/* The Upgrade seat button of a made-up concert hall, Aurel Hall. A dark pill on white: on the left a small seat map
   in its own well (the stage arc, four curved rows, your seat in amber), then the label, then a chip with the price.
   The skin is a layer of its own, so it can swell on a spring while the words stay put. */
:root {
  --fondo: #ffffff;        /* the page */
  --pillola: #141318;      /* the pill */
  --crema: #f5f1ea;        /* the words on the pill */
  --palco: #ffb547;        /* the stage light, your seat and the done chip */
  --posti: rgba(245, 241, 234, 0.2); /* the taken seats */
  --grigio: #8b8893;       /* the line under the pill */
}

*, *::before, *::after { box-sizing: border-box; }

html { touch-action: manipulation; }
html, body {
  margin: 0;
  height: 100%;
  background: var(--fondo);
  color: var(--pillola);
  font-family: "Mona Sans Variable", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.stage {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 16px;
  overflow: hidden;
}

.frame {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 16px;
  width: min(340px, 94vw);
  padding: 12px 0;
}

/* the pill: the button for GSAP (scale), the layers inside for CSS */
.u {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  height: 60px;
  max-width: 94vw;
  padding: 0 8px 0 8px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--crema);
  font: inherit;
  font-size: 16px;
  font-weight: 580;
  letter-spacing: -0.005em;
  cursor: pointer;
  isolation: isolate;
  -webkit-tap-highlight-color: transparent;
}
.u:focus-visible { outline: 2px solid var(--palco); outline-offset: 4px; }

.u__skin, .u__glow, .u__warm, .u__sheen {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
}
.u__skin {
  z-index: -4;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .06 0'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E"),
    linear-gradient(180deg, #26252c 0%, var(--pillola) 56%, #0d0c10 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.13),
    inset 0 -1px 0 rgba(0, 0, 0, 0.55),
    0 1px 1px rgba(20, 19, 24, 0.16),
    0 6px 14px -6px rgba(20, 19, 24, 0.3),
    0 24px 42px -22px rgba(20, 19, 24, 0.55);
}
.u__glow {
  z-index: -3;
  overflow: hidden;
  opacity: 0;
  background: radial-gradient(120px 80px at var(--gx, 50%) var(--gy, 50%), rgba(255, 226, 180, 0.14), transparent 70%);
}
/* the stage light spilling into the pill once you are in the front row */
.u__warm {
  z-index: -2;
  opacity: 0;
  background:
    radial-gradient(90px 60px at 36px 50%, rgba(255, 181, 71, 0.22), transparent 70%),
    linear-gradient(90deg, rgba(255, 181, 71, 0.06), transparent 60%);
  box-shadow: inset 0 0 0 1px rgba(255, 181, 71, 0.16);
}
.u__sheen {
  z-index: -1;
  overflow: hidden;
  opacity: 0;
  background: linear-gradient(100deg, transparent 32%, rgba(255, 236, 205, 0.2) 48%, transparent 62%);
  background-size: 260% 100%;
  background-position: 120% 0;
}

/* the seat map in its well */
.u__map {
  position: relative;
  flex: none;
  width: 62px;
  height: 46px;
  border-radius: 23px;
  background: linear-gradient(180deg, #0c0b0f, #17161b);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.7), inset 0 0 0 1px rgba(255, 255, 255, 0.05), 0 1px 0 rgba(255, 255, 255, 0.07);
  overflow: hidden;
}
.u__map svg {
  position: absolute;
  left: 4px;
  top: 3px;
  width: 54px;
  height: 40.5px;
  overflow: visible;
}
.m__stage { fill: none; stroke: var(--palco); stroke-width: 1.3; stroke-linecap: round; opacity: 0.55; }
.m__stagefill { fill: var(--palco); opacity: 0.1; }
.m__cone { fill: url(#u-cone); opacity: 0; }
.m__seat { fill: var(--posti); }
.m__seat.is-free { fill: none; stroke: rgba(255, 181, 71, 0.6); stroke-width: 0.7; stroke-dasharray: 1.2 0.9; }
.m__seat.is-left { fill: none; stroke: rgba(245, 241, 234, 0.22); stroke-width: 0.6; }
.m__mine { fill: var(--palco); }

.u__labels {
  position: relative;
  display: block;
  height: 22px;
  overflow: hidden;
}
.u__label {
  position: absolute;
  left: 0;
  top: 0;
  display: inline-flex;
  align-items: center;
  width: max-content;
  height: 22px;
  line-height: 22px;
  white-space: nowrap;
  opacity: 0;
  font-variation-settings: "wdth" 100;
}
.u__label[data-l="idle"] { opacity: 1; }
.u__sep { margin: 0 0.42em; opacity: 0.45; }
.u__num { color: #ffd08a; font-weight: 640; }

/* the chip: the price at rest, the rolling row letter while it moves, the tick when done */
.u__chip {
  position: relative;
  flex: none;
  width: 50px;
  height: 32px;
  margin-right: 6px;
  font-size: 13px;
  font-weight: 620;
  font-variant-numeric: tabular-nums;
}
.u__chipbg {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.u__ch {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  opacity: 0;
}
.u__ch[data-c="price"] { opacity: 1; color: #ffd08a; }
.u__ch[data-c="row"] { line-height: 18px; }
.u__roll {
  position: relative;
  display: block;
  width: 0.8em;
  height: 18px;
  overflow: hidden;
  vertical-align: middle;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
          mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
}
.u__strip { position: absolute; left: 0; top: 0; width: 100%; color: #ffd08a; }
.u__strip span { display: block; height: 18px; line-height: 18px; text-align: center; }
.u__ch--ok svg { width: 16px; height: 16px; fill: none; stroke: var(--pillola); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.note {
  position: relative;
  margin: 0;
  height: 18px;
  width: 100%;
  font-size: 13px;
  font-weight: 460;
  color: var(--grigio);
}
.note__l {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  text-align: center;
  white-space: nowrap;
}
.note__l[data-n="done"] { opacity: 0; }

@media (max-width: 400px) {
  .u { height: 56px; font-size: 15px; gap: 10px; }
  .u__map { width: 58px; height: 42px; }
  .u__map svg { left: 4px; top: 2px; width: 50px; height: 37.5px; }
  .note { font-size: 12px; }
}
