/* css-announcement.css - styles that only matter on: any page with the announcement bar (sections/main-announcement.liquid). */

/* The strip above the header; a phone gets it too. */
.hdr-announce {
  display: block;
  background: color-mix(in srgb, var(--accent) 16%, var(--surface));
  color: var(--ink);
  font-size: 0.85rem;
}

.hdr-announce__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  min-height: 2.5rem;
}

/* One line tall: the messages are stacked in it and slide up in turn (js-header-announce.js).
 * Without the script the first one stands alone and the rest are `hidden`. */
.hdr-announce__msgs {
  position: relative;
  flex: 1 1 auto;
  max-width: 64rem;
  height: 1.5rem;
  min-width: 0;
  overflow: hidden;
  text-align: center;
}

.hdr-announce__msg {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  overflow: hidden;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transform: translateY(100%);
  transition: transform 0.4s var(--ease, ease), opacity 0.4s var(--ease, ease);
}

.hdr-announce__msg > a,
.hdr-announce__msg { text-overflow: ellipsis; }

.hdr-announce__msg.is-active { opacity: 1; visibility: visible; transform: none; }

.hdr-announce__msg.is-above { opacity: 0; visibility: visible; transform: translateY(-100%); }

.hdr-announce__msg.is-below { opacity: 0; visibility: visible; transform: translateY(100%); }

.hdr-announce__msg.no-anim { transition: none; }

@media (prefers-reduced-motion: reduce) {
  .hdr-announce__msg { transition: none; }
}

.hdr-announce__msg a { color: inherit; text-decoration: none; }
.hdr-announce__msg a:hover { text-decoration: underline; }

/* Wide arrows: a larger chevron in a roomy target. */
.hdr-announce__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  padding: 0.3rem 0.9rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  cursor: pointer;
}
.hdr-announce__arrow:hover { background: color-mix(in srgb, var(--accent) 18%, transparent); }

.hdr-announce__chev--prev { transform: rotate(90deg); }
.hdr-announce__chev--next { transform: rotate(-90deg); }
[dir="rtl"] .hdr-announce__chev--prev { transform: rotate(-90deg); }
[dir="rtl"] .hdr-announce__chev--next { transform: rotate(90deg); }


/* Phones: no room for it above the header. */
@media (max-width: 60rem) {
  .hdr-announce { display: none; }
}
