/**
 * Site-wide announcement bar. See includes/announcement-bar.php.
 *
 * The bar sits in normal flow at the very top of the body, and deliberately does
 * NOT reposition the site header. The Elementor header is a *sticky* (position:
 * relative at rest, only becoming fixed once you scroll past it), so in-flow the
 * bar simply pushes it down, and Elementor pins the nav to the top edge at the
 * moment the bar has scrolled out of view. Offsetting the header here would shove
 * the relative-positioned nav down and open a gap beneath the bar.
 */

.qc-announce {
    /*
     * A shade deeper than the nav's own #28465a: the site header is the same
     * Prussian blue, so an exact match would fuse the two into one dark block and
     * the bar would stop reading as a separate strip. The hairline below does the
     * rest of the separating.
     */
    --qc-announce-bg: #1e3849;
    --qc-announce-fg: #ffffff;
    --qc-announce-accent: #ff914d; /* signal orange */

    position: relative;
    z-index: 201; /* above the Elementor header (200) */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 44px;
    padding: 8px 48px 8px 20px; /* right padding leaves room for the ✕ */
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    background: var(--qc-announce-bg);
    color: var(--qc-announce-fg);
    font-family: "Open Sans", system-ui, sans-serif;
    font-size: 14px;
    line-height: 1.4;
    text-align: center;
}

.qc-announce--teal {
    --qc-announce-bg: #3ca5aa;
    --qc-announce-accent: #ffffff;
}

.qc-announce--orange {
    --qc-announce-bg: #ff914d;
    --qc-announce-accent: #ffffff;
}

.qc-announce__inner {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px 14px;
    max-width: 1080px;
}

.qc-announce__pill {
    flex: none;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    color: var(--qc-announce-fg);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    white-space: nowrap;
}

.qc-announce__text {
    font-weight: 600;
}

/* Inline links inside the message — underlined so they read as links on a solid bar. */
.qc-announce__text a {
    color: var(--qc-announce-fg);
    text-decoration: underline;
    text-underline-offset: 2px;
    text-decoration-thickness: 1px;
}

.qc-announce__text a:hover,
.qc-announce__text a:focus-visible {
    color: var(--qc-announce-accent);
}

/* The site's pill-button convention. */
.qc-announce__cta {
    flex: none;
    padding: 6px 16px;
    border: 1.5px solid rgba(255, 255, 255, 0.5);
    border-radius: 999px;
    background: transparent;
    color: var(--qc-announce-fg);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.qc-announce__cta:hover,
.qc-announce__cta:focus-visible {
    border-color: #ffffff;
    background: #ffffff;
    color: var(--qc-announce-bg);
}

.qc-announce button.qc-announce__close {
    position: absolute;
    -webkit-appearance: none;
    appearance: none;
    top: 50%;
    right: 12px;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    padding: 0;
    transform: translateY(-50%);
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--qc-announce-fg);
    opacity: 0.7;
    cursor: pointer;
    transition: opacity 0.18s ease, background-color 0.18s ease;
}

.qc-announce button.qc-announce__close:hover,
.qc-announce button.qc-announce__close:focus-visible {
    background: rgba(255, 255, 255, 0.14);
    opacity: 1;
}

/* Keyboard focus must stay visible against the solid background. */
.qc-announce a:focus-visible,
.qc-announce button:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

/* Hidden by the visitor, or by the script before paint. */
.qc-announce[hidden] {
    display: none;
}

@media (max-width: 782px) {
    .qc-announce {
        gap: 8px;
        padding: 8px 44px 8px 14px;
        font-size: 13px;
    }

    .qc-announce__inner {
        gap: 8px 10px;
    }

    .qc-announce__cta {
        padding: 5px 14px;
        font-size: 12px;
    }
}

/* On the narrowest screens the message earns the space before the pill does. */
@media (max-width: 480px) {
    .qc-announce__pill {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .qc-announce__cta,
    .qc-announce button.qc-announce__close {
        transition: none;
    }
}
