/* Card Upload, written on the Smoked Glass tokens (tokens.css is a verbatim copy of the source). Phone first. */
*, *::before, *::after { box-sizing: border-box; }
body { font-size: var(--sg-text); line-height: 1.45; }
main { padding-top: 16px; padding-bottom: calc(48px + env(safe-area-inset-bottom)); }
/* once a shoot has photos the upload comes first: it is the thing to glance at in the car */
main { display: flex; flex-direction: column; }
main.has-files #upload, main.has-files #review, main.has-files #problems { order: -1; }
[hidden] { display: none !important; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--sg-muted); }
p { margin: 0 0 10px; }
.sg-btn.small { min-height: 34px; padding: 0 10px; font-size: var(--sg-text-sm); }
.sg-panel { margin-bottom: 12px; }
.sg-panel > :last-child { margin-bottom: 0; }

.field { display: grid; gap: 0; margin-bottom: 14px; }
.field .sg-input, .field .sg-textarea { width: 100%; }
.field input[type="date"] { -webkit-appearance: none; appearance: none; text-align: left; }
.switch-row { display: flex; align-items: center; gap: 12px; min-height: var(--sg-tap); cursor: pointer; }
.switch-row span { flex: 1; }
.code-input { width: 100%; font: 400 24px/1.2 var(--sg-mono); letter-spacing: 0.3em; text-align: center; }

/* the upload: one big number, one bar, one line that says what is happening */
.big { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 10px; font-weight: 200; font-size: 56px; line-height: 1.05; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.big small { font-size: 18px; font-weight: 300; letter-spacing: -0.01em; color: var(--sg-muted); }
.sg-meter.tall { height: 10px; border-radius: 5px; margin: 14px 0 12px; }
.sg-meter.tall::before { border-radius: 5px; transition: width 400ms linear; }
.facts { font-variant-numeric: tabular-nums; }
.state { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; min-height: 28px; margin: 0 0 6px; }
.state .sg-chip { flex: none; }
.now { min-height: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 14px; }
.row .sg-btn { flex: 1 1 140px; }
.row .sg-btn.narrow { flex: 0 1 auto; }

/* the file inputs sit under their buttons: a label opens the picker, which iOS allows without script */
.pick { position: relative; overflow: hidden; }
.pick input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 0; }

.days { list-style: none; margin: 0 0 4px; padding: 0; }
.days li { border-bottom: 1px solid var(--sg-line); }
.days li:last-child { border-bottom: 0; }
.days label { display: flex; align-items: center; gap: 12px; min-height: var(--sg-tap); cursor: pointer; }
.days .n { margin-left: auto; font: 400 var(--sg-text-xs)/1.4 var(--sg-mono); color: var(--sg-muted); white-space: nowrap; }

.names { margin: 0 0 10px; padding: 0; list-style: none; font: 400 var(--sg-text-xs)/1.7 var(--sg-mono); color: var(--sg-muted); max-height: 136px; overflow-y: auto; }
.names li { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.shoots { list-style: none; margin: 0; padding: 0; }
.shoots li { border-bottom: 1px solid var(--sg-line); }
.shoots li:last-child { border-bottom: 0; }
.shoots button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 56px; margin: 0; padding: 8px 0; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.shoots .where { flex: 1; min-width: 0; }
.shoots .where b { display: block; font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shoots .where span { display: block; font: 400 var(--sg-text-xs)/1.5 var(--sg-mono); color: var(--sg-muted); }
.sg-toast { text-align: center; }

@media (min-width: 761px) {
  main { padding-top: 28px; }
  .big { font-size: 72px; }
}
