/* The guarded Clawdie POS section on /pos (pos-section.js, board job 105): the code dialog, the three tabs, Hours with
   its day drawer, and Store computers as clean white cards. Light look: white cards on the page's pale background,
   the Office's own type, buttons and pills. Until the section answers, none of this shows. */

/* While the section runs it replaces the warning and the dark strip of tills; Staff and PINs shows only on its tab. */
body.pos-section-on #pos-warning,body.pos-section-on #pos-tills{display:none!important}
body.pos-section-on:not(.pos-tab-staff) #pos-staff{display:none!important}
body.pos-section-on.pos-tab-staff #pos-staff{margin-top:16px}

#pos-section{display:grid;gap:16px;margin-bottom:4px}
#pos .section-top{display:flex;align-items:center;justify-content:space-between;gap:12px}
#pos .section-lock{min-height:36px;padding:0 16px;font-size:11px}
#pos .pos-tabs{display:flex;gap:4px;width:max-content;max-width:100%;padding:4px;border-radius:999px;background:var(--cream);overflow-x:auto}
#pos .pos-tabs button{min-height:42px;padding:0 22px;border:0;border-radius:999px;background:transparent;box-shadow:none;color:var(--muted);font-size:13px;white-space:nowrap}
#pos .pos-tabs button:hover{background:rgb(255 255 255/.55)}
#pos .pos-tabs button[aria-selected=true]{background:var(--surface);color:var(--ink);box-shadow:0 2px 6px -2px rgb(34 31 32/.28)}
#pos .section-panel{display:grid;gap:16px;min-width:0}
#pos .section-locked{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px;padding:20px}
#pos .section-locked p{margin:0;font-size:15px}
#pos .hours-empty{display:grid;gap:8px;padding:28px 24px}
#pos .hours-empty h2{margin:0;font-family:Inter,'Segoe UI',system-ui,sans-serif;font-size:20px;font-weight:700;letter-spacing:0;text-transform:none}
#pos .hours-empty p{margin:0;max-width:62ch;font-size:15px;line-height:1.55;color:var(--ink)}
#pos .hours-empty .hours-empty-note{font-size:14px;color:var(--muted)}

/* Pills: a state in words, with a dot. */
#pos .section-pill{display:inline-flex;align-items:center;gap:6px;padding:3px 11px;border-radius:999px;font-size:12px;font-weight:700;white-space:nowrap}
#pos .section-pill::before{content:'';width:7px;height:7px;border-radius:50%;background:currentColor}
#pos .section-pill:is(.on,.signed-off,.computer-online){background:var(--mint);color:#1d5a2e}
#pos .section-pill:is(.break,.computer-late){background:var(--citrus);color:#7a4a08}
#pos .section-pill:is(.needs-attention,.computer-offline){background:var(--blush);color:#8c2f2b}
#pos .section-pill:is(.open,.computer-not-installed){background:#eceeef;color:#35434b}

/* ---- Hours ---- */
#pos .hours-bar{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:10px 16px;padding:14px 16px}
#pos .hours-pickers{display:flex;flex-wrap:wrap;align-items:center;gap:10px 14px;min-width:0}
#pos .hours-store{width:auto;min-width:150px;margin:0}
#pos .hours-week{display:flex;align-items:center;gap:8px;font-size:14px;font-weight:700;color:var(--ink)}
#pos .icon-only{display:inline-grid;place-items:center;min-width:36px;min-height:36px;padding:0;font-size:18px;line-height:1}
#pos .hours-actions{display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-end}
#pos .hours-why{grid-column:1/-1;margin:0;font-size:13px;color:var(--muted)}
#pos .hours-pair{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.4fr);gap:16px;align-items:start}
#pos .hours-card-head{display:flex;flex-wrap:wrap;align-items:center;gap:4px 12px;min-height:48px;padding-top:0;padding-bottom:0}
#pos .hours-card-head>span:first-child{font-size:15px;font-weight:700;letter-spacing:0;text-transform:none;color:var(--ink)}
#pos .hours-count{font-size:13px;font-weight:600;letter-spacing:0;text-transform:none;color:var(--muted)}
#pos .hours-rows{margin:0;padding:0;list-style:none}
#pos .hours-row{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:10px 12px;min-height:56px;padding:10px 16px}
#pos .hours-row+.hours-row{border-top:1px solid var(--line)}
#pos .hours-row-main{display:grid;gap:2px;min-width:0;font-size:13px;color:var(--muted)}
#pos .hours-row-main strong{font-size:14px;color:var(--ink)}
#pos .hours-dot{width:10px;height:10px;border-radius:50%;background:#f48c5b}
#pos .hours-dot.break{background:#e8a33a}
#pos .hours-flag{display:grid;place-items:center;width:24px;height:24px;border-radius:50%;background:var(--blush);color:#8c2f2b;font-size:13px;font-weight:700}
#pos .hours-flag.waiting{background:#eceeef;color:#35434b}
#pos .hours-row .secondary{min-height:32px;padding:0 14px;font-size:11px}
#pos .hours-wait{font-size:12px;font-weight:700;color:var(--muted)}
#pos .hours-quiet{margin:0;padding:18px 16px;font-size:14px;color:var(--muted)}
#pos .drawer-note{margin:0;font-size:13px;color:var(--muted)}
#pos .hours-grid-scroll{overflow-x:auto}
#pos .hours-grid{width:100%;min-width:900px;border-collapse:collapse;font-size:13px}
#pos .hours-grid th,#pos .hours-grid td{padding:8px 6px;border-bottom:1px solid var(--line);text-align:left;vertical-align:top}
#pos .hours-grid thead th{font-size:11px;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:var(--muted);background:var(--subtle)}
#pos .hours-grid tbody th{min-width:84px;padding-left:14px}
#pos .hours-grid thead th:first-child{padding-left:14px}
#pos .grid-name{display:block;font-size:14px;font-weight:700;color:var(--ink)}
#pos .grid-card{display:block;font-size:11px;font-weight:600;color:var(--muted)}
#pos .grid-empty{color:#b8b4aa}
#pos .grid-cell{padding:3px}
#pos .grid-open{display:grid;gap:4px;width:100%;min-height:0;padding:5px 6px;border:1px solid transparent;border-radius:10px;background:transparent;box-shadow:none;text-align:left;font-weight:400;letter-spacing:0;text-transform:none;color:var(--ink);cursor:pointer}
#pos .grid-open:hover{background:var(--hover);border-color:var(--edge)}
#pos .grid-open:focus-visible{outline:3px solid var(--focus);outline-offset:1px}
#pos .grid-cell.flagged .grid-open{border-color:#f0b8b5;background:#fff6f5}
#pos .grid-shift{display:grid;gap:1px}
#pos .grid-time{font-size:12px;font-weight:600;white-space:nowrap}
#pos .grid-detail{font-size:11px;color:var(--muted);white-space:nowrap}
#pos .grid-missing{color:#8c2f2b;font-weight:700}
#pos .grid-worked{font-size:13px;font-weight:700;color:#1d5a2e}
#pos .grid-week{padding-right:14px!important;font-size:14px;font-weight:700;color:var(--ink);white-space:nowrap}

/* The day drawer: beside the page on a computer, a sheet from the bottom on a phone. */
#pos .hours-drawer{position:fixed;top:calc(var(--header-height,72px) + 12px);right:16px;bottom:16px;z-index:30;display:flex;flex-direction:column;gap:12px;width:min(440px,calc(100vw - 32px));padding:20px;overflow-y:auto;border:1px solid var(--edge);border-radius:var(--radius-lg);background:var(--surface);box-shadow:var(--shadow-pop)}
#pos .drawer-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
#pos .hours-drawer h2{margin:0;font-family:Inter,'Segoe UI',system-ui,sans-serif;font-size:18px;font-weight:700;letter-spacing:0;text-transform:none}
#pos .hours-drawer h2:focus{outline:none}
#pos .hours-drawer h3{margin:6px 0 0;font-size:13px;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:var(--muted)}
#pos .drawer-summary{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;margin:0}
#pos .drawer-summary div{display:grid;gap:2px;padding:8px 10px;border:1px solid var(--edge);border-radius:10px;background:var(--subtle)}
#pos .drawer-summary dt{font-size:11px;font-weight:600;color:var(--muted)}
#pos .drawer-summary dd{margin:0;font-size:13px;font-weight:700;color:var(--ink)}
#pos .drawer-history{display:grid;gap:8px;margin:0;padding:0;list-style:none}
#pos .drawer-history li{display:grid;grid-template-columns:62px minmax(0,1fr);gap:10px;font-size:13px;color:var(--ink)}
#pos .drawer-history small{display:block;margin-top:2px;font-size:12px;color:var(--muted)}
#pos .history-at{font-weight:700;color:var(--muted)}
#pos .drawer-actions{display:flex;flex-wrap:wrap;gap:8px}
#pos .drawer-actions .secondary{min-height:36px;font-size:11px}
#pos .drawer-form{display:grid;gap:12px;padding:14px;border:1px solid var(--edge);border-radius:var(--radius);background:var(--subtle)}
#pos .drawer-form h3{margin:0;color:var(--ink);letter-spacing:0;text-transform:none;font-size:15px}
#pos .drawer-form .form-field+.form-field{margin-top:0}
#pos .drawer-form textarea{width:100%;min-height:64px;resize:vertical}
#pos .drawer-buttons{display:flex;justify-content:flex-end;gap:8px}
#pos .drawer-saved{margin:0;padding:10px 12px;border-radius:10px;background:var(--mint);color:#1d5a2e;font-size:13px}
#pos .drawer-empty{margin:0;color:var(--muted)}

/* ---- Store computers ---- */
#pos .computers-empty{margin:0;padding:24px;border:1px solid var(--edge);border-radius:var(--radius-lg);background:var(--surface);color:var(--muted)}
#pos .computers-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:16px}
#pos .computer-card{display:grid;align-content:start;min-width:0;overflow:hidden;border:1px solid var(--edge);border-radius:var(--radius-lg);background:var(--surface);box-shadow:var(--shadow-card)}
#pos .computer-screen{display:grid;place-items:center;width:100%;aspect-ratio:16/10;min-height:0;padding:0;overflow:hidden;border:0;border-bottom:1px solid var(--line);border-radius:0;background:#f3f1ec;box-shadow:none;color:var(--muted);font-size:13px;font-weight:600;letter-spacing:0;text-transform:none;cursor:zoom-in}
/* DeAndre, 18 Nov: the screen fills its card, full width, edge to edge. */
#pos .computer-screen img{display:block;width:100%;height:100%;object-fit:cover;object-position:top center}
#pos .computer-screen:focus-visible{outline:3px solid var(--focus);outline-offset:-3px}
#pos .computer-body{display:grid;gap:10px;padding:14px 16px 16px}
#pos .computer-title{display:flex;align-items:center;justify-content:space-between;gap:10px}
#pos .computer-title strong{font-size:15px;color:var(--ink)}
#pos .computer-facts{display:grid;gap:6px;margin:0}
#pos .computer-facts div{display:flex;justify-content:space-between;gap:10px;font-size:13px}
#pos .computer-facts dt{color:var(--muted)}
#pos .computer-facts dd{margin:0;font-weight:700;color:var(--ink);text-align:right}
#dialog .computer-large img{display:block;width:100%;border-radius:10px;border:1px solid var(--edge)}

/* ---- The code dialog ---- */
#dialog.gate-dialog .gate-lead{margin:0 0 10px;font-size:15px;color:var(--ink)}
#dialog.gate-dialog .gate-to{margin-bottom:8px}
#dialog.gate-dialog .gate-code-step .dialog-copy{margin-bottom:6px}
#dialog.gate-dialog .gate-code{width:100%;height:64px;margin:6px 0 4px;padding:0 0 0 .55em;font-family:Inter,sans-serif;font-size:32px;font-weight:700;letter-spacing:.55em;text-align:center}
#dialog.gate-dialog .gate-buttons{justify-content:space-between}
#dialog.gate-dialog .gate-note{margin:12px 0 0;font-size:13px;color:var(--muted)}
#dialog.gate-dialog .gate-preview{margin:10px 0 18px;padding:8px 12px;border:1px dashed #e0a24a;border-radius:10px;background:var(--citrus);color:#7a4a08;font-size:12px;font-weight:600}

@media(max-width:900px){
  #pos .hours-bar{grid-template-columns:minmax(0,1fr)}
  #pos .hours-actions{justify-content:flex-start}
  #pos .hours-pair{grid-template-columns:minmax(0,1fr)}
  #pos .drawer-summary{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:720px){
  #pos .pos-tabs{width:100%}
  #pos .pos-tabs button{flex:1;padding:0 10px;min-height:44px}
  #pos .hours-drawer{top:auto;left:0;right:0;bottom:0;width:100%;max-height:82dvh;border-radius:20px 20px 0 0}
  #pos .hours-row .secondary,#pos .icon-only{min-height:44px;min-width:44px}
  #pos .computers-grid{grid-template-columns:minmax(0,1fr)}
}

/* Follow-ups (24 Nov 2026): what staff noted about a sale on the till, newest first. Read only. */
#pos .followups-bar{display:flex;flex-wrap:wrap;align-items:center;gap:12px}
#pos .followups-bar select{min-height:44px;padding:0 12px;border:1px solid var(--edge);border-radius:12px;background:var(--surface);font:inherit;font-weight:700}
#pos .followups-count{margin-left:auto;color:var(--muted);font-weight:700}
#pos .followups-list{display:grid;gap:12px}
#pos .followup-card{display:grid;gap:6px;padding:16px 20px;border:1px solid var(--edge);border-left:4px solid #2f9a4b;border-radius:var(--radius-lg);background:var(--surface);box-shadow:var(--shadow-card)}
#pos .followup-card.kind-escalate{border-left-color:#c24141}
#pos .followup-card.kind-refund{border-left-color:#e8a52e}
#pos .followup-card.kind-free-drink{border-left-color:#3579e8}
#pos .followup-head{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:8px 16px}
#pos .followup-head span,#pos .followup-who{color:var(--muted);font-size:14px;font-weight:700}
#pos .followup-note,#pos .followup-who{margin:0}
#pos .followup-note{overflow-wrap:anywhere}

/* Count photos (count-photos.ts): one card per count, its pictures on the left, the count's details beside them. */
#pos .countphotos-list{display:grid;gap:12px}
#pos .countphoto-card{display:flex;flex-wrap:wrap;gap:16px;padding:16px 20px;border:1px solid var(--edge);border-left:4px solid #2f9a4b;border-radius:var(--radius-lg);background:var(--surface);box-shadow:var(--shadow-card)}
#pos .countphoto-card.diff-short{border-left-color:#c24141}
#pos .countphoto-card.diff-over{border-left-color:#e8a52e}
#pos .countphoto-card.diff-unknown{border-left-color:var(--edge)}
#pos .countphoto-pictures{display:flex;flex-wrap:wrap;gap:8px;align-content:flex-start}
#pos .countphoto-thumb{width:112px;height:112px;padding:0;border:1px solid var(--edge);border-radius:12px;background:#eef0e6;overflow:hidden;cursor:zoom-in}
#pos .countphoto-thumb img{display:block;width:100%;height:100%;object-fit:cover}
#pos .countphoto-thumb:focus-visible{outline:3px solid rgb(47 154 75 / .5);outline-offset:2px}
#pos .countphoto-body{display:grid;gap:8px;flex:1 1 320px;min-width:0;align-content:start}
#pos .countphoto-diff{font-weight:700}
#pos .diff-short .countphoto-diff{color:#a53030}
#pos .diff-over .countphoto-diff{color:#8a5a00}
#pos .diff-exact .countphoto-diff{color:#1f7a37}
#pos .countphoto-facts{display:flex;flex-wrap:wrap;gap:8px 28px}
#pos .countphoto-fact{display:grid;gap:2px}
#pos .countphoto-fact span{color:var(--muted);font-size:13px;font-weight:700}
.countphoto-view img{display:block;max-width:100%;max-height:70vh;margin:0 auto;border-radius:12px}
