/* ==========================================================================
   That Gouda Life: shared look with the stream overlay
   Colors, fonts and sizes come from theme.json presets.
   ========================================================================== */

:root {
	--tgl-night: var(--wp--preset--color--base, #07091a);
	--tgl-panel: var(--wp--preset--color--surface, #0e1230);
	--tgl-panel-2: var(--wp--preset--color--surface-2, #161b42);
	--tgl-line: var(--wp--preset--color--line, #2a3170);
	--tgl-white: var(--wp--preset--color--contrast, #f4f6ff);
	--tgl-muted: var(--wp--preset--color--muted, #a3abd1);
	--tgl-blue: var(--wp--preset--color--blue, #3fa8f2);
	--tgl-gold: var(--wp--preset--color--gold, #f2a43a);
	--tgl-red: var(--wp--preset--color--red, #e31b23);
	--tgl-purple: var(--wp--preset--color--purple, #8b5cf6);
	--tgl-cyan: var(--wp--preset--color--cyan, #22d3ee);
	--tgl-pink: var(--wp--preset--color--pink, #ec4899);
	--tgl-frame: linear-gradient(135deg, var(--tgl-purple) 0%, var(--tgl-blue) 55%, var(--tgl-purple) 100%);
	--tgl-mono: var(--wp--preset--font-family--mono, monospace);
	--tgl-display: var(--wp--preset--font-family--display, sans-serif);
}

/* Page backdrop: night sky with soft purple/blue glow and a faint tech grid,
   like the space around the frames on stream. */
body {
	background-color: var(--tgl-night);
	background-image:
		radial-gradient(ellipse 70% 50% at 15% -10%, rgba(139, 92, 246, .22), transparent 70%),
		radial-gradient(ellipse 60% 45% at 100% 20%, rgba(63, 168, 242, .14), transparent 70%),
		linear-gradient(rgba(63, 168, 242, .045) 1px, transparent 1px),
		linear-gradient(90deg, rgba(63, 168, 242, .045) 1px, transparent 1px);
	background-size: auto, auto, 48px 48px, 48px 48px;
	background-attachment: fixed;
	-webkit-font-smoothing: antialiased;
}

::selection {
	background: var(--tgl-gold);
	color: var(--tgl-night);
}

:where(a, button, input, .wp-element-button):focus-visible {
	outline: 2px solid var(--tgl-cyan);
	outline-offset: 3px;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.tgl-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: rgba(7, 9, 26, .82);
	-webkit-backdrop-filter: blur(12px);
	backdrop-filter: blur(12px);
}
.admin-bar .tgl-header { top: var(--wp-admin--admin-bar--height, 32px); }
.tgl-header::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 2px;
	background: var(--tgl-frame);
	opacity: .8;
}
.tgl-logo img {
	display: block;
	height: 44px;
	width: auto;
}
.wp-block-navigation .wp-block-navigation__submenu-container,
.wp-block-navigation__responsive-container.is-menu-open {
	background: var(--tgl-panel) !important;
	color: var(--tgl-white) !important;
	border-color: var(--tgl-line) !important;
}
.wp-block-navigation .wp-block-navigation-item__content:hover {
	text-decoration: underline;
	text-decoration-color: var(--tgl-gold);
	text-underline-offset: 6px;
	text-decoration-thickness: 2px;
}

/* --------------------------------------------------------------------------
   Neon frame: the framed insets from the overlay
   -------------------------------------------------------------------------- */
.is-style-frame:not(.wp-block-image):not(.wp-block-post-featured-image) {
	position: relative;
	border: 2px solid transparent;
	border-radius: 6px;
	background:
		linear-gradient(180deg, rgba(22, 27, 66, .96), rgba(14, 18, 48, .96)) padding-box,
		var(--tgl-frame) border-box;
	box-shadow: 0 0 0 1px rgba(139, 92, 246, .2), 0 18px 50px -20px rgba(63, 168, 242, .45);
	padding: var(--wp--preset--spacing--50);
}
/* corner brackets */
.is-style-frame:not(.wp-block-image):not(.wp-block-post-featured-image)::before,
.is-style-frame:not(.wp-block-image):not(.wp-block-post-featured-image)::after {
	content: "";
	position: absolute;
	width: 22px;
	height: 22px;
	pointer-events: none;
}
.is-style-frame:not(.wp-block-image):not(.wp-block-post-featured-image)::before {
	top: 8px;
	left: 8px;
	border-top: 2px solid var(--tgl-cyan);
	border-left: 2px solid var(--tgl-cyan);
}
.is-style-frame:not(.wp-block-image):not(.wp-block-post-featured-image)::after {
	right: 8px;
	bottom: 8px;
	border-right: 2px solid var(--tgl-cyan);
	border-bottom: 2px solid var(--tgl-cyan);
}

.wp-block-image.is-style-frame img,
.wp-block-post-featured-image.is-style-frame img {
	border: 2px solid transparent;
	border-radius: 6px;
	background: var(--tgl-frame) border-box;
	box-shadow: 0 18px 50px -20px rgba(63, 168, 242, .5);
}

/* Panel card and event feed item */
.is-style-card {
	background: rgba(14, 18, 48, .9);
	border: 1px solid var(--tgl-line);
	border-radius: 10px;
	padding: var(--wp--preset--spacing--40);
	transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.is-style-card:hover {
	border-color: var(--tgl-purple);
	box-shadow: 0 14px 40px -18px rgba(139, 92, 246, .6);
	transform: translateY(-2px);
}
.is-style-feed {
	background: rgba(14, 18, 48, .9);
	border-left: 3px solid var(--tgl-gold);
	border-radius: 6px;
	padding: .85rem 1.1rem;
}

/* --------------------------------------------------------------------------
   Labels, badges and chips
   -------------------------------------------------------------------------- */
.is-style-label {
	font-family: var(--tgl-mono) !important;
	font-weight: 700 !important;
	font-style: normal !important;
	font-size: var(--wp--preset--font-size--x-small) !important;
	letter-spacing: .24em !important;
	text-transform: uppercase !important;
	line-height: 1.4 !important;
}
.is-style-label:not(.has-text-color) { color: var(--tgl-gold); }

.is-style-live {
	display: inline-flex;
	align-items: center;
	gap: .6rem;
	width: fit-content;
	padding: .45rem .9rem;
	border: 1px solid var(--tgl-line);
	border-radius: 999px;
	background: rgba(14, 18, 48, .9);
	font-family: var(--tgl-mono);
	font-weight: 700;
	font-size: var(--wp--preset--font-size--x-small);
	letter-spacing: .2em;
	text-transform: uppercase;
}
.is-style-live::before {
	content: "";
	width: .6rem;
	height: .6rem;
	border-radius: 50%;
	background: var(--tgl-red);
	box-shadow: 0 0 0 0 rgba(227, 27, 35, .6);
	animation: tgl-pulse 2.4s ease-out infinite;
	flex: none;
}
@keyframes tgl-pulse {
	0% { box-shadow: 0 0 0 0 rgba(227, 27, 35, .55); }
	70% { box-shadow: 0 0 0 .55rem rgba(227, 27, 35, 0); }
	100% { box-shadow: 0 0 0 0 rgba(227, 27, 35, 0); }
}

/* Key chip, like the Camelot key badge on the deck cards */
.is-style-chip {
	display: inline-grid;
	place-items: center;
	min-width: 3.4rem;
	height: 3.4rem;
	padding: 0 .6rem;
	border-radius: 8px;
	background: var(--tgl-cyan);
	color: var(--tgl-night);
	font-family: var(--tgl-mono);
	font-weight: 700;
	font-size: .9rem;
	letter-spacing: .06em;
	text-transform: uppercase;
	line-height: 1;
}
.is-style-chip.has-background { background: inherit; }

/* House is my Heartbeat type */
.is-style-heartbeat {
	font-family: var(--wp--preset--font-family--heartbeat) !important;
	font-weight: 400 !important;
	font-style: normal !important;
	letter-spacing: .03em !important;
	text-transform: uppercase;
	line-height: .95 !important;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.wp-block-button:not(.is-style-ghost):not(.is-style-outline) .wp-block-button__link {
	clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
	transition: background-color .15s ease, color .15s ease;
}
.wp-block-button.is-style-heartbeat .wp-block-button__link {
	background-color: var(--tgl-red);
	color: var(--tgl-white);
}
.wp-block-button.is-style-heartbeat .wp-block-button__link:hover,
.wp-block-button.is-style-heartbeat .wp-block-button__link:focus {
	background-color: var(--tgl-white);
	color: var(--tgl-red);
}
.wp-block-button.is-style-ghost .wp-block-button__link {
	background: transparent;
	color: var(--tgl-white);
	border: 2px solid var(--tgl-cyan);
	border-radius: 0;
}
.wp-block-button.is-style-ghost .wp-block-button__link:hover,
.wp-block-button.is-style-ghost .wp-block-button__link:focus {
	background: var(--tgl-cyan);
	color: var(--tgl-night);
}

/* --------------------------------------------------------------------------
   Flatline separator: the line that runs into the heartbeat
   -------------------------------------------------------------------------- */
.wp-block-separator.is-style-flatline {
	border: 0 !important;
	height: 44px;
	width: 100% !important;
	opacity: 1;
	background:
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 44'%3E%3Cpolyline points='0,22 34,22 40,16 46,22 54,22 60,6 68,38 74,22 82,22 88,18 94,22 120,22' fill='none' stroke='%23E31B23' stroke-width='3' stroke-linejoin='round' stroke-linecap='round'/%3E%3C/svg%3E") center / 120px 44px no-repeat,
		linear-gradient(var(--tgl-white), var(--tgl-white)) left center / calc(50% - 59px) 3px no-repeat,
		linear-gradient(var(--tgl-white), var(--tgl-white)) right center / calc(50% - 59px) 3px no-repeat;
}

/* --------------------------------------------------------------------------
   Ticker strip (from the BRB screen)
   -------------------------------------------------------------------------- */
.is-style-ticker {
	overflow: hidden;
	white-space: nowrap;
	background: linear-gradient(90deg, var(--tgl-cyan) 0%, var(--tgl-purple) 50%, var(--tgl-pink) 100%);
	padding: .6rem 0 !important;
}
.is-style-ticker > * {
	display: inline-block;
	margin: 0 !important;
	padding-left: 100%;
	color: var(--tgl-night);
	font-family: var(--tgl-mono);
	font-weight: 700;
	font-size: var(--wp--preset--font-size--x-small);
	letter-spacing: .22em;
	text-transform: uppercase;
	animation: tgl-ticker 38s linear infinite;
}
@keyframes tgl-ticker {
	from { transform: translateX(0); }
	to { transform: translateX(-100%); }
}

/* --------------------------------------------------------------------------
   Hero, schedule and section helpers used by the patterns
   -------------------------------------------------------------------------- */
.tgl-hero-logo img {
	width: 100%;
	max-width: 880px;
	height: auto;
	filter: drop-shadow(0 10px 30px rgba(63, 168, 242, .35));
}
.tgl-schedule-row {
	border-bottom: 1px solid var(--tgl-line);
	padding-block: 1rem;
}
.tgl-schedule-row:last-child { border-bottom: 0; }
.tgl-time {
	font-family: var(--tgl-mono) !important;
	font-weight: 700;
	letter-spacing: .02em;
	white-space: nowrap;
}
.tgl-heart img {
	width: 120px;
	height: auto;
	filter: drop-shadow(0 6px 18px rgba(227, 27, 35, .45));
}

/* Post cards in query loops */
.tgl-post-card {
	height: 100%;
	display: flex;
	flex-direction: column;
}
.tgl-post-card .wp-block-post-featured-image {
	margin: calc(-1 * var(--wp--preset--spacing--40)) calc(-1 * var(--wp--preset--spacing--40)) 0;
	overflow: hidden;
	border-radius: 9px 9px 0 0;
}
.tgl-post-card .wp-block-post-featured-image img {
	aspect-ratio: 16 / 9;
	object-fit: cover;
	width: 100%;
	transition: transform .4s ease;
}
.tgl-post-card:hover .wp-block-post-featured-image img { transform: scale(1.03); }
.tgl-post-card .wp-block-post-excerpt__excerpt { color: var(--tgl-muted); }

.wp-block-query-pagination a,
.wp-block-query-pagination .current {
	font-family: var(--tgl-mono);
	font-weight: 700;
	letter-spacing: .1em;
}

/* Comments and forms */
:where(.wp-block-search__input, .comment-form input, .comment-form textarea, input[type="text"], input[type="email"], textarea) {
	background: var(--tgl-panel);
	color: var(--tgl-white);
	border: 1px solid var(--tgl-line);
	border-radius: 6px;
}
.wp-block-search__button {
	margin-left: .5rem;
}

/* Footer */
.tgl-footer a { text-decoration: none; }
.tgl-footer a:hover { text-decoration: underline; }
.wp-block-social-links.is-style-logos-only .wp-social-link { color: var(--tgl-white); }
.wp-block-social-links.is-style-logos-only .wp-social-link:hover { color: var(--tgl-gold); }

/* Respect reduced-motion settings */
@media (prefers-reduced-motion: reduce) {
	.is-style-ticker > * { animation: none; padding-left: 0; }
	.is-style-live::before { animation: none; }
	.is-style-card, .tgl-post-card .wp-block-post-featured-image img { transition: none; }
	.is-style-card:hover { transform: none; }
}

.tgl-plain-list { list-style: none; }

/* Pages built with Elementor keep their own section widths instead of the
   narrow reading column. */
.wp-block-post-content > .elementor {
	max-width: var(--wp--style--global--wide-size, 1240px) !important;
	margin-inline: auto !important;
}

.wp-block-button__link { white-space: nowrap; }
.tgl-nav { padding-top: .25rem; }
@media (max-width: 600px) {
	.tgl-header-live { display: none !important; }
	.tgl-logo img { height: 34px; }
	.tgl-nav { border-top: 0; padding-top: 0; }
}
