/* The production controls stay in place; this file only presents the cart preflight on touch. */
.touch-customer-step, .touch-customer-intro,
.touch-customer-card > h3, .touch-customer-contact-title, .touch-customer-total,
.touch-customer-back-label { display: none; }
.touch-customer-scroll, .touch-customer-card, .touch-customer-contact, .touch-customer-footer { display: contents; }
.touch-customer-schedule { display: none; }

body:is([data-layout="mobile"], [data-layout="portrait"]) #customerDetailsModal[data-mode="cart-preflight"] {
  padding: 0 !important;
  place-items: end center;
}
body:is([data-layout="mobile"], [data-layout="portrait"]) #customerDetailsModal[data-mode="cart-preflight"] .customer-details-sheet {
  display: flex !important; flex-direction: column; width: min(680px, 100%) !important;
  height: 100dvh; max-height: 100dvh !important;
  padding: 0 !important; overflow: hidden !important; border-radius: 0;
  background: var(--touch-canvas) !important; color: var(--touch-ink);
}
body:is([data-layout="mobile"], [data-layout="portrait"]) #customerDetailsModal[data-mode="cart-preflight"] .customer-details-grabber { display: none; }
body:is([data-layout="mobile"], [data-layout="portrait"]) #customerDetailsModal[data-mode="cart-preflight"] .customer-details-header {
  display: flex; align-items: center; justify-content: space-between; flex: none;
  min-height: 64px; margin: 0; padding: calc(8px + env(safe-area-inset-top)) 21px 8px; border-bottom: 1px solid var(--touch-line);
  background: var(--touch-canvas);
}
body:is([data-layout="mobile"], [data-layout="portrait"]) #customerDetailsModal[data-mode="cart-preflight"] .customer-details-header > div { display: none; }
body:is([data-layout="mobile"], [data-layout="portrait"]) #customerDetailsModal[data-mode="cart-preflight"] .customer-details-close {
  display: inline-flex; align-items: center; gap: 8px; width: auto; height: 44px; min-height: 44px;
  padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none;
  color: var(--touch-accent); font-size: 13px; font-weight: 650;
}
body:is([data-layout="mobile"], [data-layout="portrait"]) #customerDetailsModal[data-mode="cart-preflight"] .customer-details-close-icon { display: none; }
body:is([data-layout="mobile"], [data-layout="portrait"]) #customerDetailsModal[data-mode="cart-preflight"] .customer-details-close::before { content: '←'; font-size: 20px; line-height: 1; }
body:is([data-layout="mobile"], [data-layout="portrait"]) #customerDetailsModal[data-mode="cart-preflight"] .touch-customer-back-label { display: inline; }
body:is([data-layout="mobile"], [data-layout="portrait"]) #customerDetailsModal[data-mode="cart-preflight"] .touch-customer-step {
  display: inline; color: #90968b; font-size: 9px; font-weight: 700; letter-spacing: .13em; text-align: right;
}
body:is([data-layout="mobile"], [data-layout="portrait"]) #customerDetailsModal[data-mode="cart-preflight"] .touch-customer-scroll {
  display: block; flex: 1 1 0 !important; min-height: 0 !important; max-height: none !important;
  overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none;
  padding: 23px 20px 30px; box-sizing: border-box;
}
body:is([data-layout="mobile"], [data-layout="portrait"]) #customerDetailsModal[data-mode="cart-preflight"] .touch-customer-scroll::-webkit-scrollbar { display: none; }
body:is([data-layout="mobile"], [data-layout="portrait"]) #customerDetailsModal[data-mode="cart-preflight"] .customer-details-title {
  display: block; margin: 0 0 13px; color: var(--touch-ink) !important;
  font-size: 29px; font-weight: 680; letter-spacing: -.035em; line-height: 1.15; text-align: left !important;
}
body:is([data-layout="mobile"], [data-layout="portrait"]) #customerDetailsModal[data-mode="cart-preflight"] .touch-customer-intro {
  display: block; margin: 0 0 17px; padding: 12px 14px; border-radius: 13px;
  background: #eeeee6; color: #697163; font-size: 12px; line-height: 1.55; text-align: left !important;
}
body:is([data-layout="mobile"], [data-layout="portrait"]) #customerDetailsModal[data-mode="cart-preflight"] .customer-details-compact-controls {
  display: grid !important; gap: 14px !important; margin: 0 0 16px !important;
}
body:is([data-layout="mobile"], [data-layout="portrait"]) #customerDetailsModal[data-mode="cart-preflight"] .touch-customer-card,
body:is([data-layout="mobile"], [data-layout="portrait"]) #customerDetailsModal[data-mode="cart-preflight"] .touch-customer-contact {
  display: block; min-width: 0; padding: 15px 14px; border: 1px solid var(--touch-line);
  border-radius: 19px; background: #fff !important;
}
body:is([data-layout="mobile"], [data-layout="portrait"]) #customerDetailsModal[data-mode="cart-preflight"] :is(.touch-customer-card > h3, .touch-customer-contact-title) {
  display: block; margin: 0 0 11px; color: var(--touch-ink); font-size: 15px; font-weight: 700;
  line-height: 1.25; letter-spacing: -.01em; text-align: left !important;
}
body:is([data-layout="mobile"], [data-layout="portrait"]) #customerDetailsModal[data-mode="cart-preflight"] :is(.customer-details-order-toggle, .customer-details-payment-toggle, .touch-customer-timing) {
  width: 100% !important; max-width: none !important; height: auto !important; min-height: 52px !important;
  display: grid !important; gap: 4px; padding: 4px; border-radius: 14px !important;
  background: #e9ebe3 !important; box-sizing: border-box;
}
body:is([data-layout="mobile"], [data-layout="portrait"]) #customerDetailsModal[data-mode="cart-preflight"] :is(.customer-details-order-toggle, .touch-customer-timing) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
body:is([data-layout="mobile"], [data-layout="portrait"]) #customerDetailsModal[data-mode="cart-preflight"] .customer-details-payment-toggle { grid-template-columns: repeat(3, minmax(0, 1fr)); }
body:is([data-layout="mobile"], [data-layout="portrait"]) #customerDetailsModal[data-mode="cart-preflight"] .customer-details-payment-toggle.is-delivery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
body:is([data-layout="mobile"], [data-layout="portrait"]) #customerDetailsModal[data-mode="cart-preflight"] :is(.customer-details-order-option, .customer-details-payment-option, .touch-customer-timing button) {
  display: flex !important; align-items: center; justify-content: center; gap: 7px;
  min-height: 44px !important; height: 44px !important; padding: 4px 8px !important;
  border: 0 !important; border-radius: 10px !important; background: transparent !important;
  box-shadow: none !important; color: #697163 !important; font-size: 13px; font-weight: 650;
}
body:is([data-layout="mobile"], [data-layout="portrait"]) #customerDetailsModal[data-mode="cart-preflight"] :is(.customer-details-order-option.is-active, .customer-details-payment-option.is-active, .touch-customer-timing button[aria-pressed="true"]) {
  background: #fff !important; color: var(--touch-ink) !important; box-shadow: 0 2px 5px #303d2410 !important;
}
body:is([data-layout="mobile"], [data-layout="portrait"]) #customerDetailsModal[data-mode="cart-preflight"] .customer-details-order-option :is(.customer-details-order-time-wrap),
body:is([data-layout="mobile"], [data-layout="portrait"]) #customerDetailsModal[data-mode="cart-preflight"] .customer-details-payment-option .checkout-top-icon { display: none !important; }
body:is([data-layout="mobile"], [data-layout="portrait"]) #customerDetailsModal[data-mode="cart-preflight"] .customer-details-order-option { flex-direction: row-reverse !important; }
body:is([data-layout="mobile"], [data-layout="portrait"]) #customerDetailsModal[data-mode="cart-preflight"] .customer-details-order-option .customer-details-order-icon { display: inline-flex !important; width: 17px; height: 17px; }
body:is([data-layout="mobile"], [data-layout="portrait"]) #customerDetailsModal[data-mode="cart-preflight"] .customer-details-order-option .customer-details-order-icon svg { width: 17px; height: 17px; }
body:is([data-layout="mobile"], [data-layout="portrait"]) #customerDetailsModal[data-mode="cart-preflight"] .customer-details-payment-option .checkout-top-label { display: inline !important; color: inherit !important; font-size: 13px !important; }
body:is([data-layout="mobile"], [data-layout="portrait"]) #customerDetailsModal[data-mode="cart-preflight"] .touch-customer-timing button:disabled { opacity: .45; cursor: not-allowed; }
body:is([data-layout="mobile"], [data-layout="portrait"]) #customerDetailsModal[data-mode="cart-preflight"] .touch-customer-later:not([hidden]) { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; margin-top: 12px; }
body:is([data-layout="mobile"], [data-layout="portrait"]) #customerDetailsModal[data-mode="cart-preflight"] .touch-customer-later[hidden] { display: none !important; }
body:is([data-layout="mobile"], [data-layout="portrait"]) #customerDetailsModal[data-mode="cart-preflight"] .customer-details-date-row {
  display: flex !important; flex-wrap: wrap; min-height: 44px; height: auto; margin: 0; padding: 5px 8px;
  border: 1px solid var(--touch-line); border-radius: 12px; background: #fff !important;
  box-shadow: none; font-size: 12px;
}
body:is([data-layout="mobile"], [data-layout="portrait"]) #customerDetailsModal[data-mode="cart-preflight"] .customer-details-date-label { display: none; }
body:is([data-layout="mobile"], [data-layout="portrait"]) #customerDetailsModal[data-mode="cart-preflight"] .customer-details-date-mount .order-date-inline-trigger { background: transparent; padding: 0; }
body:is([data-layout="mobile"], [data-layout="portrait"]) #customerDetailsModal[data-mode="cart-preflight"] .touch-customer-time-button {
  min-width: 0; min-height: 44px; padding: 8px; border: 1px solid var(--touch-line);
  border-radius: 12px; background: #fff; color: var(--touch-ink); font-size: 13px; text-align: center;
}
body:is([data-layout="mobile"], [data-layout="portrait"]) #customerDetailsModal[data-mode="cart-preflight"] .touch-customer-time-status { margin: 10px 1px 0; color: #6b765f; font-size: 11px; line-height: 1.5; }
body:is([data-layout="mobile"], [data-layout="portrait"]) #customerDetailsModal[data-mode="cart-preflight"] .customer-details-fields-mount { flex: none; min-height: 0; margin: 0; padding: 0; overflow: visible; border: 0; box-shadow: none; background: transparent; }
body:is([data-layout="mobile"], [data-layout="portrait"]) #customerDetailsModal[data-mode="cart-preflight"] .customer-details-lookup-mount { margin: 0 0 10px; }
body:is([data-layout="mobile"], [data-layout="portrait"]) #customerDetailsModal[data-mode="cart-preflight"] .customer-details-order-confirmation { display: none; }
body:is([data-layout="mobile"], [data-layout="portrait"]) #customerDetailsModal[data-mode="cart-preflight"] .touch-customer-footer {
  display: block; flex: none; padding: 13px 20px calc(14px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--touch-line); background: #fff;
}
body:is([data-layout="mobile"], [data-layout="portrait"]) #customerDetailsModal[data-mode="cart-preflight"] .touch-customer-total {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  color: var(--touch-muted); font-size: 12px;
}
body:is([data-layout="mobile"], [data-layout="portrait"]) #customerDetailsModal[data-mode="cart-preflight"] .touch-customer-total strong { color: var(--touch-ink); font-size: 22px; white-space: nowrap; }
body:is([data-layout="mobile"], [data-layout="portrait"]) #customerDetailsModal[data-mode="cart-preflight"] #customerDetailsSave {
  /* The flex footer already stays visible; do not expose a sticky red edge to Safari. */
  position: static; inset: auto;
  display: block; width: 100%; min-height: 53px !important; margin: 10px 0 0; padding: 8px;
  border: 0 !important; border-radius: 13px; background: var(--touch-accent) !important;
  color: #fff !important; box-shadow: none !important; font-size: 15px !important; font-weight: 700;
}
body:is([data-layout="mobile"], [data-layout="portrait"]) #customerDetailsModal[data-mode="cart-preflight"] #customerDetailsSave::after { content: ' →'; font-size: 20px; font-weight: 400; margin-left: 10px; vertical-align: -1px; }
body:is([data-layout="mobile"], [data-layout="portrait"]) #customerDetailsModal[data-mode="cart-preflight"] :is(button, input, select):focus-visible { outline: 2px solid var(--touch-accent) !important; outline-offset: 2px; }
@media (max-height: 520px) {
  body:is([data-layout="mobile"], [data-layout="portrait"]) #customerDetailsModal[data-mode="cart-preflight"] .customer-details-header { min-height: 48px; padding-top: calc(2px + env(safe-area-inset-top)); padding-bottom: 2px; }
  body:is([data-layout="mobile"], [data-layout="portrait"]) #customerDetailsModal[data-mode="cart-preflight"] .touch-customer-scroll { padding-top: 14px; }
  body:is([data-layout="mobile"], [data-layout="portrait"]) #customerDetailsModal[data-mode="cart-preflight"] .touch-customer-footer { padding-top: 8px; padding-bottom: calc(8px + env(safe-area-inset-bottom)); }
  body:is([data-layout="mobile"], [data-layout="portrait"]) #customerDetailsModal[data-mode="cart-preflight"] #customerDetailsSave { min-height: 44px !important; margin-top: 6px; }
}
