/* Cashier site on a venue set-top box: big type, big touch targets, high contrast. */

:root {
  --bg: #f4f4f1;
  --fg: #16181d;
  --muted: #5b606b;
  --accent: #1f5fbf;
  --accent-fg: #ffffff;
  --danger: #b3261e;
  --card: #ffffff;
  --line: #d7d8dc;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 24px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.35;
}

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
}

h1 {
  font-size: 1.6rem;
  margin: 0 0 1rem;
}

p {
  margin: 0 0 1rem;
}

.hint {
  color: var(--muted);
}

.code {
  font-size: 1.5rem;
}

.code b {
  display: block;
  margin-top: 0.5rem;
  font-size: 3.5rem;
  letter-spacing: 0.15em;
  font-variant-numeric: tabular-nums;
}

.calc {
  white-space: pre-line;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem;
  font-variant-numeric: tabular-nums;
}

.error {
  color: var(--danger);
  font-weight: 600;
}

button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 64px;
  min-width: 64px;
  padding: 0 1.25rem;
  border: 0;
  border-radius: 12px;
  background: var(--accent);
  color: var(--accent-fg);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

button:focus-visible,
.button:focus-visible,
input:focus-visible {
  outline: 4px solid var(--fg);
  outline-offset: 2px;
}

input,
select,
textarea {
  min-height: 64px;
  padding: 0 0.75rem;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  color: var(--fg);
  font: inherit;
}

.secondary {
  background: var(--card);
  color: var(--fg);
  border: 2px solid var(--line);
}

.choices {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

.pin-form {
  max-width: 420px;
  margin-bottom: 1rem;
}

.pin {
  width: 100%;
  margin-bottom: 1rem;
  font-size: 1.5rem;
  letter-spacing: 0.3em;
  text-align: center;
}

.pad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.pad button {
  min-height: 80px;
  font-size: 1.4rem;
}

.danger {
  background: var(--danger);
  color: var(--accent-fg);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1rem 0;
}

/* box screen */

.top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-bottom: 1rem;
}

.top h1 {
  margin: 0;
}

.who {
  color: var(--muted);
}

.calc b {
  font-size: 1.1em;
}

/* operation form: the choices are radio buttons drawn as big buttons */

.op-form fieldset {
  margin: 0 0 1rem;
  padding: 0;
  border: 0;
}

.op-form legend {
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.op-form .choices {
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem;
}

.choice {
  position: relative;
}

.choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.choice span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 64px;
  padding: 0 1rem;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  font-weight: 600;
  text-align: center;
  cursor: pointer;
}

.choice input:checked + span {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-fg);
}

.choice input:focus-visible + span {
  outline: 4px solid var(--fg);
  outline-offset: 2px;
}

.field {
  display: block;
  margin-bottom: 1rem;
  font-weight: 600;
}

.field input {
  display: block;
  width: 100%;
  margin-top: 0.5rem;
  font-weight: 400;
}

.field .amount {
  max-width: 420px;
  font-size: 1.5rem;
  font-variant-numeric: tabular-nums;
}

/* journal */

.journal {
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.journal li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 80px;
  padding: 0.5rem 1rem;
  font-variant-numeric: tabular-nums;
}

.journal li + li {
  border-top: 1px solid var(--line);
}
