/* ============================================================
   ANNOUNCEMENT BAR — independent global component
   FILE: assets/css/announcement-bar.css
   Phase 1.8 of the Final Master Roadmap, Stage 1.
   Depends on: tokens.css, buttons.css.

   The one place this touches Header: publishes
   --announcement-bar-height on :root, reflecting its own
   current rendered height. Header's sticky positioning reads
   this variable (a one-way read, executed at Header's own
   Stage 2 lock — not performed by this file).
   ============================================================ */

.announcement-bar {
  position: relative;
  width: 100%;
  background-color: var(--color-navy);
  color: var(--color-white);
  z-index: var(--z-sticky);
}

.announcement-bar__inner {
  max-width: var(--container-max-width);
  margin-inline: auto;
  padding: var(--space-1) var(--container-padding-inline);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 40px;
  text-align: center;
}

.announcement-bar__text {
  font-size: var(--text-small);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.announcement-bar__link {
  color: var(--color-gold);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.announcement-bar__link:hover {
  color: #dfb62f;
}

.announcement-bar__close {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-pill);
  color: rgba(255, 255, 255, 0.75);
}

.announcement-bar__close:hover {
  background-color: rgba(255, 255, 255, 0.12);
  color: var(--color-white);
}

.announcement-bar.is-closed {
  display: none;
}

/* ----------------------------------------------------------
   MOBILE — collapses to a single-line/truncated variant
---------------------------------------------------------- */
@media (max-width: 480px) {
  .announcement-bar__inner {
    padding-block: 6px;
    padding-left: 12px;
    padding-right: 12px;
    flex-wrap: nowrap;
  }

  .announcement-bar__text {
    flex: 1 1 auto;
    min-width: 0;
    flex-wrap: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    justify-content: flex-start;
    text-align: left;
    font-size: 13px;
    line-height: 1.3;
  }
}