/*
 * The announcement Boom's operator writes in /admin/.
 *
 * Its own stylesheet, linked from every page, because there is no stylesheet
 * that every page already loads: index.html loads styles-content.css and the
 * shop pages load catalog.css. That gap is not a detail — it is what let the
 * cart stepper bug in 5bcaa37 exist, a rule present in one sheet and missing
 * from the other. A component that renders everywhere gets a sheet of its own
 * rather than a rule copied into two.
 *
 * Which is also why nothing here reads --ink, --paper or --line. Those names
 * exist in both root sheets with different values and, for --line, different
 * types: a colour on the landing page and a border shorthand in the catalog.
 * catalog.css says outright that the two never meet because no page loads
 * both. This sheet meets both, so it carries its own colours and borrows none.
 *
 * No inline styles anywhere, here or in announcement.mjs: `style-src 'self'`
 * in public/_headers has no 'unsafe-inline' and is not getting one. That has
 * already cost once, on the product colour swatches, and it fails silently —
 * the rule is simply dropped and the thing renders wrong.
 */

.boom-announce {
  --announce-ink: #0c0b0e;
  --announce-gold: #e5ae37;
  --announce-paper: #f7f0df;
  font-family: var(--font-body);
}

/* --- the banner ------------------------------------------------------- */

/*
 * Above the header rather than under it, and in the normal flow rather than
 * stuck to the viewport. The site header is already sticky on the landing
 * page, and a second sticky strip above it either fights for the top or eats
 * --header-h worth of every sticky offset on the page.
 */
.boom-announce-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 18px;
  color: var(--announce-paper);
  background: var(--announce-ink);
  border-bottom: 3px solid var(--announce-gold);
}
.boom-announce-banner .boom-announce-copy {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  min-width: 0;
}
.boom-announce-banner .boom-announce-heading {
  color: var(--announce-gold);
  font-size: .74rem;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.boom-announce-banner .boom-announce-body {
  font-size: .74rem;
  line-height: 1.35;
}

/* --- the modal -------------------------------------------------------- */

.boom-announce-scrim {
  position: fixed;
  z-index: 9000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(9, 8, 11, .72);
  animation: boom-announce-in .18s ease-out both;
}
.boom-announce-modal {
  position: relative;
  display: grid;
  justify-items: start;
  gap: 10px;
  width: min(30rem, 100%);
  padding: 26px 26px 22px;
  color: var(--announce-paper);
  background: var(--announce-ink);
  border: 3px solid var(--announce-gold);
  box-shadow: 9px 10px 0 rgba(9, 8, 11, .55);
}
.boom-announce-modal .boom-announce-heading {
  max-width: 88%;
  color: var(--announce-gold);
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 400;
  line-height: 1.05;
  text-transform: uppercase;
}
.boom-announce-modal .boom-announce-body {
  margin: 0;
  font-size: .86rem;
  line-height: 1.5;
}

/* --- shared controls -------------------------------------------------- */

.boom-announce-link {
  color: var(--announce-gold);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-underline-offset: 3px;
}
.boom-announce-ok {
  margin-top: 4px;
  padding: 9px 20px;
  color: var(--announce-ink);
  background: var(--announce-gold);
  border: 0;
  cursor: pointer;
  font: 900 .68rem / 1 var(--font-body);
  letter-spacing: .11em;
  text-transform: uppercase;
}
.boom-announce-ok:hover { background: var(--announce-paper); }

/*
 * 44px, the size a thumb actually needs, on both forms. The glyph is smaller
 * than the button on purpose -- this is the control people press when they
 * have decided they are done, and a dismissal that misses is a notice that
 * feels like it will not go away.
 */
.boom-announce-close {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  color: inherit;
  background: transparent;
  border: 0;
  cursor: pointer;
  font: 400 1.5rem / 1 var(--font-body);
}
.boom-announce-modal .boom-announce-close {
  position: absolute;
  top: 2px;
  right: 2px;
}
.boom-announce-close:hover { color: var(--announce-gold); }
.boom-announce :focus-visible {
  outline: 3px solid var(--announce-gold);
  outline-offset: 3px;
}
/*
 * The close sits in the very corner of the card, and the modal takes focus
 * there the moment it opens — so an outward ring is drawn straight across the
 * card's own border and reads as a box hanging off the corner rather than as
 * focus. Inside instead. Same three pixels, same colour, on the other side of
 * the edge.
 */
.boom-announce-modal .boom-announce-close:focus-visible { outline-offset: -3px; }

@keyframes boom-announce-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .boom-announce-scrim { animation: none; }
}

@media (max-width: 560px) {
  .boom-announce-banner {
    align-items: flex-start;
    gap: 6px;
    padding: 9px 6px 9px 14px;
  }
  .boom-announce-modal { padding: 22px 20px 20px; }
  .boom-announce-modal .boom-announce-heading { font-size: 1.35rem; }
}
