/* ── ff notices ────────────────────────────────────────────────────────── */

/* Banner: lives at the top of <body>, pushes everything down naturally
   so a sticky header still sticks to the top of the visible viewport
   (below the banner). */

.ff-notice {
    position: relative;
    width: 100%;
    padding: 12px 48px 12px 16px;       /* extra right padding for the close button */
    box-sizing: border-box;
    font-family: var(--fnf-font-body, system-ui, sans-serif);
    font-size: 14px;
    line-height: 1.4;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    animation: ff-notice-slide-in 0.25s ease-out;
}
.ff-notice--leaving {
    animation: ff-notice-slide-out 0.2s ease-in forwards;
}

@keyframes ff-notice-slide-in {
    from { transform: translateY(-100%); opacity: 0; }
    to   { transform: translateY(0);     opacity: 1; }
}
@keyframes ff-notice-slide-out {
    from { transform: translateY(0);     opacity: 1; }
    to   { transform: translateY(-100%); opacity: 0; }
}

/* Severity color schemes */
.ff-notice--info {
    background: var(--fnf-color-primary, #4f46e5);
    color: var(--fnf-color-primary-contrast, #fff);
}
.ff-notice--warning {
    background: #fef3c7;
    color: #78350f;
    border-bottom-color: #f59e0b;
}
.ff-notice--critical {
    background: #fee2e2;
    color: #7f1d1d;
    border-bottom-color: #dc2626;
}

/* Belt-and-suspenders: keep every banner's text on that banner's own color
   (auto-contrast on the colored "info" variant), so a published site's global
   `h1–h6` / `a` color rules can't leak in. The title is a <strong> today, but
   this keeps it bulletproof if it ever becomes a heading. Mirrors the theme's
   `.fnf-section--bg-primary h1–h6 { color: inherit }` fix. */
.ff-notice h1, .ff-notice h2, .ff-notice h3,
.ff-notice h4, .ff-notice h5, .ff-notice h6,
.ff-notice strong, .ff-notice a { color: inherit; }

.ff-notice__inner {
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.ff-notice__icon {
    flex: 0 0 auto;
    font-size: 18px;
}

.ff-notice__text {
    flex: 1 1 auto;
    min-width: 0;
}

.ff-notice__body {
    margin-left: 6px;
    opacity: 0.9;
    font-weight: normal;
}

.ff-notice__cta {
    flex: 0 0 auto;
    padding: 4px 12px;
    border-radius: 4px;
    background: rgba(255,255,255,0.2);
    color: inherit;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    border: 1px solid rgba(255,255,255,0.4);
    transition: background 0.15s;
}
.ff-notice__cta:hover {
    background: rgba(255,255,255,0.3);
    color: inherit;
}
.ff-notice--warning .ff-notice__cta,
.ff-notice--critical .ff-notice__cta {
    background: rgba(0,0,0,0.08);
    border-color: rgba(0,0,0,0.15);
}
.ff-notice--warning .ff-notice__cta:hover,
.ff-notice--critical .ff-notice__cta:hover {
    background: rgba(0,0,0,0.15);
}

.ff-notice__close {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: inherit;
    font-size: 22px;
    line-height: 1;
    padding: 4px 8px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.15s;
}
.ff-notice__close:hover { opacity: 1; }

/* ── Popup modal ───────────────────────────────────────────────────────── */

.ff-notice-popup-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: ff-notice-popup-fade-in 0.2s ease-out;
}
.ff-notice-popup-backdrop.ff-notice-popup--leaving {
    animation: ff-notice-popup-fade-out 0.2s ease-in forwards;
}
@keyframes ff-notice-popup-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes ff-notice-popup-fade-out {
    from { opacity: 1; }
    to   { opacity: 0; }
}

.ff-notice-popup {
    position: relative;
    max-width: 480px;
    width: 100%;
    background: #fff;
    border-radius: 12px;
    padding: 32px 28px 24px;
    box-shadow: 0 16px 48px rgba(0,0,0,0.25);
    text-align: center;
    font-family: var(--fnf-font-body, system-ui, sans-serif);
    color: var(--fnf-color-text, #1f1f24);
}

.ff-notice-popup--info     { border-top: 4px solid var(--fnf-color-primary, #4f46e5); }
.ff-notice-popup--warning  { border-top: 4px solid #f59e0b; }
.ff-notice-popup--critical { border-top: 4px solid #dc2626; }

.ff-notice-popup__close {
    position: absolute;
    top: 8px;
    right: 12px;
    background: transparent;
    border: none;
    font-size: 22px;
    line-height: 1;
    color: #9ca3af;
    cursor: pointer;
    padding: 4px 8px;
}
.ff-notice-popup__close:hover { color: #4b5563; }

.ff-notice-popup__icon {
    font-size: 36px;
    margin-bottom: 8px;
    display: block;
}
.ff-notice-popup--info     .ff-notice-popup__icon { color: var(--fnf-color-primary, #4f46e5); }
.ff-notice-popup--warning  .ff-notice-popup__icon { color: #f59e0b; }
.ff-notice-popup--critical .ff-notice-popup__icon { color: #dc2626; }

.ff-notice-popup__title {
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 700;
    font-family: var(--fnf-font-heading, var(--fnf-font-body, system-ui, sans-serif));
}

.ff-notice-popup__body {
    margin: 0 0 20px;
    font-size: 15px;
    line-height: 1.5;
    color: #4b5563;
}

.ff-notice-popup__cta {
    display: inline-block;
    padding: 10px 24px;
    background: var(--fnf-color-primary, #4f46e5);
    color: var(--fnf-color-primary-contrast, #fff);
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: filter 0.15s;
}
.ff-notice-popup__cta:hover {
    filter: brightness(1.05);
    color: var(--fnf-color-primary-contrast, #fff);
}
