/* The table ready notification: the waitlist toast of Lume, a trattoria, on pure white. .toast is moved only by GSAP
   (x, y, scale, height, opacity); whatever the CSS shapes or transforms is a child of it. */
:root {
  --page: #ffffff;            /* the page */
  --card: #ffffff;            /* the body of the notification */
  --card-low: #faf8f5;        /* its lower half, a warm white */
  --edge: rgba(28, 20, 12, 0.08); /* its 1px edge */
  --ink: #1b1712;             /* the words */
  --muted: #8c8379;           /* the small words */
  --soft: rgba(28, 20, 12, 0.14); /* the marks of the people ahead, the ring track */
  --accent: #e4532e;          /* your mark, the ring, I'm coming */
  --accent-ink: #ffffff;      /* the words on the accent */
}

* {
  box-sizing: border-box;
}

html {
  touch-action: manipulation;
}

html,
body {
  margin: 0;
  overflow-x: clip;
}

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

button {
  font: inherit;
  color: inherit;
}

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

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

/* the slot keeps the room of the open notification, so nothing around it moves */
.slot {
  position: relative;
  width: min(92vw, 360px);
  height: var(--open, 220px);
}

.toast {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 70px;
  border-radius: 22px;
  overflow: clip;
  background:
    linear-gradient(180deg, var(--card) 30%, var(--card-low));
  box-shadow:
    inset 0 0 0 1px var(--edge),
    inset 0 1px 0 #ffffff,
    0 1px 2px rgba(28, 20, 12, 0.06),
    0 6px 14px -6px rgba(28, 20, 12, 0.12),
    0 22px 44px -20px rgba(60, 30, 10, 0.26);
  opacity: 0;
  will-change: transform;
}

/* a grain so fine it only takes the plastic look away */
.toast::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.035;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.95' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* the warm light under the pointer */
.toast__light {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(180px circle at var(--mx, 50%) var(--my, -60%), color-mix(in srgb, var(--accent) 7%, transparent), transparent 70%);
}

/* the band of light that crosses the card when the table is ready */
.toast__sheen {
  position: absolute;
  top: 0;
  bottom: 0;
  left: -50%;
  width: 50%;
  pointer-events: none;
  background: linear-gradient(100deg, transparent, color-mix(in srgb, var(--accent) 10%, transparent) 50%, rgba(255, 255, 255, 0.9) 64%, transparent);
  mix-blend-mode: multiply;
  opacity: 0;
}

.toast__head {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  height: 70px;
  padding: 0 14px 0 13px;
  border: 0;
  background: none;
  text-align: left;
  cursor: default;
  -webkit-tap-highlight-color: transparent;
}

.toast__head[aria-disabled='false'] {
  cursor: pointer;
}

.toast__head:focus-visible {
  outline: none;
}

.toast:has(.toast__head:focus-visible) {
  box-shadow:
    inset 0 0 0 1.5px color-mix(in srgb, var(--accent) 75%, transparent),
    0 6px 14px -6px rgba(28, 20, 12, 0.12),
    0 22px 44px -20px rgba(60, 30, 10, 0.26);
}

/* the tile: your place in line, then the table, then the check */
.tile {
  position: relative;
  flex: none;
  width: 42px;
  height: 42px;
}

.tile__face {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: var(--accent-ink);
  background:
    radial-gradient(120% 90% at 30% 0%, rgba(255, 255, 255, 0.38), transparent 58%),
    linear-gradient(160deg, color-mix(in srgb, var(--accent) 88%, #ffd9b8), color-mix(in srgb, var(--accent) 82%, #5a1a08));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.2),
    inset 0 -2px 4px rgba(80, 20, 0, 0.22),
    0 1px 1px rgba(80, 20, 0, 0.18),
    0 6px 14px -6px color-mix(in srgb, var(--accent) 70%, transparent);
}

.tile__face > * {
  grid-area: 1 / 1;
}

.tile__num {
  font-size: 20px;
  font-weight: 680;
  font-stretch: 92%;
  letter-spacing: -0.02em;
}

.tile__table,
.tile__check {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0;
}

.tile__table {
  stroke-width: 1.7;
}

.tile__check {
  stroke-width: 2.4;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}

.head__text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.head__row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

.head__title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  font-size: 14.5px;
  font-weight: 620;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.head__when {
  flex: none;
  font-size: 11.5px;
  color: var(--muted);
}

.head__sub {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.2;
}

/* words that roll: a grid of one cell, the old and the new one stacked */
.roll {
  display: inline-grid;
  vertical-align: bottom;
  overflow: clip;
  overflow-clip-margin: 2px;
  white-space: nowrap;
}

.roll > .r {
  grid-area: 1 / 1;
  display: block;
  white-space: nowrap;
}

.head__title .roll {
  max-width: 100%;
}

.head__title .roll > .r {
  overflow: hidden;
  text-overflow: ellipsis;
}

/* the line: a thin door on the left and one mark for each party, yours in the accent */
.line {
  position: relative;
  flex: none;
  width: 48px;
  height: 14px;
  overflow: clip;
}

.line__door {
  position: absolute;
  left: 2px;
  top: 0;
  width: 1px;
  height: 14px;
  border-radius: 1px;
  background: linear-gradient(180deg, transparent, var(--soft) 30%, var(--soft) 70%, transparent);
}

.mark {
  position: absolute;
  left: 8px;
  top: 1px;
  width: 6px;
  height: 12px;
  border-radius: 3px;
}

.mark > i {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: var(--soft);
}

.mark--you > i {
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 80%, #ffffff), var(--accent));
  box-shadow: 0 1px 3px -1px color-mix(in srgb, var(--accent) 80%, transparent);
}

.chev {
  flex: none;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0;
}

/* the thin line at the bottom that fills as the line moves */
.progress {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 0;
  height: 1.5px;
  border-radius: 1px;
  background: rgba(28, 20, 12, 0.05);
  overflow: hidden;
}

.progress i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 30%, transparent), var(--accent));
  transform-origin: 0 50%;
  transform: scaleX(0);
}

/* ---------------------------------------------------------------- the open part */
.toast__more {
  position: relative;
  padding: 0 14px 14px;
}

.rule {
  display: block;
  height: 1px;
  margin: 0 2px 12px;
  background: linear-gradient(90deg, transparent, var(--edge) 12%, var(--edge) 88%, transparent);
}

.hold {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 2px 4px 14px 2px;
}

.ring {
  position: relative;
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
}

.ring > svg {
  grid-area: 1 / 1;
}

.ring > svg:first-child {
  width: 44px;
  height: 44px;
  fill: none;
}

.ring__track {
  stroke: rgba(28, 20, 12, 0.07);
  stroke-width: 3;
}

.ring__arc {
  stroke: var(--accent);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  filter: drop-shadow(0 1px 2px color-mix(in srgb, var(--accent) 40%, transparent));
}

.ring__ico {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.7;
}

.hold__text,
.hold__party {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.hold__text {
  flex: 1;
}

.hold__party {
  align-items: flex-end;
  text-align: right;
}

.hold__label {
  font-size: 11.5px;
  color: var(--muted);
}

.hold__place {
  font-size: 12.5px;
  font-weight: 560;
  white-space: nowrap;
}

.clock {
  display: flex;
  font-size: 22px;
  font-weight: 640;
  font-stretch: 94%;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.clock .roll {
  overflow-clip-margin: 0;
}

.clock .colon {
  padding: 0 1px;
  opacity: 0.55;
  transform: translateY(-1px);
}

.acts {
  display: flex;
  gap: 8px;
}

.act {
  flex: 1;
  min-width: 0;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 13px;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.act__face {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 100%;
  padding: 0 10px;
  border-radius: inherit;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.005em;
  transition: background-color 0.25s, box-shadow 0.25s;
}

.act--ghost .act__face {
  background: rgba(28, 20, 12, 0.045);
  box-shadow: inset 0 0 0 1px rgba(28, 20, 12, 0.06);
}

.act--solid .act__face {
  color: var(--accent-ink);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0) 55%),
    var(--accent);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    inset 0 -1px 0 rgba(80, 20, 0, 0.2),
    0 1px 2px rgba(80, 20, 0, 0.2),
    0 8px 16px -8px color-mix(in srgb, var(--accent) 80%, transparent);
}

.act__check {
  flex: none;
  width: 0;
  height: 16px;
  margin-right: -6px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  opacity: 0;
}

.act:disabled {
  cursor: default;
}

.act--ghost:disabled .act__face {
  color: var(--muted);
}

.act:focus-visible {
  outline: none;
}

.act:focus-visible .act__face {
  box-shadow: 0 0 0 2px var(--page), 0 0 0 3.5px var(--accent);
}

@media (hover: hover) {
  .act--ghost:not(:disabled):hover .act__face {
    background: rgba(28, 20, 12, 0.075);
  }

  .act--solid:not(:disabled):hover .act__face {
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.35),
      inset 0 -1px 0 rgba(80, 20, 0, 0.2),
      0 1px 2px rgba(80, 20, 0, 0.2),
      0 12px 22px -8px color-mix(in srgb, var(--accent) 95%, transparent);
  }

  .toast__head[aria-disabled='false']:hover .chev {
    stroke: var(--ink);
  }
}

@media (max-width: 360px) {
  .act__face {
    font-size: 12.5px;
  }

  .hold__place {
    font-size: 11.5px;
  }
}
