/* NOTE: PROMO PIECES, over styles/default.css, loaded only while an event runs (inc/events.php). The look of an event is
   its theme: styles/<theme>.css sets the variables; theme 'default' keeps the ones below. */

.has-promo {
  --promo-accent: #ffffff;
  --promo-accent-fg: #0a0a0a;
  --promo-ticker-height: 10rem;
  --promo-menu-height: 5.2rem;
}

/* the bar sits over the header */
.has-ticker .header:not(.active) {
  top: var(--promo-ticker-height);
}

.has-ticker .header {
  --header-offset: var(--promo-ticker-height);
}

.has-ticker .header.active {
  --header-offset: 0rem;
}

.has-promo #content {
  padding-top: calc(var(--main-header-height) + var(--promo-menu-height));
}

.has-ticker #content {
  padding-top: calc(var(--main-header-height) + var(--promo-ticker-height) + var(--promo-menu-height));
}

/* the fixed header is taller */
.has-promo .target-id {
  top: calc(-2rem - var(--main-header-height) - var(--promo-menu-height));
}

.promo-ticker {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--promo-ticker-height);
  overflow: hidden;
  z-index: 19;
  background: var(--promo-accent);
}

.promo-ticker span {
  display: inline-block;
}

.promo-ticker .promo-ticker-link {
  display: flex;
  flex-wrap: wrap;
  align-content: center;
  align-items: center;
  justify-content: center;
  gap: 0.4rem 2rem;
  height: 100%;
  padding-inline: 2rem;
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: 0.02em;
  text-align: center;
  text-decoration: none;
  color: var(--promo-accent-fg);
}

/* its own line, until everything fits on one */
.promo-ticker .promo-ticker-text {
  flex: 0 0 100%;
}

.promo-time {
  display: inline-block;
  padding: 0.5rem 0.9rem;
  border-radius: 0.4rem;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  color: var(--promo-accent);
  background: #000;
}

/* row under the main menu; it hangs from the header, under its dropdowns and the mobile menu */
.header .promo-menu-item {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: -1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.6rem;
  width: 100%;
  height: var(--promo-menu-height);
  padding-inline: 2rem;
  font-family: Merriweather, "Open Sans", Arial, sans-serif;
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  color: var(--promo-accent);
  background-color: var(--grey-ud);
  box-shadow: 0 0.3rem 0.5rem var(--nav-shadow-color);
}

.header .promo-menu-item:hover .promo-menu-text {
  text-decoration: underline;
  text-underline-offset: 0.4rem;
}

.promo-menu-arrows {
  display: flex;
  flex: none;
  gap: 0.2rem;
  animation: promo-menu-arrows 1.2s ease-in-out infinite alternate;
}

/* the right side mirrors the left one, with its movement */
.promo-menu-text + .promo-menu-arrows {
  rotate: 180deg;
}

.promo-menu-arrows span {
  width: 1rem;
  height: 1rem;
  border: solid currentColor;
  border-width: 0.2rem 0.2rem 0 0;
  transform: rotate(45deg);
}

.promo-menu-arrows span:first-child {
  opacity: 0.35;
}

.promo-menu-arrows span:nth-child(2) {
  opacity: 0.65;
}

@keyframes promo-menu-arrows {
  from {
    transform: translateX(-0.3rem);
  }

  to {
    transform: translateX(0.3rem);
  }
}

.promo-badge {
  display: inline-block;
  padding: 0.5rem 0.8rem;
  font-size: 1.1rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--promo-accent-fg);
  background: var(--promo-accent);
}

.submenu-chair .promo-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 1;
}

/* hero and buttons */
.promo-eyebrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  font-size: 1.6rem;
  color: var(--white);
}

.promo-eyebrow strong {
  padding: 0.6rem 1rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--promo-accent-fg) !important;
  background: var(--promo-accent);
}

.promo-hero-text {
  max-width: 52rem;
  color: var(--white);
}

.promo-hero-countdown {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-weight: 700;
  color: var(--white);
}

.promo-hero-countdown .promo-time {
  color: var(--promo-accent) !important;
  border: 0.1rem solid var(--promo-accent);
}

.promo-price {
  display: flex;
  align-items: baseline;
  gap: 1.2rem;
  font-size: 2rem;
}

.promo-price strong {
  font-size: 2.8rem;
  color: var(--promo-accent) !important;
}

.has-promo .top-cta-button {
  text-transform: none;
  font-weight: 700;
  color: var(--promo-accent-fg) !important;
  background-color: var(--promo-accent);
  border-color: var(--promo-accent);
}

.has-promo .top-cta-button:hover {
  color: var(--promo-accent) !important;
  background-color: var(--black);
  border-color: var(--promo-accent);
  box-shadow: 0 0.5rem 1.5rem -0.5rem var(--promo-accent);
}

.has-promo .contact-form-section .generic-container {
  border-top: 0.3rem solid var(--promo-accent);
}

/* how the offer works */
.promo-section {
  margin-block: 4rem;
  background: var(--grey-ud);
}

.promo-section .generic-container {
  padding-block: 4rem;
}

.promo-section .row-title {
  padding-top: 1rem;
}

.promo-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 3rem;
  margin-block: 2rem 4rem;
}

.promo-trust li {
  padding-left: 1.4rem;
  font-size: 1.5rem;
  line-height: 1.4;
  color: var(--white);
  border-left: 0.3rem solid var(--promo-accent);
}

.promo-steps {
  display: grid;
  gap: 2rem;
  margin-bottom: 4rem;
  list-style: none;
  counter-reset: promo-step;
}

.promo-steps li {
  padding-top: 2rem;
  border-top: 0.1rem solid var(--white-30);
  counter-increment: promo-step;
}

.promo-steps li::before {
  content: counter(promo-step, decimal-leading-zero);
  display: block;
  margin-bottom: 1rem;
  font-family: Merriweather, serif;
  font-size: 3rem;
  color: var(--promo-accent);
}

.promo-faq {
  margin-bottom: 4rem;
}

.promo-faq details {
  border-bottom: 0.1rem solid var(--white-30);
}

.promo-faq summary {
  padding: 1.6rem 4rem 1.6rem 0;
  position: relative;
  font-size: 1.7rem;
  color: var(--white);
  cursor: pointer;
  list-style: none;
}

.promo-faq summary::-webkit-details-marker {
  display: none;
}

.promo-faq summary::after {
  content: "+";
  position: absolute;
  top: 50%;
  right: 0.4rem;
  transform: translateY(-50%);
  font-size: 2.4rem;
  color: var(--promo-accent);
}

.promo-faq details[open] summary::after {
  content: "\2212";
}

.promo-section .top-cta-button {
  display: inline-block;
}

@media screen and (min-width: 375px) {
  .has-promo {
    --promo-ticker-height: 8.4rem;
  }
}

@media screen and (min-width: 768px) {
  .has-promo {
    --promo-ticker-height: 6.4rem;
  }

  .promo-steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 4rem;
  }
}

@media screen and (min-width: 1280px) {
  .has-promo {
    --promo-ticker-height: 4rem;
  }

  /* same width and paddings as .menu-container */
  .promo-ticker .promo-ticker-link {
    flex-wrap: nowrap;
    justify-content: space-between;
    max-width: 136rem;
    margin-inline: auto;
    font-size: 1.3rem;
    white-space: nowrap;
  }

  .promo-ticker .promo-ticker-text {
    flex: none;
  }
}
