/* wall-booth.css : styles for the ticket booth. Loaded after wall.css.

   Three sections: #booth-way (the trip down the ribbon to the booth; no words, its still picture
   on the plain page), #book (the tickets) and #booth-on (the trip on down the road; nothing at all
   on the plain page).

   While the 3D wall is on, the heading "Book your set" is lettered on the booth's signboard and
   "Only 9 player spots a day" on the tag that hangs from it (both class "on-the-wall"), the camera
   stands still, and the tickets are ordinary page content that scrolls over the booth. */

#booth-way { --screens: 3.8; --still: url(/assets/opening/still-6-1024.webp); }
#booth-on { --screens: 1.7; display: none; }
.wall-on #booth-on { display: block; }

/* ------------------------------------------------------------------ the ticket section, plain page */

/* the foot leaves room for the menu button, which stays at the bottom of the screen (52 px tall, 12 px up) */
.booth-book { padding: clamp(26px, 6vh, 60px) var(--edge) calc(clamp(84px, 12vh, 110px) + env(safe-area-inset-bottom)); scroll-margin-top: 14px; }
.booth-book h2, .booth-book h3, .booth-book p { margin: 0; }

.booth-h {
  position: relative; z-index: 3;
  font-family: "Big Shoulders Display", Impact, "Arial Narrow", sans-serif;
  font-weight: 900; text-transform: uppercase; letter-spacing: .005em; line-height: .86;
  font-size: clamp(3rem, 19vw, 6.5rem);
  color: var(--orange);
  text-shadow: .013em 0 0 var(--ink), -.013em 0 0 var(--ink), 0 .013em 0 var(--ink), 0 -.013em 0 var(--ink), .06em .06em 0 var(--crimson), .08em .08em 0 var(--ink);
}
.booth-only { position: relative; z-index: 3; margin-top: clamp(16px, 2.6vh, 26px); }
.booth-only .sticker { font-size: clamp(.8rem, 4vw, 1.05rem); line-height: 1.25; padding: .7em 1em .64em; }

/* the two days */
.booth-days {
  position: relative; z-index: 3;
  display: grid; gap: clamp(22px, 3.4vh, 32px);
  max-width: 27rem; margin-top: clamp(26px, 4.4vh, 44px);
  font-size: clamp(15px, 4.55vw, 19px);
}
.booth-day { position: relative; }

/* the day: a strip of paper, printed in flat purple (nothing behind the letters) */
.booth-date {
  position: relative; display: inline-block;
  margin: 0 0 .5em -.1em; padding: .2em .55em .12em;
  font-family: "Big Shoulders Display", Impact, "Arial Narrow", sans-serif;
  font-weight: 900; font-size: 1.72em; line-height: 1; letter-spacing: .012em; text-transform: uppercase; white-space: nowrap;
  color: #3B1A5E;
  background: #EBCFA6 url(/assets/opening/s6-ticket-1024.webp) center / 150% 420% no-repeat;
  box-shadow: 3px 3px 0 rgba(7, 1, 13, .62);
  transform: rotate(-1.4deg);
}
.booth-day + .booth-day .booth-date { transform: rotate(1.1deg); }

.booth-sets { list-style: none; margin: 0; padding: 0; display: grid; gap: .5em; }
/* every column may shrink (minmax(0, ...)), so a row is never wider than the screen */
.booth-set { display: grid; grid-template-columns: minmax(0, .86fr) minmax(0, 1fr) minmax(0, 1fr); gap: 6px; align-items: stretch; }

/* the set and its time: a small painted stub at the head of each row */
.booth-when {
  display: flex; flex-direction: column; justify-content: center;
  padding: .1em .1em .1em .42em;
  font-family: "Big Shoulders Display", Impact, "Arial Narrow", sans-serif;
  font-weight: 900; text-transform: uppercase; line-height: .96; letter-spacing: .012em; white-space: nowrap;
  color: var(--cream); background: #082B29;
  border-left: 4px solid var(--orange);
  box-shadow: 2px 3px 0 rgba(7, 1, 13, .62);
}
.booth-set-n { display: block; font-size: 1.24em; text-shadow: .06em .06em 0 #06211F; }
.booth-set-t { display: block; font-size: .86em; letter-spacing: 0; color: var(--orange); text-shadow: .06em .06em 0 #06211F; }

/* a ticket: a real link on a paper ticket */
.booth-ticket {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 52px; aspect-ratio: 2566 / 1152; padding: .1em 4% 0 14%;
  isolation: isolate;
  font-family: "Big Shoulders Display", Impact, "Arial Narrow", sans-serif;
  font-weight: 900; text-transform: uppercase; text-decoration: none; text-align: center; line-height: .86; letter-spacing: .012em; white-space: nowrap;
  color: #3B1A5E;
  transition: transform .15s ease;
  -webkit-tap-highlight-color: rgba(255, 61, 142, .25);
}
/* The paper and its hard shadow lie on a layer of their own, under the words. The words are flat now, and Chrome
   can lose flat words that sit INSIDE an element with a drop-shadow filter while that element tilts or flies in:
   so the filter is on the paper only, never on the words. */
.booth-ticket::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: url(/assets/opening/s6-ticket-1024.webp) center / 100% 100% no-repeat;
  filter: drop-shadow(2px 3px 0 rgba(7, 1, 13, .62));
}
/* the word is painted after the price (position + z-index). The price is flat now (it once had a printed
   offset behind it, which Chrome painted over the word while a ticket tilted); the order is kept, it does no harm */
.booth-who { position: relative; z-index: 1; display: block; font-size: 1.06em; letter-spacing: .03em; }
.booth-price { display: block; font-size: 1.62em; margin-top: .11em; }
.booth-player .booth-who { color: #A80E55; }
.booth-spectator .booth-who { color: #075E54; }

/* How to buy, said once above the tickets, and a small "Buy" on every ticket, so nobody has to guess that the
   tickets are the buttons. */
.booth-how { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: .4em .7em; margin: 0 0 -.3em; }
.booth-how-a {
  display: inline-block; padding: .55em .95em .46em;
  font-family: "Unbounded", system-ui, sans-serif; font-weight: 700; font-size: .74em; line-height: 1.1; letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink); background: var(--orange); border-radius: 999px;
  box-shadow: 3px 3px 0 rgba(7, 1, 13, .62); transform: rotate(-1deg);
}
.booth-how-b { font-family: "Space Grotesk", system-ui, sans-serif; font-weight: 600; font-size: .88em; line-height: 1.2; color: var(--cream); text-shadow: 0 1px 2px rgba(7, 1, 13, .85); }
.booth-pay { display: flex; align-items: center; justify-content: center; gap: .3em; margin-top: .11em; }
.booth-pay .booth-price { margin-top: 0; }
.booth-buy {
  display: inline-block; padding: .4em .66em .3em;
  font-family: "Unbounded", system-ui, sans-serif; font-weight: 700; font-size: .6em; line-height: 1; letter-spacing: .08em;
  color: var(--cream); background: #3B1A5E; border-radius: 999px;
}
.booth-spectator .booth-buy { background: #075E54; }
.booth-ticket:hover { transform: translate(-1px, -2px) rotate(-1.2deg); }
.booth-ticket:active { transform: translate(1px, 2px); }
.booth-ticket:focus-visible { outline: 3px solid var(--cream); outline-offset: 3px; border-radius: 4px; }

/* ------------------------------------------------------------------ wall on: the tickets over the still booth */

.wall-on .booth-book {
  z-index: 3; scroll-margin-top: 0;
  min-height: 100vh; min-height: 100lvh;
  padding: 45vh 12px calc(88px + env(safe-area-inset-bottom));
  padding-top: 45lvh;
}
.wall-on .booth-days { max-width: none; margin: 0; }
/* one dark sheet behind both days, edge to edge, so the sign and the tag never show between the
   tickets while they pass over them. Its top and foot melt away, so it has no hard edge. */
.wall-on .booth-days::before {
  content: ""; position: absolute; z-index: -1; inset: -34px -12px -40px;
  background: linear-gradient(to bottom, rgba(6, 22, 24, 0) 0, rgba(6, 22, 24, .82) 22px, rgba(6, 22, 24, .97) 46px, rgba(6, 22, 24, .97) calc(100% - 40px), rgba(6, 22, 24, 0) 100%);
  pointer-events: none;
}

/* the tickets fan out of the booth's slot (scenes-booth.js sets where each one starts) */
.wall-on .booth-ticket { transition: transform .6s cubic-bezier(.2, .85, .3, 1.06), opacity .25s ease; transition-delay: calc(var(--booth-i, 0) * 45ms); }
.wall-on .booth-date, .wall-on .booth-when, .wall-on .booth-how, .wall-on .booth-days::before { transition: opacity .5s ease; }
.wall-on .booth-wait .booth-ticket { opacity: 0; transform: translate(var(--booth-fx, 0px), var(--booth-fy, 0px)) scale(.3) rotate(var(--booth-fr, 0deg)); transition: none; }
.wall-on .booth-wait .booth-date, .wall-on .booth-wait .booth-when, .wall-on .booth-wait .booth-how, .wall-on .booth-wait .booth-days::before { opacity: 0; }
.wall-on .booth-still .booth-ticket { transition: transform .15s ease; transition-delay: 0s; }

/* ------------------------------------------------------------------ wide screens */

@media (min-aspect-ratio: 1/1) {
  .booth-days { grid-template-columns: 1fr 1fr; gap: clamp(20px, 2.6vw, 44px); max-width: 54rem; font-size: clamp(15px, 1.5vw, 24px); }
  /* room to spare: the set and its time lie across the top of each row, the two tickets under them, bigger */
  .booth-sets { gap: .72em; }
  .booth-set { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 5px 8px; }
  .booth-when { grid-column: 1 / -1; flex-direction: row; align-items: baseline; justify-content: flex-start; gap: .5em; padding: .26em .6em .18em; }
  .booth-set-n, .booth-set-t { display: inline; font-size: 1.12em; }
  .booth-h { font-size: clamp(3rem, 9vw, 7.5rem); }
  .booth-only .sticker { font-size: clamp(.85rem, 2.4vh, 1.2rem); }

  /* wall on: the booth stands on the left, the two days side by side to its right */
  .wall-on .booth-book {
    display: flex; align-items: center; justify-content: flex-end;
    padding: 9vh var(--edge) max(9vh, 84px) 43vw;
  }
  .wall-on .booth-days { width: 100%; max-width: 54rem; }
  /* beside the booth the tickets cross no lettering: the soft shade is enough */
  .wall-on .booth-days::before { inset: -30px -26px -34px; background: rgba(7, 1, 13, .52); filter: blur(16px); }
}

/* NARROW SCREENS. A ticket is at least 52 px tall, and its paper shape would then force it to at
   least 116 px wide: too wide for three in a row under 360 px, and for two days side by side
   under about 940 px. There the ticket gives up its fixed shape (the paper picture stretches a
   little) and keeps its height, so every ticket stays on the screen. */
@media (max-width: 359px) {
  .booth-ticket { aspect-ratio: auto; min-width: 0; }
  .booth-days { font-size: 14px; }
  .booth-when { padding-left: .3em; }
}
@media (min-aspect-ratio: 1/1) and (max-width: 940px) {
  .wall-on .booth-ticket { aspect-ratio: auto; min-width: 0; }
  .wall-on .booth-days { font-size: 14px; gap: 14px; }
  .wall-on .booth-book { padding-left: 41vw; padding-right: 30px; }
  .wall-on .booth-days::before { inset: -18px -14px -22px; }
}
/* a small phone held sideways */
@media (min-aspect-ratio: 1/1) and (max-width: 620px) {
  .wall-on .booth-days { font-size: 12.5px; gap: 10px; }
  .wall-on .booth-book { padding-left: 37vw; padding-right: 14px; }
  .wall-on .booth-set { gap: 4px 5px; }
}
@media (min-width: 900px), (min-height: 900px) {
  #booth-way { --still: url(/assets/opening/still-6-1600.webp); }
}

@media (prefers-reduced-motion: reduce) {
  .booth-ticket, .wall-on .booth-ticket, .wall-on .booth-date, .wall-on .booth-when { transition: none; }
}

/* ------------------------------------------------------------------ a ticket Square says has sold out
   (tickets.js adds .booth-sold). Same box, same size, so nothing around it moves: the paper is dulled,
   the words go grey and the price is struck through, and "Sold out" stands on a small dark pill where
   "Buy" was. It no longer moves under the pointer. */
.booth-ticket.booth-sold { cursor: default; color: #5E5868; }
.booth-ticket.booth-sold::before { filter: grayscale(.85) brightness(.78) drop-shadow(2px 3px 0 rgba(7, 1, 13, .62)); }
.booth-sold .booth-who, .booth-player.booth-sold .booth-who, .booth-spectator.booth-sold .booth-who { color: #5E5868; }
/* "Sold out" is longer than "Buy": the struck price gets smaller and the pill tighter, so both still fit the
   narrowest ticket on one line */
.booth-sold .booth-price { font-size: 1.08em; color: #6E6878; text-decoration: line-through; text-decoration-thickness: .1em; }
.booth-sold .booth-buy, .booth-spectator.booth-sold .booth-buy { padding: .4em .5em .3em; font-size: .54em; letter-spacing: .02em; color: var(--cream); background: #1C1622; }
.booth-ticket.booth-sold:hover, .booth-ticket.booth-sold:active { transform: none; }
