/* Full-width public website header, approved with the Ariadne preview. */
@media (min-width: 901px) {
  .cw-site-header__row {
    width: calc(100% - 2 * clamp(32px, 2.5vw, 48px));
    max-width: none;
  }
}

@media (min-width: 901px) {
  .site-header .header-inner,
  main .wrap:not(.narrow),
  footer .wrap,
  html[data-wr-legacy-preferences] .container {
    box-sizing: border-box;
    width: calc(100% - 2 * clamp(32px, 2.5vw, 48px));
    max-width: none;
    margin-inline: auto;
    padding-inline: 0;
  }

  .ride-opening .ride-opening-grid,
  .hero .hero-split,
  html[data-wr-legacy-preferences] .hero .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: clamp(40px, 4vw, 88px);
  }

  .ride-opening .hero-copy {
    padding-block-start: 0;
  }

  .ride-opening .eyebrow {
    margin-block-start: 0;
    line-height: 1.5;
  }
}

:root {
  --cw-screenshot-max-height: min(72svh, 780px);
  --cw-screenshot-dialog-gutter: clamp(.5rem, 1.5vw, 1.5rem);
}

main .product-figure button {
  width: fit-content;
  max-width: 100%;
  margin-inline: auto;
}

main .ride-opening-visual .product-figure button {
  margin-inline-start: 0;
}

main .product-figure img,
main .ride-opening-visual .product-figure img,
main .device-pair img,
html[data-wr-legacy-preferences] .shot img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: var(--cw-screenshot-max-height);
  margin-inline: auto;
  aspect-ratio: auto;
  object-fit: contain;
}

html[data-wr-legacy-preferences] .shot {
  width: fit-content;
  height: fit-content;
  max-width: 100%;
  min-height: 0;
  align-self: start;
  justify-self: center;
  margin-inline: auto;
}

html[data-wr-legacy-preferences] .hero-media .stack {
  align-content: start;
}

html[data-wr-legacy-preferences] .hero-media .shot:is(.small, .tall) {
  min-height: 0;
  height: auto;
}

dialog[data-image-dialog][open] {
  box-sizing: border-box;
  width: fit-content;
  max-width: calc(100% - 2 * var(--cw-screenshot-dialog-gutter));
  max-height: calc(100dvh - 2 * var(--cw-screenshot-dialog-gutter));
  padding: clamp(.625rem, 1.5vw, 1rem);
}

dialog[data-image-dialog] .zoom-toolbar {
  gap: .5rem .75rem;
  margin-block-end: .625rem;
}

dialog[data-image-dialog] img {
  width: auto;
  height: auto;
  max-height: max(6rem, calc(100dvh - 8rem));
}

html[data-wr-legacy-preferences] .lightbox .panel {
  max-height: calc(100dvh - 4rem);
}

html[data-wr-legacy-preferences] .lightbox img {
  max-height: calc(100dvh - 4rem - 2px);
}

@media (max-width: 620px) {
  html[data-wr-legacy-preferences] .table {
    width: 100%;
    table-layout: fixed;
  }

  html[data-wr-legacy-preferences] .table :is(th, td) {
    overflow-wrap: anywhere;
    padding-inline: .625rem;
  }
}

@media (max-width: 900px) and (orientation: landscape) {
  .ride-opening .carpool-photo {
    max-inline-size: min(100%, calc(72svh * 1.5));
    margin-inline: auto;
  }

  .ride-opening .carpool-photo img {
    aspect-ratio: auto;
  }

  .ride-opening .journey-art {
    max-inline-size: min(100%, calc(72svh * 26 / 17));
    margin-inline: auto;
  }
}
