/* Orca Race Day — the tabs and the three tools around the volunteer app.
   Same palette and one-thumb sizing as the volunteer app it sits beside. */

html, body.ord-body {
  margin: 0;
  background: #EDF1F3;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #0A0F12;
}

body.ord-body * { box-sizing: border-box; }

/* ----------------------------------------------------------------- tabs */

.ord-tabs {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 4px;
  max-width: 720px;
  margin: 0 auto;
  padding: 6px 8px;
  padding-top: max(6px, env(safe-area-inset-top));
  background: #0A0F12;
}
.ord-tabs[hidden], .ord-tab[hidden] { display: none; }

.ord-tab {
  min-height: 44px;
  padding: 6px 4px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #c9d1da;
  font: 600 14px/1.15 inherit;
  font-family: inherit;
  cursor: pointer;
}
.ord-tab.is-on { background: #12546B; color: #fff; }
.ord-tab:focus-visible { outline: 2px solid #FFB000; outline-offset: 1px; }

.ord-panel[hidden] { display: none !important; }

/* --------------------------------------------------------- shared bits */

.ord-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin: 4px 0 12px; }
.ord-head h2 { margin: 0; font-size: 22px; }
.ord-sub { margin: 2px 0 0; color: #5C6C74; font-size: 14px; }
.ord-refresh {
  flex: none; min-width: 44px; min-height: 44px; padding: 0 12px;
  border: 1px solid #D3DBDF; border-radius: 4px; background: #fff;
  font: 600 14px inherit; font-family: inherit; color: #12546B; cursor: pointer;
}
.ord-refresh:disabled { opacity: .5; }

.ord-card {
  background: #fff;
  border: 1px solid #D3DBDF;
  border-radius: 4px;
  padding: 14px;
  margin-bottom: 12px;
}
.ord-card h3 { margin: 0 0 8px; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: #5C6C74; }

.ord-note { color: #5C6C74; font-size: 14px; margin: 0 0 10px; }
.ord-warn { background: #fff4e5; color: #8a4b08; border-radius: 4px; padding: 10px 12px; font-size: 14px; margin: 0 0 12px; }
.ord-bad  { background: #fdeceb; color: #a3341c; border-radius: 4px; padding: 10px 12px; font-size: 14px; margin: 0 0 12px; }
.ord-ok   { background: #e8f5ee; color: #157a48; border-radius: 4px; padding: 10px 12px; font-size: 14px; margin: 0 0 12px; }
.ord-empty { text-align: center; color: #5C6C74; padding: 40px 12px; }

.ord-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.ord-stat { background: #fff; border: 1px solid #D3DBDF; border-radius: 4px; padding: 10px; text-align: center; }
.ord-stat b { display: block; font-size: 28px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.ord-stat span { font-size: 12px; color: #5C6C74; }
.ord-stat.is-hot b { color: #a3341c; }

/* -------------------------------------------------------------- course */

.ord-runner {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 4px 10px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid #eef0f3;
}
.ord-runner:first-child { border-top: 0; }
.ord-bib { font: 700 22px/1 ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-variant-numeric: tabular-nums; }
.ord-who { min-width: 0; }
.ord-who strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ord-who span { font-size: 13px; color: #5C6C74; }
.ord-overdue { color: #a3341c; font-weight: 700; }
.ord-acts { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.ord-act {
  min-height: 40px; border: 1px solid #D3DBDF; border-radius: 4px; background: #EDF1F3;
  font: 600 13px inherit; font-family: inherit; color: #0A0F12; cursor: pointer;
}
.ord-act:disabled { opacity: .5; }
.ord-undo { border: 0; background: none; color: #12546B; font: 600 13px inherit; font-family: inherit; padding: 6px 0; cursor: pointer; }
details.ord-cleared summary { cursor: pointer; font-weight: 600; padding: 4px 0; }

/* -------------------------------------------------------------- shirts */

.ord-search { display: flex; gap: 8px; }
.ord-search input {
  flex: 1; min-width: 0; font-size: 20px; padding: 12px; border: 2px solid #D3DBDF; border-radius: 4px; background: #fff;
}
.ord-search input:focus { outline: none; border-color: #12546B; }
.ord-search button { width: auto; margin: 0; flex: none; }

.ord-hit { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; align-items: center; padding: 12px 0; border-top: 1px solid #eef0f3; }
.ord-hit:first-child { border-top: 0; }
.ord-size { grid-row: span 2; font-size: 26px; font-weight: 800; color: #12546B; text-align: right; }
.ord-size.is-none { font-size: 15px; color: #5C6C74; font-weight: 600; }

.ord-tally { width: 100%; border-collapse: collapse; font-size: 15px; font-variant-numeric: tabular-nums; }
.ord-tally td { padding: 6px 0; border-top: 1px solid #eef0f3; }
.ord-tally td:last-child { text-align: right; font-weight: 600; }

/* ---------------------------------------------------------------- swag */

.ord-line {
  display: grid;
  grid-template-columns: 1fr 96px;
  gap: 2px 10px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid #eef0f3;
}
.ord-line:first-of-type { border-top: 0; }
.ord-line label { font-weight: 600; }
.ord-line small { grid-column: 1; color: #5C6C74; font-size: 12px; }
.ord-line input[type="number"], .ord-line input[type="text"] {
  width: 100%; font-size: 20px; padding: 10px; border: 2px solid #D3DBDF; border-radius: 4px; background: #fff;
  font-variant-numeric: tabular-nums; text-align: center;
}
.ord-line input:focus { outline: none; border-color: #12546B; }
.ord-line.is-extra { grid-template-columns: 1fr 96px 36px; }
.ord-line.is-extra input[type="text"] { text-align: left; font-size: 16px; }
.ord-x { width: 36px; height: 36px; border: 0; background: none; color: #a3341c; font-size: 22px; cursor: pointer; }

.ord-field { display: block; margin-bottom: 10px; }
.ord-field span { display: block; font-size: 13px; color: #5C6C74; margin-bottom: 4px; }
.ord-field input, .ord-field textarea {
  width: 100%; font-size: 17px; padding: 10px; border: 2px solid #D3DBDF; border-radius: 4px; background: #fff; font-family: inherit;
}
.ord-field input:focus, .ord-field textarea:focus { outline: none; border-color: #12546B; }

.ord-add { border: 0; background: none; color: #12546B; font: 600 15px inherit; font-family: inherit; padding: 10px 0 0; cursor: pointer; }

.ord-savebar {
  position: sticky;
  bottom: 0;
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 0 -12px;
  padding: 10px 12px;
  padding-bottom: max(10px, env(safe-area-inset-bottom));
  background: rgba(245, 246, 248, .96);
  border-top: 1px solid #D3DBDF;
}
.ord-savebar .ov-btn { margin: 0; flex: 1; }
.ord-dirty { font-size: 13px; color: #8a4b08; flex: none; max-width: 40%; }

.ord-links { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; padding: 18px 0 8px; font-size: 14px; }
.ord-links a { color: #12546B; }

/* --------------------------------------------------------------- admin */

.ord-adminlist { display: grid; gap: 10px; }
.ord-adminbtn {
  display: block; width: 100%; text-align: left; padding: 16px;
  border: 1px solid #D3DBDF; border-radius: 4px; background: #fff; cursor: pointer;
  font-family: inherit; color: #0A0F12;
}
.ord-adminbtn strong { display: block; font-size: 17px; }
.ord-adminbtn span { display: block; font-size: 14px; color: #5C6C74; margin-top: 2px; }
.ord-adminbtn:focus-visible { outline: 2px solid #12546B; outline-offset: 2px; }

/* ---------------------------------------------------------- spyhop skin */
/* Race day wears the kiosk's look: Plex type, ink/fog/pacific with signal
   amber, square-ish corners, condensed uppercase on the primary actions. */

html, body.ord-body,
body.ord-body .ov-app {
  font-family: "IBM Plex Sans", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}
body.ord-body .ov-app {
  --ov-ink: #0A0F12;
  --ov-muted: #5C6C74;
  --ov-line: #D3DBDF;
  --ov-bg: #EDF1F3;
  --ov-accent: #12546B;
}

.ord-bar {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: max(10px, env(safe-area-inset-top)) 20px 10px;
  background: #0A0F12;
  color: #FFFFFF;
  font-size: 14px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.ord-bar__brand { font-weight: 600; color: #FFB000; }
.ord-bar__view  { font-weight: 500; letter-spacing: 0.06em; text-transform: none; opacity: 0.9; }
/* The tabs sit flush under the bar once signed in. */
.ord-tabs { padding-top: 6px; }

.ord-tab {
  font-family: "IBM Plex Sans Condensed", "IBM Plex Sans", sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.ord-tab.is-on { background: #FFB000; color: #0A0F12; }

.ord-head h2, .ov-app h2 { letter-spacing: -0.01em; }

body.ord-body .ov-btn {
  font-family: "IBM Plex Sans Condensed", "IBM Plex Sans", sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: #0A0F12;
  color: #FFFFFF;
}
body.ord-body .ov-btn:active { background: #12546B; }

body.ord-body .ov-pin {
  font-family: "IBM Plex Mono", monospace;
  font-weight: 700;
  border: 3px solid #0A0F12;
  background: #EDF1F3;
}
body.ord-body .ov-pin:focus { border-color: #FFB000; }

.ord-stat b { font-family: "IBM Plex Mono", monospace; }
