.announcement-bar {
    background: var(--ann-bg);
    color: var(--ann-color);
    padding: 10px 0;
    overflow: hidden;
    position: relative;
    z-index: 1001;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    display: flex;
    align-items: center;
}

/* Prev/next controls. Each one grows into everything the message leaves free,
   which parks its single chevron against the far edge of the bar and keeps the
   message centred between them. */
.announcement-nav {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    align-items: center;
    overflow: hidden;
    margin: 0;
    padding: 0 var(--opsim-space-lg, 24px);
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    cursor: pointer;
    opacity: 0.65;
    transition: opacity 0.25s ease;
    -webkit-tap-highlight-color: transparent;
}
.announcement-nav--prev { justify-content: flex-start; }
.announcement-nav--next { justify-content: flex-end; }
.announcement-nav svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}
.announcement-nav:hover:not(:disabled),
.announcement-nav:focus-visible { opacity: 1; }
.announcement-nav:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: -2px;
}
.announcement-nav:disabled { cursor: default; }

/* --ann-text-gap is the breathing room between the message and the arrows. */
.announcement-container-full {
    flex: 0 1 auto;
    min-width: 0;
    padding: 0 var(--ann-text-gap, 28px);
}
.announcement-rotate {
    position: relative;
    overflow: hidden;
}
.announcement-rotate-sizer {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 1.4em;
    white-space: nowrap;
    visibility: hidden;
}
.announcement-rotate-item {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    white-space: nowrap;
    opacity: 0;
    transform: translateY(calc(100% * var(--ann-dir, 1)));
    /* visibility flips only once the fade has finished, so the animation is
       unchanged — but a message that is not showing is no longer rendered,
       read out by screen readers, or measured mid-fade as low-contrast text. */
    visibility: hidden;
    transition: opacity 0.4s ease, transform 0.4s ease, visibility 0s linear 0.4s;
}
.announcement-icon,
.announcement-flag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    line-height: 1;
}
.announcement-icon svg,
.announcement-flag svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    display: block;
}
.announcement-icon--flag svg,
.announcement-flag svg {
    width: 18px;
    height: auto;
    aspect-ratio: 28 / 20;
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}
.announcement-rotate-item.is-active {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
    transition-delay: 0s;
}
.announcement-rotate-item.is-out {
    opacity: 0;
    transform: translateY(calc(-100% * var(--ann-dir, 1)));
}
/* Flipping direction repositions the queued items; that must not animate. */
.announcement-rotate.is-instant .announcement-rotate-item { transition: none; }

@media (max-width: 767px) {
    .announcement-bar { font-size: 0.6875rem; }
    .announcement-rotate-sizer,
    .announcement-rotate-item {
        gap: 6px;
    }
    .announcement-icon svg {
        width: 13px;
        height: 13px;
    }
    .announcement-icon--flag svg,
    .announcement-flag svg {
        width: 15px;
    }
    .announcement-nav {
        flex: 0 0 auto;
        padding: 0 12px;
    }
    .announcement-nav svg {
        width: 16px;
        height: 16px;
    }
    .announcement-container-full {
        flex: 1 1 auto;
        padding: 0 4px;
    }
}
