/**
 * COD Express - Upsell Styles
 * @package COD_Express
 */

/* Upsell Popup */
.cod-express-upsell-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.cod-express-upsell-popup .upsell-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
}

.cod-express-upsell-popup .upsell-content {
    position: relative;
    background: #fff;
    border-radius: 16px;
    max-width: 480px;
    width: 100%;
    padding: 32px;
    text-align: center;
    animation: upsellBounce 0.5s ease;
}

@keyframes upsellBounce {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }

    50% {
        transform: scale(1.02);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.upsell-headline {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 24px;
    color: #1f2937;
}

.upsell-product {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: #f9fafb;
    border-radius: 12px;
    margin-bottom: 24px;
    text-align: left;
}

.upsell-product .product-image img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
}

.upsell-product .product-name {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 8px;
}

.upsell-product .product-desc {
    font-size: 14px;
    color: #6b7280;
    margin: 0 0 12px;
}

.upsell-product .product-price {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.upsell-product .original-price {
    text-decoration: line-through;
    color: #9ca3af;
    font-size: 16px;
}

.upsell-product .discount-price {
    font-size: 22px;
    font-weight: 700;
    color: #16a34a;
}

.upsell-product .savings {
    background: #fef3c7;
    color: #b45309;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.upsell-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.upsell-accept-btn {
    padding: 16px 24px;
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
}

.upsell-accept-btn:hover {
    transform: scale(1.02);
}

.upsell-decline-btn {
    padding: 12px 24px;
    background: transparent;
    color: #6b7280;
    border: none;
    font-size: 14px;
    cursor: pointer;
    text-decoration: underline;
}

.upsell-decline-btn:hover {
    color: #374151;
}

/* Inline Upsell */
.cod-express-upsell-inline {
    border: 2px dashed #e5e7eb;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 20px;
    transition: border-color 0.2s, background 0.2s;
}

.cod-express-upsell-inline:has(input:checked) {
    border-color: #16a34a;
    background: #f0fdf4;
}

.upsell-checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.upsell-checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: #16a34a;
}

.upsell-product-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.upsell-product-info img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 6px;
}

.upsell-product-info .product-name {
    font-weight: 600;
    flex: 1;
}

.upsell-product-info .product-price {
    font-weight: 700;
    color: #16a34a;
}

.upsell-product-info .product-savings {
    background: #fef3c7;
    color: #b45309;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
}

/* Downsell styling */
.cod-express-upsell-popup.downsell .upsell-headline {
    color: #dc2626;
}

.cod-express-upsell-popup.downsell .upsell-accept-btn {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
}

/* Responsive */
@media (max-width: 480px) {
    .upsell-content {
        padding: 24px 16px;
    }

    .upsell-product {
        flex-direction: column;
        text-align: center;
    }

    .upsell-product .product-price {
        justify-content: center;
    }
}