/* Site view: the building card's live tickets and the search bar (siteview.js, 2026-11-23). Loaded after app.css. */

/* the search bar, top centre, between the title card and the buttons */
.sv-head { align-items: flex-start; }
.sv-head > .sv-title { flex: none; }
.sv-head > .sv-actions { flex: none; justify-content: flex-end; }
.sv-search { position: relative; flex: 1 1 260px; max-width: 460px; min-width: 220px; margin: 0 auto; display: flex; align-items: center; gap: 8px;
  height: 42px; padding: 0 10px 0 13px; background: var(--surface); border: 1px solid transparent; border-radius: 10px;
  box-shadow: 0 1px 3px rgba(16, 24, 40, .18); transition: box-shadow .15s, border-color .15s; }
.sv-search:focus-within { border-color: var(--text); box-shadow: 0 0 0 3px rgba(16, 24, 40, .10), 0 4px 16px rgba(16, 24, 40, .18); }
.sv-search[hidden] { display: none; }
.sv-search-i { display: inline-flex; color: var(--muted); }
.sv-search-in { flex: 1; min-width: 0; height: 100%; border: 0; outline: none; background: none; font: inherit; font-size: 14px; color: var(--text); }
.sv-search-in::placeholder { color: var(--faint); }
.sv-search-in::-webkit-search-cancel-button { cursor: pointer; }
.sv-search-k { font: 600 11px -apple-system, system-ui, sans-serif; color: var(--muted); border: 1px solid var(--line-strong); border-radius: 5px; padding: 1px 6px; }
.sv-search:focus-within .sv-search-k { display: none; }
.sv-sres { position: absolute; left: 0; right: 0; top: calc(100% + 6px); max-height: min(60vh, 460px); overflow: auto; overscroll-behavior: contain;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 5px; box-shadow: 0 12px 32px -8px rgba(16, 24, 40, .32); z-index: 30; }
.sv-sres[hidden] { display: none; }
.sv-sr-h { display: flex; justify-content: space-between; padding: 8px 9px 3px; font-size: 11px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.sv-sr { width: 100%; display: flex; align-items: center; gap: 10px; padding: 7px 9px; border: 0; border-radius: 7px; background: none; text-align: left; font: inherit; cursor: pointer; color: var(--text); }
.sv-sr.act { background: var(--bg); }
.sv-sr-main { display: flex; flex-direction: column; min-width: 0; }
.sv-sr-main strong { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sv-sr-main span { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sv-sr-t { flex: none; width: 8px; height: 8px; border-radius: 2px; background: var(--faint); }
.sv-sr-t.ticket { background: #1570ef; } .sv-sr-t.pallet { background: #067647; } .sv-sr-t.order { background: #6941c6; } .sv-sr-t.machine { background: #344054; border-radius: 50%; }
.sv-sr-t.station { background: #98a2b3; } .sv-sr-t.customer { background: #dc6803; border-radius: 50%; } .sv-sr-t.building { background: #101828; }
.sv-sr-none { margin: 0; padding: 10px; font-size: 13px; color: var(--muted); }
.sv-notes { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; pointer-events: none; }
.sv-notes > * { pointer-events: auto; }
@media (max-width: 1180px) { .sv-head { flex-wrap: wrap; } .sv-search { order: 3; flex-basis: 100%; max-width: 520px; margin: 0; } }

/* the building card: a wider card with every live ticket in it */
.sv-card.sv-bcard { width: 380px; }
.sv-fchips { display: flex; flex-wrap: wrap; gap: 5px; margin: 2px 0 10px; }
.sv-fchip { border: 1px solid var(--line-strong); background: var(--surface); border-radius: 999px; padding: 3px 10px; font: inherit; font-size: 12px; color: var(--text-2); cursor: pointer; }
.sv-fchip strong { color: var(--text); }
.sv-fchip:hover:not(:disabled) { border-color: var(--text); }
.sv-fchip.on { background: var(--text); border-color: var(--text); color: #fff; }
.sv-fchip.on strong { color: #fff; }
.sv-fchip.bad:not(.on) { border-color: #f4b7b1; color: #9c1a12; } .sv-fchip.bad:not(.on) strong { color: #9c1a12; }
.sv-fchip:disabled { opacity: .45; cursor: default; }
.sv-bgroups { display: flex; flex-direction: column; gap: 12px; margin-bottom: 10px; }
.sv-bgroup-h { display: flex; align-items: center; gap: 8px; padding-bottom: 4px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.sv-bgroup-name { border: 0; background: none; padding: 0; font: inherit; font-size: 13px; font-weight: 650; color: var(--text); cursor: pointer; text-align: left; }
.sv-bgroup-name:hover { color: #1570ef; text-decoration: underline; }
.sv-bgroup-n { margin-left: auto; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--bg); font-size: 11.5px; font-weight: 650; color: var(--muted);
  display: inline-flex; align-items: center; justify-content: center; }
.sv-tks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.sv-tk { position: relative; width: 100%; display: flex; flex-direction: column; gap: 1px; padding: 7px 26px 7px 10px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--surface); text-align: left; font: inherit; color: var(--text); cursor: pointer; transition: border-color .12s, background-color .12s; }
.sv-tk:hover, .sv-tk:focus-visible { border-color: var(--text); background: var(--subtle); outline: none; }
.sv-tk-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sv-tk-top strong { font-size: 13.5px; font-variant-numeric: tabular-nums; }
.sv-tk-l { font-size: 12.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sv-tk-m { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sv-tk-go { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: var(--faint); font-size: 18px; }
.sv-tk-bar { display: block; height: 4px; margin-top: 5px; border-radius: 2px; background: var(--line); overflow: hidden; }
.sv-tk-bar > i { display: block; height: 100%; width: 0; background: #1570ef; border-radius: 2px; }
.sv-ph { flex: none; font-size: 11px; font-weight: 650; padding: 1px 8px; border-radius: 999px; background: var(--bg); color: var(--text-2); }
.sv-ph.working { background: var(--green-bg); color: var(--green); }
.sv-ph.hold { background: #fdecea; color: #9c1a12; }
.sv-ph.ready { background: #eff8ff; color: #175cd3; }
.sv-empty { margin: 4px 0 10px; font-size: 12.5px; color: var(--muted); }
.sv-bmach { margin: 4px 0 10px; }
.sv-bsub { display: block; font-size: 11px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin-bottom: 5px; }
.sv-mchips { display: flex; flex-wrap: wrap; gap: 5px; }
.sv-mchip { border: 1px solid var(--line-strong); background: var(--subtle); border-radius: 6px; padding: 3px 9px; font: inherit; font-size: 12px; color: var(--text-2); cursor: pointer; }
.sv-mchip:hover { border-color: var(--text); color: var(--text); }
.sv-bcard .sv-more { margin: 0 0 10px; }
[data-theme="dark"] .sv-search, [data-theme="dark"] .sv-sres, [data-theme="dark"] .sv-tk { background: #1C1C1C; }
[data-theme="dark"] .sv-sr.act, [data-theme="dark"] .sv-tk:hover { background: #2a2a2a; }
