/* Rotating offers — embedded in contact utility bar */

body.site-has-top-offers-bar {
  --top-nav-contact-height: 2.5rem;
}

.top-nav-contact-bar__inner--with-offers {
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(0, 1fr) minmax(0, auto);
  align-items: center;
  gap: 0.75rem 1rem;
}

.top-nav-contact-bar__offers.top-offers-bar {
  position: relative;
  min-width: 0;
  overflow: hidden;
  justify-self: center;
  width: 100%;
  max-width: 36rem;
}

.top-offers-bar__track {
  position: relative;
  min-height: 1.05rem;
}

.top-offers-bar__slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition:
    opacity var(--top-offers-transition, 0.4s) ease,
    transform var(--top-offers-transition, 0.4s) ease,
    visibility 0s linear var(--top-offers-transition, 0.4s);
  pointer-events: none;
}

.top-offers-bar__slide.is-active {
  position: relative;
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition:
    opacity var(--top-offers-transition, 0.4s) ease,
    transform var(--top-offers-transition, 0.4s) ease,
    visibility 0s;
  pointer-events: auto;
}

.top-offers-bar__slide.is-exiting {
  position: absolute;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  pointer-events: none;
}

.top-offers-bar__text {
  margin: 0;
  font-family: var(--top-nav-font, "Avenir LT Std", sans-serif);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 2;
  text-align: center;
  color: #fff;
  white-space: nowrap;
}

.top-offers-bar__line {
  display: inline;
}

.top-offers-bar__line--meta {
  white-space: nowrap;
}

.top-offers-bar__message,
.top-offers-bar__message strong,
.top-offers-bar__code strong,
.top-offers-bar__cta strong {
  font-weight: 800;
  color: #fff;
}

.top-offers-bar__sep {
  color: rgba(255, 255, 255, 0.72);
  font-weight: 500;
}

.top-offers-bar__code-wrap {
  color: rgba(255, 255, 255, 0.92);
  font-weight: 500;
}

.top-offers-bar__code {
  display: inline;
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  font: inherit;
  letter-spacing: 0.06em;
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  transition: opacity 0.18s ease;
}

.top-offers-bar__code:hover,
.top-offers-bar__code:focus-visible {
  opacity: 0.86;
  outline: none;
}

.top-offers-bar__cta,
.top-offers-bar__terms {
  color: #fff !important;
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 500;
  transition: opacity 0.18s ease;
}

.top-offers-bar__cta:hover,
.top-offers-bar__cta:focus-visible,
.top-offers-bar__terms:hover,
.top-offers-bar__terms:focus-visible {
  opacity: 0.86;
  color: #fff !important;
}

.top-offers-bar__copied {
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  font-family: var(--top-nav-font, "Avenir LT Std", sans-serif);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 0.15rem 0.45rem;
  pointer-events: none;
}

.top-offers-bar__copied:not([hidden]) {
  animation: top-offers-copied-fade 1.4s ease forwards;
}

@keyframes top-offers-copied-fade {
  0% { opacity: 0; transform: translateY(-50%) scale(0.96); }
  12% { opacity: 1; transform: translateY(-50%) scale(1); }
  72% { opacity: 1; }
  100% { opacity: 0; }
}

@media (max-width: 991.98px) {
  body.site-has-top-offers-bar {
    /* fallback until top-nav-shell-sync.js measures the live shell */
    --top-nav-contact-height: 4.65rem;
  }

  .top-nav-contact-bar__inner--with-offers {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    align-items: center;
    gap: 0.35rem 0;
    padding: 0.4rem max(0.85rem, env(safe-area-inset-right, 0px)) 0.4rem max(0.85rem, env(safe-area-inset-left, 0px));
  }

  .top-nav-contact-bar__offers.top-offers-bar {
    grid-column: 1;
    grid-row: 1;
    order: unset;
    max-width: none;
    padding: 0 0 0.35rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .top-nav-contact-bar__links {
    grid-column: 1;
    grid-row: 2;
    justify-self: start;
    align-self: center;
    min-width: 0;
    flex-wrap: nowrap;
    z-index: 1;
  }

  .top-nav-contact-bar__aside {
    grid-column: 1;
    grid-row: 2;
    justify-self: end;
    align-self: center;
    gap: 0.65rem;
    min-width: 0;
    max-width: none;
    width: auto;
    z-index: 1;
  }

  .top-offers-bar__track {
    min-height: 1.2rem;
  }

  .top-offers-bar__text {
    font-size: 0.78rem;
    line-height: 1.3;
    white-space: nowrap;
  }

  .top-offers-bar__line {
    display: inline;
  }

  .top-offers-bar__line--primary,
  .top-offers-bar__line--meta {
    display: inline;
    white-space: nowrap;
  }

  .top-offers-bar__copied {
    display: none;
  }
}

@media (max-width: 820px) and (min-width: 431px) {
  .top-nav-contact-bar__inner--with-offers {
    padding: 0.38rem max(0.75rem, env(safe-area-inset-right, 0px)) 0.38rem max(0.75rem, env(safe-area-inset-left, 0px));
  }

  .top-nav-contact-bar__aside {
    gap: 0.75rem;
  }

  .top-offers-bar__text {
    font-size: 0.76rem;
    line-height: 2;
  }
}

@media (max-width: 767.98px) {
  .top-offers-bar__text {
    font-size: 0.75rem;
    line-height: 2;
  }
}

@media (max-width: 430px) {
  body.site-has-top-offers-bar {
    --top-nav-contact-height: 3.45rem;
  }

  .top-nav-contact-bar__inner--with-offers {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    row-gap: 0;
    column-gap: 0;
    padding: 0 0 0.28rem;
  }

  .top-nav-contact-bar__offers.top-offers-bar {
    grid-column: 1;
    grid-row: 1;
    width: 100%;
    max-width: none;
    padding: 0.32rem max(0.65rem, env(safe-area-inset-right, 0px)) 0.28rem max(0.65rem, env(safe-area-inset-left, 0px));
    margin: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    box-sizing: border-box;
  }

  .top-nav-contact-bar__links {
    grid-column: 1;
    grid-row: 2;
    justify-self: start;
    align-self: center;
    min-width: 0;
    padding-left: max(0.65rem, env(safe-area-inset-left, 0px));
  }

  .top-nav-contact-bar__inner--with-offers .top-nav-contact-bar__aside {
    display: contents;
  }

  .top-nav-contact-bar__inner--with-offers .top-nav-contact-bar__address {
    display: none !important;
  }

  .top-nav-contact-bar__inner--with-offers .top-nav-contact-bar__social {
    grid-column: 1;
    grid-row: 2;
    justify-self: end;
    align-self: center;
    display: flex;
    gap: 0.35rem;
    flex-shrink: 0;
    padding-right: max(0.65rem, env(safe-area-inset-right, 0px));
  }

  .top-offers-bar__track {
    min-height: 1.25rem;
  }

  .top-offers-bar__slide.is-active {
    width: 100%;
    min-width: 0;
  }

  .top-offers-bar__text {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0;
    font-size: 0.68rem;
    line-height: 2;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .top-offers-bar__line {
    display: inline;
    max-width: none;
  }

  .top-offers-bar__line--primary {
    white-space: nowrap;
  }

  .top-offers-bar__line--primary::after {
    content: " — ";
    font-weight: 500;
    color: rgba(255, 255, 255, 0.72);
  }

  .top-offers-bar__line--meta {
    display: inline;
    white-space: nowrap;
  }

  .top-offers-bar__message {
    font-size: inherit;
  }

  .top-offers-bar__use-code {
    display: none;
  }

  .top-offers-bar__code strong {
    letter-spacing: 0.04em;
  }
}
