/* B-EASY — phone layout. Loaded after app.css. */

/* Cart lines: name on its own line, then qty · total · remove */
.cart-row { flex-wrap: wrap; row-gap: 6px; }
.cart-row > .cart-info { flex: 1 1 100%; }
.cart-row > .cart-qty { margin-right: auto; }
.cart-row .cart-info p.truncate { white-space: normal; overflow: visible; }

/* Tab strips scroll sideways without a visible bar; snap so a tab is never half cut */
#tabsMobile { scroll-snap-type: x proximity; scroll-padding-inline: 16px; }
#tabsMobile > * { scroll-snap-align: start; flex-shrink: 0; }

@media (max-width: 639.98px) {
  /* Header: shop name + account on row 1, the other buttons share row 2 */
  header > div:first-child { height: auto; flex-wrap: wrap; padding-top: 10px; padding-bottom: 8px; row-gap: 0; }
  header > div:first-child::after { content: ""; flex-basis: 100%; order: 1; height: 0; }
  header > div:first-child > div:first-child { flex: 1 1 0; order: 0; }
  #storeName { font-size: 20px; }
  #headActions { display: contents; }
  #headActions > * { order: 2; flex: 1 1 0; min-width: 0; margin-top: 8px; }
  #headActions > button { justify-content: center; max-width: none; height: 40px; padding: 0 6px; }
  #headActions > #locBtn { flex-grow: 2; }
  #headActions > #userBtn { order: 0; flex: 0 0 auto; margin-top: 0; width: 40px; padding: 0; }
  #tabsMobile { padding-bottom: 10px; }

  /* Sideways tab strips inside screens: no visible bar */
  main .overflow-x-auto.scroll-thin { scrollbar-width: none; }
  main .overflow-x-auto.scroll-thin::-webkit-scrollbar { display: none; }

  /* Comfortable tap targets and no iOS zoom-on-focus */
  input:not([type=checkbox]):not([type=radio]), select, textarea { font-size: 16px !important; }

  /* Wide tables scroll inside their card instead of stretching the page */
  main table { max-width: none; }
  main .overflow-x-auto { -webkit-overflow-scrolling: touch; }

  /* Bottom sheets and dialogs use the full phone width */
  [data-sheet-panel], .sheet-panel { max-width: 100vw; }
}

/* Leave room for the iPhone home bar */
@supports (padding: env(safe-area-inset-bottom)) {
  body { padding-bottom: env(safe-area-inset-bottom); }
}
