/* IslandOrder Stage 1 Release D — narrow accessibility / mobile form guards.
   Loaded on the homepage and public storefront only; deliberately avoids
   changing product cards, business hero sizes, cart lines and grid counts.
*/

/* Visible keyboard focus for controls over images, cart, gallery and search. */
:where(
  .io-storefront-hero .business-glass-action,
  .io-store-product-card .extras-control summary,
  .io-store-cart .io-cart-clear,
  .io-store-cart .qty button,
  .io-mobile-order-jump,
  .io-home-search input,
  .io-home-search button,
  .io-home-search select,
  .io-gallery-modal button
):focus-visible {
  outline: 3px solid #16834a;
  outline-offset: 3px;
}

/* Date and time controls otherwise retain their platform-native appearance.
   Prevent their intrinsic minimum width from exceeding narrow form columns. */
:where(
  .stay-booking,
  .tour-public-form,
  .tour-public-search,
  .io-storefront-catalog,
  .booking-form,
  .reservation-form,
  .io-catalog-welcome
) :is(input[type="date"],input[type="time"],input[type="datetime-local"]) {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

/* Scroll-to-cart and search-result anchors should not hide under browser UI. */
:where(#cartPanel,#stores,#roomBooking,#tour-enquiry) {
  scroll-margin-top: 18px;
}

/* 16px native date/time text avoids automatic iOS Safari zoom on focus.
   The rule applies only to form inputs, not to product cards or text layout. */
@media (max-width: 600px) {
  :where(.stay-booking,.tour-public-form,.booking-form,.reservation-form,.io-storefront-catalog)
  :is(input[type="date"],input[type="time"],input[type="datetime-local"]) {
    font-size: 16px;
  }
}

/* Honor reduced-motion preferences on the public pages' key controls. */
@media (prefers-reduced-motion: reduce) {
  :where(.io-mobile-order-jump,.io-storefront-hero .business-glass-action) {
    transition-duration: .01ms !important;
  }
}
