/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/*
 * Prevent iOS Safari from auto-zooming when a form control receives focus.
 * iOS triggers zoom whenever a focused input has font-size < 16px and never
 * un-zooms after blur, so we bump form controls to 16px on small viewports
 * only. Desktop typography stays untouched.
 */
@media (max-width: 768px) {
  input[type="text"],
  input[type="search"],
  input[type="email"],
  input[type="tel"],
  input[type="number"],
  input[type="password"],
  input[type="url"],
  input[type="date"],
  input[type="datetime-local"],
  input[type="time"],
  input[type="month"],
  input[type="week"],
  textarea,
  select {
    font-size: 16px !important;
  }
}

/*
 * DS-11 (issue #81): on pages with a sticky bottom buy bar (country page, cart) the floating
 * Zalo/phone widget sat on top of the bar's right side — exactly the "Add to cart" button.
 * Lift it above the bar on mobile/tablet (the bars are lg:hidden).
 */
@media (max-width: 1023px) {
  body:has([data-sticky-cta]) [data-chat-widget] {
    bottom: calc(88px + env(safe-area-inset-bottom, 0px)) !important;
  }
}

/*
 * Cart / checkout show the support contacts inline (shared/_inline_support): lifted or not,
 * the floating widget still covered the coupon "Apply" button and the order total there.
 */
body:has([data-inline-support]) [data-chat-widget] {
  display: none !important;
}
