/* ─── Page layout ──────────────────────────────────────────────────────── */

.page-playbill {
    background: #fff;
}

.playbill-page {
    width: 100%;
}

.playbill-months-content {
    width: calc(100% - 8rem);
    margin: 0 auto;
    padding: 0 2rem 4rem;
}

/* ─── Sticky nav ──────────────────────────────────────────────────────── */

.playbill-nav {
    position: sticky;
    top: 0;
    z-index: 20;
    background: #fff;
    border-bottom: 1px solid #eee;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 2rem;
    padding: 1.5rem 6rem;
}

.playbill-heading {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.playbill-months {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.playbill-month-link {
    font-size: 0.95rem;
    font-weight: 600;
    color: #999;
    text-decoration: none;
    padding: 0.25rem 0;
    border-bottom: 2px solid transparent;
    transition: color 0.15s, border-color 0.15s;
    text-transform: lowercase;
}

.playbill-month-link:hover {
    color: #000;
}

.playbill-month-link.is-active {
    color: #000;
    border-bottom-color: #000;
}

.playbill-month-year {
    color: #999;
    font-size: 0.8em;
}

.playbill-month-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: #000;
    text-decoration: none;
    transition: opacity 0.15s;
}

.playbill-month-arrow:hover {
    opacity: 0.6;
}

.playbill-controls {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

.playbill-control-btn {
    background: transparent;
    border: 1px solid #000;
    padding: 0.5rem 1.25rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    color: #000;
    position: relative;
    transition: background 0.15s, color 0.15s;
}

.playbill-control-btn:hover {
    background: #000;
    color: #fff;
}

.playbill-filter-count {
    background: #d40000;
    color: #fff;
    font-size: 0.65rem;
    padding: 0.1rem 0.4rem;
    border-radius: 1em;
    margin-left: 0.5rem;
}

/* ─── Month sections ──────────────────────────────────────────────────── */

.playbill-month {
    padding: 3rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.playbill-month:last-child {
    border-bottom: none;
}

.playbill-empty {
    padding: 3rem 0;
    text-align: center;
    color: #999;
}

/* ─── Day blocks ──────────────────────────────────────────────────────── */

.playbill-day {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 2rem;
    padding: 2rem 0;
    border-bottom: 1px solid #f0f0f0;
    align-items: start;
    transition: background 0.4s;
}

.playbill-day:last-child {
    border-bottom: none;
}

.playbill-day.is-highlighted {
    background: #fffbcc;
}

.playbill-day-date {
    /* Match the item's top padding so the date label baselines with
       `.playbill-item-meta` rather than floating above the item. */
    padding-top: 1rem;
    font-weight: 700;
}

.playbill-day-num {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.1;
}

.playbill-day-weekday {
    margin-top: 0.25rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #666;
}

/* Items are direct grid children of `.playbill-day` — the wrapper
   `.playbill-day-events` was removed so each performance gets its own
   grid row. The date sits at row 1 / col 1; perfs auto-place into
   col 2 row by row. Row gap is shared with the day's column gap. */
.playbill-day > .playbill-item {
    grid-column: 2;
}

/* ─── Performance items ────────────────────────────────────────────────
 *
 * Default: compact white card. On hover (desktop) the whole row flips
 * to black/white and the ticket button reveals. On touch screens
 * (no hover) the button stays visible in flow so it remains tappable.
 */

.playbill-item {
    padding: 1rem 1.5rem;
    margin: 0 -1.5rem;
    color: var(--color-text);
    transition: background var(--t-base),
                color var(--t-base),
                opacity var(--t-base);
}

.playbill-item.is-past {
    opacity: 0.5;
}

.playbill-item-meta {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: var(--tracking-wide);
    color: inherit;
    margin-bottom: 0.75rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: baseline;
}

.playbill-item-sep {
    color: var(--color-text-faint);
}

.playbill-item-tag-premiere {
    color: var(--color-action-red);
    letter-spacing: 0.15em;
}

.playbill-item-title {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.15;
    margin: 0 0 0.5rem;
}

/* Length-bucket scaler — class is set in templates/playbill/_item.twig.
   The card panel is narrow, so shrink earlier than the hero. */
.playbill-item-title.is-medium    { font-size: 1.5rem;  line-height: 1.2;  }
.playbill-item-title.is-long      { font-size: 1.25rem; line-height: 1.25; }
.playbill-item-title.is-very-long { font-size: 1.05rem; line-height: 1.3;  }

.playbill-item-title a {
    color: inherit;
    text-decoration: none;
    transition: color var(--t-fast);
}

.playbill-item-title a:hover {
    color: var(--color-text-muted);
}

.playbill-item-subtitle {
    font-size: 0.95rem;
    line-height: 1.4;
    color: var(--color-text-medium);
    margin-bottom: 0.5rem;
}

.playbill-item-banner {
    font-size: 0.9rem;
    color: var(--color-text-mute);
    margin-bottom: 0.5rem;
}

.playbill-item-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.playbill-item-buy {
    background: var(--color-action-red);
    color: var(--color-text-on-dark);
    border: none;
    padding: 0.75rem 1.5rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: var(--tracking-caps);
    cursor: pointer;
    transition: background var(--t-fast), color var(--t-fast);
}

.playbill-item-buy:hover {
    background: var(--color-action-red-dk);
}

/* Free-registration variant (Timepad) — outline button so it reads as
   secondary, and stays legible against the black hovered row. */
.playbill-item-buy-free {
    background: transparent;
    border: 1px solid currentColor;
    color: inherit;
}

.playbill-item-buy-free:hover {
    background: currentColor;
    color: var(--color-bg-strong);
}

/* ─── Hover takeover (desktop only) ─────────────────────────────────────
 *
 * On hover-capable devices we hide the action button by default and
 * reveal it together with a black-card hover state. Touch devices keep
 * the button visible in flow (it would be unreachable otherwise).
 * Suppressed while the row is expanded — the detail card is the new
 * focus and a flickering hover state behind it reads as noisy. */
@media (hover: hover) {
    .playbill-item-actions {
        opacity: 0;
        pointer-events: none;
        transition: opacity var(--t-base);
    }

    .playbill-item:not(.is-expanded):hover {
        background: var(--color-bg-strong);
        color: var(--color-text-on-dark);
    }

    .playbill-item:not(.is-expanded):hover .playbill-item-sep {
        color: rgba(255, 255, 255, 0.4);
    }

    .playbill-item:not(.is-expanded):hover .playbill-item-subtitle,
    .playbill-item:not(.is-expanded):hover .playbill-item-banner {
        color: rgba(255, 255, 255, 0.85);
    }

    .playbill-item:not(.is-expanded):hover .playbill-item-title a:hover {
        color: rgba(255, 255, 255, 0.7);
    }

    .playbill-item:not(.is-expanded):hover .playbill-item-actions {
        opacity: 1;
        pointer-events: auto;
    }
}

/* The detail card below has its own buy buttons — the basic row's
   actions become redundant once expanded. */
.playbill-item.is-expanded .playbill-item-actions {
    display: none;
}

/* ─── Expanded-row layout ──────────────────────────────────────────────
 *
 * When a perf is opened, the takeover should consume the row's full
 * width — including the slot the date column normally occupies — and
 * the date label should move to align with the next collapsed perf so
 * the day context stays visible.
 *
 *   1 perf in the day, expanded   → date hidden entirely.
 *   first perf expanded, ≥2 perfs → date drops to row 2, aligning with
 *                                   the next perf in col 2.
 *   later perf expanded           → date stays at row 1 next to the
 *                                   first (still-collapsed) perf.
 */

/* Expanded perf claims both columns. */
.playbill-day > .playbill-item.is-expanded {
    grid-column: 1 / -1;
}

/* If the first perf is the one expanded, push the date down a row so
   it ends up next to whatever sits in row 2 of the events column. */
.playbill-day:has(> .playbill-item:nth-of-type(2).is-expanded) .playbill-day-date,
.playbill-day:has(> .playbill-item:first-of-type.is-expanded) .playbill-day-date {
    grid-row: auto;
}
.playbill-day:has(> .playbill-item:first-of-type.is-expanded) .playbill-day-date {
    grid-row: 2;
}

/* Single-perf day with the item expanded → no other perf to anchor
   the date against, so hide it. Covers longtime cards too (always
   single-perf). */
.playbill-day:has(> .playbill-item.is-expanded):not(:has(> .playbill-item + .playbill-item)) .playbill-day-date {
    display: none;
}

/* ─── Longtime events ────────────────────────────────────────────────── */

.playbill-longtime {
    padding: 1rem 0 2rem;
    border-bottom: 2px solid #000;
    margin-bottom: 1rem;
}

.playbill-longtime-item {
    padding: 1.5rem 0;
}

.playbill-longtime-dates {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #d40000;
    margin-bottom: 0.5rem;
}

/* ─── Drawers (placeholder; refined in steps 4–5) ────────────────────── */

.playbill-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 480px;
    max-width: 100vw;
    background: #fff;
    box-shadow: -4px 0 16px rgba(0, 0, 0, 0.1);
    transform: translateX(100%);
    transition: transform 0.25s;
    z-index: 100;
    padding: 2rem;
    overflow-y: auto;
}

.playbill-drawer.is-open {
    transform: translateX(0);
}

.playbill-drawer[hidden] {
    /* Override [hidden] when drawer is in the DOM but not yet styled */
    display: block;
}

/* ─── Responsive ─────────────────────────────────────────────────────── */

@media (max-width: 1024px) {
    .playbill-nav {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .playbill-months {
        flex-wrap: wrap;
    }

    .playbill-day {
        grid-template-columns: 120px 1fr;
        gap: 1rem;
    }

    .playbill-day-num {
        font-size: 1.4rem;
    }
}

@media (max-width: 768px) {
    .playbill-page {
        padding: 0 1rem 2rem;
    }

    .playbill-day {
        grid-template-columns: 1fr;
    }

    .playbill-day-date {
        display: flex;
        align-items: baseline;
        gap: 0.5rem;
    }

    .playbill-item-title {
        font-size: 1.25rem;
    }
}

/* ─── Drawer mechanics (replaces placeholder rules) ─────────────────── */

.playbill-drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 99;
    opacity: 0;
    transition: opacity 0.25s;
    pointer-events: none;
}

.playbill-drawer-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
}

.playbill-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 480px;
    max-width: 100vw;
    background: #fff;
    box-shadow: -4px 0 16px rgba(0, 0, 0, 0.1);
    transform: translateX(100%);
    transition: transform 0.25s;
    z-index: 100;
    padding: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.playbill-drawer.is-open {
    transform: translateX(0);
}

.playbill-drawer[hidden] {
    display: flex !important;
    /* override [hidden] so transform works */
}

.playbill-drawer-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.playbill-drawer-close:hover {
    color: #666;
}

.playbill-drawer-header {
    padding: 2rem 2rem 1rem;
    border-bottom: 1px solid #eee;
}

.playbill-drawer-header h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.playbill-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

/* ─── Calendar grid ─────────────────────────────────────────────────── */

.calendar-month-title {
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
    color: #000;
}

.calendar-grid {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.calendar-grid th {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #999;
    padding: 0.5rem 0;
    text-align: center;
}

.calendar-day {
    padding: 0;
    text-align: center;
    height: 40px;
    vertical-align: middle;
    border: 1px solid transparent;
}

.calendar-day span,
.calendar-day a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 0.9rem;
    color: #ccc;
    /* default: no events */
    text-decoration: none;
}

.calendar-day.has-events a {
    color: #000;
    font-weight: 600;
    cursor: pointer;
}

.calendar-day.has-events a:hover {
    background: #f0f0f0;
}

.calendar-day.is-today a,
.calendar-day.is-today span {
    background: #000;
    color: #fff;
}

.calendar-day.is-today.has-events a:hover {
    background: #333;
}

.calendar-day.is-past:not(.is-today).has-events a {
    color: #999;
}

.calendar-day.calendar-day-empty {
    background: transparent;
}

/* ─── Day highlight after calendar click ─────────────────────────────── */

.playbill-day.is-highlighted {
    background: #fffbcc;
    transition: background 0.4s;
}

/* ─── Responsive ─────────────────────────────────────────────────────── */

@media (max-width: 600px) {
    .playbill-drawer {
        width: 100%;
    }

    .playbill-drawer-body {
        padding: 1rem;
        gap: 1.5rem;
    }
}

/* ─── Filter form ───────────────────────────────────────────────────── */

.playbill-filter-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem 1.75rem;
}

@media (max-width: 520px) {
    .playbill-filter-form { grid-template-columns: 1fr; }
}

.filter-section-title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #999;
    margin: 0 0 0.75rem;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-options-inline {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Hide the native checkbox; style the label as a button-ish row */
.filter-check {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.4rem 0;
    font-size: 0.95rem;
    transition: color 0.15s;
    user-select: none;
}

.filter-check input {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 1.5px solid #999;
    background: #fff;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    transition: background 0.15s, border-color 0.15s;
}

.filter-check input:checked {
    background: #000;
    border-color: #000;
}

.filter-check input:checked::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 5px;
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.filter-check:hover input:not(:checked) {
    border-color: #000;
}

.filter-check:hover {
    color: #000;
}

/* Pill variant for age filters */
.filter-check-pill {
    padding: 0.4rem 1rem;
    border: 1px solid #ddd;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.filter-check-pill input {
    display: none;
}

.filter-check-pill:has(input:checked) {
    background: #000;
    color: #fff;
    border-color: #000;
}

/* Fallback for browsers without :has() — JS will toggle .is-checked */
.filter-check-pill.is-checked {
    background: #000;
    color: #fff;
    border-color: #000;
}

/* ─── Actions row ───────────────────────────────────────────────────── */

.filter-actions {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
    gap: 1rem;
}

.filter-action-clear {
    background: transparent;
    border: 1px solid #000;
    padding: 0.6rem 1.5rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    color: #000;
    transition: background 0.15s, color 0.15s;
}

.filter-action-clear:hover {
    background: #000;
    color: #fff;
}

.filter-active-count {
    font-size: 0.85rem;
    color: #666;
}

/* ─── Longtime events ────────────────────────────────────────────────── */

.playbill-day-longtime {
    background: #fafafa;
    border-left: 3px solid #d40000;
    padding-left: calc(2rem - 3px);
    margin-left: -2rem;
    padding-right: 2rem;
    margin-right: -2rem;
}

.playbill-day-longtime .playbill-day-num {
    color: #d40000;
    font-size: 1.4rem;
    line-height: 1.2;
}

.playbill-day-longtime-label {
    color: #d40000;
    font-size: 0.65rem;
}

/* Remove the bottom border for stacked longtime groups (visual cohesion) */
.playbill-day-longtime+.playbill-day-longtime {
    border-top: 1px solid #f0f0f0;
    border-bottom: none;
}

@media (max-width: 768px) {
    .playbill-day-longtime {
        margin-left: -1rem;
        margin-right: -1rem;
        padding-left: calc(1rem - 3px);
        padding-right: 1rem;
    }
}

/* ─── Expandable detail panel: full-bleed takeover ───────────────────── */

.playbill-item-detail {
    display: none;
}

.playbill-item.is-expanded .playbill-item-basic {
    display: none;
}

.playbill-item.is-expanded .playbill-item-detail {
    display: block;
}

/* "Show past events of this month" affordance — appears only on the
   default landing. Mirrors the playbill day layout: a 2-column grid
   with an empty date column and the action (rendered as an outline
   button) sitting in the events column. */
.playbill-show-past {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 2rem;
    padding: 2rem 0;
    border-bottom: 1px solid var(--color-border-soft);
}

.playbill-show-past a {
    grid-column: 2;
    justify-self: start;
}

@media (max-width: 1024px) {
    .playbill-show-past {
        grid-template-columns: 120px 1fr;
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .playbill-show-past {
        grid-template-columns: 1fr;
    }
    .playbill-show-past a { grid-column: 1; }
}

.detail-takeover {
	position: relative;
	margin-left: -50vw;
	margin-right: -50vw;
	width: 100%;
	margin-top: 1.5rem;
	background: #000;
	color: #fff;
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
	min-height: 480px;
	overflow: hidden;
	margin: 0 auto;
}

/* Bigger screens — give the info panel more width and lift the row
   height in step, so the poster cell stays close to a 3:2-ish landscape
   ratio and `cover` only crops a sensible amount instead of stretching
   into a thin letterbox. */
@media (min-width: 1280px) {
	.detail-takeover {
		grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
		min-height: 56vh;
	}
}

@media (min-width: 1920px) {
	.detail-takeover {
		grid-template-columns: minmax(0, 3fr) minmax(0, 4fr);
		min-height: 62vh;
	}
}

@media (min-width: 2560px) {
	.detail-takeover {
		grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
		min-height: 68vh;
	}
}

.detail-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: opacity 0.15s;
}

.detail-close:hover {
    opacity: 0.7;
}

/* ─── Info column (left, black background) ──────────────────────────── */

.detail-info {
    padding: 3.5rem 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: #fff;
}

.detail-when {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.5rem;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 2rem;
}

.detail-meta span:not(:last-child)::after {
    content: '•';
    margin-left: 0.75rem;
}

.detail-premiere {
    color: #ff5252;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    margin-bottom: 0.75rem;
}

.detail-title {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.1;
    margin: 0 0 1rem;
    color: #fff;
}

/* Length-bucket scaler — class is set in templates/playbill/_detail.twig.
   Mirrors the .spectacle-hero-title tiers (the detail panel is the same
   width / black-info layout). */
.detail-title.is-medium {
    font-size: clamp(1.7rem, 2.8vw, 2.5rem);
    line-height: 1.15;
}
.detail-title.is-long {
    font-size: clamp(1.4rem, 2.3vw, 2rem);
    line-height: 1.2;
}
.detail-title.is-very-long {
    font-size: clamp(1.15rem, 1.9vw, 1.7rem);
    line-height: 1.25;
}

.detail-subtitle {
    font-size: 1.05rem;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 0.75rem;
}

.detail-author {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 2rem;
}

.detail-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
}

.detail-buy {
    background: #d40000;
    color: #fff;
    border: none;
    padding: 1rem 2rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: background 0.15s;
}

.detail-buy:hover {
    background: #b00000;
}

.detail-buy-free {
    background: transparent;
    border: 1px solid #fff;
}

.detail-buy-free:hover {
    background: #fff;
    color: #000;
}

.detail-more {
    padding: 1rem 2rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #fff;
    border: 1px solid #fff;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}

.detail-more:hover {
    background: #fff;
    color: #000;
}

/* ─── Poster column (right) ─────────────────────────────────────────── */

.detail-poster {
    position: relative;
    min-height: 540px;
    background: #000;
    overflow: hidden;
}

/* The image fills its whole cell — `cover` always crops to fill, no
   letterboxing. The cell's *shape* is what we tune (via grid columns
   and takeover height at each breakpoint below) so the crop stays
   reasonable on every screen. */
.detail-poster-image {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #1a1a1a;
}

.detail-poster-empty {
    background: repeating-linear-gradient(45deg, #1a1a1a, #1a1a1a 20px, #222 20px, #222 40px);
}

/* Diagonal wedge that bleeds the black info panel into the poster.
   Always above the image. */
.detail-poster::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 15%;
    background: #000;
    clip-path: polygon(0 0, 100% 0, 0 100%);
    z-index: 2;
    pointer-events: none;
}

/* ─── Loading state ──────────────────────────────────────────────────── */

.playbill-item.is-loading .playbill-item-detail::after {
    content: '';
    display: block;
    height: 200px;
    background: linear-gradient(90deg, #f0f0f0 0%, #e8e8e8 50%, #f0f0f0 100%) #f5f5f5;
    background-size: 200% 100%;
    animation: detail-skeleton 1.2s linear infinite;
    margin-top: 1.5rem;
}

@keyframes detail-skeleton {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* ─── Responsive ─────────────────────────────────────────────────────── */

@media (max-width: 768px) {
    .detail-takeover {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .detail-poster {
        order: -1;
        /* poster on top on mobile */
        min-height: 320px;
    }

    .detail-poster::before {
        display: none;
        /* drop the diagonal wedge on stacked layout */
    }

    .detail-info {
        padding: 2rem 1.5rem;
    }

    .detail-title {
        font-size: 1.75rem;
    }
}

/* ─── Electrozone events back-link bar ────────────────────────────── */

.electrozone-events-back {
    padding: 1rem 0;
    font-size: 0.85rem;
    color: #666;
}

.electrozone-events-back a { color: inherit; text-decoration: underline; }
.electrozone-events-back a:hover { text-decoration: none; color: #000; }

/* On the electrozone variant of the playbill page, align the main
 * content (breadcrumb + sticky filter bar + month listings) with the
 * site-header's horizontal padding (`var(--space-xl) = 2rem`). The
 * generic `/playbill/` view keeps its own wider gutters. */
.page-electrozone-events .electrozone-events-back,
.page-electrozone-events .playbill-nav {
    padding-left: var(--space-xl);
    padding-right: var(--space-xl);
}

.page-electrozone-events .playbill-months-content {
    width: auto;
    padding: 0 var(--space-xl) 4rem;
}

@media (max-width: 768px) {
    .page-electrozone-events .electrozone-events-back,
    .page-electrozone-events .playbill-nav,
    .page-electrozone-events .playbill-months-content {
        padding-left: var(--space-md);
        padding-right: var(--space-md);
    }
}

.playbill-info {
    font-size: 0.85rem;
    font-weight: 800;
    line-height: 1.4;
    color: #555;
    max-width: 28em;
    margin-left: 1rem;
}

.playbill-info a {
    color: inherit;
    text-decoration: underline;
}

.playbill-info a:hover {
    color: #000;
    text-decoration: none;
}

@media (max-width: 1280px) {
    .playbill-info {
        max-width: 22em;
        font-size: 0.8rem;
    }
}

@media (max-width: 1024px) {
    .playbill-info {
        max-width: 100%;
        margin-left: 0;
        margin-top: 0.5rem;
    }
}

.playbill-empty-hint {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #ccc;
}