/* ============================================================
   Sublime LMS — Announcement bar
   Full-width, above the global navigation. Compact by design: it
   introduces the hero, it does not compete with it.
   ============================================================ */

.sl-annc {
  /* Violet into teal, the brand's two poles. Dark so the bar reads as
     chrome rather than as a second hero, and so the white CTA carries
     the only real emphasis on the strip. */
  background-color: #2E1065;
  background-image: linear-gradient(100deg, #2E1065 0%, #4C1D95 44%, #0F766E 100%);
  color: #fff;
  /* PINNED. The bar stays visible for the whole visit rather than scrolling
     away once, so the TechBBQ CTA is reachable from anywhere on the page.
     z-index above the header's 100, because the header is sticky too and is
     told below to stop underneath this bar rather than on top of it. */
  position: sticky;
  top: 0;
  z-index: 120;
}

.sl-annc-row {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 9px 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px 18px;
  flex-wrap: wrap;
  min-height: 44px;
}

/* A BLOCK OF TEXT, not a flex container. As flex items the two spans get
   `min-width: auto` and so refuse to break internally — the delegation line
   then runs off the side of a phone instead of wrapping. Inline spans in normal
   flow wrap wherever they need to, at any width. */
.sl-annc-copy {
  margin: 0;
  min-width: 0;
  font-size: 13.5px;
  line-height: 1.45;
  text-wrap: pretty;
}

.sl-annc-title {
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #fff;
  margin-right: 7px;
}

.sl-annc-flag {
  /* The flag is decoration beside the wordmark, so it keeps the emoji font
     rather than inheriting the UI stack, where it can render as two letters. */
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  margin-right: 2px;
}

.sl-annc-body {
  color: rgba(255, 255, 255, 0.78);
  font-weight: 500;
}

.sl-annc-cta {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 15px;
  border-radius: 999px;
  background: #fff;
  color: #2E1065;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
  transition: transform var(--dur-base, .18s) var(--ease-out, ease),
              box-shadow var(--dur-base, .18s) var(--ease-out, ease),
              background-color var(--dur-base, .18s) var(--ease-out, ease);
}

.sl-annc-cta:hover {
  background: #F3E8FF;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.18);
  text-decoration: none;
}

.sl-annc-cta:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.sl-annc-arrow {
  transition: transform var(--dur-base, .18s) var(--ease-out, ease);
}
.sl-annc-cta:hover .sl-annc-arrow { transform: translateX(3px); }

/* ---- tablet ------------------------------------------------ */
@media (max-width: 960px) {
  .sl-annc-row { padding: 9px 20px; gap: 8px 14px; }
  /* Centred because this is the width where the CTA drops onto its own line:
     left-aligned copy above a centred button leaves the last few words
     stranded on the left. */
  .sl-annc-copy { font-size: 13px; text-align: center; }
}

/* ---- mobile ------------------------------------------------
   Stacks to two rows and centres. The date/delegation line stays:
   it is the part that makes the banner worth reading, and the
   brief asks for Copenhagen and the delegation to be clear on
   every breakpoint. */
@media (max-width: 700px) {
  .sl-annc-row {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 10px 18px 12px;
    gap: 9px;
  }
  .sl-annc-copy { font-size: 12.5px; }
  /* The headline owns its own line on a phone, so the delegation detail below
     reads as the supporting line rather than running on from it. */
  .sl-annc-title { display: block; margin-right: 0; margin-bottom: 2px; }
  .sl-annc-cta { font-size: 12.5px; padding: 8px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .sl-annc-cta, .sl-annc-arrow { transition: none; }
  .sl-annc-cta:hover { transform: none; }
  .sl-annc-cta:hover .sl-annc-arrow { transform: none; }
}

/* ---- the sticky header must stop BELOW the sticky bar ------
   `.sl-nav` is `position:sticky; top:0` too. With both pinned to 0 the header
   would sit on top of the bar and hide it — exactly what pinning the bar was
   meant to prevent. So the header is offset by the bar's height instead.

   The height is a CSS variable set by announcement.js, not a hardcoded number,
   because the bar is 53px on a desktop and taller once the copy wraps and the
   CTA stacks on a phone. `body >` beats nav.css's plain `.sl-nav` on
   specificity, so this holds regardless of stylesheet order. */
body > .sl-nav,
body > #global-nav.sl-nav {
  top: var(--sl-annc-h, 0px);
}
