/* One focus treatment for public pages, customer accounts, and admin tools.
   Important declarations in this layer outrank the legacy per-page focus rules. */
@layer creek-control-focus {
  html body.creek-customer-account #reservationLookupButton,
  html body.creek-customer-account #reservationLookupButton:is(:hover, :focus, :focus-visible, :active),
  html body.creek-customer-account #customerVehicleSearch button[type="submit"],
  html body.creek-customer-account #customerVehicleSearch button[type="submit"]:is(:hover, :focus, :focus-visible, :active) {
    outline: 0 !important;
    outline-offset: 0 !important;
    box-shadow: none !important;
    border: 0 !important;
  }

  html body:is(body) :is(button, a.btn, input[type='submit'], input[type='button']):is(:focus, :focus-visible, :active) {
    outline: none !important;
    outline-offset: 0 !important;
    box-shadow: none !important;
  }

  html body :where(a[href], button, input:not([type='hidden']), select, textarea,
    summary, [tabindex], [contenteditable='true'], [role='button'],
    [role='combobox'], [role='tab'], [role='option']):is(:focus, :focus-visible) {
    outline: none !important;
    box-shadow: none !important;
  }

  /* Compound controls must not add a second ring around the focused field. */
  html body :where(label, .phone-field, .dob-control, .search-field,
    .date-time-entry, .booking-date-time, .location-search-control,
    .input-group, .form-field, .checkout-card-field, .extra-option,
    .choice-card):focus-within {
    outline: none !important;
    box-shadow: none !important;
  }

  /* Keep keyboard focus visible without drawing a box around the control. */
  html body :where(a[href], button, select, summary, [role='button'],
    [role='combobox'], [role='tab'], [role='option']):focus-visible {
    text-decoration-line: none !important;
    background-color: #fff0e8 !important;
    color: #101419 !important;
    text-decoration-thickness: 2px !important;
    text-underline-offset: 4px !important;
  }

  html body :where(input, textarea, [contenteditable='true']):not(:where(
    [type='hidden'], [type='checkbox'], [type='radio'], [type='range'],
    [type='color'], [type='file'], [type='button'], [type='submit'],
    [type='reset'])):focus-visible {
    background-color: #fff8f4 !important;
    caret-color: #ff3600;
  }
}


/* Native dropdowns retain their white surface while open or focused. */
@layer creek-control-focus {
  html body select,
  html body select:is(:hover, :focus, :focus-visible, :active),
  html body select option,
  html body select optgroup {
    background-color: #fff !important;
    color: #101419 !important;
  }
  html body select:focus-visible { border-color: #ff3600 !important; }
}
