/* RTB Staff: the door, orders, box office and people pages (pages/staff.rs). Built on
   rtb.css's tokens; made for a phone held at the door first. */

body.staff { background: var(--rtb-gray); font-size: 16px; }
/* door.js shows and hides parts of the page with the `hidden` attribute; a class that sets
   `display` (the scanner's Start cover is a flex box) would otherwise keep them on screen. */
.staff [hidden] { display: none !important; }
.staff a { color: var(--rtb-black); }

.staff-bar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  background: var(--rtb-black); color: var(--rtb-white);
  padding: 12px max(16px, env(safe-area-inset-left)) 12px max(16px, env(safe-area-inset-right));
}
.staff-bar a { color: var(--rtb-white); }
.staff-brand { font-family: var(--rtb-serif); font-weight: 900; font-size: 20px; text-decoration: none; }
.staff-nav { display: flex; align-items: center; gap: 18px; font-size: 15px; font-weight: 700; }
.staff-nav a { text-decoration: none; }
.staff-nav form { margin: 0; }
.staff-bar .staff-link { color: #cfcfcf; }
.staff-brand img { height: 40px; width: auto; display: block; }

.staff-main { max-width: 760px; margin: 0 auto; padding: 20px 16px 64px; }
.staff-main h1 { font-size: 30px; margin: 4px 0 6px; }
.staff-main h2 { font-size: 21px; margin: 0 0 10px; }
.staff-muted { color: var(--rtb-muted); font-size: 14px; }
.staff-mono { font-family: ui-monospace, Menlo, monospace; font-size: 13px; word-break: break-all; }

.staff-card {
  background: var(--rtb-white); border: 1px solid var(--rtb-line); border-radius: var(--rtb-radius);
  padding: 18px; margin: 14px 0;
}
.staff-narrow { max-width: 440px; margin: 40px auto; }
/* The sign-in pages, inside the site's own header and footer (pages/staff.rs entry_page). */
.staff-entry-band { background: var(--rtb-gray); padding: 24px 0 48px; }
.staff-entry .staff-card h1 { font-size: 30px; margin: 0 0 8px; }
.staff-entry .staff-card p { margin: 0 0 10px; }
.staff-notice { background: #e8f5ec; border: 1px solid #b7dfc3; color: #18452a; border-radius: 12px; padding: 12px 14px; margin: 0 0 14px; font-weight: 700; }
.staff-error { background: #fdecee; border: 1px solid #f3b8c0; color: #7a1724; border-radius: 12px; padding: 12px 14px; margin: 10px 0; }
.staff-error ul { margin: 0; padding-left: 18px; }
.staff-dev { background: #fff7e0; border: 1px dashed #d9b44a; border-radius: 12px; padding: 12px 14px; }
.staff-danger { border-color: #f0c2c8; }

.staff-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.staff-actions form { margin: 0; }
.staff .button, .staff .button-outline { padding: 13px 22px; font-size: 13px; }
.staff-link { background: none; border: 0; padding: 0; font: inherit; font-weight: 700; color: var(--rtb-black); text-decoration: underline; cursor: pointer; }

.staff-form { display: flex; flex-direction: column; gap: 8px; }
.staff-form label { font-weight: 700; font-size: 14px; margin-top: 6px; }
.staff-form input[type=email], .staff-form input[type=text], .staff-form input[type=search],
.staff-form input[type=number], .staff-form select, .staff-search {
  font: inherit; font-size: 17px; padding: 12px 14px; border: 1.5px solid #cfcfcf; border-radius: 12px; background: #fff; width: 100%;
}
.staff-form .button { margin-top: 10px; align-self: flex-start; }
.staff-inline { flex-direction: row; align-items: center; }
.staff-inline .button { margin-top: 0; }
.staff-form fieldset { border: 0; padding: 0; margin: 0 0 10px; }
.staff-form legend { font-family: var(--rtb-serif); font-weight: 700; font-size: 19px; margin-bottom: 6px; }
.staff-qty { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--rtb-line); }
.staff-qty label { margin: 0; font-weight: 700; }
.staff-qty input { width: 84px !important; text-align: center; }
.staff-radios { display: flex; flex-direction: column; gap: 8px; }
.staff-radios label, .staff-check { font-weight: 400 !important; font-size: 16px !important; display: flex; align-items: center; gap: 8px; }
.staff-radios input, .staff-check input { width: 20px; height: 20px; }

.staff-perfs, .staff-results, .staff-door-list, .staff-events { list-style: none; margin: 0; padding: 0; }
.staff-perf-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.staff-perf-head h2 { margin: 0; }
.staff-badge { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; background: var(--rtb-black); color: #fff; border-radius: 999px; padding: 4px 10px; }
.staff-past { opacity: 0.6; }

.staff-counts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 12px 0 4px; }
.staff-counts div { background: var(--rtb-gray); border-radius: 12px; padding: 10px 6px; text-align: center; }
.staff-counts strong { display: block; font-family: var(--rtb-serif); font-size: 30px; line-height: 1.1; }
.staff-counts span { font-size: 12px; color: var(--rtb-muted); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; }
.staff-counts .staff-missing { background: #fff1d6; }

.staff-scanner { padding: 12px; }
.staff-video-wrap { position: relative; aspect-ratio: 1 / 1; max-height: 60vh; margin: 0 auto; background: #111; border-radius: 12px; overflow: hidden; }
.staff-video-wrap video { width: 100%; height: 100%; object-fit: cover; display: block; }
.staff-video-idle { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 20px; text-align: center; background: #1b1b1b; }
.staff-video-idle .staff-muted { color: #bdbdbd; }
.staff-video-idle .button { background: #fff; color: #111; border-color: #fff; }
.staff-result { margin-top: 12px; border-radius: 12px; padding: 14px 16px; font-size: 18px; line-height: 1.35; }
.staff-result strong { display: block; font-size: 24px; font-family: var(--rtb-serif); }
.staff-result-admit { background: #1f7a43; color: #fff; }
.staff-result-warn { background: #ffcc4d; color: #3d2a00; }
.staff-result-stop { background: #b3192e; color: #fff; }
.staff-scanner .staff-link { margin-top: 10px; }

.staff-list-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 24px 0 8px; }
.staff-list-head h2 { margin: 0; }
.staff-search { max-width: 220px; padding: 10px 12px !important; }
.staff-door-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: #fff; border: 1px solid var(--rtb-line); border-radius: 12px; padding: 12px 14px; margin: 8px 0; }
.staff-door-row.staff-is-in { background: #eef8f1; border-color: #c4e5cf; }
.staff-door-who { display: flex; flex-direction: column; min-width: 0; }
.staff-door-who a { text-decoration: none; }
.staff-door-row form { margin: 0; flex: none; }
.staff-chip { font: inherit; font-weight: 700; font-size: 14px; border: 1.5px solid var(--rtb-black); background: #fff; color: var(--rtb-black); border-radius: 999px; padding: 9px 16px; cursor: pointer; white-space: nowrap; }
.staff-chip-in { background: #1f7a43; border-color: #1f7a43; color: #fff; }

.staff-details { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0; }
.staff-details dt { color: var(--rtb-muted); font-size: 14px; }
.staff-details dd { margin: 0; }
.staff-results li { display: flex; flex-direction: column; gap: 2px; }
.staff-order-group { margin-top: 32px; }
.staff-order-group h2 { margin: 0 0 4px; }
.staff-order-group > .staff-muted { margin: 0 0 12px; }
.staff-person { flex-direction: row !important; align-items: center; justify-content: space-between; }
.staff-person form { margin: 0; }
.staff-events li { padding: 6px 0; border-bottom: 1px solid var(--rtb-line); }

@media (max-width: 520px) {
  .staff-counts strong { font-size: 24px; }
  .staff-counts span { font-size: 10px; }
  .staff-list-head { flex-direction: column; align-items: stretch; }
  .staff-search { max-width: none; }
}
