/* Escape Room Rooms: room pages, Now Playing cards, Room Archive. Matches the site's dark look. */

.erpsl-room,
.erpsl-room-list {
	--erpsl-line: #ffffff;
	--erpsl-red: #cf2e2e;
	--erpsl-amber: #fcb900;
	--erpsl-blue: #0693e3;
	--erpsl-green: #40bf01;
	--erpsl-panel: #141414;
	font-size: var(--wp--preset--font-size--medium, 1.0625rem);
}
.erpsl-icon {
	width: 1em;
	height: 1em;
	flex: none;
	vertical-align: -0.125em;
}
.erpsl-room .screen-reader-text,
.erpsl-room-list .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

/* ---------- Status ---------- */
.erpsl-status.is-live { color: var(--erpsl-green); }
.erpsl-status.is-coming { color: var(--erpsl-amber); }
.erpsl-status.is-retired { color: var(--erpsl-red); }

/* ---------- Room page: head ---------- */
.erpsl-room__head {
	display: grid;
	grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr);
	gap: 24px;
	align-items: center;
}
.erpsl-room__name { min-width: 0; }
.erpsl-room__logo {
	display: block;
	width: 100%;
	max-width: 360px;
	height: auto;
}
.erpsl-room__title {
	margin: 0;
	font-size: clamp(2rem, 4vw, 3rem);
	text-transform: uppercase;
}
.erpsl-room__tagline {
	margin: 0.4em 0 0;
	color: var(--wp--preset--color--accent-4, #a6a6a6);
	font-style: italic;
}
.erpsl-facts {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.95em;
}
.erpsl-facts th,
.erpsl-facts td {
	border: 1px solid var(--erpsl-line);
	padding: 5px 8px;
	text-align: left;
	vertical-align: middle;
	font-weight: 400;
}
.erpsl-facts th {
	white-space: nowrap;
	width: 1%;
}
.erpsl-facts th .erpsl-icon {
	margin-right: 0.5em;
}
.erpsl-room__rule {
	border: 0;
	border-top: 1px solid #555;
	margin: 28px 0;
}

/* ---------- Room page: story + poster ---------- */
.erpsl-room__body {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 24px;
	align-items: start;
}
.erpsl-room__body.has-no-poster {
	grid-template-columns: minmax(0, 1fr);
}
.erpsl-room__chapter {
	border: 1px solid var(--erpsl-line);
	padding: 6px 10px;
	margin: 0 0 8px;
	text-transform: uppercase;
	display: flex;
	flex-wrap: wrap;
	gap: 0.3em 0.75em;
	align-items: baseline;
}
.erpsl-room__saga {
	font-size: 0.8em;
	color: var(--erpsl-amber);
	letter-spacing: 0.04em;
}
.erpsl-section {
	border: 1px solid var(--erpsl-line);
	margin: 0 0 8px;
}
.erpsl-section > summary {
	cursor: pointer;
	list-style: none;
	padding: 6px 10px;
	font-size: 1.15em;
	display: flex;
	align-items: center;
	gap: 0.6em;
}
.erpsl-section > summary::-webkit-details-marker { display: none; }
.erpsl-section > summary { scroll-margin-top: calc(var(--wp-admin--admin-bar--height, 0px) + 12px); } /* clear the admin bar when scrolled to */
.erpsl-section > summary::before {
	content: "+";
	font-weight: 700;
	width: 1em;
	text-align: center;
}
.erpsl-section[open] > summary::before { content: "\2212"; }
.erpsl-section > summary:focus-visible {
	outline: 2px solid var(--erpsl-amber);
	outline-offset: 2px;
}
/* No focus box after a mouse click (the theme outlines anything focused); keyboard users still get the amber outline. */
.erpsl-room :focus:not(:focus-visible),
.erpsl-room-list :focus:not(:focus-visible) {
	outline: none;
}
.erpsl-section__body {
	padding: 0 12px 10px;
}
.erpsl-section__body p { margin: 0 0 0.9em; }
.erpsl-section__body .erpsl-tech-logo {
	text-align: center;
	margin: 6px 0 14px;
}
.erpsl-tech-logo img {
	width: 300px;
	max-width: 100%;
	height: auto;
}
.erpsl-section__empty { color: var(--wp--preset--color--accent-4, #a6a6a6); }
/* Subscribe sits next to Book Now: same shape, dark with a red YouTube mark so the two don't look alike. */
.erpsl-btn--subscribe {
	background: #000;
	color: #fff;
	border: 1px solid #fff;
}
.erpsl-btn--subscribe .erpsl-icon {
	width: 1.3em;
	height: 1.3em;
	color: #ff0000;
}
.erpsl-btn--subscribe .erpsl-icon path {
	fill-rule: evenodd; /* the play triangle shows through the red mark */
}
.erpsl-btn--subscribe:hover,
.erpsl-btn--subscribe:focus-visible {
	background: #1a1a1a;
	color: #fff;
}
.erpsl-section__body p:last-child { margin-bottom: 0; }
.erpsl-room__poster {
	box-sizing: border-box; /* the frame and padding fit inside the column (no overflow on phones) */
	margin: 0;
	border: 1px solid var(--erpsl-line);
	padding: 10px;
}
.erpsl-room__poster img {
	display: block;
	width: 100%;
	height: auto;
}
.erpsl-room__actions {
	margin: 18px 0 0;
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

/* ---------- Buttons ---------- */
.erpsl-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.45em;
	padding: 0.55em 1.2em;
	border-radius: 10px;
	font-weight: 700;
	text-decoration: none;
	line-height: 1.2;
}
.erpsl-btn--book {
	background: var(--erpsl-red);
	color: #fff;
	border: 1px solid #fff;
}
.erpsl-btn--book:hover,
.erpsl-btn--book:focus-visible {
	background: #e03a3a;
	color: #fff;
}
.erpsl-btn--details {
	background: #fff;
	color: #000;
	border: 1px solid #fff;
}
.erpsl-btn--details:hover,
.erpsl-btn--details:focus-visible {
	background: var(--erpsl-amber);
	color: #000;
}

/* ---------- Accessibility / Warnings / Safety ---------- */
.erpsl-boxes {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 24px;
	margin-top: 32px;
}
.erpsl-box {
	border: 1px solid var(--box);
	min-height: 140px;
}
.erpsl-box--accessibility { --box: var(--erpsl-blue); --box-ink: #fff; }
.erpsl-box--warnings { --box: var(--erpsl-amber); --box-ink: #000; }
.erpsl-box--safety { --box: var(--erpsl-red); --box-ink: #fff; }
.erpsl-box__title {
	margin: 0;
	background: var(--box);
	color: var(--box-ink);
	font-size: 1em;
	font-weight: 700;
	text-transform: uppercase;
	padding: 8px 10px;
	display: flex;
	align-items: center;
	gap: 0.6em;
}
.erpsl-box ul {
	margin: 0;
	padding: 10px 12px 12px 32px;
}
.erpsl-box li { margin: 0.25em 0; }

/* ---------- Saga + lineage (inside the History section) ---------- */
.erpsl-section .erpsl-saga {
	margin-top: 0;
	border-top: 0;
	padding-top: 0;
}
.erpsl-section .erpsl-lineage {
	margin: 12px 0 0;
}
.erpsl-saga {
	margin-top: 32px;
	border-top: 1px solid #555;
	padding-top: 16px;
}
.erpsl-saga__title {
	font-size: 1.1em;
	font-weight: 700;
	text-transform: uppercase;
	margin: 0 0 8px;
}
.erpsl-saga ol {
	margin: 0;
	padding-left: 1.4em;
}
.erpsl-saga li { margin: 0.3em 0; }
.erpsl-saga__chapter { color: var(--wp--preset--color--accent-4, #a6a6a6); }
.erpsl-saga .erpsl-status { font-size: 0.85em; }
.erpsl-lineage {
	margin-top: 16px;
	color: var(--wp--preset--color--accent-4, #a6a6a6);
}

/* ---------- Room lists ---------- */
.erpsl-room-list__group {
	display: flex;
	align-items: center;
	gap: 0.5em;
	font-size: 1.15em;
	font-weight: 700;
	text-transform: uppercase;
	margin: 28px 0 12px;
	color: var(--erpsl-amber);
}
.erpsl-room-list__group:first-child { margin-top: 8px; }
.erpsl-room-list__empty { color: var(--wp--preset--color--accent-4, #a6a6a6); }

/* Cards (Now Playing) */
.erpsl-cards {
	display: grid;
	/* auto-fit: the cards share the full row (three across on a desktop) instead of leaving empty slots. */
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
	gap: 24px;
}
.erpsl-card {
	display: flex;
	flex-direction: column;
	gap: 0;
}
.erpsl-card__title {
	font-size: 1em;
	font-weight: 700;
	margin: 0 0 8px;
}
.erpsl-card__title a { color: #fff; }
.erpsl-card__title a:hover { color: var(--erpsl-amber); }
.erpsl-card__soon { color: var(--erpsl-red); }
.erpsl-card__image {
	display: block;
	border: 1px solid #fff;
	line-height: 0;
}
.erpsl-card__img {
	display: block;
	width: 100%;
	height: auto;
}
.erpsl-card__img.is-poster { aspect-ratio: 3 / 4; }
.erpsl-card__tagline {
	margin: 8px 0 0;
	background: var(--erpsl-red);
	color: #fff;
	text-align: center;
	font-size: 0.85em;
	padding: 4px 8px;
}
.erpsl-card__facts {
	list-style: none;
	margin: 8px 0 0;
	padding: 0;
	display: grid;
	grid-template-columns: 1fr 1fr;
	border-top: 1px solid #fff;
	border-left: 1px solid #fff;
	font-size: 0.8em;
}
.erpsl-card__facts li {
	display: flex;
	align-items: center;
	gap: 0.5em;
	padding: 5px 8px;
	border-right: 1px solid #fff;
	border-bottom: 1px solid #fff;
}
.erpsl-card__caution {
	margin: 0;
	background: var(--erpsl-amber);
	color: #000;
	font-size: 0.8em;
	padding: 6px 10px;
	display: flex;
	align-items: center;
	gap: 0.6em;
}
.erpsl-card__actions {
	display: flex;
	gap: 10px;
	margin-top: 10px;
}
.erpsl-card__actions .erpsl-btn { flex: 1; }

/* List (Room Archive) */
.erpsl-archive {
	display: grid;
	gap: 18px;
}
.erpsl-archive__row {
	display: grid;
	grid-template-columns: 120px minmax(0, 1fr);
	gap: 18px;
	align-items: start;
	border-bottom: 1px solid #333;
	padding-bottom: 18px;
}
.erpsl-archive__image {
	display: block;
	border: 1px solid #fff;
	line-height: 0;
}
.erpsl-archive__img {
	display: block;
	width: 100%;
	height: auto;
}
.erpsl-archive__img.is-logo {
	background: #141414;
	padding: 8px;
}
.erpsl-archive__title {
	margin: 0;
	font-size: 1.25em;
	font-weight: 700;
}
.erpsl-archive__title a { color: #fff; }
.erpsl-archive__title a:hover { color: var(--erpsl-amber); }
.erpsl-archive__meta {
	margin: 0.2em 0 0;
	color: var(--erpsl-amber);
	font-size: 0.9em;
}
.erpsl-archive__excerpt { margin: 0.5em 0; }
.erpsl-archive__more { font-weight: 700; }

/* ---------- Click-to-play YouTube (also styled by the theme) ---------- */
.erpsl-room .erpsl-yt {
	position: relative;
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	background: #000 center / cover no-repeat;
	border: 0;
	padding: 0;
	cursor: pointer;
}
.erpsl-room .erpsl-yt:not(.is-playing)::after {
	content: "";
	position: absolute;
	inset: 0;
	margin: auto;
	width: 68px;
	height: 48px;
	border-radius: 12px;
	background: rgba(207, 46, 46, 0.92) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M8 5v14l11-7z'/%3E%3C/svg%3E") center / 28px no-repeat;
}
.erpsl-room .erpsl-yt iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

/* ---------- Narrow screens ---------- */
@media (max-width: 900px) {
	.erpsl-room__head {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	}
	.erpsl-room__name { grid-column: 1 / -1; }
	.erpsl-room__body { grid-template-columns: minmax(0, 1fr); }
	/* One column: the poster comes right after the room name and details, before the chapter and Synopsis. */
	.erpsl-room__poster {
		order: -1;
		max-width: 480px;
		width: 100%;
		margin: 0 auto;
	}
}
@media (max-width: 600px) {
	.erpsl-room__head { grid-template-columns: minmax(0, 1fr); }
	.erpsl-archive__row { grid-template-columns: 84px minmax(0, 1fr); }
}

/* "Tap for sound" over a trailer the browser would only start muted. */
.erpsl-yt__sound {
	position: absolute;
	left: 12px;
	bottom: 12px;
	z-index: 2;
	padding: 0.45em 0.9em;
	border: 1px solid #fff;
	border-radius: 8px;
	background: rgba(0, 0, 0, 0.75);
	color: #fff;
	font: inherit;
	font-size: 0.9em;
	font-weight: 700;
	cursor: pointer;
}
