/* The bottom-bar profile is independent of the order/payment preflight. */
.touch-profile-lookup, .touch-profile-field-label { display: none; }
body:is([data-layout="mobile"], [data-layout="portrait"]) #customerDetailsModal[data-mode="touch-profile"] {
  padding: 30px 0 0 !important; place-items: end center;
}
body:is([data-layout="mobile"], [data-layout="portrait"]) #customerDetailsModal[data-mode="touch-profile"] .customer-details-sheet {
  display: flex !important; flex-direction: column; width: min(680px, 100%) !important;
  height: calc(100dvh - 30px); max-height: calc(100dvh - 30px) !important;
  padding: 0 !important; overflow: hidden !important; border-radius: 26px 26px 0 0;
  background: var(--touch-canvas) !important; color: var(--touch-ink);
}
body:is([data-layout="mobile"], [data-layout="portrait"]) #customerDetailsModal[data-mode="touch-profile"] .customer-details-grabber {
  display: block; flex: none; width: 42px; height: 4px; margin: 9px auto 4px;
  border-radius: 4px; background: #c7cbc2;
}
body:is([data-layout="mobile"], [data-layout="portrait"]) #customerDetailsModal[data-mode="touch-profile"] .customer-details-header {
  display: flex; flex: none; align-items: center; justify-content: space-between;
  min-height: 65px; margin: 0; padding: 8px 20px 14px;
  border-bottom: 1px solid var(--touch-line); background: var(--touch-canvas);
}
body:is([data-layout="mobile"], [data-layout="portrait"]) #customerDetailsModal[data-mode="touch-profile"] .customer-details-title {
  margin: 0; color: var(--touch-ink) !important; font-size: 26px; font-weight: 680;
  letter-spacing: -.03em; text-align: left !important;
}
body:is([data-layout="mobile"], [data-layout="portrait"]) #customerDetailsModal[data-mode="touch-profile"] .customer-details-close {
  display: grid; place-items: center; flex: none; width: 44px; height: 44px;
  padding: 0; border: 1px solid var(--touch-line); border-radius: 50%;
  background: #fff; box-shadow: none; color: var(--touch-ink);
}
body:is([data-layout="mobile"], [data-layout="portrait"]) #customerDetailsModal[data-mode="touch-profile"] .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: 22px 20px 30px; box-sizing: border-box;
}
body:is([data-layout="mobile"], [data-layout="portrait"]) #customerDetailsModal[data-mode="touch-profile"] .touch-customer-scroll::-webkit-scrollbar { display: none; }
body:is([data-layout="mobile"], [data-layout="portrait"]) #customerDetailsModal[data-mode="touch-profile"] :is(
  .touch-customer-step, .touch-customer-intro, .customer-details-compact-controls,
  .customer-details-date-row, .customer-details-lookup-mount, .customer-details-summary,
  .customer-details-order-confirmation, .touch-customer-total, .touch-customer-contact-title
) { display: none !important; }
body:is([data-layout="mobile"], [data-layout="portrait"]) #customerDetailsModal[data-mode="touch-profile"] .touch-customer-contact {
  display: block; padding: 0; background: transparent;
}
body:is([data-layout="mobile"], [data-layout="portrait"]) #customerDetailsModal[data-mode="touch-profile"] .customer-details-fields-mount {
  display: block !important; width: 100%; min-height: 0; margin: 0; padding: 0 !important;
  overflow: visible; border: 0 !important; box-shadow: none; background: transparent !important;
}
body:is([data-layout="mobile"], [data-layout="portrait"]) #customerDetailsModal[data-mode="touch-profile"] .customer-profile-fields {
  display: flex; flex-direction: column; gap: 0;
}
body:is([data-layout="mobile"], [data-layout="portrait"]) #customerDetailsModal[data-mode="touch-profile"] .touch-profile-field-label {
  display: block; margin: 13px 0 7px; color: var(--touch-muted);
  font-size: 12px; font-weight: 600; text-align: left !important; align-self: stretch;
}
body:is([data-layout="mobile"], [data-layout="portrait"]) #customerDetailsModal[data-mode="touch-profile"] .customer-profile-fields > input {
  min-height: 50px; border: 1px solid var(--touch-line); border-radius: 12px;
  background: #fff; box-shadow: none; color: var(--touch-ink);
}
body:is([data-layout="mobile"], [data-layout="portrait"]) #customerDetailsModal[data-mode="touch-profile"] #touchDeliveryAddress {
  margin: 21px 0 10px; padding: 0 15px; border: 1px solid var(--touch-line);
  border-radius: 16px; background: #fff;
}
body:is([data-layout="mobile"], [data-layout="portrait"]) #customerDetailsModal[data-mode="touch-profile"] #touchDeliveryAddressFields :is(input, select, textarea) {
  width: 100%; min-width: 0; min-height: 50px; box-sizing: border-box;
  border: 1px solid var(--touch-line) !important; border-radius: 12px !important;
  background: #fff !important; box-shadow: none !important;
  color: var(--touch-ink) !important; -webkit-text-fill-color: var(--touch-ink) !important;
  font-size: 16px !important;
}
body:is([data-layout="mobile"], [data-layout="portrait"]) #customerDetailsModal[data-mode="touch-profile"] #touchDeliveryAddressFields .pc-hn-row {
  grid-template-columns: repeat(2, minmax(0, 1fr)); min-width: 0;
}
body:is([data-layout="mobile"], [data-layout="portrait"]) #customerDetailsModal[data-mode="touch-profile"] #touchDeliveryAddressFields .pc-hn-row > input {
  min-width: 0;
}
body:is([data-layout="mobile"], [data-layout="portrait"]) #customerDetailsModal[data-mode="touch-profile"] .touch-profile-lookup {
  display: inline-flex; align-items: center; gap: 7px; width: 100%; min-height: 44px; margin: 12px 0 2px;
  padding: 8px 0; border: 0; background: transparent;
  color: var(--touch-accent); font-size: 13px; font-weight: 650; text-align: left;
}
body:is([data-layout="mobile"], [data-layout="portrait"]) #customerDetailsModal[data-mode="touch-profile"] .touch-profile-lookup svg {
  display: block; flex: 0 0 18px; width: 18px; height: 18px;
}
body:is([data-layout="mobile"], [data-layout="portrait"]) #customerDetailsModal[data-mode="touch-profile"] .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="touch-profile"] #customerDetailsSave {
  display: block; width: 100%; min-height: 52px !important; margin: 0; padding: 8px;
  border: 0 !important; border-radius: 13px; background: var(--touch-accent) !important;
  box-shadow: none !important; color: #fff !important; font-size: 16px; font-weight: 700;
}
body:is([data-layout="mobile"], [data-layout="portrait"]) #customerDetailsModal[data-mode="touch-profile"] :is(button, input, summary):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="touch-profile"] .customer-details-header { min-height: 50px; padding-block: 2px; }
  body:is([data-layout="mobile"], [data-layout="portrait"]) #customerDetailsModal[data-mode="touch-profile"] .touch-customer-scroll { padding-top: 12px; }
  body:is([data-layout="mobile"], [data-layout="portrait"]) #customerDetailsModal[data-mode="touch-profile"] .touch-customer-footer { padding-block: 8px; }
  body:is([data-layout="mobile"], [data-layout="portrait"]) #customerDetailsModal[data-mode="touch-profile"] #customerDetailsSave { min-height: 44px !important; }
}
