/**
 * Frontend Styles for Smart Upsell Order Bump
 */

.su-order-bump-container {
    background: #ffffff;
    border: 2px dashed var(--su-accent, #2563eb);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
}

.su-order-bump-container:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.08);
    border-style: solid;
}

/* Header & Badges */
.su-order-bump-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 8px;
}

.su-order-bump-badge {
    background: linear-gradient(135deg, var(--su-accent, #2563eb) 0%, #1e40af 100%);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}

.su-order-bump-timer {
    display: inline-flex;
    align-items: center;
    background: #fff1f2;
    border: 1px solid #ffe4e6;
    color: #e11d48;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    animation: suPulse 2s infinite;
}

.su-timer-countdown {
    margin-left: 4px;
    font-variant-numeric: tabular-nums;
}

@keyframes suPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(225, 29, 72, 0.4);
    }
    70% {
        box-shadow: 0 0 0 6px rgba(225, 29, 72, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(225, 29, 72, 0);
    }
}

/* Body Layout */
.su-order-bump-body {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.su-order-bump-checkbox-wrapper {
    padding-top: 4px;
}

.su-order-bump-checkbox {
    width: 20px !important;
    height: 20px !important;
    margin: 0 !important;
    cursor: pointer;
    border-radius: 4px !important;
    border: 2px solid #d1d5db !important;
    transition: all 0.2s ease;
}

.su-order-bump-checkbox:checked {
    background-color: var(--su-accent, #2563eb) !important;
    border-color: var(--su-accent, #2563eb) !important;
}

.su-order-bump-image {
    width: 64px;
    height: 64px;
    flex-shrink: 0;
}

.su-order-bump-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #f3f4f6;
}

.su-order-bump-content {
    flex-grow: 1;
}

.su-order-bump-title {
    margin: 0 0 4px 0 !important;
    font-size: 15px;
    font-weight: 700;
    color: var(--su-primary, #111827);
}

.su-order-bump-description {
    margin: 0 0 8px 0 !important;
    font-size: 13px;
    color: #4b5563;
    line-height: 1.4;
}

.su-order-bump-product-title {
    margin: 0 0 6px 0 !important;
    font-size: 13px;
    color: #1f2937;
}

/* Pricing */
.su-order-bump-pricing {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.su-price-regular {
    text-decoration: line-through;
    color: #9ca3af;
    font-size: 12px;
}

.su-price-sale {
    color: var(--su-accent, #2563eb);
    font-weight: 700;
    font-size: 16px;
}

/* Footer & CTA */
.su-order-bump-footer {
    margin-top: 14px;
    border-top: 1px solid #f3f4f6;
    padding-top: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.su-order-bump-label {
    cursor: pointer;
    display: inline-block;
    width: 100%;
}

.su-order-bump-cta {
    font-size: 13px;
    font-weight: 600;
    color: var(--su-accent, #2563eb);
    transition: color 0.2s ease;
}

.su-order-bump-cta:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

.su-order-bump-disclaimer {
    margin-top: 8px;
    font-size: 11px;
    color: #9ca3af;
    line-height: 1.3;
}

/* Loading Shimmer State */
.su-loading {
    opacity: 0.6;
    pointer-events: none;
}

.su-loading::after {
    content: "";
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.6) 50%, rgba(255,255,255,0) 100%);
    background-size: 200% 100%;
    animation: suShimmer 1.5s infinite;
}

@keyframes suShimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@media (max-width: 480px) {
    .su-order-bump-body {
        flex-direction: column;
        gap: 12px;
    }
    .su-order-bump-image {
        width: 100%;
        height: 120px;
    }
    .su-order-bump-image img {
        object-fit: contain;
    }
}

/* Cart Upsell Styling */
.su-cart-upsell-container {
    background: #fbfbfb;
    border: 1.5px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.su-cart-upsell-container:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
    border-color: var(--su-accent, #2563eb);
}

.su-cart-upsell-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    flex-wrap: wrap;
    gap: 8px;
}

.su-cart-upsell-badge {
    background-color: #eff6ff;
    color: var(--su-accent, #2563eb);
    border: 1px solid #dbeafe;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 6px;
    letter-spacing: 0.5px;
}

.su-cart-upsell-timer {
    display: inline-flex;
    align-items: center;
    background: #fff1f2;
    border: 1px solid #ffe4e6;
    color: #e11d48;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    animation: suPulse 2s infinite;
}

.su-cart-upsell-body {
    display: flex;
    gap: 20px;
    align-items: center;
}

.su-cart-upsell-image {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
}

.su-cart-upsell-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.su-cart-upsell-content {
    flex-grow: 1;
}

.su-cart-upsell-title {
    margin: 0 0 4px 0 !important;
    font-size: 18px;
    font-weight: 700;
    color: var(--su-primary, #111827);
}

.su-cart-upsell-description {
    margin: 0 0 10px 0 !important;
    font-size: 13px;
    color: #6b7280;
    line-height: 1.4;
}

.su-cart-upsell-product-name {
    margin: 0 0 12px 0 !important;
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
}

.su-cart-upsell-pricing-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.su-cart-upsell-pricing {
    display: flex;
    align-items: center;
    gap: 8px;
}

.su-cart-upsell-button {
    background-color: var(--su-accent, #2563eb);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px rgba(37, 99, 235, 0.15);
}

.su-cart-upsell-button:hover {
    background-color: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(37, 99, 235, 0.2);
}

.su-cart-upsell-button:active {
    transform: translateY(0);
}

.su-cart-upsell-disclaimer {
    margin-top: 14px;
    font-size: 11px;
    color: #9ca3af;
    line-height: 1.3;
    border-top: 1px solid #f3f4f6;
    padding-top: 8px;
}

@media (max-width: 600px) {
    .su-cart-upsell-body {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .su-cart-upsell-image {
        width: 100%;
        height: 140px;
    }
    .su-cart-upsell-image img {
        object-fit: contain;
    }
    .su-cart-upsell-pricing-row {
        width: 100%;
        justify-content: space-between;
    }
}

/* Post-Purchase Styling */
.su-postpurchase-container {
    background: #ffffff;
    border: 3px solid #e11d48;
    border-radius: 16px;
    margin: 30px 0;
    box-shadow: 0 10px 30px rgba(225, 29, 72, 0.08);
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

.su-postpurchase-container:hover {
    box-shadow: 0 15px 40px rgba(225, 29, 72, 0.15);
}

.su-postpurchase-banner {
    background: linear-gradient(90deg, #e11d48 0%, #be123c 100%);
    color: #ffffff;
    text-align: center;
    padding: 12px;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.su-postpurchase-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 20px 0 20px;
    flex-wrap: wrap;
    gap: 8px;
}

.su-postpurchase-badge {
    background-color: #ffe4e6;
    color: #e11d48;
    border: 1px solid #fecdd3;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 6px;
    letter-spacing: 0.5px;
}

.su-postpurchase-timer {
    display: inline-flex;
    align-items: center;
    background: #fff1f2;
    border: 1px solid #ffe4e6;
    color: #e11d48;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    animation: suPulse 2s infinite;
}

.su-postpurchase-body {
    display: flex;
    gap: 24px;
    padding: 20px;
    align-items: center;
}

.su-postpurchase-image {
    width: 120px;
    height: 120px;
    flex-shrink: 0;
}

.su-postpurchase-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.su-postpurchase-content {
    flex-grow: 1;
}

.su-postpurchase-title {
    margin: 0 0 6px 0 !important;
    font-size: 20px;
    font-weight: 800;
    color: var(--su-primary, #111827);
}

.su-postpurchase-description {
    margin: 0 0 12px 0 !important;
    font-size: 14px;
    color: #4b5563;
    line-height: 1.4;
}

.su-postpurchase-product-name {
    margin: 0 0 10px 0 !important;
    font-size: 15px;
    font-weight: 700;
    color: #1f2937;
}

.su-postpurchase-pricing-row {
    margin-bottom: 12px;
}

.su-postpurchase-pricing {
    display: flex;
    align-items: center;
    gap: 10px;
}

.su-postpurchase-notice {
    background-color: #f9fafb;
    border-left: 4px solid #9ca3af;
    padding: 10px 14px;
    border-radius: 0 8px 8px 0;
}

.su-postpurchase-notice p {
    margin: 0 !important;
    font-size: 12.5px;
    color: #4b5563;
    line-height: 1.4;
}

.su-oneclick-info {
    border-color: #10b981;
}

.su-postpurchase-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 0 20px 20px 20px;
    border-top: 1px solid #f3f4f6;
    padding-top: 20px;
}

.su-postpurchase-btn-accept {
    background-color: #10b981;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 14px 40px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.su-postpurchase-btn-accept:hover {
    background-color: #059669;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.3);
}

.su-postpurchase-button-decline {
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 13px;
    cursor: pointer;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.su-postpurchase-button-decline:hover {
    color: #4b5563;
}

.su-postpurchase-disclaimer {
    background-color: #f9fafb;
    padding: 12px 20px;
    font-size: 11px;
    color: #9ca3af;
    line-height: 1.4;
    text-align: center;
    border-top: 1px solid #f3f4f6;
}

@media (max-width: 600px) {
    .su-postpurchase-body {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    .su-postpurchase-image {
        width: 100%;
        height: 160px;
    }
    .su-postpurchase-image img {
        object-fit: contain;
    }
    .su-postpurchase-btn-accept {
        width: 100%;
    }
}
