/* The seat picker: a dark hall on a black page, the seats chosen in amber. */
:root {
  --page: #000000;          /* the page */
  --panel: #0e0e12;         /* the hall */
  --edge: #1e1e25;
  --ink: #f2f1ee;
  --muted: #8b8a92;
  --seat: #2b2c35;          /* a free seat */
  --seat-hover: #3d3f4b;
  --premium: #322b45;       /* a free seat in the back rows */
  --taken: #18181d;         /* a seat already taken */
  --accent: #ffb547;        /* the seats chosen */
}

* {
  box-sizing: border-box;
}

html {
  touch-action: manipulation;
}

html,
body {
  margin: 0;
}

body {
  min-height: 100svh;
  background: var(--page);
  color: var(--ink);
  font-family: 'Spline Sans Variable', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.stage {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 24px 12px;
}

.hall {
  position: relative;
  width: min(430px, 100%);
  padding: 22px 20px 18px;
  border: 1px solid var(--edge);
  border-radius: 28px;
  background: var(--panel);
}

.hall__title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.hall__when {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13.5px;
}

/* ---------------------------------------------------------------- the screen */
.hall__screen {
  margin: 18px 6px 0;
  text-align: center;
}

.hall__screen svg {
  display: block;
  width: 100%;
  height: 24px;
  fill: none;
  stroke: #d9d6ff;
  stroke-width: 3;
  stroke-linecap: round;
  opacity: 0.85;
}

.hall__screen span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* ---------------------------------------------------------------- the seats */
.hall__seats {
  display: grid;
  gap: 7px;
  margin-top: 16px;
}

.row {
  --name: 16px;
  --aisle: 12px;
  display: grid;
  grid-template-columns: var(--name) repeat(var(--a, 5), minmax(0, 1fr)) var(--aisle) repeat(var(--b, 5), minmax(0, 1fr));
  align-items: center;
  gap: 6px;
}

.row__name {
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  text-align: center;
}

.seat {
  position: relative;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 9px 9px 5px 5px;
  background: var(--seat);
  color: #241604;
  font: 700 10px 'Spline Sans Variable', system-ui, sans-serif;
  cursor: pointer;
  transition: background-color 0.25s;
  -webkit-tap-highlight-color: transparent;
}

/* the cushion: a line along the bottom of every seat */
.seat::after {
  content: '';
  position: absolute;
  left: 3px;
  right: 3px;
  bottom: 3px;
  height: 3px;
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.25);
}

.seat.is-premium {
  background: var(--premium);
}

@media (hover: hover) {
  .seat:not(.is-taken):not(.is-on):hover {
    background: var(--seat-hover);
  }
}

.seat.is-taken {
  background: var(--taken);
  cursor: default;
}

.seat.is-taken::after {
  background: rgba(255, 255, 255, 0.04);
}

.seat.is-on {
  background: var(--accent);
}

.seat:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

html[data-using='pointer'] .seat:focus-visible {
  outline: none;
}

.seat--key {
  display: inline-block;
  width: 16px;
  height: 14px;
  margin-right: 6px;
  vertical-align: -2px;
  cursor: default;
}

/* the tip over a seat */
.hall__tip {
  position: absolute;
  top: 0;
  left: 0;
  margin: 0;
  padding: 5px 9px;
  border-radius: 8px;
  background: #ffffff;
  color: #15151a;
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
}

.hall__key {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 12px;
}

/* ---------------------------------------------------------------- the summary */
.sum {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--edge);
}

.sum__left {
  min-width: 0;
}

.sum__label {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
}

.sum__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.chip {
  padding: 5px 9px;
  border-radius: 8px;
  background: var(--accent);
  color: #241604;
  font-size: 12.5px;
  font-weight: 750;
}

.sum__none {
  margin: 0;
  color: #5d5c66;
  font-size: 14px;
}

.sum__none[hidden] {
  display: none;
}

.sum__right {
  display: grid;
  justify-items: end;
  gap: 8px;
  flex: none;
}

.sum__total {
  margin: 0;
  font-size: 22px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.sum__go {
  padding: 10px 18px;
  border: 0;
  border-radius: 12px;
  background: var(--accent);
  color: #241604;
  font: 700 14.5px 'Spline Sans Variable', system-ui, sans-serif;
  cursor: pointer;
  transition: opacity 0.25s, transform 0.25s cubic-bezier(0.3, 1.6, 0.5, 1);
}

.sum__go:disabled {
  opacity: 0.35;
  cursor: default;
}

.sum__go:not(:disabled):active {
  transform: scale(0.95);
}

.sum__go:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

html[data-using='pointer'] .sum__go:focus-visible {
  outline: none;
}

/* the ticket on its way between its seat and the summary */
.flyer {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #241604;
  font: 750 12.5px 'Spline Sans Variable', system-ui, sans-serif;
  pointer-events: none;
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (max-width: 400px) {
  .row {
    --name: 12px;
    --aisle: 8px;
    gap: 4px;
  }

  .seat {
    height: 22px;
  }
}
