/* ==========================================================
   Admin-controlled promotional popup (group registration +
   sponsorship request). Shown on site load.
   ========================================================== */

.promo-popup-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    background: rgba(8, 17, 30, .55);
    backdrop-filter: blur(4px);
    animation: promoFade .25s ease;
}

/* The [hidden] attribute must win over display:flex above, otherwise the
   overlay stays visible/painted even before the script decides to show it. */
.promo-popup-overlay[hidden] { display: none; }

body.promo-popup-open { overflow: hidden; }

@keyframes promoFade {
    from { opacity: 0; }
    to { opacity: 1; }
}

.promo-popup {
    position: relative;
    width: 100%;
    max-width: 460px;
    background: linear-gradient(180deg, #ffffff 0%, #f7f9fe 100%);
    border: 1px solid rgba(201, 162, 39, .25);
    border-radius: 22px;
    padding: 2.2rem 1.9rem 1.9rem;
    text-align: center;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .8),
        0 24px 50px rgba(8, 17, 30, .3),
        0 8px 18px rgba(8, 17, 30, .18);
    animation: promoPop .3s cubic-bezier(.2, .8, .3, 1);
}

@keyframes promoPop {
    from { opacity: 0; transform: translateY(14px) scale(.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.promo-popup-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 10px;
    background: #f1f4fa;
    color: #475569;
    font-size: 1.1rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background .15s ease, color .15s ease, transform .1s ease;
}
.promo-popup-close:hover { background: #e2e8f3; color: #0B3B5C; transform: rotate(90deg); }

.promo-popup-badge {
    width: 62px;
    height: 62px;
    margin: 0 auto 1rem;
    border-radius: 18px;
    display: grid;
    place-items: center;
    font-size: 1.9rem;
    color: #1a1330;
    background: linear-gradient(180deg, #f2d675 0%, #C9A227 100%);
    box-shadow: 0 4px 0 #9c7b14, 0 14px 26px rgba(201, 162, 39, .4), inset 0 1px 0 rgba(255, 255, 255, .5);
}

.promo-popup-title {
    margin: 0 0 .6rem;
    font-family: 'Playfair Display', Georgia, serif;
    color: #0B3B5C;
    font-size: 1.4rem;
    font-weight: 700;
}

.promo-popup-message {
    margin: 0 0 1.4rem;
    color: #55607a;
    font-size: .96rem;
    line-height: 1.55;
}

.promo-popup-actions {
    display: flex;
    gap: .75rem;
    flex-wrap: wrap;
    justify-content: center;
}

.promo-popup-btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .7rem 1.2rem;
    border-radius: 12px;
    font-weight: 700;
    font-size: .92rem;
    text-decoration: none;
    line-height: 1;
    transition: transform .15s cubic-bezier(.2, .7, .3, 1), box-shadow .2s ease, filter .2s ease;
}
.promo-popup-btn:hover { transform: translateY(-2px); filter: brightness(1.03); }
.promo-popup-btn:active { transform: translateY(1px); }

.promo-popup-btn-primary {
    background: linear-gradient(180deg, #0e4a75 0%, #0B3B5C 100%);
    color: #fff;
    box-shadow: 0 3px 0 #06293f, 0 10px 22px rgba(11, 59, 92, .35), inset 0 1px 0 rgba(255, 255, 255, .2);
}
.promo-popup-btn-gold {
    background: linear-gradient(180deg, #e3bf4b 0%, #C9A227 100%);
    color: #1a1330;
    box-shadow: 0 3px 0 #9c7b14, 0 10px 22px rgba(201, 162, 39, .35), inset 0 1px 0 rgba(255, 255, 255, .45);
}

@media (max-width: 420px) {
    .promo-popup-actions { flex-direction: column; }
    .promo-popup-btn { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
    .promo-popup-overlay, .promo-popup { animation: none; }
    .promo-popup-btn, .promo-popup-close { transition: none; }
}
