/* `hidden` has to win over the display values set below, and over site.css.
   Without this the flex/block rules beat the UA's [hidden] { display: none }
   and every collapsed row — discount line, code input, card form, success card —
   renders at once. */
[hidden] { display: none !important; }

/* Only what the ticket pages add on top of the copied site.css. Everything structural — bands, wraps, type scale, buttons, pills — comes from the design system, so this file stays small and the page reads as a native part of www.fitbeatfitness.com. */

/* ---------- event page: prose beside a sticky checkout card ---------- */

.tk-layout {
  display: grid;
  gap: clamp(2rem, 4vw, 3.5rem);
  grid-template-columns: 1fr;
  align-items: start;
}
@media (min-width: 940px) {
  .tk-layout { grid-template-columns: minmax(0, 1fr) 420px; }
  .tk-buy { position: sticky; top: calc(var(--nav-h, 76px) + 1.5rem); }
}

.tk-prose { max-width: 62ch; }
.tk-prose p { color: var(--slate); }

.tk-facts {
  display: grid;
  gap: 0;
  margin-top: clamp(1.6rem, 3vw, 2.4rem);
  border-top: 1px solid var(--line);
  max-width: 62ch;
}
.tk-facts > div {
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 1fr);
  gap: 1rem;
  padding: .85rem 0;
  border-bottom: 1px solid var(--line);
}
.tk-facts dt {
  font-family: var(--mono);
  font-size: .72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--slate);
  padding-top: .2rem;
}
.tk-facts dd { font-weight: 500; }
.tk-facts dd .fine { display: block; font-weight: 400; }

/* ---------- the checkout card: the page's focal point ---------- */

.tk-card {
  background: var(--bone-2);
  border: 1px solid var(--line);
  border-top: 3px solid var(--pulse-mid);
  border-radius: 6px;
  padding: clamp(1.3rem, 2.4vw, 1.8rem);
  box-shadow: var(--shadow-2);
  isolation: isolate;
}
.tk-card .eyebrow { margin-bottom: .55rem; }
.tk-card .price { margin-bottom: .35rem; }
.tk-card .price__v { font-size: clamp(2.3rem, 4vw, 3rem); }

.tk-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.1rem;
  padding: .95rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.tk-row__label { font-weight: 500; }
.tk-row__label .fine { display: block; font-weight: 400; }

.stepper { display: flex; align-items: center; gap: .3rem; }
.stepper button {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--bone);
  color: var(--ink);
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  transition: background-color .18s var(--ease), border-color .18s var(--ease);
}
.stepper button:hover:not(:disabled) { background: var(--bone-2); border-color: var(--accent-gfx); }
.stepper button:disabled { opacity: .35; cursor: default; }
.stepper output {
  min-width: 2.6rem;
  text-align: center;
  font-family: var(--mono);
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
}

/* discount code — present but discreet until wanted */
.tk-code-row { padding-top: .9rem; }
.tk-code-input { display: flex; gap: .5rem; }
.tk-code-msg {
  margin: .55rem 0 0;
  font-size: .86rem;
  color: var(--pulse-deep);
  font-weight: 500;
}
.tk-code-msg--err { color: #9a2617; }

.tk-textlink {
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  font-size: .88rem;
  color: var(--pulse-deep);
  text-decoration: underline;
  text-underline-offset: .18em;
  cursor: pointer;
}
.tk-textlink:hover { text-decoration-thickness: 2px; }
.tk-textlink--center { display: block; width: 100%; margin-top: .9rem; text-align: center; }

.tk-total { margin: 1.1rem 0 1.25rem; display: grid; gap: .4rem; }
.tk-total__line { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.tk-total__line dt { font-size: .92rem; color: var(--slate); }
.tk-total__line dd { margin: 0; font-variant-numeric: tabular-nums; }
.tk-total__line--big { padding-top: .45rem; border-top: 1px solid var(--line); }
.tk-total__line--big dt { font-family: var(--mono); font-size: .74rem; text-transform: uppercase; letter-spacing: .14em; }
.tk-total__line--big dd {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.75rem;
  letter-spacing: -.03em;
}

#express { min-height: 48px; }

.tk-or {
  display: flex; align-items: center; gap: .75rem;
  margin: 1rem 0;
  font-family: var(--mono); font-size: .7rem;
  text-transform: uppercase; letter-spacing: .16em;
  color: var(--slate);
}
.tk-or::before, .tk-or::after { content: ''; flex: 1; height: 1px; background: var(--line); }

.tk-field { display: block; margin-bottom: .9rem; }
.tk-field > span {
  display: block;
  font-family: var(--mono); font-size: .72rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: .12em; color: var(--slate);
  margin-bottom: .35rem;
}

.tk-card input[type='text'],
.tk-card input[type='email'] {
  width: 100%;
  padding: .78rem .9rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--bone-2);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1rem;
}
.tk-card input[type='text']:focus-visible,
.tk-card input[type='email']:focus-visible { border-color: var(--accent-gfx); }
.tk-card #code { text-transform: uppercase; letter-spacing: .06em; font-family: var(--mono); }

#payment-element { margin-bottom: 1rem; }
#pay-card { margin-top: .25rem; }

.tk-msg { margin: .9rem 0 0; font-size: .92rem; min-height: 0; }
.tk-msg:empty { margin: 0; }
.tk-msg--err { color: #9a2617; font-weight: 500; }

.tk-diag {
  margin: 1rem 0 0;
  padding: .8rem .9rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--bone);
  font-family: var(--mono);
  font-size: .72rem;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--slate);
}

.tk-closed { margin-top: 1rem; }
.tk-fineprint { margin-top: 1rem; }

/* ---------- success state ---------- */

.tk-done { border-top-color: var(--pulse-mid); }
.tk-done .lead { margin-bottom: 1rem; }
.tk-tickets { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .9rem; }
.tk-ticket-item {
  display: flex; align-items: center; gap: 1rem; margin: 0;
  padding: .9rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--bone);
}
.tk-ticket-item img { width: 110px; height: 110px; flex: none; background: #fff; }
.tk-ticket-code {
  display: block;
  font-size: 1.2rem; font-weight: 600; letter-spacing: .12em;
  margin-bottom: .3rem;
}

/* ---------- single ticket page ---------- */

.tk-ticket-head { text-align: center; }
.tk-ticket-head .eyebrow { margin-bottom: .6rem; }
.tk-ticket { text-align: center; }
.tk-qr {
  width: min(340px, 78vw);
  margin: 0 auto 1.2rem;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: var(--shadow-1);
}
.tk-qr img { width: 100%; height: auto; }
.tk-bigcode {
  font-size: clamp(1.5rem, 6vw, 2.1rem);
  font-weight: 600;
  letter-spacing: .16em;
  margin: 0 0 .8rem;
}
.tk-ticket .fine { margin-top: 1rem; word-break: break-word; }

/* ---------- used / void stamp over the QR ----------
   A pill under the code is easy to miss on a phone held up at a door, and a
   screenshot of a spent ticket looks identical to a fresh one. This sits across
   the QR itself, so a used ticket cannot be passed off as unused. */
.tk-qr { position: relative; isolation: isolate; }
.tk-qr--stamped img { opacity: .35; filter: grayscale(1); }
.tk-stamp {
  position: absolute;
  inset: 14px;
  margin: 0;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: .1rem;
  text-align: center;
  background: rgba(11, 22, 34, .82);
  color: #fff;
  border-radius: 4px;
}
.tk-stamp b {
  font-size: clamp(1.8rem, 9vw, 3rem);
  font-weight: 800;
  letter-spacing: .12em;
  line-height: 1;
  transform: rotate(-8deg);
}
.tk-stamp span {
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  opacity: .85;
  transform: rotate(-8deg);
}

/* ---------- paid, tickets not issued yet ---------- */
.tk-pending { border-top-color: var(--pulse-mid); }
.tk-pending .lead { margin-bottom: .8rem; }
.tk-pending .mono { word-break: break-all; }

/* ---------- find my tickets ---------- */
.tk-find { display: grid; gap: .9rem; max-width: 26rem; margin: 1.2rem 0 .6rem; }

/* ---------- past-festival gallery ---------- */
.tk-gallery__intro { max-width: 56ch; margin-top: .8rem; }
.tk-gallery {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: .8rem;
  margin-top: 2rem;
}
.tk-gallery__item { margin: 0; grid-column: span 4; position: relative; overflow: hidden; border-radius: 4px; background: var(--ink); }
.tk-gallery__item--lead { grid-column: span 8; grid-row: span 2; }
.tk-gallery__item img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 3 / 2; display: block; transition: transform .6s var(--ease); }
.tk-gallery__item--lead img { aspect-ratio: auto; }
.tk-gallery__item:hover img { transform: scale(1.03); }
.tk-gallery__item figcaption {
  position: absolute; inset: auto 0 0 0;
  padding: 1.4rem .9rem .7rem;
  font-family: var(--mono); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--snow);
  background: linear-gradient(to top, rgba(11, 22, 34, .85), rgba(11, 22, 34, 0));
}
@media (max-width: 900px) {
  .tk-gallery { grid-template-columns: repeat(2, 1fr); gap: .6rem; }
  .tk-gallery__item, .tk-gallery__item--lead { grid-column: span 1; grid-row: auto; }
  .tk-gallery__item--lead { grid-column: span 2; }
  .tk-gallery__item--lead img { aspect-ratio: 3 / 2; }
}
