/* =============================================================
   SITE NOTICES  –  /assets/css/notices.css
   ============================================================= */

/* ── Sticky wrap ──────────────────────────────────────────────── */
#site-notices-wrap {
    position: sticky;
    top: 0;
    z-index: 800;
    width: 100%;
}

/* ── Single sticky notice bar ─────────────────────────────────── */
.site-notice {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 56px 10px 56px;
    min-height: 52px;
    position: relative;
    width: 100%;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.45;
    transition: opacity .3s ease, transform .3s ease;
    overflow: hidden;
    box-sizing: border-box;
}

/* ── Body: emoji + text ───────────────────────────────────────── */
.notice-body {
    flex: 0 1 auto;
    text-align: center;
}

.notice-emoji {
    font-size: 20px;
    line-height: 1;
    display: inline;
    margin-right: 4px;
}

.notice-image {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 8px;
    border: 1.5px solid rgba(255,255,255,0.15);
    vertical-align: middle;
    margin-right: 6px;
}

@media (min-width: 600px) {
    .notice-image { width: 50px; height: 50px; }
}

.notice-text { display: inline; }
.notice-text b,
.notice-text strong { font-weight: 800; }
.notice-text i,
.notice-text em { font-style: italic; }

/* ── Sticky CTA button ────────────────────────────────────────── */
.notice-btn {
    flex: 0 0 auto;
    display: inline-block;
    padding: 7px 18px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: filter .2s ease, transform .15s ease;
}
.notice-btn:hover {
    filter: brightness(1.12);
    transform: scale(1.03);
}

/* ── Close button (sticky) ────────────────────────────────────── */
.notice-close {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.35);
    border: 1.5px solid rgba(255,255,255,0.55);
    color: #ffffff !important;
    cursor: pointer;
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    opacity: 1 !important;
    transition: background .2s ease, border-color .2s ease;
    flex-shrink: 0;
}
.notice-close:hover {
    background: rgba(0,0,0,0.6);
    border-color: rgba(255,255,255,0.9);
}

/* ── Hidden state ─────────────────────────────────────────────── */
.site-notice.notice-hidden { display: none; }


/* =============================================================
   LOAD ANIMATIONS (sticky bars)
   ============================================================= */
@keyframes notice-fadein {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}
.notice-anim-static { animation: notice-fadein .45s ease both; }

@keyframes notice-pulse {
    0%   { opacity: 0; transform: translateY(-6px) scale(.97); }
    60%  { opacity: 1; transform: translateY(0) scale(1.015); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}
.notice-anim-pulse { animation: notice-pulse .6s ease both; }

@keyframes notice-shake {
    0%   { transform: translateX(0); }
    15%  { transform: translateX(-8px); }
    30%  { transform: translateX(8px); }
    45%  { transform: translateX(-6px); }
    60%  { transform: translateX(6px); }
    75%  { transform: translateX(-3px); }
    90%  { transform: translateX(3px); }
    100% { transform: translateX(0); }
}
.notice-anim-shake {
    animation: notice-fadein .3s ease both,
    notice-shake .6s ease .32s both;
}

@keyframes notice-flash-bg {
    0%   { filter: brightness(1); }
    25%  { filter: brightness(1.45); }
    50%  { filter: brightness(1); }
    75%  { filter: brightness(1.3); }
    100% { filter: brightness(1); }
}
.notice-anim-flash {
    animation: notice-fadein .35s ease both,
    notice-flash-bg .8s ease .38s both;
}


/* =============================================================
   POP MODAL NOTICES
   ============================================================= */

/* Overlay */
.notice-modal-overlay {
    display: none; /* shown via JS */
    position: fixed;
    inset: 0;
    z-index: 9500;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

/* Entrance / exit animations */
@keyframes notice-modal-in {
    from { opacity: 0; transform: scale(.92) translateY(12px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes notice-modal-out {
    from { opacity: 1; transform: scale(1) translateY(0); }
    to   { opacity: 0; transform: scale(.92) translateY(12px); }
}

.notice-modal-visible .notice-modal-box {
    animation: notice-modal-in .32s cubic-bezier(.22,.68,0,1.2) both;
}
.notice-modal-hiding .notice-modal-box {
    animation: notice-modal-out .26s ease both;
}

/* Modal box */
.notice-modal-box {
    position: relative;
    width: 100%;
    max-width: 420px;
    border-radius: 16px;
    padding: 36px 28px 32px;
    box-shadow: 0 24px 80px rgba(0,0,0,0.65), 0 0 0 1px rgba(255,255,255,0.06);
    box-sizing: border-box;
    text-align: center;
    overflow: hidden;
}

/* Close button (modal) */
.notice-modal-close {
    position: absolute;
    top: 12px;
    right: 14px;
    background: rgba(0,0,0,0.35);
    border: 1.5px solid rgba(255,255,255,0.4);
    color: #ffffff !important;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
    transition: background .2s, border-color .2s;
    /* Override notice-close's absolute positioning from sticky context */
    transform: none;
    top: 12px;
}
.notice-modal-close:hover {
    background: rgba(0,0,0,0.6);
    border-color: rgba(255,255,255,0.85);
}

/* Emoji (shown before text in modal) */
.notice-modal-emoji {
    font-size: 36px;
    line-height: 1;
    margin-bottom: 10px;
}

/* Notice text */
.notice-modal-text {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.55;
    margin: 0 0 18px;
}
.notice-modal-text b,
.notice-modal-text strong { font-weight: 800; }
.notice-modal-text i,
.notice-modal-text em { font-style: italic; }

/* Image below text in modal */
.notice-modal-img-wrap {
    margin-bottom: 18px;
    border-radius: 10px;
    overflow: hidden;
    line-height: 0;
}
.notice-modal-img {
    width: 100%;
    max-height: 220px;
    object-fit: cover;
    border-radius: 10px;
    display: block;
}

/* Full-width CTA button */
.notice-modal-btn {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 14px 20px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    text-align: center;
    transition: filter .2s ease, transform .15s ease;
    line-height: 1.2;
}
.notice-modal-btn:hover {
    filter: brightness(1.1);
    transform: scale(1.02);
}


/* =============================================================
   MOBILE  (≤ 599px)
   ============================================================= */
@media (max-width: 599px) {
    /* Sticky bar mobile */
    .site-notice {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 12px 44px 12px 12px;
        gap: 8px;
        font-size: 13px;
        min-height: unset;
        text-align: center;
    }
    .notice-body {
        width: 100%;
        text-align: center;
    }
    .notice-btn {
        font-size: 12px;
        padding: 6px 20px;
        width: auto;
        flex: none;
    }
    .notice-close {
        top: 10px;
        transform: none;
        right: 9px;
        width: 26px;
        height: 26px;
        font-size: 13px;
    }
    .notice-image {
        width: 34px;
        height: 34px;
    }

    /* Modal mobile */
    .notice-modal-box {
        padding: 30px 18px 26px;
        max-width: 100%;
        border-radius: 14px;
    }
    .notice-modal-text {
        font-size: 14px;
    }
    .notice-modal-btn {
        font-size: 14px;
        padding: 12px 16px;
    }
}