* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

:root {
  /* SEATING SIZE SETTINGS: change these to resize every seat. */
  --seat-size: clamp(9px, 0.72vw, 16px);
  --seat-font-size: clamp(6px, 0.52vw, 9px);
  --seat-gap: clamp(1px, 0.15vw, 3px);
  --row-label-width: clamp(12px, 0.82vw, 16px);

  /* BLOCK SIZE SETTINGS: change these to resize block spacing/card padding. */
  --block-gap: clamp(8px, 0.9vw, 14px);
  --block-padding: clamp(5px, 0.55vw, 9px);
  --lower-side-block-width: 120px;
  --lower-center-block-width: 210px;
  --gallery-side-block-width: 120px;
  --gallery-center-block-width: 210px;

  /* BLOCK POSITION SETTINGS: x moves left/right, y moves up/down, rotate changes angle. */
  --block-1-x: -20px;
  --block-1-y: 160px;
  --block-1-rotate: -24deg;
  --block-2-x: -40px;
  --block-2-y: 50px;
  --block-2-rotate: -24deg;
  --block-3-x: 0px;
  --block-3-y: 0px;
  --block-3-rotate: 0deg;
  --block-4-x: 40px;
  --block-4-y: 50px;
  --block-4-rotate: 24deg;
  --block-5-x: 20px;
  --block-5-y: 160px;
  --block-5-rotate: 24deg;
  --block-g1-x: 0px;
  --block-g1-y: 18px;
  --block-g1-rotate: 0deg;
  --block-g2-x: 0px;
  --block-g2-y: 0px;
  --block-g2-rotate: 0deg;
  --block-g3-x: 0px;
  --block-g3-y: 18px;
  --block-g3-rotate: 0deg;
  --block-hover-scale: 1;

  /* BOOKING PANEL SETTINGS: narrower side panel keeps booking separate from seats. */
  --booking-panel-width: clamp(280px, 24vw, 330px);
  --booking-panel-top: 18px;
  --wheelchair-seat-color: #8b5cf6;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #f3f1ee;
  color: #222;
}

main {
  background: #f3f1ee;
}

.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  background: rgba(246,246,246,0.92);
}

.loading-overlay.hidden {
  display: none;
}

.loading-card {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 22px 26px;
  background: white;
  border-radius: 10px;
  box-shadow: 0 10px 34px rgba(0,0,0,0.14);
  color: #231f20;
  font-weight: bold;
}

.loading-card p {
  margin: 0;
}

.loading-spinner {
  width: 42px;
  height: 42px;
  border: 4px solid #ddd;
  border-top-color: #014456;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.site-header {
  color: white;
}

.hero {
  position: relative;
  display: grid;
  align-content: end;
  min-height: clamp(820px, 84svh, 760px);
  padding: clamp(18px, 3vw, 38px);
  overflow: hidden;
  background-image: url("src/assets/tpw-hero-image.png");
  background-position: center 0%;
  background-size: cover;
  color: white;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(6, 14, 30, 0.18);
}

.site-nav,
.hero-content {
  position: relative;
  z-index: 1;
}

.site-nav {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.site-nav a,
.hero-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid rgba(255,255,255,0.78);
  border-radius: 999px;
  padding: 0 18px;
  color: white;
  text-decoration: none;
  font-weight: bold;
}

.site-nav a {
  min-height: 36px;
  padding: 0 14px;
  background: rgba(0,0,0,0.18);
  font-size: 0.92rem;
}

.hero-content {
  width: min(560px, 92vw);
  padding-bottom: clamp(22px, 3vh, 42px);
}

.event-kicker,
.section-kicker {
  margin: 0 0 10px;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-size: clamp(3.2rem, 9vw, 7.8rem);
  line-height: 0.92;
  letter-spacing: 0;
  text-wrap: balance;
}

.hero-copy {
  max-width: 560px;
  margin: 18px 0 24px;
  font-size: clamp(1.05rem, 2vw, 1.45rem);
  line-height: 1.35;
}

.hero-action {
  width: fit-content;
  background: #f8c84b;
  border-color: #f8c84b;
  color: #171717;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.hero-action:hover,
.hero-action:focus-visible {
  filter: brightness(0.96);
}

.event-section {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: clamp(24px, 5vw, 72px);
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: clamp(42px, 7vw, 90px) 0 clamp(32px, 6vw, 72px);
}

.event-blurb h2,
.booking-heading h2 {
  margin: 0;
  text-align: left;
  font-size: clamp(2rem, 4.5vw, 4.5rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.event-blurb p {
  max-width: 700px;
  margin: 18px 0 0;
  color: #3d403f;
  font-size: clamp(1rem, 1.7vw, 1.18rem);
  line-height: 1.7;
}

.section-kicker {
  color: #9d2e46;
}

.story-label {
  margin-top: 24px;
  color: #9d2e46;
  font-weight: 900;
  text-transform: uppercase;
}

.event-facts {
  display: grid;
  align-self: end;
  gap: 0;
  margin: 0;
  border-top: 1px solid #d7d0c8;
}

.event-facts div {
  padding: 18px 0;
  border-bottom: 1px solid #d7d0c8;
}

.event-facts dt {
  margin-bottom: 5px;
  color: #6f4450;
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.event-facts dd {
  margin: 0;
  color: #242424;
  line-height: 1.4;
}

.ticket-info-section {
  padding: clamp(42px, 6vw, 76px) 0;
  background: #1d2f34;
  color: #f8f3eb;
}

.ticket-info-heading,
.ticket-info-grid,
.story-worlds-section {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
}

.ticket-info-heading {
  display: grid;
  gap: 8px;
  margin-bottom: clamp(22px, 4vw, 38px);
}

.ticket-info-heading .section-kicker,
.story-worlds-section .section-kicker {
  color: #f8c84b;
}

.ticket-info-heading h2 {
  max-width: 850px;
  margin: 0;
  font-size: clamp(2rem, 4.4vw, 4rem);
  line-height: 1;
  letter-spacing: 0;
}

.ticket-info-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.42fr);
  gap: clamp(22px, 4vw, 44px);
  align-items: start;
}

.booking-steps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.booking-steps article {
  min-height: 174px;
  padding: 18px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 8px;
  background: rgba(255,255,255,0.07);
}

.booking-steps span {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin-bottom: 24px;
  border-radius: 50%;
  background: #f8c84b;
  color: #17201b;
  font-weight: 900;
}

.booking-steps h3,
.payment-collection-card h3 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.booking-steps p,
.payment-collection-card p {
  margin: 0;
  color: rgba(248,243,235,0.84);
  line-height: 1.55;
}

.payment-collection-card {
  display: grid;
  gap: 18px;
  padding: 20px;
  border: 1px solid rgba(248,200,75,0.38);
  border-radius: 8px;
  background: #f8f3eb;
  color: #1d2f34;
}

.payment-collection-card p {
  color: #2f3f43;
}

.payment-collection-card > div:first-child {
  padding: 14px;
  border: 1px solid #e1655e;
  border-radius: 6px;
  background: #fff0ef;
}

.payment-collection-card p + p {
  margin-top: 6px;
}

.story-worlds-section {
  padding: 30px 0;
}

.world-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.world-list span {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  padding: 0 14px;
  border: 1px solid #d5cbbf;
  border-radius: 999px;
  background: #fffdf9;
  color: #2a3437;
  font-weight: 800;
}

.booking-section {
  padding: clamp(36px, 5vw, 70px) 0 54px;
  background: #faf9f7;
  border-top: 1px solid #e0dbd4;
}

.booking-heading {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto 18px;
}

.page {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
}

h2 {
  text-align: center;
  margin: 30px 0 12px;
}

.booking-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--booking-panel-width);
  align-items: start;
  gap: clamp(22px, 3vw, 44px);
}

.seat-plan-area {
  min-width: 0;
}

.plan-title {
  margin: 30px 0 12px;
  text-align: center;
  font-size: clamp(1rem, 1.6vw, 1.35rem);
}

.plan-instruction {
  width: fit-content;
  max-width: min(620px, 92%);
  margin: -12px auto 28px;
  padding: 8px 12px;
  border: 1px solid #e24500;
  border-radius: 999px;
  background: #fffdf9;
  color: #e24500;
  font-size: 0.9rem;
  font-weight: 700;
  text-align: center;
}

@media (min-width: 1151px) {
  .seat-plan-area {
    --seat-size: clamp(7px, 0.58vw, 13px);
    --seat-font-size: clamp(5px, 0.42vw, 8px);
    --seat-gap: clamp(1px, 0.12vw, 2px);
    --row-label-width: clamp(10px, 0.68vw, 14px);
    --block-gap: clamp(6px, 0.7vw, 11px);
    --block-padding: clamp(4px, 0.42vw, 7px);
    --lower-side-block-width: 94px;
    --lower-center-block-width: 166px;
    --gallery-side-block-width: 96px;
    --gallery-center-block-width: 170px;
  }

  .seat-plan-area .lower-plan {
    min-height: clamp(430px, 44vw, 540px);
  }

  .seat-plan-area .gallery-plan {
    min-height: clamp(280px, 29vw, 360px);
  }
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  margin-bottom: 16px;
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: inline-block;
}

.available { background: #3fb950; }
.wheelchair { background: var(--wheelchair-seat-color); }
.selected { background: #58a6ff; }
.unavailable { background: #8b949e; }
.reserved { background: #f2cc60; }
.sold { background: #f85149; }
.blackedout { background: #111; }

.stage {
  width: min(760px, 88%);
  margin: 8px auto 30px;
  padding: 34px;
  text-align: center;
  background: #014456;
  color: white;
  font-weight: bold;
  border-radius: 8px;
}

.theatre-plan {
  width: 100%;
  overflow-x: hidden;
  padding: 10px 0 18px;
}

.gallery-plan {
  min-height: 360px;
}

.lower-plan {
  min-height: 550px;
}

.seat-map {
  display: grid;
  gap: var(--block-gap);
  justify-content: center;
  align-items: center;
  margin-bottom: 28px;
}

.lower-layout {
  grid-template-columns:
    minmax(var(--lower-side-block-width), auto)
    minmax(var(--lower-side-block-width), auto)
    minmax(var(--lower-center-block-width), auto)
    minmax(var(--lower-side-block-width), auto)
    minmax(var(--lower-side-block-width), auto);
  grid-template-areas: "block-1 block-2 block-3 block-4 block-5";
}

.gallery-layout {
  grid-template-columns:
    minmax(var(--gallery-side-block-width), auto)
    minmax(var(--gallery-center-block-width), auto)
    minmax(var(--gallery-side-block-width), auto);
  grid-template-areas: "block-g1 block-g2 block-g3";
}

.block {
  position: relative;
  background: white;
  padding: var(--block-padding);
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  overflow-x: hidden;
  transform-origin: center;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.block[role="button"]:hover {
  --block-hover-scale: 1.1;
  box-shadow: 0 5px 16px rgba(0,0,0,0.14);
}

.block-1 { grid-area: block-1; transform: translate(var(--block-1-x), var(--block-1-y)) rotate(var(--block-1-rotate)) scale(var(--block-hover-scale)); }
.block-2 { grid-area: block-2; transform: translate(var(--block-2-x), var(--block-2-y)) rotate(var(--block-2-rotate)) scale(var(--block-hover-scale)); }
.block-3 { grid-area: block-3; transform: translate(var(--block-3-x), var(--block-3-y)) rotate(var(--block-3-rotate)) scale(var(--block-hover-scale)); }
.block-4 { grid-area: block-4; transform: translate(var(--block-4-x), var(--block-4-y)) rotate(var(--block-4-rotate)) scale(var(--block-hover-scale)); }
.block-5 { grid-area: block-5; transform: translate(var(--block-5-x), var(--block-5-y)) rotate(var(--block-5-rotate)) scale(var(--block-hover-scale)); }
.block-g1 {
  grid-area: block-g1;
  justify-self: end;
  transform: translate(var(--block-g1-x), var(--block-g1-y)) rotate(var(--block-g1-rotate)) scale(var(--block-hover-scale));
}
.block-g2 { grid-area: block-g2; transform: translate(var(--block-g2-x), var(--block-g2-y)) rotate(var(--block-g2-rotate)) scale(var(--block-hover-scale)); }
.block-g3 { grid-area: block-g3; transform: translate(var(--block-g3-x), var(--block-g3-y)) rotate(var(--block-g3-rotate)) scale(var(--block-hover-scale)); }

.block h3 {
  text-align: center;
  margin: 0 0 8px;
  font-size: clamp(0.8rem, 1vw, 1rem);
}

.seat-row {
  display: grid;
  grid-template-columns: var(--row-label-width) 1fr var(--row-label-width);
  align-items: center;
  gap: var(--seat-gap);
  margin-bottom: var(--seat-gap);
}

.seats-in-row {
  display: flex;
  gap: var(--seat-gap);
}

.block-g1 .seats-in-row {
  justify-content: flex-end;
}

.block-4 .seats-in-row {
  justify-content: flex-end;
}

.block-g2 .seats-in-row {
  display: grid;
  grid-template-columns: repeat(13, var(--seat-size));
  justify-self: center;
  width: max-content;
}

.block-g2 .seat-row[data-row="K"] .seat:nth-child(1) {
  grid-column: 9;
}

.block-g2 .seat-row[data-row="K"] .seat:nth-child(2) {
  grid-column: 10;
}

.block-g2 .seat-row[data-row="K"] .seat:nth-child(3) {
  grid-column: 11;
}

.block-g2 .seat-row[data-row="K"] .seat:nth-child(4) {
  grid-column: 12;
}

.block-g2 .seat-row[data-row="K"] .seat:nth-child(5) {
  grid-column: 13;
}

.row-label {
  width: var(--row-label-width);
  text-align: center;
  font-weight: bold;
  background: #facc15;
  padding: clamp(2px, 0.24vw, 4px) 0;
  border-radius: 4px;
  font-size: var(--seat-font-size);
}

.seat {
  width: var(--seat-size);
  height: var(--seat-size);
  min-width: 0;
  min-height: 0;
  border: 1px solid #bbb;
  border-radius: 3px;
  cursor: pointer;
  font-size: var(--seat-font-size);
  padding: 0;
}

.seat.available { background: #3fb950; }
.seat.available.wheelchair { background: var(--wheelchair-seat-color); color: white; }
.seat.selected { background: #58a6ff; }
.seat.unavailable {
  background: #8b949e;
  cursor: not-allowed;
}
.seat.reserved {
  background: #f2cc60;
  cursor: not-allowed;
}
.seat.sold {
  background: #f85149;
  color: white;
  cursor: not-allowed;
}

.seat.blackedout {
  background: #111;
  border-color: #111;
  color: transparent;
  cursor: default;
}

.booking-panel {
  position: sticky;
  top: var(--booking-panel-top);
  z-index: 4;
  width: var(--booking-panel-width);
  max-height: calc(100vh - (var(--booking-panel-top) * 2));
  overflow: auto;
  background: white;
  padding: 16px;
  border-radius: 10px;
  max-width: none;
  margin: 30px 0 40px;
  box-shadow: 0 14px 34px rgba(0,0,0,0.16);
}

.booking-panel-section {
  border: 1px solid #d8ddd9;
  border-radius: 8px;
  background: #fbfcfb;
  overflow: hidden;
}

.booking-panel-section + .booking-panel-section {
  margin-top: 10px;
}

.booking-panel-section summary {
  cursor: pointer;
  padding: 12px 14px;
  background: #f0f3f1;
  color: #17201b;
  font-size: 1rem;
  font-weight: 800;
}

.booking-panel-section[open] summary {
  border-bottom: 1px solid #d8ddd9;
}

.booking-panel-section-body {
  padding: 0 12px 14px;
}

.ticket-mix {
  margin-top: 18px;
  border-top: 1px solid #d8ddd9;
}

.ticket-mix h3 {
  margin: 16px 0 8px;
  font-size: 1rem;
}

.ticket-type-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 64px;
  align-items: center;
  gap: 14px;
  min-height: 58px;
  margin: 0;
  border-bottom: 1px solid #e5e8e6;
  color: #27342c;
}

.ticket-type-row > div,
.ticket-type-row > span {
  display: grid;
  gap: 2px;
}

.ticket-type-row span span,
.ticket-type-row div span {
  color: #657069;
  font-size: 0.82rem;
  font-weight: normal;
}

.ticket-type-row output {
  text-align: center;
  font-weight: bold;
}

.ticket-stepper {
  display: grid;
  grid-template-columns: 30px 30px 30px;
  align-items: center;
  justify-content: end;
  gap: 4px;
}

.ticket-stepper button {
  width: 30px;
  height: 30px;
  min-height: 30px;
  border: 1px solid #7d8981;
  border-radius: 50%;
  padding: 0;
  background: white;
  color: #1d2b22;
  cursor: pointer;
  font-size: 1.15rem;
  font-weight: bold;
  line-height: 1;
}

.ticket-stepper button:hover:not(:disabled) {
  background: #edf2ee;
}

.ticket-stepper button:disabled {
  cursor: default;
  opacity: 0.35;
}

.ticket-stepper output {
  width: 30px;
  text-align: center;
  font-weight: bold;
}

.cart-summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin: 1rem 0;
  padding: 0.85rem 0;
  border-top: 1px solid #d8ddd9;
  border-bottom: 1px solid #d8ddd9;
  color: #39443d;
}

.cart-summary strong {
  color: #14261b;
  font-size: 1.15rem;
  white-space: nowrap;
}

.selected-seat-list {
  display: grid;
  gap: 8px;
  margin: 12px 0 4px;
}

.selected-seat-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0;
  padding: 10px 12px;
  border-left: 4px solid #58a6ff;
  border-radius: 6px;
  background: #eef6ff;
  font-weight: bold;
  line-height: 1.35;
}

.selected-seat-group-unavailable {
  border-left-color: #f85149;
  background: #fff1f1;
  color: #6b1f2b;
}

.selected-seat-remove {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 50%;
  background: #231f20;
  color: white;
  cursor: pointer;
  font-size: 14px;
  font-weight: bold;
  line-height: 1;
  padding: 0;
}

.selected-seat-remove:hover,
.selected-seat-remove:focus-visible {
  background: #6b1f2b;
}

label {
  display: block;
  margin-top: 12px;
  font-weight: bold;
}

input {
  width: 100%;
  padding: 10px;
  margin-top: 5px;
}

button[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin-top: 16px;
  padding: 12px;
  border: 0;
  border-radius: 6px;
  background: #231f20;
  color: white;
  cursor: pointer;
  font-weight: bold;
}

button[type="submit"]:disabled {
  cursor: wait;
  opacity: 0.75;
}

button[type="submit"].is-loading::before {
  content: "";
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.35);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.small-note {
  font-size: 0.9rem;
  color: #555;
}

.status-lookup {
  margin-top: 10px;
}

.status-lookup h3 {
  margin: 0 0 10px;
  font-size: 1rem;
}

.status-lookup form {
  display: grid;
  gap: 10px;
}

.status-lookup form button {
  width: 100%;
  min-height: 38px;
  border: 1px solid #39443d;
  border-radius: 6px;
  background: white;
  color: #1f2923;
  font-weight: 800;
}

.status-lookup form button:hover,
.status-lookup form button:focus-visible {
  background: #edf2ee;
}

.status-result {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  color: #344039;
  font-size: 0.9rem;
  line-height: 1.4;
}

.status-result-card {
  display: grid;
  gap: 5px;
  padding: 10px 12px;
  border-left: 4px solid #58a6ff;
  border-radius: 6px;
  background: #eef6ff;
  text-align: left;
}

.status-result-card strong {
  display: block;
  color: #17201b;
}

.status-result-card span {
  display: block;
}

.status-result-action {
  margin-top: 4px;
  color: #014456;
  font-size: 0.78rem;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.status-result-card-button {
  width: 100%;
  border-top: 0;
  border-right: 0;
  border-bottom: 0;
  color: inherit;
  cursor: pointer;
  font: inherit;
}

.status-result-card-button:hover,
.status-result-card-button:focus-visible {
  background: #e3f0ff;
  outline: 2px solid #58a6ff;
  outline-offset: 2px;
}

.status-history,
.status-history-item {
  border: 1px solid #d8ddd9;
  border-radius: 6px;
  background: #fff;
}

.status-history {
  margin-top: 4px;
}

.status-history summary,
.status-history-item summary {
  cursor: pointer;
  padding: 9px 11px;
  color: #344039;
  font-weight: 800;
}

.status-history-item {
  margin: 8px;
}

.status-history-item .status-result-card {
  margin: 0 8px 8px;
  border-left-color: #8b949e;
  background: #f7f8f7;
}

.status-result-error {
  padding: 10px 12px;
  border-left: 4px solid #f85149;
  border-radius: 6px;
  background: #fff1f1;
  color: #6b1f2b;
  font-weight: 700;
}

.block[role="button"] {
  cursor: zoom-in;
}

.block-zoom-icon {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  background-image: url("src/assets/icons8-zoom-in-100.png");
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  pointer-events: none;
}

.block[role="button"]:focus-visible {
  outline: 3px solid #58a6ff;
  outline-offset: 4px;
}

.zoom-open,
.message-open {
  overflow: hidden;
}

.zoom-modal,
.message-modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0,0,0,0.55);
}

.zoom-modal[hidden],
.message-modal[hidden] {
  display: none;
}

.zoom-dialog {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(1100px, 96vw);
  max-height: 92vh;
  overflow: hidden;
  background: #f6f6f6;
  border-radius: 8px;
  box-shadow: 0 18px 60px rgba(0,0,0,0.35);
}

.message-dialog {
  display: flex;
  flex-direction: column;
  width: min(720px, 96vw);
  max-height: 92vh;
  overflow: hidden;
  background: #f6f6f6;
  border-radius: 8px;
  box-shadow: 0 18px 60px rgba(0,0,0,0.35);
}

.zoom-header,
.message-header {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  background: #231f20;
  color: white;
}

.zoom-header h2,
.message-header h2 {
  margin: 0;
  text-align: center;
}

.message-body {
  flex: 1 1 auto;
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 0;
  overflow: auto;
  padding: 18px;
  font-size: 0.98rem;
  line-height: 1.45;
}

.message-body p {
  margin: 0;
}

.message-list {
  position: relative;
  display: grid;
  gap: 0;
  margin: 0;
  padding: 10px 12px;
  border: 1px dashed #8aa99a;
  border-radius: 8px;
  background: #fffdf7;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.7);
  list-style: none;
}

.message-ticket {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 168px;
  min-height: 232px;
  overflow: hidden;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: #343434;
}

.message-list::before,
.message-list::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #f6f6f6;
  transform: translateY(-50%);
}

.message-list::before {
  left: -10px;
}

.message-list::after {
  right: -10px;
}

.message-ticket::before,
.message-ticket::after {
  display: none;
}

.message-ticket-left,
.message-ticket-right {
  background: linear-gradient(to bottom, #e84c3d 0%, #e84c3d 28%, #ecedef 28%, #ecedef 100%);
  padding: 18px;
}

.message-ticket-left {
  border-top-left-radius: 8px;
  border-bottom-left-radius: 8px;
}

.message-ticket-right {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  justify-items: center;
  border-left: 3px dashed #fff;
  border-top-right-radius: 8px;
  border-bottom-right-radius: 8px;
  padding-bottom: 24px;
  text-align: center;
}

.message-ticket-right::before,
.message-ticket-right::after {
  content: "";
  position: absolute;
  left: -10px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #f6f6f6;
}

.message-ticket-right::before {
  top: -9px;
}

.message-ticket-right::after {
  bottom: -9px;
}

.message-ticket h3 {
  margin: 0 0 54px;
  color: #fff;
  font-size: 1.2rem;
  line-height: 1.1;
}

.message-ticket h3 span {
  font-weight: 400;
}

.message-ticket-field {
  margin-top: 13px;
  text-transform: uppercase;
}

.message-ticket-field strong {
  display: block;
  color: #525252;
  font-size: 0.94rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.message-ticket-field span {
  display: block;
  color: #7d8989;
  font-size: 0.7rem;
  font-weight: 800;
}

.message-ticket-customer {
  width: 100%;
  color: #fff;
  text-transform: uppercase;
}

.message-ticket-customer strong {
  display: block;
  font-size: 1rem;
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.message-ticket-customer span {
  display: block;
  margin-top: 6px;
  color: rgba(255,255,255,0.82);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.message-ticket-reference {
  display: block;
  width: 100%;
  color: #e84c3d;
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  overflow-wrap: anywhere;
  text-align: center;
}

.message-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 3px;
  padding: 7px 4px;
  border-bottom: 1px dashed #d5cab4;
  color: #26352d;
  background: transparent;
  font-weight: bold;
}

.message-list li:last-child {
  border-bottom: 0;
}

.message-modal[data-tone="danger"] .message-list li {
  color: #6b1f2b;
}

.message-modal[data-tone="success"] .message-list li {
  color: #174b2a;
}

.message-details {
  min-width: 0;
  margin-top: 6px;
  border: 1px solid #d8ddd9;
  border-radius: 6px;
  background: white;
  overflow: visible;
}

.message-details summary {
  cursor: pointer;
  padding: 8px 10px;
  color: #17201b;
  font-size: 0.82rem;
  font-weight: 800;
}

.message-details-panel {
  overflow: visible;
  padding-bottom: 8px;
}

.message-details-list {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0 8px;
  list-style: none;
}

.message-details-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  padding: 5px 7px;
  border-left: 3px solid #3fb950;
  border-radius: 5px;
  background: #effaf1;
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.25;
}

.message-details-list li span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.message-field-copy-button {
  flex: 0 0 auto;
  min-width: 44px;
  border: 1px solid #9ab7a1;
  border-radius: 5px;
  padding: 3px 6px;
  background: white;
  color: #174b2a;
  cursor: pointer;
  font-size: 0.68rem;
  font-weight: 800;
}

.message-field-copy-button:hover,
.message-field-copy-button:focus-visible {
  background: #e2f2e7;
}

.reservation-countdown {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid #b8d5c2;
  background: #eef8f1;
  color: #174b2a;
  font-size: 1.15rem;
  font-weight: 700;
  text-align: center;
}

.reservation-countdown.is-urgent {
  border-color: #dc8b8b;
  background: #fff0f0;
  color: #8f1f1f;
}

.message-actions {
  flex: 0 0 auto;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 0 18px 18px;
}

.message-button {
  min-width: 92px;
  border: 0;
  border-radius: 6px;
  padding: 10px 14px;
  cursor: pointer;
  font-weight: bold;
}

.message-button-primary {
  background: #231f20;
  color: white;
}

.message-modal[data-tone="danger"] .message-button-primary {
  background: #6b1f2b;
}

.message-modal[data-tone="success"] .message-button-primary {
  background: #014456;
}

.message-button-secondary {
  background: #d8dee4;
  color: #231f20;
}

.message-button:hover,
.message-button:focus-visible {
  filter: brightness(0.94);
}

.zoom-close {
  position: absolute;
  top: 58px;
  right: 18px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  padding: 7px;
  background: white;
  color: #231f20;
  cursor: pointer;
  font-weight: bold;
  box-shadow: 0 2px 10px rgba(0,0,0,0.18);
}

.zoom-out-icon {
  width: 28px;
  height: 28px;
  background-image: url("src/assets/icons8-zoom-out-100.png");
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}

.zoom-body {
  --seat-size: clamp(20px, 2.2vw, 34px);
  --seat-font-size: clamp(10px, 1vw, 14px);
  --seat-gap: clamp(3px, 0.35vw, 6px);
  --row-label-width: clamp(22px, 2vw, 34px);
  --block-padding: clamp(12px, 1.5vw, 20px);
  overflow: auto;
  padding: 62px 18px 18px;
}

.zoom-body .block {
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
  transform: none;
  overflow-x: auto;
  cursor: default;
}

.zoom-body .block h3 {
  font-size: clamp(1rem, 1.5vw, 1.25rem);
}

@media (max-width: 1150px) {
  :root {
    /* MOBILE MINI-MAP SETTINGS: keeps blocks positioned but turns seats into dots. */
    --seat-size: 3px;
    --seat-font-size: 0;
    --seat-gap: 1px;
    --mobile-seat-radius: 50%;
    --row-label-width: 3px;
    --block-gap: 4px;
    --block-padding: 2px;
    --lower-side-block-width: 62px;
    --lower-center-block-width: 68px;
    --gallery-side-block-width: 62px;
    --gallery-center-block-width: 68px;

    --block-1-x: 0px;
    --block-1-y: 70px;
    --block-2-x: -12px;
    --block-2-y: 25px;
    --block-3-x: 0px;
    --block-3-y: 0px;
    --block-4-x: 12px;
    --block-4-y: 25px;
    --block-5-x: 0px;
    --block-5-y: 70px;
    --block-g1-x: 0px;
    --block-g1-y: 14px;
    --block-g2-x: 0px;
    --block-g2-y: 0px;
    --block-g3-x: 0px;
    --block-g3-y: 14px;
  }

  .hero {
    min-height: auto;
    aspect-ratio: 1131 / 1188;
    padding: 16px;
    background-image: url("src/assets/tpw-hero-image-mobile.png");
    background-position: center top;
    background-size: 100% auto;
    background-repeat: no-repeat;
  }

  .site-nav {
    justify-content: flex-start;
  }

  .site-nav a {
    min-height: 34px;
    padding: 0 12px;
    font-size: 0.82rem;
  }

  .hero-content {
    padding-bottom: 18px;
  }

  .hero h1 {
    font-size: clamp(2.7rem, 16vw, 4.8rem);
  }

  .hero-copy {
    margin: 14px 0 18px;
    max-width: 420px;
    font-size: 1rem;
  }

  .hero-action {
    min-height: 40px;
  }

  .event-section {
    grid-template-columns: 1fr;
    width: min(100% - 28px, 720px);
    gap: 26px;
    padding: 34px 0 30px;
  }

  .event-blurb h2,
  .booking-heading h2 {
    font-size: clamp(2rem, 10vw, 3.2rem);
  }

  .event-blurb p {
    margin-top: 16px;
    font-size: 0.98rem;
  }

  .ticket-info-heading,
  .ticket-info-grid,
  .story-worlds-section {
    width: min(100% - 28px, 720px);
  }

  .ticket-info-grid,
  .booking-steps {
    grid-template-columns: 1fr;
  }

  .booking-steps article {
    min-height: 0;
  }

  .booking-steps span {
    margin-bottom: 14px;
  }

  .world-list {
    gap: 8px;
  }

  .world-list span {
    min-height: 34px;
    padding: 0 11px;
    font-size: 0.82rem;
  }

  .booking-section {
    padding-top: 32px;
  }

  .booking-heading {
    width: min(100% - 28px, 720px);
  }

  .booking-layout {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .message-ticket {
    grid-template-columns: minmax(0, 1fr) 132px;
    min-height: 198px;
  }

  .message-ticket-left,
  .message-ticket-right {
    padding: 13px;
  }

  .message-ticket h3 {
    margin-bottom: 54px;
    font-size: 1rem;
  }

  .message-ticket-field {
    margin-top: 9px;
  }

  .message-ticket-field strong {
    font-size: 0.78rem;
  }

  .message-ticket-customer strong {
    font-size: 0.78rem;
  }

  .message-ticket-customer span {
    font-size: 0.56rem;
  }

  .message-ticket-reference {
    font-size: 0.84rem;
  }

  .page {
    padding: 14px 8px;
  }

  h2 {
    margin: 22px 0 8px;
    font-size: 1.1rem;
  }

  .plan-title {
    margin: 20px 0 8px;
    font-size: 1rem;
  }

  .plan-instruction {
    font-size: 0.7rem;
  }

  .legend {
    gap: 8px 10px;
    font-size: 0.8rem;
  }

  .dot {
    width: 10px;
    height: 10px;
  }

  .theatre-plan {
    padding: 4px 0 10px;
  }

  .gallery-plan {
    min-height: 90px;
  }

  .lower-plan {
    min-height: 160px;
  }

  .lower-layout {
    grid-template-columns:
      minmax(var(--lower-side-block-width), auto)
      minmax(var(--lower-side-block-width), auto)
      minmax(var(--lower-center-block-width), auto)
      minmax(var(--lower-side-block-width), auto)
      minmax(var(--lower-side-block-width), auto);
  }

  .gallery-layout {
    grid-template-columns:
      minmax(var(--gallery-side-block-width), auto)
      minmax(var(--gallery-center-block-width), auto)
      minmax(var(--gallery-side-block-width), auto);
  }

  .block {
    border-radius: 5px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
  }

  .block-zoom-icon {
    top: 3px;
    right: 3px;
    width: 10px;
    height: 10px;
  }

  .block h3 {
    margin-right: 15px;
    margin-bottom: 3px;
    font-size: 0.55rem;
  }

  .row-label {
    color: transparent;
    padding: 0;
    border-radius: 50%;
  }

  .seat {
    border: 0;
    border-radius: var(--mobile-seat-radius);
    color: transparent;
  }

  .stage {
    width: min(240px, 88%);
    padding: 18px;
    font-size: 0.9rem;
  }

  .booking-panel {
    position: static;
    width: min(560px, calc(100% - 8px));
    max-height: none;
    overflow: visible;
    margin: 18px auto 32px;
  }

  .zoom-dialog {
    width: 96vw;
  }

  .zoom-body {
    --seat-size: clamp(18px, 6vw, 28px);
    --seat-font-size: clamp(9px, 3vw, 12px);
    --seat-gap: 4px;
    --row-label-width: 24px;
    --block-padding: 12px;
    padding: 56px 12px 12px;
  }

  .zoom-body .row-label {
    color: #222;
    padding: 3px 0;
    border-radius: 4px;
  }

  .zoom-body .seat {
    border: 1px solid #bbb;
    border-radius: 3px;
    color: #111;
  }

  .zoom-body .seat.sold {
    color: white;
  }

  .zoom-body .seat.blackedout {
    color: transparent;
  }
}
