/*
 * The whole component library's CSS lands in every code-island shadow root, so
 * every selector here is prefixed and every inherited property the banner cares
 * about is stated rather than assumed.
 *
 * Colours and widths come from the Webflow variables, with the literal values
 * as fallbacks so the playground renders correctly without tokens.css.
 */

/*
 * Sizes match the live site's deal banner: a 46px strip (10px padding around a
 * 26px line) on a 1060px container, 18px type throughout.
 */
.ofl-ab-root {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 0.625rem 0.9375rem;
  background-color: var(--notification-bar--bg, #11488f);
  color: var(--_colour-primitives---neutral--100, #fff);
  font-family: var(--_typography-primitives---family--primary-family, Arial, sans-serif);
  font-size: 1.125rem;
  line-height: 1.625rem;
}

.ofl-ab-inner {
  display: flex;
  align-items: center;
  max-width: 66.25rem;
  margin: 0 auto;
}

/*
 * Takes the leftover space and centres within it, so the message and timer sit
 * centred while the link stays pinned to the right — the arrangement in the
 * design.
 */
.ofl-ab-main {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0 1.25rem;
  min-width: 0;
}

.ofl-ab-text {
  margin: 0;
  font-size: inherit;
  line-height: inherit;
  font-weight: 700;
  letter-spacing: normal;
  text-transform: uppercase;
  color: inherit;
}

.ofl-ab-countdown {
  /* A fixed slot, so the message beside it does not slide as the digits change. */
  min-width: 9.375rem;
  font-size: inherit;
  line-height: inherit;
  font-weight: 700;
  color: inherit;
  /* Digits share an advance width, so the strip does not twitch each second. */
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.ofl-ab-link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  flex-shrink: 0;
  font-size: inherit;
  line-height: inherit;
  /* Normal weight so the link reads as secondary to the bold message. */
  font-weight: 400;
  text-transform: uppercase;
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
}

/*
 * The shared Icon's `small` is 14px, which is the live chevron's size. CSS
 * wins over the SVG's width/height attributes, so nothing here needs
 * !important.
 */
.ofl-ab-link svg {
  width: 0.875rem;
  height: 0.875rem;
}

.ofl-ab-link:hover {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.ofl-ab-link:focus-visible {
  outline: 2px solid var(--_colour-primitives---neutral--100, #fff);
  outline-offset: 3px;
}

/*
 * Designer canvas only — never reaches the published site. Greys out a banner
 * that would lose the election for the path typed into "Preview page path", so
 * the live one stands out against the ones that page would not get.
 */
.ofl-ab-root--placeholder {
  background-color: var(--_colour-primitives---neutral--400, #a3a3a3);
}

/* Stacks at the live site's 767px breakpoint: message, timer, link, no gaps. */
@media (max-width: 767px) {
  .ofl-ab-inner {
    flex-direction: column;
    text-align: center;
  }

  .ofl-ab-main {
    flex: 0 1 auto;
    flex-direction: column;
    gap: 0;
  }

  .ofl-ab-text {
    line-height: 1.25rem;
  }

  .ofl-ab-countdown {
    min-width: 0;
  }
}

