/*
  The shared modal (`components/aw/modal/ModalShell`) and the site search entry (D31): the header icon,
  the search dialog, the drawer's Search row and the results page's own form. A separate stylesheet:
  main.css is the live theme, served unchanged. Colours and fonts are the theme's (blue #1fc4f9,
  red #dc1c29 / #D31D26, yellow #FAD232, Roboto Condensed italic for headings).

  This is also the home of the site's own additions to the theme that apply on every page (it is linked
  from the header on all of them): the skip link and the 404/500 page layout, at the end of the file.
*/

/* ---- header icon (every width) ------------------------------------------------------------ */
.aw-search-trigger {
  -webkit-appearance: none;
  align-items: center;
  align-self: center;
  background: none;
  border: 0;
  border-radius: 50%;
  color: #dc1c29;
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 1.25em;
  height: 44px;
  justify-content: center;
  margin: 0 2px;
  padding: 0;
  transition: background-color 0.15s ease-out, color 0.15s ease-out;
  width: 44px;
}

.aw-search-trigger:hover {
  background-color: #e6f8fe;
}

.aw-search-trigger:focus-visible {
  outline: 3px solid #1fc4f9;
  outline-offset: 0;
}

.aw-search-trigger svg {
  height: 1.25em;
  width: 1.25em;
}

@media (max-width: 767px) {
  /* The phone bar is the logo and the burger on one row: the icon joins them, on the right of the white bar. */
  #site-header .navbar-header {
    align-items: center;
    display: flex;
  }

  #site-header .navbar-header .navbar-brand {
    flex: 0 0 auto;
  }

  #site-header .navbar-header .aw-search-trigger {
    margin-left: auto;
    margin-right: 4px;
  }
}

/* ---- desktop header fit (1200px and up) ------------------------------------------------------ */
/* The bar never wraps a label: live prints each one on a single line at every width. */
@media (min-width: 1200px) {
  #site-header .desktop-menu .nav-items .nav-link {
    white-space: nowrap;
  }
}

/* The weather (when the feed has data; live prints none) is the one item the bar cannot always fit:
   from 1200 to 1399px the menu, search icon, review button and pill already fill the row, so the
   weather shows from 1400px (the width the old inline search box used). */
@media (min-width: 1200px) and (max-width: 1399px) {
  #site-header #today .today__weather {
    display: none;
  }
}

/* ---- the drawer's Search row ---------------------------------------------------------------- */
.aw-search-drawer-row {
  background-color: white;
  border-top: 1px solid #eaeaea;
}

.aw-search-drawer {
  -webkit-appearance: none;
  align-items: center;
  background: none;
  border: 0;
  color: #555555;
  cursor: pointer;
  display: flex;
  font-weight: bold;
  gap: 0.6em;
  line-height: 3.5em;
  min-height: 44px;
  padding: 0 0 0 25px;
  text-align: left;
  width: 100%;
}

.aw-search-drawer svg {
  fill: #dc1c29;
  height: 1.25em;
  width: 1.25em;
}

.aw-search-drawer:focus-visible {
  outline: 3px solid #1fc4f9;
  outline-offset: -3px;
}

/* ---- the modal ---------------------------------------------------------------------------- */
body.aw-modal-open {
  padding-right: var(--aw-scrollbar, 0);
}

body.aw-modal-open #site-header {
  right: var(--aw-scrollbar, 0);
}

.aw-modal {
  align-items: flex-start;
  animation: aw-modal-fade 0.2s ease-out;
  display: flex;
  inset: 0;
  justify-content: center;
  overflow-y: auto;
  padding: 12vh 16px 24px;
  position: fixed;
  z-index: 110;
}

.aw-modal__backdrop {
  background-color: rgba(0, 0, 0, 0.75);
  cursor: pointer;
  inset: 0;
  position: fixed;
}

.aw-modal__panel {
  animation: aw-modal-rise 0.25s ease-out;
  background: #1fc4f9;
  border-radius: 5px;
  box-shadow: 5px 5px 15px 0px rgba(0, 0, 0, 0.44);
  color: white;
  max-width: 640px;
  outline: none;
  padding: 32px 30px 28px;
  position: relative;
  width: 100%;
}

.aw-modal__title {
  color: white;
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 30px;
  font-style: italic;
  font-weight: 900;
  line-height: 1.1;
  margin: 0 40px 18px 0;
  text-transform: uppercase;
}

.aw-modal__close {
  -webkit-appearance: none;
  align-items: center;
  background: none;
  border: 0;
  border-radius: 50%;
  color: white;
  cursor: pointer;
  display: flex;
  height: 44px;
  justify-content: center;
  padding: 0;
  position: absolute;
  right: 8px;
  top: 8px;
  width: 44px;
}

.aw-modal__close:hover {
  background-color: rgba(255, 255, 255, 0.25);
}

.aw-modal__close svg {
  height: 20px;
  width: 20px;
}

.aw-modal__close:focus-visible,
.aw-search-form__chip:focus-visible,
.aw-search-form__clear:focus-visible,
.aw-search-form__submit:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: 3px;
}

/* White on the white field would vanish: the input's ring is the theme yellow. */
.aw-search-form__input:focus-visible {
  outline: 3px solid #FAD232;
  outline-offset: 2px;
}

@keyframes aw-modal-fade {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes aw-modal-rise {
  from {
    transform: translateY(12px);
  }

  to {
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .aw-modal,
  .aw-modal__panel {
    animation: none;
  }

  .aw-search-trigger,
  .aw-search-form__submit {
    transition: none;
  }
}

@media (max-width: 480px) {
  .aw-modal {
    padding-top: 72px;
  }

  /* 16px keeps iOS from zooming into the field, and the placeholder fits on one line. */
  .aw-search-form .aw-search-form__input {
    font-size: 16px;
  }

  .aw-modal__panel {
    padding: 28px 18px 22px;
  }

  .aw-modal__title {
    font-size: 24px;
  }
}

/* ---- the search form (modal and results page) --------------------------------------------- */
.aw-search-form__label {
  border: 0;
  clip: rect(0, 0, 0, 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.aw-search-form__row {
  display: flex;
  gap: 10px;
}

.aw-search-form__input {
  -webkit-appearance: none;
  background: white;
  border: 2px solid white;
  border-radius: 5px;
  color: #333333;
  flex: 1 1 auto;
  font-size: 18px;
  height: 56px;
  min-width: 0;
  padding: 0 16px;
}

.aw-search-form__input::placeholder {
  color: #6b6b6b;
}

.aw-search-form__input[aria-invalid='true'] {
  border-color: #D31D26;
}

.aw-search-form__submit {
  -webkit-appearance: none;
  background-color: #FAD232;
  border: 2px solid #D31D26;
  border-radius: 5px;
  box-shadow: 5px 5px 15px 0px rgba(0, 0, 0, 0.25);
  color: #D31D26;
  cursor: pointer;
  flex: 0 0 auto;
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 22px;
  font-style: italic;
  font-weight: 900;
  height: 56px;
  line-height: 1;
  padding: 0 28px;
  text-transform: uppercase;
  transition: transform 0.25s ease-in-out;
}

.aw-search-form__submit:hover {
  transform: scale(1.05);
}

.aw-search-form__hint {
  color: white;
  font-size: 15px;
  font-weight: 700;
  margin: 8px 0 0;
  min-height: 22px;
}

.aw-search-form__recent {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.aw-search-form__recent-title {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
}

.aw-search-form__recent ul {
  display: contents;
  list-style: none;
  margin: 0;
  padding: 0;
}

.aw-search-form__chip {
  -webkit-appearance: none;
  background: rgba(255, 255, 255, 0.9);
  border: 0;
  border-radius: 999px;
  color: #0584ad;
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
  min-height: 36px;
  padding: 0 14px;
}

.aw-search-form__chip:hover {
  background: white;
}

.aw-search-form__clear {
  -webkit-appearance: none;
  background: none;
  border: 0;
  color: white;
  cursor: pointer;
  font-size: 14px;
  min-height: 36px;
  text-decoration: underline;
}

@media (max-width: 480px) {
  .aw-modal .aw-search-form__row {
    flex-direction: column;
  }

  .aw-modal .aw-search-form__submit {
    width: 100%;
  }
}

/* The results page's own form: the same controls on the page (white), blue on yellow-on-red stays the button. */
.aw-search-form--page {
  margin: 0 0 24px;
  max-width: 640px;
}

.aw-search-form--page .aw-search-form__input {
  border-color: #1fc4f9;
}

.aw-search-form--page .aw-search-form__hint {
  color: #D31D26;
}

.aw-search-form--page .aw-search-form__input:focus-visible,
.aw-search-form--page .aw-search-form__submit:focus-visible {
  outline-color: #0584ad;
}

@media (max-width: 480px) {
  .aw-search-form--page .aw-search-form__row {
    flex-direction: column;
  }

  .aw-search-form--page .aw-search-form__submit {
    width: 100%;
  }
}

/*
 * Desktop menu: keep a dropdown open while keyboard focus is INSIDE it (4b sweep).
 * main.css opens it on `li:hover` and `.nav-link:focus~.dropdown-menu`, so Tab from the top link to
 * its first sub-link dropped the focus (the link lost focus, the menu hid, focus fell to the page).
 * These mirror main.css's hover rules for `:focus-within`; same 1200px breakpoint, same values.
 */
@media (min-width: 1200px) {
  #site-header .desktop-menu .nav-items .nav-item:focus-within>.gradient-background {
    -ms-transform: translateY(0);
    transform: translateY(0);
  }

  #site-header .desktop-menu .nav-items .nav-item:focus-within .caret {
    -ms-transform: rotate(-180deg);
    transform: rotateZ(-180deg);
  }

  #site-header .desktop-menu .nav-items .nav-item:focus-within>.label-underline .wave-container {
    -ms-transform: translateY(-13px);
    transform: translateY(-13px);
  }

  #site-header .desktop-menu .nav-items .nav-item:focus-within>.label-underline .wave-container .wave-right,
  #site-header .desktop-menu .nav-items .nav-item:focus-within>.label-underline .wave-container .wave-left {
    animation-play-state: running;
  }

  #site-header .desktop-menu li:focus-within>.dropdown-menu {
    animation: dropdownMenuAnimation 500ms ease-out;
    box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.3);
    display: block;
  }

  #site-header .desktop-menu li:focus-within>.dropdown-menu .dropdown-item {
    background-color: #E6F7FD;
    color: #095C8A;
    display: inline-block;
    font-family: "Roboto Condensed", sans-serif;
    font-weight: 900;
    overflow: hidden;
    padding: 16px;
    position: relative;
    text-align: left;
    transition: background-color 200ms ease-in-out;
    width: 32% !important;
  }

  #site-header .desktop-menu li:focus-within>.dropdown-menu .dropdown-item.active {
    color: #1fc4f9;
  }
}

/* Accordion header button (QA round 4b R1, docs/engineering/blocks.md). The live header was an `a` with no href; ours is a real
   button so the keyboard reaches it (Enter and Space click it; Bootstrap's collapse plugin reads the same data-target and toggles
   `collapsed` on it). The button takes the heading's own font, so it is the block the live link sat in; the live link's class
   (`accordion-toggle`, which main.css gives the caret) is on the span inside, whose inline size and caret are unchanged. A button is a
   block formatting context and would grow around the floated caret (a few px taller than live, where the heading let it overflow),
   so the caret's bottom margin is pulled up to keep it inside the line. Only a visible keyboard outline is new. */
.panel-title > button.accordion-trigger {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: #000;
  font: inherit;
  letter-spacing: inherit;
  text-align: left;
  text-transform: inherit;
  cursor: pointer;
}
.content-block-top .accordion-trigger .accordion-toggle:after {
  margin-bottom: -6px;
}
.content-block-top .accordion-trigger.collapsed .accordion-toggle:after {
  content: "\e114";
}
.panel-title > button.accordion-trigger:focus-visible {
  outline: 2px solid #000;
  outline-offset: 2px;
}

/* ---- skip link (every page) ----------------------------------------------------------------
   The first focusable thing on the page: "Skip to content" jumps past the ~30 header links to <main>.
   Hidden with the theme's own `.sr-only` (so it never flashes before this file loads) and revealed on
   keyboard focus; nothing changes visually until then. */
.aw-skip-link:focus {
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  clip: auto;
  color: #dc1c29;
  font-weight: 700;
  height: auto;
  left: 8px;
  margin: 0;
  outline: 3px solid #0584ad;
  outline-offset: 2px;
  overflow: visible;
  padding: 12px 20px;
  position: fixed;
  text-decoration: none;
  top: 8px;
  width: auto;
  z-index: 100000;
}

#main:focus {
  outline: 0;
}

/* ---- no focus ring after a mouse click or tap (every page) ---------------------------------
   main.css (Bootstrap 3) rings `a:focus`, `.btn:focus` (and `:active:focus`) and file / radio / checkbox inputs with
   `outline: 5px auto -webkit-focus-ring-color`. `:focus` also matches a mouse click, and the focus the browser puts
   back on the last-clicked link after Back / Forward, so e.g. the page header's "PRICING" link showed a thick blue ring.
   The ring now shows only for KEYBOARD focus: these clear it while focus is not `:focus-visible` (the browser's own
   "keyboard, not pointer" test), and leave every keyboard ring (the theme's and our `:focus-visible` ones) as it was.
   main.css is not edited (vendored). Each selector is one step more specific than the theme rule it answers, and this
   file loads after main.css. */
a:focus:not(:focus-visible),
button:focus:not(:focus-visible),
summary:focus:not(:focus-visible),
[role="button"]:focus:not(:focus-visible),
input[type="file"]:focus:not(:focus-visible),
input[type="radio"]:focus:not(:focus-visible),
input[type="checkbox"]:focus:not(:focus-visible),
.btn:focus:not(:focus-visible),
.btn:active:focus:not(:focus-visible),
.btn.active:focus:not(:focus-visible) {
  outline: none;
}

/* The other half: the theme also sets `outline: 0` on `.btn:focus`, `.dropdown-toggle:focus` and `.carousel-control:focus`, so
   on the KEYBOARD the theme's buttons (Buy tickets, Get Directions, Subscribe, Leave a review), the header's BUY NOW and the
   carousel arrows (and the phone menu's close and sub-list toggles) had no ring at all. They get the site's keyboard ring (as the button block's, below); a mouse click still
   shows none. Same specificity as the theme rules; this file loads later. */
.btn:focus-visible,
.dropdown-toggle:focus-visible,
.carousel-control:focus-visible,
.navbar-toggle:focus-visible,
#site-nav ul li button:focus-visible {
  outline: 3px solid #0584ad;
  outline-offset: 2px;
}
/* The phone menu's sub-list toggles sit flush to the drawer's edge: an inset ring stays inside the drawer. */
#site-nav ul li button:focus-visible {
  outline-offset: -3px;
}

/* ---- button block focus ring ---------------------------------------------------------------
   The theme's `.new-button-container .new-button` sets `outline: none`, which also beat the site-wide
   `:focus-visible` outline, so a keyboard user saw no focus on a Button / Buttons / Card button (found by the
   frontend e2e, 2026-11-11). The ring shows for the keyboard only (`:focus-visible`), so mouse clicks look as before.
   Specificity matches the theme rule and this file loads after it. */
.new-button-container .new-button:focus-visible {
  outline: 3px solid #0584ad;
  outline-offset: 3px;
}

/* ---- 404 and 500 pages (CF11) ------------------------------------------------------------------
   Fill the viewport with one centred column: `.content-wrapper` already has `min-height: 100vh`;
   making it a column and letting `#main` and the page grow pushes the footer to the bottom of a tall
   screen. Scoped with `:has(.aw-error-page)` so no other page changes. The page title band, search
   form and buttons are the theme's own. */
.content-wrapper:has(.aw-error-page) {
  display: flex;
  flex-direction: column;
}

.content-wrapper:has(.aw-error-page) > * {
  flex-shrink: 0;
}

.content-wrapper:has(.aw-error-page) > #main {
  display: flex;
  flex: 1 0 auto;
  flex-direction: column;
}

/* Live's 404 has no mailing list button or modal; ours lives in the shared layout, so hide it here. */
body:has(.aw-error-page) .mailing-list-button,
body:has(.aw-error-page) .mailing-list-modal {
  display: none;
}

.aw-error-page {
  flex: 1 0 auto;
  padding-bottom: 48px;
  padding-top: 40px;
}

/* CF21: the round logo hangs about 80px below the fixed header, over the top of the title band. The theme's
   `.hero-hidden` padding (50px at tablet, 80px on small desktop) left the title touching it. Clear it at every width
   from 768 up (under 768 the logo sits inside the header bar and the ticker margin already clears it). */
@media (min-width: 768px) {
  .content-wrapper:has(.aw-error-page) .page-header.hero-hidden .container {
    padding-top: 112px;
  }
}

/* CF21: no single word left alone on a line, in the title and the message (balance the short blocks). */
.content-wrapper:has(.aw-error-page) .page-header__title,
.aw-error-page__message p {
  text-wrap: balance;
}

.aw-error-page__column {
  margin: 0 auto;
  max-width: 960px;
  text-align: center;
}

/* The message and the search keep the narrower measure; only the row of page links needs the extra width, so all five
   fit on one row at desktop instead of leaving "Contact us" alone underneath. */
.aw-error-page__message {
  max-width: 760px;
  font-size: 1.25em;
  margin-bottom: 24px;
  margin-left: auto;
  margin-right: auto;
}

.aw-error-page .aw-search-form--page {
  margin: 0 auto 32px;
  text-align: left;
}

.aw-error-page__links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* `.btn` has 20px on the left only (it makes room for the theme's icon buttons); these have no icon. */
.aw-error-page__links .btn {
  padding-left: 16px;
}

.aw-error-page__links .btn:focus-visible {
  outline: 3px solid #0584ad;
  outline-offset: 3px;
}

@media (max-width: 480px) {
  .aw-error-page__links {
    flex-direction: column;
  }

  .aw-error-page__links .btn {
    display: block;
    width: 100%;
  }
}

/*
  Home "Awesome Rides" slider: keep its place while Owl starts (CLS).
  Owl's stylesheet hides `.owl-carousel` (display: none) until it has initialised, so the section was only its heading tall
  for the first moments and then grew by one row of pictures, pushing everything below it (the Get ready section) down:
  the home page's layout shift (Lighthouse CLS 0.18 desktop, 0.31 mobile on staging). Until `.owl-loaded` is added the
  box is held at the height Owl is about to give it and its stacked slides stay hidden, so nothing moves when it starts.
  The height is a tile's width (the Owl item width: (viewport - 45px) / items - 15px, as measured at 360 to 1920) x the
  650:380 picture shape, plus about 36px for the ride name. Visitors see the same page; with scripts blocked it stays hidden
  as before.
*/
#homepage-rides .owl-carousel:not(.owl-loaded) {
  display: block;
  height: calc((100vw - 60px) * 0.5846 + 36px);
  overflow: hidden;
  visibility: hidden;
}

@media (min-width: 768px) {
  #homepage-rides .owl-carousel:not(.owl-loaded) {
    height: calc(((100vw - 45px) / 2 - 15px) * 0.5846 + 36px);
  }
}

@media (min-width: 992px) {
  #homepage-rides .owl-carousel:not(.owl-loaded) {
    height: calc(((100vw - 45px) / 4 - 15px) * 0.5846 + 36px);
  }
}

@media (min-width: 1200px) {
  #homepage-rides .owl-carousel:not(.owl-loaded) {
    height: calc(((100vw - 45px) / 5 - 15px) * 0.5846 + 36px);
  }
}

/*
  Home page: the same hold for the two blocks above the Awesome Rides slider (CLS).
  - Key boxes (`#key-boxes`): Owl hides the row until it starts, so the section was empty and then grew by one row of
    tiles. Until `.owl-loaded` the row is held at the height Owl is about to give it: a tile is the viewport width / items
    across (2, 3 from 768, 4 from 992, 5 from 1500) x 0.6 (the picture shape) + about 5px for the heading.
  - Hero (`#homepage-hero`): from 1200px a script sets `min-height = min(window height - header - key boxes - ticker, 580)`
    once it has loaded, so the hero jumped from its CSS height (about 456px) to that. The same sum is the CSS minimum now
    (header 60px, key boxes as above; a ticker, when one is showing, is the few pixels of difference), and the script's own
    inline value still wins as soon as it runs. Below 1200px the hero's CSS height already is its final one.
*/
#key-boxes .owl-carousel:not(.owl-loaded) {
  display: block;
  height: calc(100vw / 2 * 0.6 + 5px);
  overflow: hidden;
  visibility: hidden;
}

@media (min-width: 768px) {
  #key-boxes .owl-carousel:not(.owl-loaded) {
    height: calc(100vw / 3 * 0.6 + 5px);
  }
}

@media (min-width: 992px) {
  #key-boxes .owl-carousel:not(.owl-loaded) {
    height: calc(100vw / 4 * 0.6 + 5px);
  }
}

@media (min-width: 1200px) {
  #homepage-hero {
    min-height: min(580px, calc(100vh - 60px - (100vw / 4 * 0.6 + 5px)));
  }
}

@media (min-width: 1500px) {
  #key-boxes .owl-carousel:not(.owl-loaded) {
    height: calc(100vw / 5 * 0.6 + 5px);
  }

  #homepage-hero {
    min-height: min(580px, calc(100vh - 60px - (100vw / 5 * 0.6 + 5px)));
  }
}
