/*
 * Admin-controlled popup notice — supports stacked banners (up to 3).
 * Anchored to the TOP of the viewport (below the navbar). Stays in place
 * regardless of scroll. NO backdrop dim/blur — page stays fully visible
 * and interactive behind the cards.
 */
.hai-popup {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 14px;
    padding: clamp(96px, 11vh, 128px) 20px 20px;
    pointer-events: none; /* page underneath remains clickable */
    overflow-y: auto;
}

.hai-popup[hidden] {
    display: none;
}

/* Backdrop element retained in DOM for compat, but visually nothing and
   does not capture pointer events — page underneath is fully usable. */
.hai-popup__backdrop {
    display: none;
}

.hai-popup__card {
    position: relative;
    background: #ffffff;
    color: #0f1724;
    border-radius: 14px;
    padding: 44px 44px 36px;
    max-width: 720px;
    width: 100%;
    border: 1px solid rgba(15, 23, 36, 0.08);
    box-shadow: 0 12px 36px -10px rgba(0, 0, 0, 0.18);
    pointer-events: auto;
    animation: haiPopupIn 0.25s ease-out;
}

@keyframes haiPopupIn {
    from { opacity: 0; transform: translateY(-16px); }
    to   { opacity: 1; transform: none; }
}

.hai-popup__head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 0 36px 14px 0;
}

.hai-popup__icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2563eb;
}

.hai-popup__icon svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

.hai-popup__card[data-style="success"] .hai-popup__icon { color: #059669; }
.hai-popup__card[data-style="warning"] .hai-popup__icon { color: #d97706; }
.hai-popup__card[data-style="dark"]    .hai-popup__icon { color: #0f1724; }

.hai-popup__title {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.35;
    color: #0f1724;
    margin: 2px 0 0;
    letter-spacing: -0.01em;
}

.hai-popup__body {
    font-size: 16px;
    line-height: 1.75;
    color: #334155;
    white-space: pre-wrap;
    margin: 0 0 28px;
}

.hai-popup__body[hidden] {
    display: none;
}

.hai-popup__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.hai-popup__cta {
    display: inline-block;
    background: #2563eb;
    color: #ffffff;
    text-decoration: none;
    padding: 11px 22px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
}

.hai-popup__cta[hidden] {
    display: none;
}

.hai-popup__card[data-style="success"] .hai-popup__cta { background: #059669; }
.hai-popup__card[data-style="warning"] .hai-popup__cta { background: #d97706; }
.hai-popup__card[data-style="dark"]    .hai-popup__cta { background: #0f1724; }

.hai-popup__hide-today {
    background: transparent;
    border: none;
    color: #64748b;
    padding: 8px 4px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    text-decoration: underline;
    text-underline-offset: 3px;
    white-space: nowrap;
}

.hai-popup__hide-today:hover {
    color: #0f1724;
}

.hai-popup__close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    border-radius: 50%;
    color: #94a3b8;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hai-popup__close:hover {
    background: rgba(15, 23, 36, 0.06);
    color: #0f1724;
}

@media (max-width: 768px) {
    .hai-popup {
        padding-top: clamp(80px, 12vh, 110px);
    }
}

@media (max-width: 480px) {
    .hai-popup__card {
        padding: 30px 24px 24px;
    }
    .hai-popup__title {
        font-size: 18px;
    }
    .hai-popup__body {
        font-size: 14.5px;
    }
    .hai-popup__footer {
        flex-direction: column-reverse;
        align-items: stretch;
    }
    .hai-popup__cta {
        width: 100%;
        text-align: center;
    }
    .hai-popup__hide-today {
        text-align: center;
    }
}
