/* Upsell Popup Overlay */
.cod-upsell-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 99999;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Upsell Modal */
.cod-upsell-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 20px;
    max-width: 600px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
    direction: rtl;
    text-align: right;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translate(-50%, -40%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

/* Modal Header */
.cod-upsell-header {
    padding: 30px;
    background: Black;
    color: white;
    border-radius: 20px 20px 0 0;
    text-align: center;
}

.cod-upsell-header h2 {
    color: white;
    margin: 0;
    font-size: 24px;
    font-weight: 700;
}

/* Modal Body */
.cod-upsell-body {
    padding: 30px;
}

.cod-upsell-message {
    font-size: 16px;
    line-height: 1.8;
    color: #1e293b;
    margin-bottom: 25px;
    text-align: center;
}

/* Upsell Products List */
.cod-upsell-products {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 25px;
}

.cod-upsell-product {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 14px;
    text-align: right;
    transition: all 0.2s ease;
}

.cod-upsell-product-image {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.cod-upsell-product-info {
    flex: 1;
}

.cod-upsell-product-name {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 4px;
}

.cod-upsell-product-meta {
    display: flex;
    gap: 12px;
    align-items: center;
}

.cod-upsell-product-quantity {
    font-size: 13px;
    color: #64748b;
}

/* Price row */
.cod-upsell-product-prices {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
    flex-wrap: wrap;
}

.cod-upsell-original-price {
    font-size: 12px;
    color: #94a3b8;
    text-decoration: line-through;
}

.cod-upsell-sale-price {
    font-size: 15px;
    font-weight: 700;
    color: #667eea;
}

.cod-upsell-discount-badge {
    font-size: 11px;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2px 7px;
    border-radius: 20px;
}

/* Modal Footer */
.cod-upsell-footer {
    padding: 20px 30px;
    display: flex;
    gap: 15px;
    border-top: 1px solid #e2e8f0;
}

.cod-upsell-btn-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.cod-upsell-total-note {
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    padding: 4px 10px;
    border-radius: 20px;
}

.cod-upsell-total-new {
    background: #f0fdf4;
    color: #15803d;
}

.cod-upsell-total-orig {
    background: #fef2f2;
    color: #b91c1c;
}

.cod-upsell-btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 12px;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.cod-upsell-btn-yes {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.cod-upsell-btn-yes:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
    transform: translateY(-2px);
}

.cod-upsell-btn-no {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.cod-upsell-btn-no:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    box-shadow: 0 6px 16px rgba(239, 68, 68, 0.4);
    transform: translateY(-2px);
}

/* Loading State */
.cod-upsell-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Responsive */
@media (max-width: 768px) {
    .cod-upsell-modal {
        width: 95%;
        max-height: 90vh;
    }
    
    .cod-upsell-products {
        grid-template-columns: 1fr;
    }

    .cod-upsell-footer {
        flex-direction: column;
    }

    .cod-upsell-btn-wrap {
        width: 100%;
    }
}