/* Key City Shows — grid + landing page. Palette pulls GP global colors with hard fallbacks. */

:root {
	--kc-red: var(--wp--preset--color--primary, #ce0e2d);
	--kc-red-deep: var(--wp--preset--color--primary-deep, #a30b24);
	--kc-red-on-dark: #f0566e; /* AA (>=4.5:1) for small text on ink */
	--kc-ink: var(--wp--preset--color--ink, #101114);
	--kc-white: #ffffff;
	--kc-line: var(--wp--preset--color--line-cream, #d8d3c8);
	--kc-display: 'Helvetica Condensed Bold', 'Arial Narrow', sans-serif;
	--kc-body: 'Work Sans', 'Helvetica Neue', Arial, sans-serif;
}

/* Screen-reader-only live region */
.kc-sr-live {
	position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Keyboard focus parity with hover states */
.kc-tab:focus-visible,
.kc-show-search input:focus-visible,
.kc-search-submit:focus-visible,
.kc-search-clear:focus-visible,
.kc-event-card:focus-visible,
.kc-btn:focus-visible {
	outline: 3px solid var(--kc-red); outline-offset: 2px;
}
.kc-event-card:focus-visible { outline-offset: -3px; }

@media (prefers-reduced-motion: reduce) {
	.kc-btn,
	.kc-search-submit,
	.kc-tab { transition: none !important; }
}

/* ---------- Event search ---------- */
.kc-show-search {
	display: grid; grid-template-columns: minmax(180px, 1fr) auto auto;
	align-items: end; gap: 12px; margin: 0 0 32px; font-family: var(--kc-body);
}
.kc-show-search--dates { grid-template-columns: minmax(180px, 1fr) minmax(290px, 1fr) auto auto; }
.kc-search-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.kc-search-field span {
	font-size: .72rem; font-weight: bold; letter-spacing: .1em; text-transform: uppercase;
	color: var(--kc-ink);
}
.kc-show-search input {
	box-sizing: border-box; width: 100%; min-width: 0; height: 46px; padding: 10px 12px;
	border: 1px solid var(--kc-line); border-radius: 0; background: var(--kc-white);
	color: var(--kc-ink); font-family: var(--kc-body); font-size: 1rem;
}
.kc-search-dates { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.kc-search-submit {
	height: 46px; padding: 0 22px; border: 1px solid var(--kc-red); border-radius: 0;
	background: var(--kc-red); color: var(--kc-white); cursor: pointer;
	font-family: var(--kc-body); font-size: .78rem; font-weight: bold;
	letter-spacing: .08em; text-transform: uppercase; transition: background .2s;
}
.kc-search-submit:hover { background: var(--kc-red-deep); border-color: var(--kc-red-deep); }
.kc-search-clear {
	align-self: center; color: var(--kc-ink); font-size: .78rem; font-weight: bold;
	text-decoration: underline; text-underline-offset: 3px; white-space: nowrap;
}
.kc-search-clear:hover { color: var(--kc-red-deep); }
.kc-search-empty { margin: 8px 0 0; font-family: var(--kc-body); font-size: 1rem; }
.kc-search-empty[hidden] { display: none; }
.kc-search-empty a { color: var(--kc-red-deep); text-decoration: underline; }
@media (max-width: 1100px) {
	.kc-show-search,
	.kc-show-search--dates { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.kc-search-dates { grid-column: 1 / -1; }
	.kc-search-clear { justify-self: start; }
}
@media (max-width: 768px) {
	.kc-show-search,
	.kc-show-search--dates { grid-template-columns: 1fr; }
	.kc-search-dates { grid-column: auto; }
	.kc-search-submit { width: 100%; }
}
/* Phones: From and To each get the full width. Side by side, iOS Safari's native
   date control keeps an intrinsic width wider than a half-column and pushed "To"
   off the right edge — Chrome's emulator never shows it. */
@media (max-width: 480px) {
	.kc-search-dates { grid-template-columns: 1fr; }
}
.kc-show-search input[type="date"] { display: block; min-width: 0; max-width: 100%; }
@supports (-webkit-touch-callout: none) {
	/* iOS only: drop the native chrome so width:100% is honoured, keep the value left-aligned. */
	.kc-show-search input[type="date"] { -webkit-appearance: none; appearance: none; line-height: 44px; }
	.kc-show-search input[type="date"]::-webkit-date-and-time-value { text-align: left; margin: 0; }
}

/* ---------- Filter tabs ---------- */
.kc-filter-tabs { display: flex; gap: 12px; margin: 0 0 36px; flex-wrap: wrap; }
.kc-tab {
	font-family: var(--kc-body); font-size: .72rem; font-weight: bold;
	letter-spacing: .1em; text-transform: uppercase;
	padding: 10px 26px; border: 1px solid var(--kc-line); border-radius: 0;
	background: var(--kc-white); color: var(--kc-ink); cursor: pointer;
	transition: all .2s;
}
.kc-tab:hover { border-color: var(--kc-ink); }
.kc-tab.is-active { background: var(--kc-red); border-color: var(--kc-red); color: var(--kc-white); }

/* ---------- Event grid ---------- */
.kc-event-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.kc-event-card {
	display: flex; flex-direction: column; overflow: hidden;
	background: var(--kc-bar, var(--kc-ink)); text-decoration: none;
}
.kc-event-card.kc-hidden { display: none; }
.kc-poster { position: relative; aspect-ratio: 1 / 1; overflow: hidden; }
/* Spektrix posters arrive in every shape it allows — square, portrait, and wide
   banners — so contain them rather than crop: the whole poster stays visible and
   the card's own bar colour fills the rest of the square. `cover` cut the title
   off every banner. No hover zoom either; scaling a contained poster inside a
   colour band reads as a glitch. */
.kc-poster img { width: 100%; height: 100%; max-height: 100%; object-fit: contain; display: block; }
.kc-badge {
	position: absolute; top: 12px; left: 12px; z-index: 1;
	font-family: var(--kc-body); font-size: .62rem; font-weight: bold;
	letter-spacing: .12em; text-transform: uppercase;
	padding: 6px 10px; background: var(--kc-red); color: var(--kc-white);
}
.kc-badge--soldout { background: var(--kc-ink); outline: 1px solid rgba(255,255,255,.4); }
.kc-event-meta { padding: 16px 18px 18px; color: var(--kc-white); margin-top: auto; }
.kc-event-meta h3 {
	font-family: var(--kc-display); font-size: 1.5rem; font-weight: bold;
	text-transform: uppercase; letter-spacing: .03em; line-height: 1;
	margin: 0 0 6px; color: var(--kc-white);
}
.kc-event-meta .kc-date {
	font-family: var(--kc-body); font-size: .7rem; font-weight: bold;
	letter-spacing: .12em; text-transform: uppercase;
}
.kc-no-shows { font-family: var(--kc-body); }

/* Per-tab empty state. KC_Show_Colors computes every bar colour to clear
   4.5:1 against pure white, so .kc-date carries no opacity — fading it would
   spend exactly the contrast headroom that calculation just bought. */
.kc-tab-empty {
	font-family: var(--kc-body); font-size: 1rem; line-height: 1.6;
	margin: 8px 0 0; color: inherit;
}
.kc-tab-empty[hidden] { display: none; }
.kc-tab-empty a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.kc-tab-empty a:hover { color: var(--kc-red); }

@media (max-width: 1024px) { .kc-event-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 768px)  { .kc-event-grid { grid-template-columns: 1fr; } }

/* ---------- Show landing page ---------- */
.kc-show-single { background: var(--kc-ink); color: var(--kc-white); }
/* Top padding clears the fixed transparent header on show pages */
.kc-show-hero { padding: clamp(150px, 16vw, 200px) 24px clamp(48px, 8vw, 96px); }
.kc-show-hero-inner {
	max-width: 1200px; margin: 0 auto; display: grid;
	grid-template-columns: minmax(280px, 460px) 1fr; gap: clamp(32px, 5vw, 72px);
	align-items: start;
}
.kc-show-poster-wrap { position: relative; }
.kc-show-poster { width: 100%; height: auto; display: block; box-shadow: 0 24px 64px rgba(0,0,0,.5); }
.kc-eyebrow {
	display: inline-block; font-family: var(--kc-body); font-size: .66rem;
	font-weight: bold; letter-spacing: .16em; text-transform: uppercase;
	padding: 6px 12px; margin-bottom: 18px; color: var(--kc-white);
	background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.55);
}
.kc-show-info h1 {
	font-family: var(--kc-display); font-size: clamp(2.4rem, 5vw, 4rem);
	font-weight: bold; text-transform: uppercase; letter-spacing: .02em;
	line-height: .92; margin: 0 0 16px; color: var(--kc-white);
}
.kc-tagline { font-family: var(--kc-body); font-size: 1.05rem; color: rgba(255,255,255,.85); max-width: 44ch; margin: 0 0 28px; }
.kc-show-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, max-content)); gap: 20px 48px; margin: 0 0 32px; }
.kc-show-facts div { margin: 0; }
.kc-show-facts dt {
	font-family: var(--kc-body); font-size: .66rem; font-weight: bold;
	letter-spacing: .16em; text-transform: uppercase; color: var(--kc-red-on-dark);
	margin-bottom: 6px;
}
.kc-show-facts dd { font-family: var(--kc-body); font-size: 1rem; color: var(--kc-white); margin: 0; }
/* Prices are all-in; the note says so without shouting. */
.kc-price-note {
	display: block; font-size: .72rem; letter-spacing: .04em;
	color: rgba(255,255,255,.6); margin-top: 2px;
}

/* Performance list — only rendered when a run mixes evenings and matinees. */
.kc-performances { margin: 0 0 32px; }
.kc-performances-title {
	font-family: var(--kc-body); font-size: .66rem; font-weight: bold;
	letter-spacing: .16em; text-transform: uppercase; color: var(--kc-red-on-dark);
	margin: 0 0 10px;
}
.kc-performances ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.kc-performances li {
	display: flex; gap: 16px; align-items: baseline;
	font-family: var(--kc-body); font-size: .95rem; color: var(--kc-white);
	border-bottom: 1px solid rgba(255,255,255,.12); padding-bottom: 6px;
	max-width: 32ch;
}
.kc-performance-date { flex: 1; }
.kc-performance-time { font-weight: bold; white-space: nowrap; }

.kc-show-actions { display: flex; gap: 16px; flex-wrap: wrap; }
.kc-btn {
	display: inline-block; font-family: var(--kc-body); font-size: .78rem;
	font-weight: bold; letter-spacing: .08em; text-transform: uppercase;
	padding: 14px 26px; border: 2px solid transparent; border-radius: 0;
	text-decoration: none; cursor: pointer; transition: all .2s;
}
.kc-btn--red { background: var(--kc-red); color: var(--kc-white); }
.kc-btn--red:hover { background: var(--kc-red-deep); color: var(--kc-white); }
.kc-btn--outline { border-color: var(--kc-white); color: var(--kc-white); background: transparent; }
.kc-btn--outline:hover { background: var(--kc-white); color: var(--kc-ink); }
.kc-btn--disabled { background: rgba(255,255,255,.12); color: rgba(255,255,255,.55); cursor: not-allowed; }
.kc-availability { font-family: var(--kc-body); color: rgba(255,255,255,.85); margin: 0 0 20px; }

.kc-show-body { background: var(--kc-white); color: var(--kc-ink); padding: clamp(48px, 7vw, 80px) 24px; }
.kc-show-body-inner { max-width: 720px; margin: 0 auto; }
.kc-show-body-inner h2 {
	font-family: var(--kc-display); font-size: clamp(1.9rem, 3vw, 2.6rem);
	text-transform: uppercase; letter-spacing: .02em; line-height: .95;
	margin: 0 0 24px;
}
.kc-show-body-inner p { font-family: var(--kc-body); line-height: 1.7; margin: 0 0 1.2em; }

@media (max-width: 860px) {
	.kc-show-hero-inner { grid-template-columns: 1fr; }
	.kc-show-poster-wrap { max-width: 420px; }
}

/* ---------- Buy Tickets show preview panel ---------- */
.kc-show-preview {
	align-self: start; position: sticky; top: 150px;
	background: var(--kc-ink); color: var(--kc-white);
	padding: 28px; min-height: 320px;
	display: flex; flex-direction: column; justify-content: center;
	transition: opacity .25s ease;
}
.kc-show-preview .kc-preview-empty {
	color: rgba(255,255,255,.6); font-family: var(--kc-body);
	font-size: .92rem; text-align: center; margin: 0;
}
.kc-show-preview.is-filled { justify-content: flex-start; }
.kc-preview-poster { width: 100%; height: auto; display: block; margin-bottom: 20px; box-shadow: 0 16px 40px rgba(0,0,0,.45); }
.kc-preview-title {
	font-family: var(--kc-display); font-size: 1.6rem; font-weight: bold;
	text-transform: uppercase; letter-spacing: .03em; line-height: 1;
	margin: 0 0 8px; color: var(--kc-white);
}
.kc-preview-date {
	font-family: var(--kc-body); font-size: .7rem; font-weight: bold;
	letter-spacing: .12em; text-transform: uppercase; color: var(--kc-red-on-dark);
	margin: 0 0 12px;
}
.kc-preview-excerpt { font-family: var(--kc-body); font-size: .92rem; line-height: 1.6; color: rgba(255,255,255,.85); margin: 0 0 12px; }
.kc-preview-price { font-family: var(--kc-body); font-size: .85rem; font-weight: bold; color: var(--kc-white); margin: 0; }

/* Order summary — clear cost + checkout */
.kc-order-summary { border-top: 1px solid rgba(255,255,255,.15); margin-top: 16px; padding-top: 16px; }
.kc-order-line { font-family: var(--kc-body); font-size: .85rem; color: rgba(255,255,255,.75); margin: 0 0 6px; }
.kc-order-total { font-family: var(--kc-body); font-size: 1rem; color: var(--kc-white); margin: 0 0 16px; }
.kc-order-total strong { font-size: 1.25rem; }
.kc-checkout-btn { border: 2px solid transparent; font-family: var(--kc-body); width: 100%; text-align: center; }

@media (prefers-reduced-motion: reduce) { .kc-show-preview { transition: none; } }

/* ---------- Shows archive (/whats-on) ---------- */
.kc-archive { padding: clamp(48px, 7vw, 80px) 24px; }
.kc-archive-inner { max-width: 1200px; margin: 0 auto; }
.kc-archive-head { margin-bottom: 36px; }
.kc-eyebrow--dark { background: rgba(16,17,20,.06); border-color: rgba(16,17,20,.25); color: var(--kc-ink); }
.kc-archive-head h1 {
	font-family: var(--kc-display); font-size: clamp(2.4rem, 4.5vw, 3.4rem);
	text-transform: uppercase; letter-spacing: .02em; line-height: .95; margin: 12px 0 0;
}
.kc-archive .kc-event-meta h2 {
	font-family: var(--kc-display); font-size: 1.5rem; font-weight: bold;
	text-transform: uppercase; letter-spacing: .03em; line-height: 1;
	margin: 0 0 6px; color: var(--kc-white);
}
