/* Promotional banner. --banner-h (the fixed bar's height) offsets the fixed header, mobile menu
   and body; html.banner-dismissed zeroes it when collapsed. */
:root {
  --banner-h: 48px;
}
@media (max-width: 768px) {
  :root {
    --banner-h: 44px;
  }
}
html.banner-dismissed {
  --banner-h: 0px;
}

body.has-banner {
  margin-top: calc(129px + var(--banner-h, 0px));
}
@media (max-width: 1295px) {
  body.has-banner {
    margin-top: calc(56px + var(--banner-h, 0px));
  }
}
/* Offset with margin, not top: header.js hides the header on scroll and LanguagesSelector.jsx
   opens the menu by setting an inline top, and !important here would override both. */
body.has-banner #header.header {
  margin-top: var(--banner-h, 0px);
}
@media (max-width: 1295px) {
  body.has-banner .mega-menu {
    margin-top: var(--banner-h, 0px);
  }
}

/* Desktop insets content to the header gridline (.group-inner margin: 5rem); mobile stays full-width. */
.banner__bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 11;
  background: #e31519;
  padding: 10px 16px;
  display: flex;
  justify-content: center;
}
@media (min-width: 1296px) {
  .banner__bar {
    padding-left: 5rem;
    padding-right: 5rem;
  }
}
.banner__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: none;
  gap: 16px;
}
.banner__message {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1 1 auto;
}
.banner__tick {
  width: 4px;
  flex: 0 0 4px;
  align-self: stretch;
  background: #fff;
}
.banner__ticker {
  display: flex;
  align-items: center;
  min-width: 0;
}
.banner__track {
  display: flex;
  align-items: center;
  gap: 8px;
}
.banner__seq {
  display: flex;
  align-items: center;
  gap: 8px;
}
.banner__dup {
  display: none;
}

/* initBanner adds banner--overflow at any width where the message is wider than the room it has. */
.banner--overflow .banner__ticker {
  overflow: hidden;
  flex: 1 1 auto;
}
.banner--overflow .banner__track {
  gap: 0;
  white-space: nowrap;
  will-change: transform;
  animation: banner-marquee 14s linear infinite;
}
.banner--overflow .banner__seq {
  padding-right: 8px;
}
.banner--overflow .banner__dup {
  display: flex;
}
.banner__lead {
  font-weight: 700;
  font-size: 16px;
  line-height: 24px;
  color: #fff;
  text-transform: uppercase;
  white-space: nowrap;
}
.banner__slim {
  font-weight: 400;
  font-size: 16px;
  line-height: 24px;
  color: #fff;
  white-space: nowrap;
}
.banner__actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 0 0 auto;
}
.banner__countdown {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  white-space: nowrap;
}
.banner__days {
  font-weight: 700;
  font-size: 24px;
  letter-spacing: -0.24px;
  line-height: 1;
  text-transform: uppercase;
}
.banner__days-label {
  font-weight: 400;
  font-size: 14px;
  letter-spacing: -0.14px;
}
.banner__signup {
  background: #fff;
  color: #e31519;
  font-weight: 700;
  font-size: 14px;
  line-height: 16px;
  text-transform: uppercase;
  padding: 6px 12px;
  text-decoration: none;
  white-space: nowrap;
}
.banner__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #fff;
  cursor: pointer;
}

/* Collapsed: bar hidden; desktop badge floats top-right (mobile badge lives in the menu instead). */
.banner__badge {
  display: none;
}
.banner--collapsed .banner__bar {
  display: none;
}
@media (min-width: 1296px) {
  .banner--collapsed .banner__badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    position: fixed;
    top: 0;
    right: 0;
    z-index: 1000;
    background: #e31519;
    color: #fff;
    border: 0;
    cursor: pointer;
    padding: 4px 8px;
    border-bottom-left-radius: 4px;
    white-space: nowrap;
  }
}
.banner__badge .banner__days {
  font-size: 18px;
  letter-spacing: -0.18px;
}
.banner__badge .banner__days-label {
  font-size: 10px;
  letter-spacing: -0.1px;
}

/* In-menu badge (React): right-aligned row; negative margin cancels the menu gutter to sit flush.
   Shown only while the banner is collapsed; desktop uses the floating badge instead. */
.banner__menu-badge-row {
  display: none;
  justify-content: flex-end;
  margin-right: -16px;
}
html.banner-dismissed .banner__menu-badge-row {
  display: flex;
}
@media (min-width: 768px) {
  .banner__menu-badge-row {
    margin-right: -24px;
  }
}
@media (min-width: 1024px) {
  .banner__menu-badge-row {
    margin-right: -40px;
  }
}
.banner__menu-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #e31519;
  color: #fff;
  border: 0;
  cursor: pointer;
  padding: 4px 8px;
  border-bottom-left-radius: 4px;
  white-space: nowrap;
}
.banner__menu-badge .banner__days {
  font-size: 18px;
  letter-spacing: -0.18px;
}
.banner__menu-badge .banner__days-label {
  font-size: 10px;
  letter-spacing: -0.1px;
}
@media (min-width: 1296px) {
  html.banner-dismissed .banner__menu-badge-row {
    display: none;
  }
}

@media (max-width: 768px) {
  .banner__bar {
    padding: 10px 8px;
  }
  .banner__inner {
    gap: 8px;
  }
  .banner__message {
    gap: 4px;
  }
  .banner__lead,
  .banner__slim {
    font-size: 12px;
    line-height: 16px;
  }
  .banner__actions {
    gap: 8px;
  }
  .banner__days {
    font-size: 18px;
    letter-spacing: -0.18px;
  }
  .banner__days-label {
    font-size: 10px;
    letter-spacing: -0.1px;
  }
  .banner__signup {
    font-size: 12px;
    padding: 4px 8px;
  }
  .banner__close {
    width: 24px;
    height: 24px;
  }
}

@keyframes banner-marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .banner--overflow .banner__track {
    animation: none;
  }
  .banner--overflow .banner__dup {
    display: none;
  }
}
