/* Exit Intent Donation Popup Styles */
#donation-popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(5px);
    z-index: 999999;
    animation: fadeIn 0.3s ease;
}

#donation-popup-overlay.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

.donation-popup {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 20px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.4s ease;
    border: 3px solid #2563EB;
}

/* Compact variant (default for now) */
.donation-popup.donation-popup--compact {
    max-width: 420px;
    border-radius: 14px;
    border-width: 2px;
}

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

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.donation-popup-header {
    background: linear-gradient(135deg, #2563EB 0%, #1e40af 100%);
    color: white;
    padding: 18px 18px 14px 18px;
    border-radius: 12px 12px 0 0;
    text-align: center;
    position: relative;
}

.donation-popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid white;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.donation-popup-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.donation-popup-header h2 {
    margin: 0 0 10px 0;
    font-size: 22px;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.donation-popup-header p {
    margin: 0;
    font-size: 14px;
    opacity: 0.95;
}

.donation-popup-body {
    padding: 18px;
}

.donation-amounts {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin: 12px 0 14px 0;
}

.donation-amount-btn {
    background: linear-gradient(135deg, #fff 0%, #f8fafc 100%);
    border: 3px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px;
    font-size: 18px;
    font-weight: bold;
    color: #2563EB;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.donation-amount-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(37, 99, 235, 0.1), transparent);
    transition: left 0.5s ease;
}

.donation-amount-btn:hover::before {
    left: 100%;
}

.donation-amount-btn:hover {
    border-color: #2563EB;
    background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%);
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.18);
}

.donation-amount-btn.selected {
    background: linear-gradient(135deg, #2563EB 0%, #1e40af 100%);
    color: white;
    border-color: #1e40af;
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.4);
}

.custom-amount-wrapper {
    margin: 10px 0 8px 0;
}

.custom-amount-wrapper label {
    display: block;
    color: #475569;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 13px;
}

.custom-amount-input {
    width: 100%;
    padding: 10px 12px;
    font-size: 16px;
    border: 3px solid #e2e8f0;
    border-radius: 12px;
    box-sizing: border-box;
    transition: all 0.3s ease;
    font-weight: bold;
    color: #2563EB;
}

.custom-amount-input:focus {
    outline: none;
    border-color: #2563EB;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.paypal-button-container {
    margin: 12px 0 8px 0;
    min-height: 45px;
}

.donation-popup-body .skip-donation {
    display: inline-block;
    margin-top: 8px;
    font-size: 13px;
    color: #64748b;
    text-decoration: underline;
}

.secure-badge {
    display: inline-flex;
    align-items: center;
    background: #10b981;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-top: 15px;
}

.secure-badge::before {
    content: "🔒";
    margin-right: 8px;
}

.skip-donation {
    display: inline-block;
    margin-top: 15px;
    color: #64748b;
    text-decoration: underline;
    cursor: pointer;
    font-size: 14px;
    transition: color 0.3s ease;
}

.skip-donation:hover {
    color: #475569;
}

/* Mobile Responsive */
@media (max-width: 640px) {
    .donation-popup {
        width: 95%;
        margin: 10px;
    }
    
    .donation-amounts {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .donation-popup-header h2 {
        font-size: 26px;
    }
    
    .donation-popup-body {
        padding: 30px 20px;
    }
    
    .donation-amount-btn {
        padding: 18px;
        font-size: 22px;
    }
}

/* Animation for selected state */
@keyframes pulse {
    0%, 100% {
        box-shadow: 0 10px 25px rgba(37, 99, 235, 0.4);
    }
    50% {
        box-shadow: 0 10px 35px rgba(37, 99, 235, 0.6);
    }
}

.donation-amount-btn.selected {
    animation: pulse 2s infinite;
}
