/* Announcements bar — YMCA 2026 Option B (Hero Announcements B, node 56:608)
   Light lavender (#f2e5f2) notice strip that sits between the menu and the hero
   photo. Built from core blocks (group + ymca/icon + paragraphs + buttons). */

:where(.bmg-announcements) {
    background: var(--accent-1); /* purple-tint #f2e5f2 */
    color: var(--black);
}

/* Content rides in the same 1240px container as the header/content sections
   (at the comp's 1440 frame, 100px side padding ≡ this centered cap). The
   lavender band itself stays full-bleed via .bmg-announcements. */
.bmg-announcements__inner {
    box-sizing: border-box;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 14px;
    min-height: 92px;
    margin-left: auto;
    margin-right: auto;
    padding: 16px 80px;
}

/* keep breathing room once the viewport nears the 1240 cap */
@media (max-width: 1280px) {
    .bmg-announcements__inner {
        padding: 16px 20px;
    }
}

/* circle-exclamation icon (ymca/icon block) */
.bmg-announcements .wp-block-ymca-icon {
    margin: 0;
    flex: none;
}

/* label + body text stacked vertically next to the icon */
.bmg-announcements__copy {
    max-width: 100%;
    flex: none;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.bmg-announcements__label {
    margin: 0;
    white-space: nowrap;
}

.bmg-announcements__label:not(.has-heading-font-family) {
    font-family: var(--font-heading);
    font-size: 19px;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.15;
    text-transform: uppercase;
}

.bmg-announcements__text {
    margin: 0;
}

.bmg-announcements__text:not(.has-body-font-family) {
    font-size: 16px;
    line-height: 1.2;
}

/* link + close cluster, pushed to the right.
   Scoped to the inner row so it beats core's `.is-layout-flex > *{margin:0}`
   reset (equal-specificity shorthand would otherwise zero the auto margin). */
.bmg-announcements__inner > .bmg-announcements__actions {
    margin-left: auto;
    flex: none;
    align-items: center;
    gap: 24px;
}

/* "Learn More" renders as a filled Button B Secondary (purple-dk) via
   is-style-bmg-secondary in the markup — no extra styling needed here. */
.bmg-announcements__link .wp-block-button__link {
    white-space: nowrap;
}

/* dismiss "X" — core button reset; label hidden for SR, X drawn via mask in
   purple-dk to match the comp. */
.bmg-announcements__close .wp-block-button__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    min-height: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    font-size: 0;
    line-height: 0;
    color: transparent;
    cursor: pointer;
}

.bmg-announcements__close .wp-block-button__link:hover {
    background: transparent;
    border: 0;
}

.bmg-announcements__close .wp-block-button__link::after {
    content: "";
    display: block;
    width: 24px;
    height: 24px;
    background: var(--primary-dk);
    -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><path fill="black" d="M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z"/></svg>');
    mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><path fill="black" d="M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z"/></svg>');
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-position: center;
    mask-position: center;
}

/* tablet/mobile (out of 2026 desktop scope — keep usable) */
@media (max-width: 992px) {
    .bmg-announcements__inner {
        padding: 14px 20px !important;
        flex-wrap: wrap;
    }

    .bmg-announcements__inner > .bmg-announcements__actions {
        width: 100%;
        margin-left: 0 !important;
        justify-content: space-between;
    }

    .bmg-announcements__copy {
        flex: 0 0 85%;
    }
}
