﻿/* ==========================================================================
   Popup Styles - Optimized for this project (ZarmaGold)
   ========================================================================== */

.popup-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background-color: rgba(0, 0, 0, 0.65) !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    z-index: 99999999 !important; /* بسیار بالا */
    opacity: 1 !important;
    animation: popupFadeIn 0.25s ease-out forwards !important;
    pointer-events: auto !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

.popup-content {
    background: #ffffff !important;
    border-radius: 16px !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35) !important;
    width: 92% !important;
    max-width: 420px !important;
    min-width: 300px !important;
    position: relative !important;
    z-index: 100000000 !important;
    transform: scale(0.95) !important;
    animation: popupSlideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards !important;
    margin: 20px !important;
    max-height: 92vh !important;
    overflow: hidden !important;
    direction: rtl !important;
    font-family: 'yekan-bakh', 'iranSans', 'Shabnam', tahoma !important;
}

/* انیمیشن‌های نرم و زیبا */
@keyframes popupFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes popupSlideUp {
    from {
        transform: scale(0.92) translateY(40px);
        opacity: 0;
    }

    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

/* بقیه استایل‌ها با !important */
.popup-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 1.1rem 1.25rem !important;
    border-bottom: 1px solid #eee !important;
    position: sticky !important;
    top: 0 !important;
    background: white !important;
    z-index: 2 !important;
    border-radius: 16px 16px 0 0 !important;
}

    .popup-header h3 {
        margin: 0 !important;
        font-size: 1.15rem !important;
        font-weight: 700 !important;
        color: #1f2937 !important;
    }

.popup-close {
    background: none !important;
    border: none !important;
    font-size: 1.8rem !important;
    cursor: pointer !important;
    padding: 0.4rem 0.6rem !important;
    color: #6b7280 !important;
    line-height: 1 !important;
}

    .popup-close:hover {
        color: #ef4444 !important;
    }

.popup-body {
    padding: 1.25rem !important;
    font-size: 14px !important;
    line-height: 1.6 !important;
    color: #374151 !important;
    max-height: calc(92vh - 140px) !important;
    overflow-y: auto !important;
}

.popup-footer {
    display: flex !important;
    justify-content: flex-end !important;
    padding: 1rem 1.25rem !important;
    border-top: 1px solid #f1f1f1 !important;
    gap: 10px !important;
    background: white !important;
    z-index: 2 !important;
}

/* رنگ‌بندی نوع پیام */
.popup-success .popup-header {
    background: linear-gradient(135deg, #10b981, #34d399) !important;
    color: white !important;
}

.popup-error .popup-header {
    background: linear-gradient(135deg, #ef4444, #f87171) !important;
    color: white !important;
}

.popup-warning .popup-header {
    background: linear-gradient(135deg, #f59e0b, #fbbf24) !important;
    color: #1f2937 !important;
}

.popup-info .popup-header {
    background: linear-gradient(135deg, #3b82f6, #60a5fa) !important;
    color: white !important;
}

/* بقیه کلاس‌ها */
.popup-icon {
    margin-left: 8px !important; /* چون rtl است */
    font-size: 1.3rem !important;
}

.popup-button,
.popup-copy {
    padding: 10px 18px !important;
    border-radius: 10px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    border: none !important;
    transition: all 0.2s !important;
}

.popup-copy {
    background: linear-gradient(135deg, #eab308, #facc15) !important;
    color: #1f2937 !important;
}

/* برای موبایل بهتر نمایش بده */
@media (max-width: 480px) {
    .popup-content {
        width: 96% !important;
        margin: 10px !important;
        border-radius: 14px !important;
    }
}
