/* Bale Hub Pro - Advanced Popup Styles */

/* ==========================================
   BASE
   ========================================== */
.bhp-popup-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    direction: rtl;
    font-family: 'Vazirmatn', system-ui, sans-serif;
    padding: 20px;
}

.bhp-popup-overlay.active { display: flex; }

.bhp-popup-box {
    position: relative;
    max-width: 480px;
    width: 100%;
    border-radius: 24px;
    padding: 48px 36px 36px;
    text-align: center;
    box-shadow: 0 25px 80px rgba(0,0,0,0.4);
}

/* ==========================================
   ANIMATIONS
   ========================================== */
.bhp-anim-fadeIn .bhp-popup-box { animation: bhpFadeIn 0.5s ease; }
.bhp-anim-slideUp .bhp-popup-box { animation: bhpSlideUp 0.5s cubic-bezier(0.34, 1.56, 0.64, 1); }
.bhp-anim-bounce .bhp-popup-box { animation: bhpBounce 0.6s ease; }
.bhp-anim-flip .bhp-popup-box { animation: bhpFlip 0.6s ease; }

@keyframes bhpFadeIn { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: scale(1); } }
@keyframes bhpSlideUp { from { opacity: 0; transform: translateY(60px); } to { opacity: 1; transform: translateY(0); } }
@keyframes bhpBounce { 0% { opacity: 0; transform: scale(0.3); } 50% { transform: scale(1.05); } 70% { transform: scale(0.9); } 100% { opacity: 1; transform: scale(1); } }
@keyframes bhpFlip { from { opacity: 0; transform: perspective(600px) rotateY(-90deg); } to { opacity: 1; transform: perspective(600px) rotateY(0); } }
@keyframes bhpPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }

/* ==========================================
   CLOSE BUTTON
   ========================================== */
.bhp-popup-close {
    position: absolute;
    top: 14px;
    left: 14px;
    width: 36px; height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,0.05);
    cursor: pointer;
    font-size: 18px;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    z-index: 2;
}
.bhp-popup-close:hover { background: rgba(239,68,68,0.1); color: #dc2626; transform: rotate(90deg); }

/* ==========================================
   TEMPLATE: MODERN
   ========================================== */
.bhp-template-modern { background: #fff; }
.bhp-popup-icon-modern { font-size: 64px; margin-bottom: 20px; animation: bhpFloat 3s ease-in-out infinite; }
.bhp-popup-title { font-size: 24px; font-weight: 900; color: #1e293b; margin-bottom: 10px; line-height: 1.3; }
.bhp-popup-subtitle { font-size: 15px; color: #64748b; margin-bottom: 28px; line-height: 1.7; }

@keyframes bhpFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* ==========================================
   TEMPLATE: GLASS
   ========================================== */
.bhp-template-glass {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
}
.bhp-popup-glass-bg {
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: linear-gradient(45deg, rgba(99,102,241,0.3), rgba(139,92,246,0.3), rgba(16,185,129,0.2));
    animation: bhpGlassRotate 10s linear infinite;
    border-radius: 40%;
    z-index: 0;
}
@keyframes bhpGlassRotate { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.bhp-template-glass > * { position: relative; z-index: 1; }
.bhp-popup-icon-glass { font-size: 48px; margin-bottom: 16px; filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3)); }
.bhp-popup-title-glass { font-size: 24px; font-weight: 900; margin-bottom: 10px; text-shadow: 0 2px 10px rgba(0,0,0,0.3); }
.bhp-popup-subtitle-glass { font-size: 15px; opacity: 0.9; margin-bottom: 28px; }

/* ==========================================
   TEMPLATE: MINIMAL
   ========================================== */
.bhp-template-minimal { background: #fff; padding: 50px 40px 40px; }
.bhp-popup-icon-minimal { font-size: 72px; margin-bottom: 16px; }
.bhp-popup-title-minimal { font-size: 20px; font-weight: 700; color: #1e293b; margin-bottom: 8px; }
.bhp-popup-subtitle-minimal { font-size: 14px; color: #94a3b8; margin-bottom: 24px; }

/* ==========================================
   BUTTONS
   ========================================== */
.bhp-popup-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 36px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 8px;
}

.bhp-btn-gradient {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    box-shadow: 0 8px 30px rgba(99,102,241,0.4);
}
.bhp-btn-gradient:hover { transform: translateY(-3px); box-shadow: 0 12px 40px rgba(99,102,241,0.6); color: #fff; }

.bhp-btn-glass {
    background: rgba(255,255,255,0.2);
    color: #fff;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.3);
}
.bhp-btn-glass:hover { background: rgba(255,255,255,0.3); transform: translateY(-3px); color: #fff; }

.bhp-btn-minimal {
    background: #1e293b;
    color: #fff;
    border-radius: 12px;
}
.bhp-btn-minimal:hover { background: #334155; transform: scale(1.03); color: #fff; }

/* ==========================================
   COUNTDOWN
   ========================================== */
.bhp-countdown {
    display: inline-block;
    background: #fef3c7;
    color: #d97706;
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 20px;
    animation: bhpPulse 2s infinite;
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 600px) {
    .bhp-popup-box { padding: 36px 24px 28px; border-radius: 20px; }
    .bhp-popup-title, .bhp-popup-title-glass { font-size: 20px; }
    .bhp-popup-btn { padding: 14px 28px; font-size: 15px; }
    .bhp-popup-icon-modern { font-size: 48px; }
}