/* Touch workstations. Print templates keep the dimensions defined by the ticket. */
@media screen {
  .header-content, .workspace, .dialog-body {min-width:0}
  .header-content {column-gap:clamp(12px,2.5vw,42px)}
  #user-menu {min-width:0}
  #user-menu .user-identity {display:grid;min-width:0;line-height:1.25}
  #user-menu .user-identity b {display:block;max-width:15ch;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}
  #user-menu .user-identity small {white-space:nowrap}
  .auth-card {width:min(100%,440px);padding:clamp(22px,4.5vw,36px);border-radius:18px;box-shadow:0 10px 36px #512c3b0a}
  .auth-card>img {display:block;width:64px;height:64px;margin:0 auto 18px;border-radius:16px}
  .auth-card h1 {font-size:clamp(27px,6vw,36px);line-height:1.12;margin:0 0 8px}
  .auth-card .sub {margin:0 0 20px;line-height:1.5}
  .auth-card .field input {min-height:48px}
  .auth-card .help {margin:-4px 0 15px}
  .auth-card code {overflow-wrap:anywhere}
  .auth-card .primary {min-height:46px}
  a,button,input,select,textarea {touch-action:manipulation}
  .dialog-body, .field, .adm-body, .catalog, .ticket-panel, .prep-board {min-width:0}
}
@media screen and (max-width:1100px) {
  :root {scroll-padding-block:12px}
  .header-content {padding-left:max(16px,env(safe-area-inset-left));padding-right:max(16px,env(safe-area-inset-right))}
  .workspace {padding-left:max(clamp(14px,2.5vw,28px),env(safe-area-inset-left));padding-right:max(clamp(14px,2.5vw,28px),env(safe-area-inset-right))}
  .nav-item,.category-item,.adm-nav button,.confirm-payment,.billing-options label,.station-tickets button,.dialog-body .icon-btn,.customer-formats button,
  #user-menu .text-btn,.cart-lines .qty button,.extra-step button,.adm-nav button {min-height:44px}
  .dialog-body .icon-btn,.cart-lines .qty button,.extra-step button {min-width:44px}
  .dialog-body .field input,.dialog-body .field select,.dialog-body .field textarea,.auth-card .field input,.search input,
  .web-table-select select,.inv-cost select,.date-filter input {font-size:16px}
  .dialog-body .primary,.dialog-body .secondary,.cashier-actions button,.adm-actions button,.order-intro .editor-link,.customer-tools a {min-height:44px}
  .category-rail {overscroll-behavior-x:contain;scroll-padding-inline:6px}
  .cashier-heading {align-items:center}
  .customer-print-actions,.customer-formats {max-width:100%}
}
@media screen and (min-width:741px) and (max-width:980px) {
  .header-content {min-height:72px;display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:8px;align-items:center}
  .header-content nav {min-width:0;justify-content:center;gap:2px}
  .header-content .nav-item {gap:5px;padding-inline:8px}
  #user-menu {gap:7px}
  #user-menu .user-identity b,#user-menu .cashier-id-text b {max-width:90px}
  .order-layout {grid-template-columns:minmax(0,1fr) minmax(230px,.58fr);align-items:start;gap:15px}
  .order-layout .category-rail {display:flex;grid-column:1/-1;flex-direction:row;position:static;max-height:none;overflow-x:auto}
  .compact-menu {grid-template-columns:repeat(2,minmax(0,1fr))}
  .ticket-panel {top:12px}
}
@media screen and (max-width:740px) {
  .header-content {min-height:0;grid-template-columns:minmax(0,1fr) auto;row-gap:0}
  .brand {min-height:60px}
  .brand>span.wordmark {font-size:25px}
  .wordmark small {font-size:8px}
  .header-content nav {display:grid;grid-template-columns:repeat(auto-fit,minmax(0,1fr));gap:3px}
  #user-menu {gap:4px}
  #user-menu .user-identity b {max-width:clamp(52px,15vw,104px)}
  #user-menu .text-btn {padding-inline:5px}
  .workspace {padding-top:20px;padding-bottom:calc(90px + env(safe-area-inset-bottom))}
  .cash-banner,.adm-card-head {flex-wrap:wrap}
  .page-intro h1,.order-intro h1 {font-size:clamp(25px,6.5vw,32px)}
  .cashier-state {font-size:.78rem}
  .auth-card {margin:0 auto}
  .customer-print-actions {gap:6px}
  .customer-print-actions .primary,.customer-print-actions .secondary {min-height:44px}
  .mobile-cart-btn {bottom:calc(10px + env(safe-area-inset-bottom));left:max(12px,env(safe-area-inset-left));right:max(12px,env(safe-area-inset-right))}
}
@media screen and (max-width:900px) and (orientation:landscape) and (max-height:550px) {
  .header-content {min-height:54px;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:2px 10px}
  .header-content nav {display:flex;align-self:center;flex:0 1 auto;padding:0;margin:0}
  .header-content .nav-item {padding:6px;min-height:44px;gap:4px}
  .brand {min-height:50px}
  .brand img {width:32px;height:32px}
  .brand>span.wordmark {font-size:22px}
  .wordmark small {display:none}
  #user-menu {margin:0}
  #user-menu .user-identity b,#user-menu .cashier-id-text b {max-width:86px}
  .workspace {padding-top:14px}
  .ticket-panel,.category-rail {position:static}
  dialog,dialog.wider {max-height:calc(100vh - 8px);max-height:calc(100dvh - 8px)}
  #modal-content {max-height:calc(100vh - 12px);max-height:calc(100dvh - 12px)}
  .dialog-head {position:static;padding:8px 0;margin-top:-7px}
  .dialog-body {padding:13px 20px}
}
