/* ==========================================================================
   aal-booking-form.css — the real Gravity Form wearing the booking page design.

   Context: the page that took the /book-online/ slug on 2 November was the
   design comp — a static <form method="get"> with hand-written inputs and a
   hard-coded em dash where the fare goes. It took no bookings for about
   fifteen hours. This stylesheet exists so the design can be kept while the
   form doing the work is the real one, with the pricing engine, the terminal
   guard, the ATL quick picks and PayPal all still behind it.

   HOW THIS IS DONE, AND WHY IT IS NOT A SPECIFICITY FIGHT
   ------------------------------------------------------
   gravity-forms-theme-framework.min.css carries a 4087-character selector list
   that lands at (0,5,1) and repaints any <button> inside a form. The project
   rule is: do not out-specify it and do not reach for !important.

   So almost nothing below targets GF's own elements. Instead it sets GF's own
   custom properties on the form wrapper, which is the documented way in. The
   framework reads them at whatever specificity it likes and restyles itself,
   so this survives a Gravity Forms update instead of breaking on one.

   Our own controls inside the form (the ATL quick-pick chips) already carry
   .gform-theme-no-framework, which GF excludes from every branch on purpose.
   That stays the mechanism for anything we add.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. The card the form sits in
   -------------------------------------------------------------------------- */

.aalb .aalb__booking { display: grid; }

/* minmax(0,1fr), never a bare 1fr. A bare track keeps min-width:auto, so the
   widest unbreakable child sets the column and the page scrolls sideways. That
   has now bitten this stylesheet family three times: a long email address on
   contact, .aalb__bform at 372px inside a 327px box on booking, and the quote
   card's input. A Gravity Form is full of inputs, so it would have been
   fourth. */
@media (min-width: 1000px) {
  .aalb .aalb__booking {
    grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr);
    gap: var(--s8);
    align-items: start;
  }
}

.aalb .aalb__formcard {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  /* Longhands. A shorthand "padding: X 0" on an element that also carries
     .aalb__wrap resets the wrap's side padding to zero, which is what had the
     home hero flush against both screen edges. The habit is longhands. */
  padding-top: var(--s7);
  padding-bottom: var(--s7);
  padding-left: var(--s7);
  padding-right: var(--s7);
  min-width: 0;
}

@media (max-width: 700px) {
  .aalb .aalb__formcard {
    padding-left: var(--s5);
    padding-right: var(--s5);
    padding-top: var(--s6);
    padding-bottom: var(--s6);
  }
}

/* --------------------------------------------------------------------------
   2. Gravity Forms, re-skinned through its own variables

   Every value here is a brand token, so the form follows the site rather than
   carrying a second copy of the palette.
   -------------------------------------------------------------------------- */

.aalb .aal-booking-form_wrapper {
  /* Type. GF sizes from these rather than from a font shorthand. */
  --gf-font-family: var(--body);
  --gf-font-size-primary: var(--t0);
  --gf-font-size-secondary: 15px;
  --gf-font-size-tertiary: 13px;

  /* Brand colours. --gf-color-primary drives focus rings, the step marker and
     the primary button together, which is why the whole form turns gold from
     this one line. */
  --gf-color-primary: var(--gold);
  --gf-color-primary-rgb: 184, 124, 60;
  --gf-color-primary-contrast: var(--navy);
  --gf-color-primary-contrast-rgb: 0, 28, 56;
  --gf-color-primary-darker: var(--gold-hover);
  --gf-color-primary-lighter: var(--gold-hi);

  --gf-color-secondary: #fff;
  --gf-color-secondary-contrast: var(--navy);
  --gf-color-secondary-darker: var(--panel);
  --gf-color-secondary-lighter: #fff;

  --gf-color-out-ctrl-light: var(--line);
  --gf-color-out-ctrl-light-darker: var(--line-ui);
  --gf-color-out-ctrl-dark: var(--mid);
  --gf-color-out-ctrl-dark-darker: var(--slate);

  --gf-color-in-ctrl: #fff;
  --gf-color-in-ctrl-contrast: var(--navy);
  --gf-color-in-ctrl-primary: var(--gold);
  --gf-color-in-ctrl-primary-contrast: var(--navy);
  --gf-color-in-ctrl-light: var(--panel);
  --gf-color-in-ctrl-dark: var(--line-ui);

  --gf-color-danger: var(--red);
  --gf-color-danger-contrast: #fff;

  /* Controls. The comp's field is a 1px box with a 4px radius on white, and
     these are the same numbers read off .aalb__field. */
  --gf-ctrl-border-color: var(--line-ui);
  --gf-ctrl-border-color-hover: var(--gold-hi);
  --gf-ctrl-border-color-focus: var(--gold);
  --gf-ctrl-border-width: 1px;
  --gf-ctrl-radius: 4px;
  --gf-ctrl-bg-color: #fff;
  --gf-ctrl-bg-color-focus: #fff;
  --gf-ctrl-accent-color: var(--gold);

  /* Buttons. Gold ground, navy text. White on this gold is 3.36:1 and fails
     normal text; navy on it is about 6:1. aal-brenda.css already solves it the
     same way with .aalb__btn--gold{background:var(--gold);color:var(--navy)},
     and aal-preview.css was corrected to match on 2 November. */
  --gf-ctrl-btn-bg-color-primary: var(--gold);
  --gf-ctrl-btn-bg-color-hover-primary: var(--gold-hover);
  --gf-ctrl-btn-bg-color-focus-primary: var(--gold-hover);
  --gf-ctrl-btn-color-primary: var(--navy);
  --gf-ctrl-btn-color-hover-primary: #fff;
  --gf-ctrl-btn-color-focus-primary: #fff;
  --gf-ctrl-btn-border-color-primary: var(--gold);
  --gf-ctrl-btn-border-color-hover-primary: var(--gold-hover);
  --gf-ctrl-btn-border-width-primary: 1px;
  --gf-ctrl-btn-radius: 4px;

  --gf-ctrl-btn-bg-color-secondary: #fff;
  --gf-ctrl-btn-color-secondary: var(--navy);
  --gf-ctrl-btn-border-color-secondary: var(--line-ui);
  --gf-ctrl-btn-bg-color-hover-secondary: var(--panel);

  /* Labels. The comp sets field labels in small uppercase; these are the same
     values read off .aalb__field label. */
  --gf-label-color: var(--mid);
  --gf-label-font-size: 11px;
  --gf-label-font-weight: 600;

  /* Rhythm, off the house 4/8/12/16/24/32 scale rather than GF's own. */
  --gf-form-gap-y: var(--s5);
  --gf-field-gap-y: var(--s5);
  --gf-field-gap-x: var(--s4);
  --gf-form-footer-margin-y-start: var(--s6);
}

/* The wrapper's own margins fight the card padding; the card owns the space. */
.aalb .aal-booking-form_wrapper { margin-top: 0; margin-bottom: 0; }

/* Field labels in the comp's small uppercase. Scoped to our wrapper class and
   landing well under the framework, so any GF rule that needs to win still
   does. */
.aalb .aal-booking-form_wrapper .gfield_label {
  letter-spacing: .07em;
  text-transform: uppercase;
}

/* Headings inside the form read as the comp's .aalb__bh. */
.aalb .aal-booking-form_wrapper .gsection_title,
.aalb .aal-booking-form_wrapper .gfield_html h2 {
  font-family: var(--display);
  font-weight: 400;
  font-size: var(--t2);
  color: var(--navy);
  letter-spacing: -0.01em;
}

/* --------------------------------------------------------------------------
   3. The step indicator

   GF's three-page flow is the one place the comp and the real form genuinely
   differ: the comp drew a single long page. Rather than pretend, this styles
   GF's own steps to read like the comp's segmented control, so the three
   pages look deliberate instead of like a different form.
   -------------------------------------------------------------------------- */

.aalb .aal-booking-form_wrapper .gf_page_steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s1);
  background: var(--panel);
  border-radius: 4px;
  padding: var(--s1);
  margin-bottom: var(--s6);
  border: 0;
}

.aalb .aal-booking-form_wrapper .gf_step {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  margin: 0;
  padding: var(--s3) var(--s2);
  border-radius: 3px;
  font: 600 15px/1 var(--body);
  color: var(--mid);
  opacity: 1;
  min-width: 0;
}

.aalb .aal-booking-form_wrapper .gf_step_active {
  background: var(--navy);
  color: #fff;
}

.aalb .aal-booking-form_wrapper .gf_step_number {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 28, 56, .08);
  color: inherit;
  font-size: 12px;
  font-weight: 700;
  border: 0;
}

.aalb .aal-booking-form_wrapper .gf_step_active .gf_step_number {
  background: var(--gold);
  color: var(--navy);
}

.aalb .aal-booking-form_wrapper .gf_step_label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* On a phone three labels will not fit. The numbers carry the meaning and the
   active step keeps its words.

   Three equal columns is wrong here: an equal third of a 342px card is about
   110px, and "Trip details" next to its number does not fit in that, so the
   one label worth reading was being ellipsised to "TRI...". Flex instead, with
   the two inactive steps shrunk to their number and the active one taking
   everything left over. */
@media (max-width: 560px) {
  .aalb .aal-booking-form_wrapper .gf_page_steps {
    display: flex;
    align-items: stretch;
  }
  .aalb .aal-booking-form_wrapper .gf_step_label { display: none; }
  .aalb .aal-booking-form_wrapper .gf_step {
    flex: 0 0 auto;
    gap: 0;
    padding-left: var(--s3);
    padding-right: var(--s3);
  }
  .aalb .aal-booking-form_wrapper .gf_step_active {
    flex: 1 1 auto;
    gap: var(--s2);
    justify-content: flex-start;
  }
  .aalb .aal-booking-form_wrapper .gf_step_active .gf_step_label {
    display: block;
    white-space: normal;
  }
}

/* --------------------------------------------------------------------------
   4. The footer buttons

   Next and Submit fill the width like the comp's "Continue to payment".
   Previous stays small, because it is not the action we are asking for.
   -------------------------------------------------------------------------- */

.aalb .aal-booking-form_wrapper .gform_page_footer {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s3);
  align-items: center;
  border-top: 1px solid var(--line);
  padding-top: var(--s6);
}

.aalb .aal-booking-form_wrapper .gform_next_button,
.aalb .aal-booking-form_wrapper .gform_button {
  flex: 1 1 auto;
  justify-content: center;
}

.aalb .aal-booking-form_wrapper .gform_previous_button { flex: 0 0 auto; }

/* --------------------------------------------------------------------------
   5. hello-elementor's pink

   reset.css paints every bare button #c36 on :hover AND :focus, and the focus
   half is why a hover-only fix does not hold on a phone: a tap leaves focus
   sitting on the control after the finger lifts.

   GF's framework already outranks the theme for GF's own buttons. This covers
   anything inside the form that is not GF's, and it is written at (0,1,1) with
   :where() so it ties the theme rule and wins on load order, while every real
   component rule still outranks it. Do not rewrite this as
   .aalb .aal-booking-form_wrapper button:hover — that is (0,3,1) and would
   silently beat the gold.
   -------------------------------------------------------------------------- */

:where(.aal-booking-form_wrapper) button:hover,
:where(.aal-booking-form_wrapper) button:focus {
  background-color: revert;
  color: revert;
}

/* --------------------------------------------------------------------------
   6. Safety
   -------------------------------------------------------------------------- */

/* Old copy and customer-typed addresses can carry long unbreakable strings.
   Let words break rather than let the document widen. */
.aalb .aalb__formcard { overflow-wrap: anywhere; }

/* Belt and braces: nothing inside the form may set the page width. */
.aalb .aal-booking-form_wrapper,
.aalb .aal-booking-form_wrapper .gform_fields,
.aalb .aal-booking-form_wrapper .gfield { min-width: 0; max-width: 100%; }

.aalb .aal-booking-form_wrapper input,
.aalb .aal-booking-form_wrapper select,
.aalb .aal-booking-form_wrapper textarea { max-width: 100%; }
