/* St Mike's coffee order — phone order page
   Version: v5 */
* { box-sizing: border-box; }
html, body { margin: 0; background: #F7F5F2; color: #1C1A17; }
body { font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif; -webkit-text-size-adjust: 100%; }
.wrap { max-width: 480px; min-height: 100vh; margin: 0 auto; padding: calc(24px + env(safe-area-inset-top, 0px)) 22px calc(108px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; }
h1 { margin: 0 0 18px; font-size: 28px; font-weight: 700; letter-spacing: -0.01em; }
.brand { font-size: 17px; font-weight: 700; }
.field { margin-bottom: 16px; }
.label { display: block; font-size: 15px; font-weight: 600; color: #5E574E; margin-bottom: 8px; }
.input { width: 100%; height: 48px; padding: 0 16px; font: inherit; font-size: 19px; border: 2px solid #D9D2C7; border-radius: 12px; background: #FFFFFF; color: #1C1A17; }
.input:focus { outline: none; border-color: #1F6B44; }
.input::placeholder { color: #8A8279; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.opt { height: 52px; border-radius: 12px; font: inherit; font-size: 17px; font-weight: 600; cursor: pointer; background: #FFFFFF; color: #1C1A17; border: 2px solid #D9D2C7; padding: 0 8px; }
.opt.short { height: 48px; }
.opt.full { grid-column: span 2; }
.opt[aria-pressed="true"] { background: #1F6B44; color: #FFFFFF; border-color: #1F6B44; }
.opt:focus-visible, .chip:focus-visible, .cta:focus-visible, .ghost:focus-visible { outline: 3px solid #6B3F1D; outline-offset: 2px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.chip { height: 40px; padding: 0 16px; border-radius: 20px; font: inherit; font-size: 16px; font-weight: 600; cursor: pointer; background: #FFFFFF; color: #1C1A17; border: 2px solid #D9D2C7; }
.chip[aria-pressed="true"] { background: #1F6B44; color: #FFFFFF; border-color: #1F6B44; }
.cta { width: 100%; height: 60px; border: 0; border-radius: 14px; font: inherit; font-size: 19px; font-weight: 700; cursor: pointer; background: #6B3F1D; color: #FFFFFF; }
.cta:disabled { background: #E4DFD8; color: #5E574E; cursor: default; }
.ghost { width: 100%; height: 60px; border: 2px solid #D9D2C7; border-radius: 14px; font: inherit; font-size: 19px; font-weight: 600; cursor: pointer; background: #FFFFFF; color: #1C1A17; }
.error { background: #FBE9E4; color: #7A2412; border-radius: 10px; padding: 10px 14px; font-size: 16px; margin-bottom: 12px; }
.muted { color: #5E574E; }
.centre { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px 12px; }
.centre > * + * { margin-top: 16px; }
.badge { width: 84px; height: 84px; border-radius: 42px; display: flex; align-items: center; justify-content: center; }
.badge.ok { background: #1F6B44; color: #FFFFFF; }
.badge.closed { background: #E9E4DC; color: #5E574E; }
.centre h2 { margin: 0; font-size: 28px; font-weight: 700; }
.summary { font-size: 20px; }
.noteline { font-size: 17px; background: #E9E4DC; border-radius: 8px; padding: 4px 10px; }
.msg { font-size: 18px; line-height: 1.45; color: #5E574E; }

/* v2 — pinned order bar */
.bar { position: fixed; left: 0; right: 0; bottom: 0; background: #F7F5F2; border-top: 1px solid #E4DFD8; padding: 12px 22px calc(12px + env(safe-area-inset-bottom, 0px)); z-index: 5; }
.bar .cta { display: block; max-width: 436px; margin: 0 auto; }

/* v2 — note button and modal */
.notebtn { width: 100%; min-height: 52px; display: flex; align-items: center; gap: 10px; padding: 10px 16px; border: 2px solid #D9D2C7; border-radius: 12px; background: #FFFFFF; color: #1C1A17; font: inherit; font-size: 17px; font-weight: 600; text-align: left; cursor: pointer; }
.notebtn.set { border-color: #1F6B44; }
.notebtn svg { flex-shrink: 0; color: #5E574E; }
.notebtn .nt { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notebtn:focus-visible { outline: 3px solid #6B3F1D; outline-offset: 2px; }
body.locked { overflow: hidden; }
.overlay { position: fixed; top: 0; right: 0; bottom: 0; left: 0; background: rgba(28, 26, 23, 0.55); display: flex; align-items: flex-start; justify-content: center; padding: calc(24px + env(safe-area-inset-top, 0px)) 16px 16px; z-index: 10; }
.dlg { width: 100%; max-width: 448px; background: #FFFFFF; border-radius: 16px; padding: 20px; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18); }
.dlg h2 { margin: 0 0 14px; font-size: 22px; font-weight: 700; outline: none; }
.dlg .chips { margin-bottom: 12px; }
.ta { width: 100%; min-height: 96px; padding: 12px 14px; font: inherit; font-size: 18px; line-height: 1.4; border: 2px solid #D9D2C7; border-radius: 12px; background: #FFFFFF; color: #1C1A17; resize: none; }
.ta:focus { outline: none; border-color: #1F6B44; }
.ta::placeholder { color: #8A8279; }
.dlgbtns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
.dlgbtns button { height: 52px; border-radius: 12px; font: inherit; font-size: 18px; font-weight: 600; cursor: pointer; }
.dlgbtns .clear { background: #FFFFFF; color: #1C1A17; border: 2px solid #D9D2C7; }
.dlgbtns .ok { background: #1F6B44; color: #FFFFFF; border: 0; font-weight: 700; }

/* v3 — the hidden attribute must win over display rules (the note overlay is display:flex) */
[hidden] { display: none !important; }

/* v4 — choice groups: up to 4 across */
.grid2.cols1 { grid-template-columns: minmax(0, 1fr); }
.grid2.cols3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid2.cols4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* v5 — compact layout: one screen for most drinks */
.wrap { padding: calc(16px + env(safe-area-inset-top, 0px)) 16px calc(92px + env(safe-area-inset-bottom, 0px)); }
h1 { font-size: 24px; margin: 0 0 12px; }
.field { margin-bottom: 12px; }
.input { height: 44px; padding: 0 14px; font-size: 18px; }
.grid2.drinks { gap: 6px; }
.grid2.drinks .opt { height: 44px; border-radius: 10px; font-size: 16px; }
.orow { display: flex; align-items: center; margin-bottom: 8px; }
.olbl { width: 104px; flex-shrink: 0; margin-right: 10px; font-size: 15px; font-weight: 600; color: #5E574E; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.strip { flex: 1; min-width: 0; display: flex; height: 44px; border: 2px solid #D9D2C7; border-radius: 10px; overflow: hidden; background: #FFFFFF; }
.sg { flex: 1; min-width: 0; border: 0; border-left: 2px solid #D9D2C7; background: #FFFFFF; color: #1C1A17; font: inherit; font-size: 15px; font-weight: 600; padding: 0 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.sg:first-child { border-left: 0; }
.sg[aria-pressed="true"] { background: #1F6B44; color: #FFFFFF; }
.sg:focus-visible { outline: 3px solid #6B3F1D; outline-offset: -3px; }
.orow + .field { margin-top: 12px; }
.notebtn { min-height: 44px; padding: 8px 14px; font-size: 16px; border-radius: 10px; }
.bar { padding: 10px 16px calc(12px + env(safe-area-inset-bottom, 0px)); }
.cta { height: 54px; }
