/* ============================================================================
   KCOHL Game Center — Next Game hero + schedule list
   ----------------------------------------------------------------------------
   Colours come from the kcohl-2026 theme's GeneratePress palette when the
   theme is active (--contrast, --base, --accent ...). Each var() carries a
   literal fallback so the block still looks right if it is dropped onto a
   page before the theme loads, or previewed in the editor iframe.
   ========================================================================= */

.kcgc-next {
	--kcgc-ink: var(--ink, #0a0e14);
	--kcgc-paper: var(--paper, #e8eaed);
	--kcgc-accent: var(--accent, #0368c7);
	--kcgc-on-accent: var(--kc-on-accent, #fff);
	--kcgc-display: var(--kc-display, 'League Gothic', 'Arial Narrow', Impact, sans-serif);
	--kcgc-body: var(--kc-body, 'Work Sans', system-ui, -apple-system, sans-serif);

	position: relative;
	isolation: isolate;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: clamp(460px, 46vw, 660px);
	padding: clamp(2.5rem, 5vw, 4.25rem) 1.25rem;
	background-color: var(--kcgc-ink);
	background-image: var(--kcgc-bg, none);
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	color: var(--kcgc-paper);
	font-family: var(--kcgc-body);
	text-align: center;
}

/* Two layers over the photograph:
   1. a vertical gradient, darker top and bottom, for the text areas
   2. a flat wash across the whole image
   The wash is what lets a white team crest (Inland Kenworth, Northstar GM)
   read on the white half of the ice. Its strength is the "Background
   darkness" setting, arriving as --kcgc-scrim. */
.kcgc-next::before {
	content: '';
	position: absolute;
	inset: 0;
	z-index: 0;
	background:
		linear-gradient(
			180deg,
			rgba(7, 10, 16, .5) 0%,
			rgba(7, 10, 16, .12) 26%,
			rgba(7, 10, 16, 0) 52%,
			rgba(7, 10, 16, .16) 78%,
			rgba(7, 10, 16, .5) 100%
		),
		linear-gradient(
			0deg,
			rgba(7, 10, 16, var(--kcgc-scrim, .45)),
			rgba(7, 10, 16, var(--kcgc-scrim, .45))
		);
	pointer-events: none;
}

.kcgc-next__inner {
	position: relative;
	z-index: 2;
	width: 100%;
	max-width: var(--kc-wide, 1180px);
	margin-inline: auto;
}

/* --- Impact flash ------------------------------------------------------- */

.kcgc-next__flash {
	position: absolute;
	inset: 0;
	z-index: 3;
	opacity: 0;
	pointer-events: none;
	background: radial-gradient(
		circle at 50% 52%,
		rgba(255, 255, 255, .95) 0%,
		rgba(3, 104, 199, .55) 34%,
		rgba(255, 255, 255, 0) 72%
	);
	mix-blend-mode: screen;
}

.kcgc-next.is-live .kcgc-next__flash {
	animation: kcgc-flash .5s ease-out 1.02s both;
}

/* --- Sound toggle -------------------------------------------------------
   The horn fires on its own when the block arrives, so a visitor needs a way
   to turn it off. The choice is remembered in localStorage.

   Bottom right, not top: the site header is sticky and would sit over it. */

.kcgc-next__sound {
	position: absolute;
	bottom: clamp(.75rem, 2vw, 1.25rem);
	right: clamp(.75rem, 2vw, 1.25rem);
	z-index: 4;
	display: grid;
	place-items: center;
	width: 2.75rem;
	height: 2.75rem;
	padding: 0;
	border: 1px solid rgba(255, 255, 255, .28);
	border-radius: 50%;
	background: rgba(7, 10, 16, .66);
	line-height: 1;
	cursor: pointer;
	opacity: .8;
	transition: background var(--kc-speed, .24s) var(--kc-ease, ease),
		border-color var(--kc-speed, .24s) var(--kc-ease, ease),
		opacity var(--kc-speed, .24s) var(--kc-ease, ease);
}

.kcgc-next__sound:is(:hover, :focus-visible) {
	opacity: 1;
	background: rgba(7, 10, 16, .88);
	border-color: var(--kcgc-accent);
}

.kcgc-next__sound.is-muted {
	opacity: .6;
}

.kcgc-next__sound-icon {
	font-size: 1.1rem;
	line-height: 1;
}

@media (max-width: 767px) {
	.kcgc-next__sound {
		width: 2.4rem;
		height: 2.4rem;
	}

	.kcgc-next__sound-icon {
		font-size: 1rem;
	}
}

/* --- Type ---------------------------------------------------------------
   The eyebrow, heading and date sit on one dark plate so they stay readable
   wherever the diagonal happens to fall behind them. */

.kcgc-next__head {
	display: inline-block;
	margin: 0 0 clamp(1.5rem, 3.5vw, 2.75rem);
	padding: clamp(.7rem, 1.6vw, 1rem) clamp(1.25rem, 3vw, 2.25rem) clamp(.85rem, 1.8vw, 1.15rem);
	border-radius: var(--kc-radius-md, 8px);
	background: rgba(7, 10, 16, .74);
	box-shadow: 0 18px 48px rgba(7, 10, 16, .45);
	border-bottom: 3px solid var(--kcgc-accent);
	backdrop-filter: blur(7px);
	-webkit-backdrop-filter: blur(7px);
}

.kcgc-next__eyebrow {
	margin: 0 0 .3rem;
	font-family: var(--kcgc-body);
	font-size: clamp(.72rem, 1.4vw, .85rem);
	font-weight: 600;
	letter-spacing: .24em;
	text-transform: uppercase;
	color: #9ecbf8;
}

.kcgc-next__heading {
	margin: 0 0 .35rem;
	font-family: var(--kcgc-display);
	font-size: clamp(2.2rem, 5vw, 3.5rem);
	line-height: .94;
	text-transform: uppercase;
	color: #fff;
}

.kcgc-next__when {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: center;
	gap: .35rem .85rem;
	margin: 0;
	font-family: var(--kcgc-display);
	font-size: clamp(1.75rem, 4.2vw, 3rem);
	line-height: 1.02;
	text-transform: uppercase;
	letter-spacing: .02em;
	color: #fff;
}

.kcgc-next__sep {
	color: var(--kcgc-accent);
	font-weight: 700;
}

.kcgc-next__location {
	display: inline-block;
	margin: clamp(1.25rem, 3vw, 2rem) 0 0;
	padding: .45em .95em;
	border-radius: var(--kc-radius-pill, 999px);
	background: rgba(7, 10, 16, .72);
	font-size: clamp(.82rem, 1.5vw, .98rem);
	font-weight: 500;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: #d8dee7;
}

.kcgc-next__cta {
	margin: clamp(1.25rem, 3vw, 2rem) 0 0;
}

/* Styled here rather than borrowing the theme's .kc-btn, so the block keeps
   its look if it is ever used outside the kcohl-2026 theme.

   Selector note: GeneratePress ships `.inside-article a { color: var(--accent-2) }`
   at specificity 0-1-1, which beats a lone `.kcgc-next__btn` (0-1-0) and
   repainted the label link-blue on the blue pill. Qualifying with the section
   class and the `a` element puts this at 0-2-1 so it wins without `!important`.
   Every link state is listed for the same reason.

   The label is a literal #fff rather than a palette token: white is the only
   value that holds 5.5:1 on the brand blue, and it has to stay white in Home
   and Away alike, whatever the palette does later. */
.kcgc-next a.kcgc-next__btn,
.kcgc-next a.kcgc-next__btn:link,
.kcgc-next a.kcgc-next__btn:visited {
	display: inline-block;
	padding: .85em 2em;
	border: 2px solid var(--kcgc-accent);
	border-radius: var(--kc-radius-pill, 999px);
	background: var(--kcgc-accent);
	color: #fff;
	font-family: var(--kcgc-body);
	font-size: clamp(.82rem, 1.5vw, .95rem);
	font-weight: 600;
	letter-spacing: .12em;
	line-height: 1;
	text-transform: uppercase;
	text-decoration: none;
	box-shadow: 0 10px 30px rgba(7, 10, 16, .45);
	transition: background var(--kc-speed, .24s) var(--kc-ease, ease),
		border-color var(--kc-speed, .24s) var(--kc-ease, ease),
		transform var(--kc-speed, .24s) var(--kc-ease, ease);
}

.kcgc-next a.kcgc-next__btn:is(:hover, :focus, :focus-visible, :active) {
	background: var(--accent-hover, #0256a8);
	border-color: var(--accent-hover, #0256a8);
	color: #fff;
	transform: translateY(-2px);
}

.kcgc-next a.kcgc-next__btn:active {
	transform: translateY(0);
}

/* --- Matchup row -------------------------------------------------------- */

.kcgc-next__matchup {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	gap: clamp(.5rem, 3vw, 2.5rem);
}

.kcgc-team {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: .85rem;
	min-width: 0;
}

/* No plate, no disc — the crests sit straight on the ice, lifted by a soft
   radial shadow underneath. */
.kcgc-team__plate {
	position: relative;
	display: grid;
	place-items: center;
	width: clamp(120px, 21vw, 230px);
	aspect-ratio: 1;
}

/* The shadow is a blurred pseudo-element rather than a background gradient on
   the plate itself: the blur guarantees there is no edge anywhere for the eye
   to read as a circle, which is what the flat gradient did. It fades out well
   inside the box so the falloff is never clipped by the plate bounds. */
.kcgc-team__plate::before {
	content: '';
	position: absolute;
	inset: 4%;
	z-index: 0;
	border-radius: 50%;
	background: radial-gradient(
		circle at 50% 52%,
		rgba(7, 10, 16, .38) 0%,
		rgba(7, 10, 16, .26) 32%,
		rgba(7, 10, 16, .11) 54%,
		rgba(7, 10, 16, 0) 72%
	);
	filter: blur(12px);
	pointer-events: none;
}

.kcgc-team__logo,
.kcgc-team__initials {
	position: relative;
	z-index: 1;
}

/* Every crest and the TBA wordmark are square, so the ratio is declared here
   rather than as width/height attributes — the source files differ in pixel
   size and hardcoding one of them would shift the layout for the others. */
/* Three shadows, each doing a different job:
   - a tight omnidirectional halo, which is the only thing that keeps a white
     logo (Inland Kenworth, Northstar GM) legible on the white half of the ice
   - a wider ambient one for separation
   - a short offset one to seat the crest on the surface
   Omnidirectional has to come first: it hugs the glyph edges, so it reads as
   an outline rather than as a shape sitting behind the logo.

   Selector note: the Awen01 colour-mode plugin ships
   `:root[data-theme="dark"] img { filter: none }` at specificity 0-2-1, which
   silently killed these shadows in Away mode — the site default. Qualifying
   down to `img.kcgc-team__logo` inside the plate puts this at 0-3-1 so it
   survives, in both modes, without `!important`. */
.kcgc-next .kcgc-team__plate img.kcgc-team__logo {
	width: 88%;
	height: auto;
	aspect-ratio: 1;
	object-fit: contain;
	filter:
		drop-shadow(0 0 6px rgba(7, 10, 16, .55))
		drop-shadow(0 0 18px rgba(7, 10, 16, .4))
		drop-shadow(0 8px 20px rgba(7, 10, 16, .45));
}

.kcgc-team__initials {
	font-family: var(--kcgc-display);
	font-size: clamp(2.2rem, 6vw, 4rem);
	line-height: 1;
	color: #fff;
	text-shadow: 0 2px 16px rgba(7, 10, 16, .8);
}

/* A chip behind each name so it holds up over the white half of the ice. */
.kcgc-team__name {
	margin: 0;
	padding: .3em .7em .35em;
	border-radius: var(--kc-radius-sm, 4px);
	background: rgba(7, 10, 16, .78);
	font-family: var(--kcgc-display);
	font-size: clamp(1.1rem, 2.6vw, 1.9rem);
	line-height: 1.05;
	text-transform: uppercase;
	letter-spacing: .01em;
	color: #fff;
}

.kcgc-team__score {
	margin: 0;
	font-family: var(--kcgc-display);
	font-size: clamp(1.6rem, 4vw, 2.8rem);
	line-height: 1;
	color: var(--kcgc-accent);
}

/* --- VS ----------------------------------------------------------------- */

.kcgc-next__vs {
	position: relative;
	display: grid;
	place-items: center;
	width: clamp(86px, 15vw, 180px);
	aspect-ratio: 1;
}

.kcgc-next__vs-img {
	width: 100%;
	height: auto;
	filter: drop-shadow(0 0 22px rgba(3, 104, 199, .85)) drop-shadow(0 8px 22px rgba(7, 10, 16, .8));
}

.kcgc-next__vs-text {
	font-family: var(--kcgc-display);
	font-size: clamp(2.6rem, 8vw, 5rem);
	line-height: 1;
	color: var(--kcgc-accent);
	text-shadow: 0 0 26px rgba(3, 104, 199, .9);
}

/* Shockwave ring thrown off at the moment the VS lands. */
.kcgc-next__shock {
	position: absolute;
	inset: 0;
	border-radius: 50%;
	border: 3px solid rgba(255, 255, 255, .8);
	opacity: 0;
	pointer-events: none;
}

.kcgc-next.is-live .kcgc-next__shock {
	animation: kcgc-shock .85s cubic-bezier(.16, 1, .3, 1) 1.02s both;
}

/* --- Entrance choreography ---------------------------------------------
   Resting state is hidden. Everything stays hidden until JS adds .is-live,
   which it does the first time the block scrolls into view. If JS never
   runs, .kcgc-next stays without the no-js guard class and everything is
   visible — see the :not(.kcgc-armed) rules below. */

.kcgc-next.kcgc-armed .kcgc-next__head,
.kcgc-next.kcgc-armed .kcgc-next__location,
.kcgc-next.kcgc-armed .kcgc-next__cta,
.kcgc-next.kcgc-armed .kcgc-team,
.kcgc-next.kcgc-armed .kcgc-next__vs {
	opacity: 0;
}

.kcgc-next.is-live .kcgc-next__head {
	animation: kcgc-drop .75s cubic-bezier(.2, 1.5, .4, 1) .08s both;
}

.kcgc-next.is-live .kcgc-team--home {
	animation: kcgc-slam-left .9s cubic-bezier(.18, 1.1, .32, 1) .18s both;
}

.kcgc-next.is-live .kcgc-team--away {
	animation: kcgc-slam-right .9s cubic-bezier(.18, 1.1, .32, 1) .18s both;
}

.kcgc-next.is-live .kcgc-next__vs {
	animation: kcgc-vs-crash .78s cubic-bezier(.3, 1.4, .4, 1) .5s both;
}

.kcgc-next.is-live .kcgc-next__location,
.kcgc-next.is-live .kcgc-next__cta {
	animation: kcgc-rise .6s var(--kc-ease, cubic-bezier(.22, 1, .36, 1)) 1.25s both;
}

/* --- Keyframes ---------------------------------------------------------- */

@keyframes kcgc-rise {
	from { opacity: 0; transform: translate3d(0, 22px, 0); }
	to   { opacity: 1; transform: none; }
}

@keyframes kcgc-drop {
	0%   { opacity: 0; transform: translate3d(0, -80px, 0) scale(1.18); }
	60%  { opacity: 1; }
	78%  { transform: translate3d(0, 6px, 0) scale(.99); }
	100% { opacity: 1; transform: none; }
}

@keyframes kcgc-slam-left {
	0%   { opacity: 0; transform: translate3d(-170%, 0, 0) scale(.5) rotate(-16deg); filter: blur(8px); }
	55%  { opacity: 1; filter: blur(0); }
	68%  { transform: translate3d(7%, 0, 0) scale(1.1) rotate(3deg); }
	82%  { transform: translate3d(-3%, 0, 0) scale(.97) rotate(-1.5deg); }
	100% { opacity: 1; transform: none; filter: blur(0); }
}

@keyframes kcgc-slam-right {
	0%   { opacity: 0; transform: translate3d(170%, 0, 0) scale(.5) rotate(16deg); filter: blur(8px); }
	55%  { opacity: 1; filter: blur(0); }
	68%  { transform: translate3d(-7%, 0, 0) scale(1.1) rotate(-3deg); }
	82%  { transform: translate3d(3%, 0, 0) scale(.97) rotate(1.5deg); }
	100% { opacity: 1; transform: none; filter: blur(0); }
}

@keyframes kcgc-vs-crash {
	0%   { opacity: 0; transform: scale(9) rotate(-28deg); filter: blur(16px); }
	45%  { opacity: .9; }
	66%  { opacity: 1; transform: scale(.78) rotate(5deg); filter: blur(0); }
	80%  { transform: scale(1.18) rotate(-3deg); }
	91%  { transform: scale(.95) rotate(1deg); }
	100% { opacity: 1; transform: none; filter: blur(0); }
}

@keyframes kcgc-flash {
	0%   { opacity: 0; }
	12%  { opacity: .85; }
	100% { opacity: 0; }
}

@keyframes kcgc-shock {
	0%   { opacity: .9; transform: scale(.35); border-width: 4px; }
	100% { opacity: 0; transform: scale(3.6); border-width: 1px; }
}

/* --- Screen shake ------------------------------------------------------
   Applied to <html> so the whole viewport jolts, then removed by JS. */

@keyframes kcgc-quake {
	0%   { transform: translate3d(0, 0, 0) rotate(0); }
	8%   { transform: translate3d(-9px, 6px, 0) rotate(-.45deg); }
	18%  { transform: translate3d(8px, -7px, 0) rotate(.4deg); }
	28%  { transform: translate3d(-7px, -5px, 0) rotate(-.32deg); }
	38%  { transform: translate3d(6px, 6px, 0) rotate(.28deg); }
	50%  { transform: translate3d(-5px, -3px, 0) rotate(-.2deg); }
	62%  { transform: translate3d(4px, 3px, 0) rotate(.15deg); }
	74%  { transform: translate3d(-3px, -2px, 0) rotate(-.1deg); }
	86%  { transform: translate3d(2px, 1px, 0) rotate(.05deg); }
	100% { transform: translate3d(0, 0, 0) rotate(0); }
}

html.kcgc-quake {
	animation: kcgc-quake .62s cubic-bezier(.36, .07, .19, .97) both;
	will-change: transform;
}

/* --- Small screens ------------------------------------------------------ */

@media (max-width: 767px) {
	.kcgc-next {
		min-height: clamp(460px, 120vw, 640px);
		padding-inline: .75rem;
	}

	.kcgc-next__matchup {
		gap: .25rem;
	}

	.kcgc-team {
		gap: .6rem;
	}

	/* The three columns have to fit a 320px phone without clipping the
	   circular plates, so both the plate and the VS shrink below their
	   desktop floors here. */
	.kcgc-team__plate {
		width: min(100%, clamp(88px, 27vw, 140px));
	}

	.kcgc-next__vs {
		width: clamp(62px, 19vw, 96px);
	}

	.kcgc-team__name {
		padding: .28em .55em .32em;
		font-size: clamp(.95rem, 4vw, 1.25rem);
		overflow-wrap: anywhere;
	}

	.kcgc-next__when {
		flex-direction: column;
		gap: .15rem;
	}

	.kcgc-next__sep {
		display: none;
	}
}

/* --- Reduced motion ----------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
	.kcgc-next.is-live .kcgc-next__head,
	.kcgc-next.is-live .kcgc-next__location,
	.kcgc-next.is-live .kcgc-next__cta,
	.kcgc-next.is-live .kcgc-team--home,
	.kcgc-next.is-live .kcgc-team--away,
	.kcgc-next.is-live .kcgc-next__vs {
		animation: kcgc-fade .3s ease-out both;
	}

	.kcgc-next.is-live .kcgc-next__flash,
	.kcgc-next.is-live .kcgc-next__shock,
	html.kcgc-quake {
		animation: none;
	}

	@keyframes kcgc-fade {
		from { opacity: 0; }
		to   { opacity: 1; }
	}
}

/* ============================================================================
   Schedule list
   ========================================================================= */

.kcgc-schedule__heading {
	font-family: var(--kc-display, 'League Gothic', 'Arial Narrow', Impact, sans-serif);
	text-transform: uppercase;
}

.kcgc-schedule__empty {
	padding: 2rem 1rem;
	text-align: center;
	font-size: 1.1rem;
	color: var(--contrast-3, #7a808a);
}

.kcgc-schedule__table {
	width: 100%;
	border-collapse: collapse;
}

.kcgc-schedule__table th,
.kcgc-schedule__table td {
	padding: .75rem .85rem;
	text-align: left;
	border-bottom: 1px solid var(--base-2, #252a34);
}

.kcgc-schedule__table th {
	font-family: var(--kc-body, 'Work Sans', system-ui, sans-serif);
	font-size: .78rem;
	font-weight: 600;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--contrast-3, #7a808a);
}

.kcgc-schedule__score {
	display: inline-block;
	margin-left: .4rem;
	padding: .05em .45em;
	border-radius: var(--kc-radius-sm, 4px);
	background: var(--accent, #0368c7);
	color: var(--kc-on-accent, #fff);
	font-weight: 600;
	font-size: .85em;
}

@media (max-width: 640px) {
	.kcgc-schedule__table thead {
		display: none;
	}

	.kcgc-schedule__table tr {
		display: block;
		padding: .5rem 0;
		border-bottom: 1px solid var(--base-2, #252a34);
	}

	.kcgc-schedule__table td {
		display: flex;
		justify-content: space-between;
		gap: 1rem;
		padding: .3rem 0;
		border: 0;
	}

	.kcgc-schedule__table td::before {
		content: attr(data-label);
		font-size: .72rem;
		letter-spacing: .14em;
		text-transform: uppercase;
		color: var(--contrast-3, #7a808a);
	}
}
