/* Broadway Kids Studio — performances / box office page
   Rendered by [bks_performances]. Shares the card stylesheet's palette and
   type stack but not its markup: this page is a purchase surface, so the
   ticket control is the loudest thing in every row.

   Loaded only on pages where the shortcode actually runs. */

.bks-shows {
  --bks-orange:     #FF6C00;
  --bks-yellow:     #FFB000;
  --bks-bg:         #0A0A0A;
  /* Kept in step with bks-productions.css; see the note there. */
  --bks-surface:    #242424;
  --bks-border:     #383838;
  --bks-text-2:     #A0A0A0;
  --bks-text-1:     #F2F2F0;

  --bks-font-display: 'Poppins', system-ui, sans-serif;
  --bks-font-body:    'Poppins', system-ui, sans-serif;
  --bks-font-mono:    'JetBrains Mono', ui-monospace, monospace;

  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  box-sizing: border-box;
  font-family: var(--bks-font-body);
  color: var(--bks-text-1);
  line-height: 1.6;
}

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

/* ---------- Show block ---------- */

.bks-shows .bks-show {
  display: grid;
  grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
  gap: 0 1.7rem;
  align-items: start;
  background: var(--bks-surface);
  border: 1px solid var(--bks-border);
  border-radius: 14px;
  overflow: hidden;
}

@media (max-width: 780px) {
  .bks-shows .bks-show {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }
}

/* ---------- Poster ---------- */

/* The poster sits at its own natural height rather than stretching to match
   the body column. Stretching plus object-fit:contain is what produced the
   letterbox bars: a 16:9 image in a 300x490 box can only fill the middle.

   Because the image sets its own height, this works for any aspect ratio —
   16:9 key art stays short, a 2:3 theatrical poster runs tall, and neither
   letterboxes. No object-fit, no aspect-ratio, nothing to tune per show. */

.bks-shows .bks-show-poster {
  align-self: start;
  padding: 1.7rem 0 1.7rem 1.7rem;
  line-height: 0;
}

@media (max-width: 780px) {
  .bks-shows .bks-show-poster { padding: 1.4rem 1.4rem 0; }
}

/* width:auto with two maxima lets the image pick whichever constraint binds
   first, so the element box always equals the rendered image. Using width:100%
   plus max-height instead would squash the box and letterbox inside it, which
   would put the border and radius around empty space. */

.bks-shows .bks-show-poster-img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 480px;
  height: auto;
  margin-inline: auto;
  border-radius: 10px;
  border: 1px solid var(--bks-border);
}

@media (max-width: 780px) {
  /* A 2:3 poster at full phone width runs past 600px and buries the
     showtimes below the fold. */
  .bks-shows .bks-show-poster-img { max-height: 320px; }
}

.bks-shows .bks-show-poster-ph {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  background:
    repeating-linear-gradient(45deg,
      #2C2C2C 0 10px,
      #313131 10px 20px);
  color: var(--bks-text-2);
  font-family: var(--bks-font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
  line-height: 1.4;
}

/* ---------- Body ---------- */

.bks-shows .bks-show-body { padding: 1.75rem 1.9rem 1.9rem; }

@media (max-width: 480px) {
  .bks-shows .bks-show-body { padding: 1.4rem 1.25rem 1.6rem; }
}

.bks-shows .bks-show-head { margin-bottom: 0.9rem; }

.bks-shows .bks-show-title {
  font-family: var(--bks-font-display);
  font-weight: 800;
  font-size: 1.9rem;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--bks-text-1);
}

.bks-shows .bks-show-dates {
  margin: 0.4rem 0 0;
  font-family: var(--bks-font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--bks-orange);
}

.bks-shows .bks-show-summary {
  margin: 0 0 0.7rem;
  font-size: 0.98rem;
  line-height: 1.6;
  text-wrap: pretty;
}

.bks-shows .bks-show-runtime {
  margin: 0 0 1.3rem;
  font-size: 0.82rem;
  color: var(--bks-text-2);
}

/* ---------- Venue ---------- */

.bks-shows .bks-venue-block {
  margin: 0 0 1.5rem;
  padding: 0.95rem 1.1rem;
  border-left: 3px solid var(--bks-orange);
  background: rgba(255, 108, 0, 0.08);
  border-radius: 0 8px 8px 0;
}

.bks-shows .bks-venue-name {
  margin: 0;
  font-weight: 600;
  font-size: 0.95rem;
}

.bks-shows .bks-venue-addr {
  margin: 0.25rem 0 0;
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--bks-text-2);
  font-style: normal;
}

.bks-shows .bks-venue-map {
  display: inline-block;
  margin-top: 0.5rem;
  font-family: var(--bks-font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bks-orange);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}

.bks-shows .bks-venue-map:hover,
.bks-shows .bks-venue-map:focus,
.bks-shows .bks-venue-map:visited { color: var(--bks-orange); }

.bks-shows .bks-venue-map:focus-visible {
  outline: 2px solid var(--bks-text-1);
  outline-offset: 3px;
}

.bks-shows .bks-venue-notes {
  margin-top: 0.6rem;
  padding-top: 0.6rem;
  border-top: 1px solid rgba(255, 108, 0, 0.22);
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--bks-text-2);
}

/* Multi-venue runs list the addresses under the performances instead. */

.bks-shows .bks-venue-set {
  margin-top: 1.6rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--bks-border);
}

.bks-shows .bks-venue-set-title {
  margin: 0 0 0.7rem;
  font-family: var(--bks-font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--bks-text-2);
}

.bks-shows .bks-venue-block--compact {
  margin-bottom: 0.8rem;
  padding: 0.7rem 0.9rem;
}

.bks-shows .bks-venue-block--compact:last-child { margin-bottom: 0; }

/* ---------- Performance rows ---------- */

.bks-shows .bks-perf-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--bks-border);
}

.bks-shows .bks-perf-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  margin: 0;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--bks-border);
}

@media (max-width: 520px) {
  .bks-shows .bks-perf-row {
    flex-direction: column;
    align-items: stretch;
  }
}

.bks-shows .bks-perf-when {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.15rem 0.7rem;
  min-width: 0;
}

.bks-shows .bks-perf-date {
  font-weight: 600;
  font-size: 0.98rem;
}

.bks-shows .bks-perf-time {
  font-family: var(--bks-font-mono);
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--bks-text-1);
}

.bks-shows .bks-perf-note,
.bks-shows .bks-perf-venue {
  flex-basis: 100%;
  font-family: var(--bks-font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--bks-text-2);
}

.bks-shows .bks-perf-venue { color: var(--bks-orange); }

.bks-shows .bks-perf-action { flex: 0 0 auto; }

/* ---------- Ticket controls ---------- */

.bks-shows .bks-tix {
  display: block;
  min-width: 11rem;
  padding: 0.72rem 1.4rem;
  border-radius: 999px;
  font-family: var(--bks-font-display);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
  text-decoration: none;
}

@media (max-width: 520px) {
  .bks-shows .bks-tix { min-width: 0; width: 100%; }
}

/* Curtain Black on Signal Orange measures 6.97:1. White would be 2.84:1
   and fail WCAG AA, same reasoning as the card CTA. */
.bks-shows .bks-tix--buy {
  background: var(--bks-orange);
  color: var(--bks-bg);
  transition: opacity 0.15s ease;
}

.bks-shows .bks-tix--buy:hover,
.bks-shows .bks-tix--buy:focus,
.bks-shows .bks-tix--buy:visited {
  opacity: 0.88;
  color: var(--bks-bg);
  text-decoration: none;
}

.bks-shows .bks-tix--buy:focus-visible {
  outline: 2px solid var(--bks-text-1);
  outline-offset: 3px;
}

.bks-shows .bks-tix--soon {
  border: 1px dashed var(--bks-border);
  color: var(--bks-text-2);
  font-weight: 600;
}

.bks-shows .bks-tix--soldout {
  border: 1px solid var(--bks-border);
  color: var(--bks-text-2);
  font-family: var(--bks-font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
}

.bks-shows .bks-perf-row--soldout .bks-perf-date,
.bks-shows .bks-perf-row--soldout .bks-perf-time { color: var(--bks-text-2); }

/* ---------- Accessible label text ---------- */

/* Divi ships .screen-reader-text, but the shortcode can land on pages where
   theme CSS loads after this file. Declaring it here makes it independent. */
.bks-shows .screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ---------- Motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .bks-shows .bks-tix--buy { transition: none; }
}
