/**
 * saminfo/program-videos — gate + program video player (ticket 16).
 *
 * Premium editorial surface: Overpass display / Spectral body, the blue+orange
 * pivot palette, generous whitespace. Local tokens resolve to theme.json presets
 * where they exist and fall back to the pivot values so the block is legible even
 * if a preset is renamed. No colored "spine" left-borders on cards (house rule).
 */

.sam-pvp {
	--pvp-navy: var( --wp--preset--color--navy, #04024d );
	--pvp-blue: var( --wp--preset--color--cyan-ink, #0e7490 );
	--pvp-orange: var( --wp--preset--color--orange, #f37021 );
	--pvp-ink: var( --wp--preset--color--ink, #414042 );
	--pvp-paper: var( --wp--preset--color--base, #ffffff );
	--pvp-mist: var( --wp--preset--color--base-2, #f5f5f5 );
	--pvp-line: color-mix( in srgb, var( --pvp-navy ) 14%, transparent );
	--pvp-muted: color-mix( in srgb, var( --pvp-ink ) 62%, transparent );
	--pvp-display: var( --wp--preset--font-family--overpass, "Overpass", system-ui, sans-serif );
	--pvp-body: var( --wp--preset--font-family--spectral, "Spectral", Georgia, serif );
	--pvp-radius: 14px;
	--pvp-shadow: 0 1px 2px rgba( 11, 42, 74, .06 ), 0 12px 34px -18px rgba( 11, 42, 74, .28 );

	color: var( --pvp-ink );
	font-family: var( --pvp-body );
	max-width: 1180px;
	margin-inline: auto;
}

.sam-pvp *,
.sam-pvp *::before,
.sam-pvp *::after {
	box-sizing: border-box;
}

/* ── Hero ─────────────────────────────────────────────────────────────────── */

.sam-pvp__hero {
	display: grid;
	grid-template-columns: 1.35fr 1fr;
	gap: clamp( 1.5rem, 4vw, 3rem );
	align-items: center;
	padding: clamp( 1.5rem, 4vw, 3rem ) 0 clamp( 1.25rem, 3vw, 2.25rem );
}

.sam-pvp__kicker {
	font-family: var( --pvp-display );
	font-weight: 700;
	font-size: .74rem;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var( --pvp-orange );
	margin: 0 0 .55rem;
}

.sam-pvp__prog-title {
	font-family: var( --pvp-display );
	font-weight: 800;
	font-size: clamp( 1.9rem, 4.2vw, 3.1rem );
	line-height: 1.04;
	letter-spacing: -.01em;
	color: var( --pvp-navy );
	margin: 0 0 .75rem;
}

.sam-pvp__prog-desc {
	font-size: 1.1rem;
	line-height: 1.55;
	color: var( --pvp-muted );
	margin: 0 0 1.1rem;
	max-width: 46ch;
}

.sam-pvp__meta {
	display: flex;
	flex-wrap: wrap;
	gap: .4rem 1.1rem;
	margin: 0;
	font-family: var( --pvp-display );
	font-size: .92rem;
	color: var( --pvp-muted );
}

.sam-pvp__meta span { position: relative; }
.sam-pvp__meta b { color: var( --pvp-ink ); font-weight: 700; }

/* Staff-preview honesty note — shown when access is the manage_options QA bypass,
   not a real entitlement. Keeps the player from implying the admin is registered
   (the account "My Programs" tab shows a matching note). */
.sam-pvp__previewchip {
	display: inline-block;
	margin: .9rem 0 0;
	max-width: 46ch;
	font-family: var( --pvp-display );
	font-weight: 600;
	font-size: .78rem;
	line-height: 1.35;
	color: var( --pvp-navy );
	background: color-mix( in srgb, var( --pvp-orange ) 16%, transparent );
	border: 1px solid color-mix( in srgb, var( --pvp-orange ) 40%, transparent );
	padding: .5rem .8rem;
	border-radius: 10px;
}

.sam-pvp__poster {
	position: relative;
	aspect-ratio: 16 / 10;
	border-radius: var( --pvp-radius );
	background: var( --pvp-navy ) center / cover no-repeat;
	box-shadow: var( --pvp-shadow );
	overflow: hidden;
}

.sam-pvp__lockchip {
	position: absolute;
	inset-block-end: .8rem;
	inset-inline-start: .8rem;
	font-family: var( --pvp-display );
	font-weight: 600;
	font-size: .78rem;
	color: #fff;
	background: color-mix( in srgb, var( --pvp-navy ) 78%, transparent );
	backdrop-filter: blur( 4px );
	padding: .35rem .7rem;
	border-radius: 999px;
}

/* ── Gate panel ───────────────────────────────────────────────────────────── */

.sam-pvp__gate {
	background: var( --pvp-mist );
	border: 1px solid var( --pvp-line );
	border-radius: var( --pvp-radius );
	padding: clamp( 1.25rem, 3vw, 2rem );
	margin-block-end: clamp( 1.25rem, 3vw, 2rem );
	text-align: center;
}

.sam-pvp__gate-title {
	font-family: var( --pvp-display );
	font-weight: 800;
	font-size: clamp( 1.3rem, 2.4vw, 1.7rem );
	color: var( --pvp-navy );
	margin: 0 0 .45rem;
}

.sam-pvp__gate-sub {
	color: var( --pvp-muted );
	font-size: 1.02rem;
	line-height: 1.5;
	max-width: 54ch;
	margin: 0 auto 1.25rem;
}

.sam-pvp__gate-actions {
	display: flex;
	flex-wrap: wrap;
	gap: .7rem;
	justify-content: center;
	margin: 0;
}

.sam-pvp__prices {
	display: grid;
	grid-template-columns: repeat( 2, minmax( 0, 1fr ) );
	gap: 1rem;
	max-width: 560px;
	margin: 0 auto 1.25rem;
}

.sam-pvp__price {
	background: var( --pvp-paper );
	border: 1px solid var( --pvp-line );
	border-radius: 12px;
	padding: 1.1rem 1rem;
	text-align: start;
	display: flex;
	flex-direction: column;
	gap: .3rem;
}

.sam-pvp__price.is-you {
	border-color: var( --pvp-orange );
	box-shadow: 0 0 0 1px var( --pvp-orange ), var( --pvp-shadow );
}

.sam-pvp__price-tag {
	font-family: var( --pvp-display );
	font-weight: 700;
	font-size: .74rem;
	letter-spacing: .07em;
	text-transform: uppercase;
	color: var( --pvp-muted );
}

.sam-pvp__price.is-you .sam-pvp__price-tag { color: var( --pvp-orange ); }

.sam-pvp__price-amt {
	font-family: var( --pvp-display );
	font-weight: 800;
	font-size: 1.9rem;
	line-height: 1;
	color: var( --pvp-navy );
}

.sam-pvp__price small { color: var( --pvp-muted ); font-size: .82rem; }

.sam-pvp__fineprint {
	font-size: .84rem;
	color: var( --pvp-muted );
	text-align: center;
	margin: .8rem 0 0;
}

/* ── Body: stage + playlist ───────────────────────────────────────────────── */

.sam-pvp__body {
	display: grid;
	grid-template-columns: minmax( 0, 1fr ) 360px;
	gap: clamp( 1.25rem, 3vw, 2rem );
	align-items: start;
}

.sam-pvp__stage { min-width: 0; }

.sam-pvp__frame {
	position: relative;
	aspect-ratio: 16 / 9;
	background: var( --pvp-navy );
	border-radius: var( --pvp-radius );
	overflow: hidden;
	box-shadow: var( --pvp-shadow );
}

.sam-pvp__iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.sam-pvp__frame-empty {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: .8rem;
	padding: 2rem;
	text-align: center;
	color: color-mix( in srgb, #fff 82%, transparent );
	font-family: var( --pvp-display );
}

.sam-pvp__frame-empty p { margin: 0; max-width: 34ch; font-size: 1rem; }

.sam-pvp__frame-play {
	display: grid;
	place-items: center;
	width: 66px;
	height: 66px;
	border-radius: 999px;
	background: color-mix( in srgb, var( --pvp-orange ) 92%, transparent );
	color: #fff;
	font-size: 1.5rem;
	padding-inline-start: 4px;
}

.sam-pvp__resume {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: .6rem;
	margin-top: .9rem;
	padding: .75rem 1rem;
	background: color-mix( in srgb, var( --pvp-blue ) 10%, var( --pvp-paper ) );
	border: 1px solid color-mix( in srgb, var( --pvp-blue ) 30%, transparent );
	border-radius: 10px;
	font-family: var( --pvp-display );
	font-size: .95rem;
}

.sam-pvp__resume-actions { display: flex; gap: .5rem; }

.sam-pvp__now-title {
	font-family: var( --pvp-display );
	font-weight: 800;
	font-size: clamp( 1.3rem, 2.2vw, 1.65rem );
	color: var( --pvp-navy );
	margin: 1.1rem 0 .3rem;
}

.sam-pvp__byline {
	font-family: var( --pvp-display );
	color: var( --pvp-muted );
	font-size: .95rem;
	margin: 0;
}

.sam-pvp__resources {
	margin-top: 1.25rem;
	padding-top: 1.1rem;
	border-top: 1px solid var( --pvp-line );
}

.sam-pvp__resources-h {
	font-family: var( --pvp-display );
	font-weight: 700;
	font-size: .78rem;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var( --pvp-muted );
	margin: 0 0 .6rem;
}

.sam-pvp__resources-list { display: flex; flex-wrap: wrap; gap: .5rem; }

.sam-pvp__resource {
	display: inline-flex;
	align-items: center;
	gap: .4rem;
	padding: .45rem .8rem;
	background: var( --pvp-mist );
	border: 1px solid var( --pvp-line );
	border-radius: 999px;
	font-family: var( --pvp-display );
	font-size: .88rem;
	font-weight: 600;
	color: var( --pvp-blue );
	text-decoration: none;
}

.sam-pvp__resource::before { content: "↓"; font-weight: 700; }
.sam-pvp__resource:hover { border-color: var( --pvp-blue ); }

/* ── Playlist ─────────────────────────────────────────────────────────────── */

.sam-pvp__playlist {
	background: var( --pvp-paper );
	border: 1px solid var( --pvp-line );
	border-radius: var( --pvp-radius );
	padding: .5rem;
	box-shadow: var( --pvp-shadow );
	position: sticky;
	top: 1rem;
	max-height: calc( 100vh - 2rem );
	overflow-y: auto;
}

.sam-pvp__playlist-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: .5rem;
	padding: .75rem .75rem .5rem;
}

.sam-pvp__playlist-h {
	font-family: var( --pvp-display );
	font-weight: 800;
	font-size: 1.05rem;
	color: var( --pvp-navy );
	margin: 0;
}

.sam-pvp__autoplay {
	display: inline-flex;
	align-items: center;
	gap: .4rem;
	font-family: var( --pvp-display );
	font-size: .82rem;
	color: var( --pvp-muted );
	cursor: pointer;
	user-select: none;
}

.sam-pvp__autoplay input { accent-color: var( --pvp-orange ); }

.sam-pvp__pl-group {
	font-family: var( --pvp-display );
	font-weight: 700;
	font-size: .72rem;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var( --pvp-muted );
	margin: .9rem .75rem .35rem;
}

.sam-pvp__pl-group:first-of-type { margin-top: .35rem; }

.sam-pvp__pli {
	display: flex;
	align-items: center;
	gap: .75rem;
	width: 100%;
	text-align: start;
	background: transparent;
	border: 0;
	border-radius: 10px;
	padding: .7rem .75rem;
	cursor: pointer;
	font: inherit;
	color: inherit;
	transition: background-color .12s ease;
}

.sam-pvp__pli:hover { background: var( --pvp-mist ); }

.sam-pvp__pli.is-playing {
	background: color-mix( in srgb, var( --pvp-blue ) 12%, transparent );
}

.sam-pvp__pli-idx {
	flex: 0 0 auto;
	display: grid;
	place-items: center;
	width: 26px;
	height: 26px;
	border-radius: 999px;
	background: var( --pvp-mist );
	color: var( --pvp-muted );
	font-family: var( --pvp-display );
	font-weight: 700;
	font-size: .82rem;
}

.sam-pvp__pli.is-done .sam-pvp__pli-idx {
	background: var( --pvp-blue );
	color: #fff;
}

.sam-pvp__pli.is-progress .sam-pvp__pli-idx {
	box-shadow: inset 0 0 0 2px var( --pvp-orange );
	color: var( --pvp-orange );
}

.sam-pvp__pli.is-playing .sam-pvp__pli-idx {
	background: var( --pvp-orange );
	color: #fff;
}

.sam-pvp__pli-main { flex: 1 1 auto; min-width: 0; }

.sam-pvp__pli-title {
	display: block;
	font-family: var( --pvp-display );
	font-weight: 600;
	font-size: .95rem;
	color: var( --pvp-ink );
	line-height: 1.25;
}

.sam-pvp__pli-sub {
	display: block;
	color: var( --pvp-muted );
	font-size: .8rem;
	margin-top: .1rem;
}

.sam-pvp__pli[data-state="locked"] .sam-pvp__pli-title { color: var( --pvp-muted ); }
.sam-pvp__pli-state { flex: 0 0 auto; font-size: .9rem; opacity: .8; }

.sam-pvp__pl-empty,
.sam-pvp__pl-group + .sam-pvp__pl-empty {
	color: var( --pvp-muted );
	font-size: .9rem;
	padding: 1rem .75rem;
	margin: 0;
}

/* ── End-of-program survey ────────────────────────────────────────────────── */

.sam-pvp__endcard {
	margin-top: clamp( 1.5rem, 3vw, 2.5rem );
	background: var( --pvp-navy );
	border-radius: var( --pvp-radius );
	padding: clamp( 1.5rem, 4vw, 2.5rem );
	color: #fff;
}

.sam-pvp__endcard-title {
	font-family: var( --pvp-display );
	font-weight: 800;
	font-size: clamp( 1.4rem, 2.6vw, 1.9rem );
	margin: 0 0 .4rem;
}

.sam-pvp__endcard-head p { color: color-mix( in srgb, #fff 78%, transparent ); margin: 0 0 1.25rem; }

.sam-pvp__endcard-form {
	background: var( --pvp-paper );
	color: var( --pvp-ink );
	border-radius: 10px;
	padding: clamp( 1rem, 3vw, 1.75rem );
}

/* ── Buttons ──────────────────────────────────────────────────────────────── */

.sam-pvp__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .4rem;
	font-family: var( --pvp-display );
	font-weight: 700;
	font-size: .95rem;
	line-height: 1;
	padding: .8rem 1.35rem;
	border-radius: 999px;
	border: 1px solid transparent;
	cursor: pointer;
	text-decoration: none;
	transition: background-color .14s ease, color .14s ease, border-color .14s ease;
}

.sam-pvp__btn--primary { background: var( --pvp-navy ); color: #fff; }
.sam-pvp__btn--primary:hover { background: var( --pvp-orange ); }

.sam-pvp__btn--ghost {
	background: transparent;
	color: var( --pvp-navy );
	border-color: var( --pvp-line );
}
.sam-pvp__btn--ghost:hover { border-color: var( --pvp-navy ); }

/* These CTAs are bespoke <a>s WITHOUT the `wp-element-button` class, so theme.json's
   global `:root :where(a:not(.wp-element-button)):hover { color: orange }` (0,2,0)
   out-specifies the button's own `color` (0,1,0) and drags the label to orange — on
   the orange hover fill that's an orange-on-orange, invisible label. Pin the label
   color at 0,3,0 (two classes + state) so it wins at rest AND on hover/focus. */
.sam-pvp__btn.sam-pvp__btn--primary,
.sam-pvp__btn.sam-pvp__btn--primary:hover,
.sam-pvp__btn.sam-pvp__btn--primary:focus-visible { color: #fff; }
.sam-pvp__btn.sam-pvp__btn--ghost:hover,
.sam-pvp__btn.sam-pvp__btn--ghost:focus-visible { color: var( --pvp-navy ); }

.sam-pvp__btn--block { width: 100%; }
.sam-pvp__btn--sm { padding: .5rem .9rem; font-size: .85rem; }

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

@media ( max-width: 960px ) {
	.sam-pvp__hero { grid-template-columns: 1fr; }
	.sam-pvp__poster { order: -1; }
	.sam-pvp__body { grid-template-columns: 1fr; }
	.sam-pvp__playlist { position: static; max-height: none; }
}

@media ( max-width: 520px ) {
	.sam-pvp__prices { grid-template-columns: 1fr; }
	.sam-pvp__gate-actions .sam-pvp__btn { width: 100%; }
}

/* ── Editor preview (index.js) ────────────────────────────────────────────── */

.sam-pvp-ed {
	border: 1px dashed var( --wp--preset--color--navy, #04024d );
	border-radius: 12px;
	padding: 1rem 1.25rem;
	background: var( --wp--preset--color--base-2, #f5f5f5 );
}

.sam-pvp-ed__head { display: flex; align-items: baseline; gap: .75rem; flex-wrap: wrap; margin-bottom: .75rem; }

.sam-pvp-ed__badge {
	font-family: var( --wp--preset--font-family--overpass, sans-serif );
	font-weight: 700;
	font-size: .72rem;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: #fff;
	background: var( --wp--preset--color--navy, #04024d );
	padding: .25rem .6rem;
	border-radius: 999px;
}

.sam-pvp-ed__hint,
.sam-pvp-ed__note { color: #5a6b7b; font-size: .9rem; }
.sam-pvp-ed__series { margin-bottom: .75rem; }
.sam-pvp-ed__series-title { font-weight: 700; margin: 0 0 .25rem; }
.sam-pvp-ed__videos { margin: 0; padding-left: 1.1rem; }
.sam-pvp-ed__videos li { display: flex; justify-content: space-between; gap: 1rem; }
.sam-pvp-ed__vmeta { color: #5a6b7b; font-size: .82rem; }
.sam-pvp-ed__empty { color: #5a6b7b; font-style: italic; }

/* ── Register modal (iframe embed of the register page) ───────────────────── */
html.sam-pvp-noscroll { overflow: hidden; }
.sam-pvp__regmodal { position: fixed; inset: 0; z-index: 1000; display: none; align-items: center; justify-content: center; padding: clamp(0.5rem, 3vw, 2rem); }
.sam-pvp__regmodal.is-open { display: flex; }
.sam-pvp__regmodal-backdrop { position: absolute; inset: 0; background: rgba(4,2,77,0.62); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.sam-pvp__regmodal-dialog { position: relative; z-index: 1; width: 100%; max-width: 680px; height: min(88vh, 900px); background: var(--wp--preset--color--base, #fff); border-radius: 4px; box-shadow: 0 24px 60px -16px rgba(20,16,63,0.5); overflow: hidden; display: flex; flex-direction: column; animation: sam-pvp-regpop .18s ease; }
@keyframes sam-pvp-regpop { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.sam-pvp__regmodal-close { position: absolute; top: 8px; right: 10px; z-index: 3; width: 36px; height: 36px; border: 0; border-radius: 999px; background: rgba(4,2,77,0.06); color: var(--wp--preset--color--navy, #04024d); font-size: 26px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.sam-pvp__regmodal-close:hover { background: rgba(4,2,77,0.12); }
.sam-pvp__regmodal-loading { position: absolute; inset: 0; z-index: 1; display: flex; align-items: center; justify-content: center; color: #5a6b7b; font-family: var(--wp--preset--font-family--sans, sans-serif); font-size: .95rem; }
.sam-pvp__regframe { position: relative; z-index: 2; flex: 1 1 auto; width: 100%; border: 0; background: transparent; }
