/**
 * The cabinet.
 *
 *   tmt-wp-competitions-games / assets/css/tmt-games-cabinet.css
 *
 * A framed surface that owns the middle of the screen, so a reveal reads as
 * something you operate rather than a block you scroll past. Structure only:
 * colour comes from `--tmt-primary`, which tmt-brand.php prints per site, so
 * this file names no brand and needs no per-client build.
 *
 * ## The frame is the whole idea
 *
 * A border, a ground that differs from the page, and a maximum width the
 * content sits inside. That is what turns a section into a cabinet — not
 * artwork, which is a child theme's job through the same custom properties
 * the skins already use.
 *
 * ## Two states, never both
 *
 * `.tmt-games-cabinet__stage` and `.tmt-games-cabinet__entry` occupy the
 * same place, and the template renders exactly one. There is no rule here
 * that could show them together, because a way in beside a result is the
 * repeat-purchase prompt Appendix C.2 forbids.
 */

.tmt-games-cabinet {
	--tmt-games-accent: var( --tmt-primary, #00b6d3 );
	--tmt-games-cabinet-ground: rgba( 128, 128, 128, 0.06 );
	--tmt-games-cabinet-edge: rgba( 128, 128, 128, 0.28 );

	margin: 2rem 0 3rem;
}

.tmt-games-cabinet__frame {
	background: var( --tmt-games-cabinet-ground );
	border: 1px solid var( --tmt-games-cabinet-edge );
	border-radius: 14px;
	margin: 0 auto;
	max-width: 60rem;
	overflow: hidden;
	padding: 2rem 1.5rem 1.5rem;
}

/* ------------------------------------------------------------------ */
/*  Head                                                               */
/* ------------------------------------------------------------------ */

.tmt-games-cabinet__head {
	border-bottom: 1px solid var( --tmt-games-cabinet-edge );
	margin-bottom: 1.5rem;
	padding-bottom: 1.25rem;
	text-align: center;
}

/* The game's name sits above the competition's, small: on this surface the
   competition is the subject and the game is the context. */
.tmt-games-cabinet__eyebrow {
	color: var( --tmt-games-accent );
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	margin: 0 0 0.35rem;
	text-transform: uppercase;
}

.tmt-games-cabinet__title {
	font-size: clamp( 1.4rem, 3vw, 2rem );
	line-height: 1.15;
	margin: 0 0 0.35rem;
}

/* The approved wording. Full size and not dimmed to decoration — it is the
   sentence that tells a player what they are about to do. */
.tmt-games-cabinet__how {
	font-size: 1rem;
	margin: 0;
	opacity: 0.9;
}

/* ------------------------------------------------------------------ */
/*  Headline prize                                                     */
/* ------------------------------------------------------------------ */

.tmt-games-cabinet__headline {
	align-items: center;
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
	margin-bottom: 1.5rem;
	text-align: center;
}

.tmt-games-cabinet__headline-label {
	font-size: 0.75rem;
	letter-spacing: 0.1em;
	opacity: 0.75;
	text-transform: uppercase;
}

.tmt-games-cabinet__headline-value {
	font-size: clamp( 1.75rem, 5vw, 2.75rem );
	font-weight: 700;
	line-height: 1.05;
}

/* ------------------------------------------------------------------ */
/*  Body: the stage (or the way in) beside the ladder                  */
/* ------------------------------------------------------------------ */

.tmt-games-cabinet__body {
	display: grid;
	gap: 1.5rem;
	grid-template-columns: 1fr;
}

@media ( min-width: 48rem ) {
	.tmt-games-cabinet__body {
		grid-template-columns: minmax( 0, 2fr ) minmax( 14rem, 1fr );
	}
}

.tmt-games-cabinet__stage,
.tmt-games-cabinet__entry {
	min-width: 0;
}

/* The stage supplies its own outer margin for standalone use; inside the
   cabinet the frame is the spacing. */
.tmt-games-cabinet__stage .tmt-games {
	margin: 0;
}

.tmt-games-cabinet__entry {
	align-items: center;
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-height: 12rem;
	text-align: center;
}

/* ------------------------------------------------------------------ */
/*  Prize ladder                                                       */
/* ------------------------------------------------------------------ */

.tmt-games-cabinet__ladder-heading {
	font-size: 0.875rem;
	letter-spacing: 0.06em;
	margin: 0 0 0.75rem;
	opacity: 0.8;
	text-transform: uppercase;
}

.tmt-games-cabinet__rungs {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.tmt-games-cabinet__rung {
	align-items: baseline;
	border-bottom: 1px solid var( --tmt-games-cabinet-edge );
	display: flex;
	gap: 1rem;
	justify-content: space-between;
	padding: 0.4rem 0;
}

.tmt-games-cabinet__rung-label {
	font-weight: 600;
}

.tmt-games-cabinet__rung-left {
	font-variant-numeric: tabular-nums;
	opacity: 0.75;
	white-space: nowrap;
}

/*
 * A tier with none left is dimmed AND struck, never dimmed alone: "all gone"
 * has to survive a viewer who does not perceive the opacity difference,
 * which is the same reasoning Appendix C.5 applies to win and loss.
 */
.tmt-games-cabinet__rung--gone {
	opacity: 0.55;
}

.tmt-games-cabinet__rung--gone .tmt-games-cabinet__rung-label {
	text-decoration: line-through;
}

/* ------------------------------------------------------------------ */
/*  Foot: the disclosure that travels with every game surface (R8)     */
/* ------------------------------------------------------------------ */

.tmt-games-cabinet__foot {
	border-top: 1px solid var( --tmt-games-cabinet-edge );
	margin-top: 1.75rem;
	padding-top: 1.25rem;
}

.tmt-games-cabinet__odds {
	font-weight: 600;
	margin: 0 0 0.5rem;
}

.tmt-games-cabinet__draw,
.tmt-games-cabinet__note {
	margin: 0 0 0.5rem;
	opacity: 0.85;
}

.tmt-games-cabinet__basis {
	font-size: 0.8125rem;
	margin: 0.75rem 0 0;
	opacity: 0.75;
}

.tmt-games-cabinet__back {
	font-size: 0.875rem;
	margin: 1rem 0 0;
}
