/* eu.aethernal.streams: the channel grid (/streams/) and the watch page (/streams/watch/...). The forum style's tokens
   (the website's chrome.css: --aet-*), the cards of the forum's Article Highlights box (rounded, the card surface, the
   gold edge + soft lift on hover and keyboard focus, the picture's slow zoom). Loaded by the two templates only. */

/* ---- the grid ---- */
.aetStreams {
	margin-top: var(--aet-sp-24, 24px);
}
.aetStreams + .aetStreams {
	margin-top: var(--aet-sp-32, 32px);
}
.aetStreams__heading {
	align-items: center;
	color: var(--aet-heading);
	display: flex;
	font-family: var(--aet-font-display);
	font-size: 1.2rem;
	gap: var(--aet-sp-10, 10px);
	letter-spacing: 0.02em;
	margin: 0 0 var(--aet-sp-16, 16px);
}
.aetStreams__count {
	background: rgba(var(--aet-bg-rgb), 0.72);
	border-radius: var(--aet-radius-pill);
	box-shadow: inset 0 0 0 1px rgba(var(--aet-amber-rgb), 0.45);
	color: var(--aet-amber);
	font-family: var(--aet-font);
	font-size: 0.78rem;
	font-weight: 700;
	line-height: 1;
	padding: 4px 9px;
}
.aetStreams__pulse {
	background: var(--aet-red);
	border-radius: 50%;
	box-shadow: 0 0 0 0 rgba(var(--aet-red-rgb), 0.6);
	display: inline-block;
	flex: none;
	height: 10px;
	width: 10px;
}
@media (prefers-reduced-motion: no-preference) {
	.aetStreams__pulse {
		animation: aetStreamsPulse 2s ease-out infinite;
	}
}
@keyframes aetStreamsPulse {
	0% { box-shadow: 0 0 0 0 rgba(var(--aet-red-rgb), 0.6); }
	70% { box-shadow: 0 0 0 9px rgba(var(--aet-red-rgb), 0); }
	100% { box-shadow: 0 0 0 0 rgba(var(--aet-red-rgb), 0); }
}

.aetStreams__grid {
	display: grid;
	gap: var(--aet-sp-20, 20px);
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr));
	list-style: none;
	margin: 0;
	padding: 0;
}

.aetStreamCard {
	background: var(--aet-surface-strong);
	border: 1px solid var(--aet-border);
	border-radius: var(--aet-radius);
	box-shadow: var(--aet-shadow);
	isolation: isolate;
	margin: 0;
	min-width: 0;
	overflow: hidden;
	position: relative;
}
#content .aetStreamCard__link,
#content .aetStreamCard__link:hover {
	color: inherit;
	display: flex;
	flex-direction: column;
	height: 100%;
	text-decoration: none;
}
.aetStreamCard__link:focus-visible {
	outline: none;
}

.aetStreamCard__media {
	aspect-ratio: 16 / 9;
	background:
		radial-gradient(120% 90% at 50% 0%, rgba(var(--aet-amber-rgb), 0.12), transparent 60%),
		rgba(var(--aet-bg-rgb), 0.9);
	display: block;
	overflow: hidden;
	position: relative;
}
.aetStreamCard__img {
	display: block;
	height: 100%;
	object-fit: cover;
	width: 100%;
}
.aetStreamCard:not(.aetStreamCard--live) .aetStreamCard__img {
	filter: saturate(0.85) brightness(0.8);
}
/* no offline banner: the profile picture, blurred as the background and round in the middle */
.aetStreamCard__blur {
	filter: blur(22px) brightness(0.45) saturate(1.1);
	height: 100%;
	inset: 0;
	object-fit: cover;
	position: absolute;
	transform: scale(1.3);
	width: 100%;
}
.aetStreamCard__portrait {
	border-radius: 50%;
	box-shadow: 0 0 0 3px rgba(var(--aet-bg-rgb), 0.7), 0 10px 30px -10px rgba(0, 0, 0, 0.8);
	height: 34%;
	left: 50%;
	object-fit: cover;
	position: absolute;
	top: 50%;
	transform: translate(-50%, -50%);
	width: auto;
	aspect-ratio: 1;
}
.aetStreamCard__initial {
	align-items: center;
	color: rgba(var(--aet-amber-rgb), 0.55);
	display: flex;
	font-family: var(--aet-font-display);
	font-size: 3rem;
	height: 100%;
	justify-content: center;
}
/* a soft fade at the bottom so the viewer chip stays readable on bright previews */
.aetStreamCard__media::after {
	background: linear-gradient(to top, rgba(0, 0, 0, 0.55), transparent 42%);
	content: "";
	inset: 0;
	pointer-events: none;
	position: absolute;
}

.aetStreamBadge {
	background: rgba(var(--aet-bg-rgb), 0.82);
	border-radius: var(--aet-radius-xs, 4px);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
	color: var(--aet-muted);
	display: inline-block;
	font-family: var(--aet-font);
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	line-height: 1;
	padding: 5px 8px;
	text-transform: uppercase;
	vertical-align: middle;
}
.aetStreamBadge--live {
	background: var(--aet-red);
	box-shadow: 0 4px 14px -4px rgba(var(--aet-red-rgb), 0.8);
	color: #fff;
}
.aetStreamCard__media > .aetStreamBadge {
	left: 12px;
	position: absolute;
	top: 12px;
	z-index: 1;
}
.aetStreamCard__viewers {
	align-items: center;
	background: rgba(0, 0, 0, 0.62);
	border-radius: var(--aet-radius-xs, 4px);
	bottom: 10px;
	color: #fff;
	display: inline-flex;
	font-size: 0.78rem;
	font-weight: 600;
	gap: 5px;
	left: 12px;
	line-height: 1;
	padding: 5px 8px;
	position: absolute;
	z-index: 1;
}
.aetStreamCard__viewers fa-icon {
	color: var(--aet-red);
}

.aetStreamCard__body {
	align-items: flex-start;
	display: flex;
	flex: 1;
	gap: var(--aet-sp-12, 12px);
	padding: var(--aet-sp-14, 14px) var(--aet-sp-16, 16px) var(--aet-sp-16, 16px);
}
.aetStreamCard__avatar {
	border-radius: 50%;
	flex: none;
	height: 40px;
	object-fit: cover;
	width: 40px;
}
.aetStreamCard--live .aetStreamCard__avatar {
	box-shadow: 0 0 0 2px var(--aet-surface-strong), 0 0 0 4px var(--aet-red);
}
.aetStreamCard__avatar--initial,
.aetWatch__avatar--initial {
	align-items: center;
	background: rgba(var(--aet-amber-rgb), 0.14);
	color: var(--aet-amber);
	display: inline-flex;
	font-family: var(--aet-font-display);
	font-weight: 700;
	justify-content: center;
}
.aetStreamCard__text {
	display: flex;
	flex-direction: column;
	gap: 3px;
	min-width: 0;
}
.aetStreamCard__title {
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	color: var(--aet-heading);
	display: -webkit-box;
	font-size: 0.98rem;
	font-weight: 600;
	line-height: 1.3;
	overflow: hidden;
	overflow-wrap: anywhere;
}
.aetStreamCard__name {
	color: var(--aet-amber);
	font-size: 0.9rem;
	font-weight: 600;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.aetStreamCard:not(.aetStreamCard--live) .aetStreamCard__name {
	color: var(--aet-heading);
	font-size: 1rem;
}
.aetStreamCard__meta {
	color: var(--aet-muted);
	font-size: 0.84rem;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* hover and keyboard focus: the gold edge, a soft lift + zoom (motion only when allowed) */
.aetStreamCard:hover,
.aetStreamCard:has(:focus-visible) {
	border-color: rgba(var(--aet-amber-rgb), 0.55);
	box-shadow: var(--aet-shadow-lift), 0 0 0 1px rgba(var(--aet-amber-rgb), 0.35);
}
.aetStreamCard:has(:focus-visible) {
	box-shadow: 0 0 0 3px var(--aet-focus), var(--aet-shadow-lift);
}
.aetStreamCard:hover .aetStreamCard__title,
.aetStreamCard:has(:focus-visible) .aetStreamCard__title {
	color: var(--aet-amber);
}
@media (prefers-reduced-motion: no-preference) {
	.aetStreamCard {
		transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
	}
	.aetStreamCard__img,
	.aetStreamCard__portrait {
		transition: transform 0.6s ease, filter 0.3s ease;
	}
	.aetStreamCard:hover,
	.aetStreamCard:has(:focus-visible) {
		transform: translateY(-3px);
	}
	.aetStreamCard:hover .aetStreamCard__img,
	.aetStreamCard:has(:focus-visible) .aetStreamCard__img {
		transform: scale(1.04);
	}
}
.aetStreamCard:not(.aetStreamCard--live):hover .aetStreamCard__img {
	filter: none;
}

/* ---- the watch page ---- */
.aetWatch__header.contentHeader {
	display: block;
	margin-bottom: var(--aet-sp-20, 20px);
}
.aetWatch__head {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: var(--aet-sp-16, 16px);
}
.aetWatch__avatar {
	border-radius: 50%;
	flex: none;
	font-size: 1.6rem;
	height: 64px;
	object-fit: cover;
	width: 64px;
}
.aetWatch__avatar--live {
	box-shadow: 0 0 0 3px var(--aet-bg), 0 0 0 5px var(--aet-red);
}
.aetWatch__who {
	flex: 1 1 280px;
	min-width: 0;
}
.aetWatch__name.contentTitle {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: var(--aet-sp-10, 10px);
	margin: 0;
	overflow-wrap: anywhere;
}
.aetWatch__title {
	color: var(--aet-heading);
	font-size: 1rem;
	margin: var(--aet-sp-6, 6px) 0 0;
	overflow-wrap: anywhere;
}
.aetWatch__meta {
	color: var(--aet-muted);
	display: flex;
	flex-wrap: wrap;
	font-size: 0.9rem;
	gap: var(--aet-sp-6, 6px) var(--aet-sp-16, 16px);
	margin: var(--aet-sp-4, 4px) 0 0;
}
.aetWatch__meta > span:first-child:not(:only-child) {
	color: var(--aet-amber);
	font-weight: 600;
}
.aetWatch__meta fa-icon {
	color: var(--aet-red);
}
.aetWatch__actions {
	display: flex;
	flex-wrap: wrap;
	gap: var(--aet-sp-10, 10px);
}
.aetWatch__actions .button {
	align-items: center;
	display: inline-flex;
	gap: 6px;
}
.aetWatch__subscribe[aria-pressed="true"] {
	box-shadow: inset 0 0 0 1px rgba(var(--aet-amber-rgb), 0.55);
	color: var(--aet-amber);
}

.aetWatch__back {
	margin: 0 0 var(--aet-sp-14, 14px);
}
#content .aetWatch__back a {
	align-items: center;
	color: var(--aet-muted);
	display: inline-flex;
	font-size: 0.9rem;
	gap: 6px;
	text-decoration: none;
}
#content .aetWatch__back a:hover,
#content .aetWatch__back a:focus-visible {
	color: var(--aet-amber);
}

.aetWatch {
	display: grid;
	gap: var(--aet-sp-16, 16px);
	grid-template-columns: minmax(0, 1fr);
}
.aetWatch__player,
.aetWatch__chat {
	background: #0e0e10;
	border: 1px solid var(--aet-border);
	border-radius: var(--aet-radius);
	box-shadow: var(--aet-shadow);
	overflow: hidden;
}
.aetWatch__player {
	aspect-ratio: 16 / 9;
}
.aetWatch__chat {
	height: 520px;
}
.aetWatch iframe {
	border: 0;
	display: block;
	height: 100%;
	width: 100%;
}
/* side by side from tablet width: the chat as tall as the 16:9 player */
@media (min-width: 1025px) {
	.aetWatch {
		align-items: stretch;
		grid-template-columns: minmax(0, 1fr) 340px;
	}
	.aetWatch__chat {
		height: auto;
		min-height: 0;
	}
}
/* phones: the style's breadcrumb is already a back link to the grid */
@media (max-width: 768px) {
	.aetWatch__back {
		display: none;
	}
}
@media (max-width: 544px) {
	.aetWatch__who {
		flex-basis: 180px;
	}
	.aetWatch__avatar {
		font-size: 1.2rem;
		height: 52px;
		width: 52px;
	}
	.aetWatch__actions {
		width: 100%;
	}
	.aetWatch__actions .button {
		flex: 1 1 auto;
		justify-content: center;
	}
	.aetWatch__chat {
		height: 440px;
	}
}
.aetWatch__note {
	color: var(--aet-muted);
	font-size: 0.9rem;
	margin: var(--aet-sp-12, 12px) 0 0;
}
.aetWatch__about {
	margin-top: var(--aet-sp-24, 24px);
}
.aetWatch__about p {
	color: var(--aet-text);
	overflow-wrap: anywhere;
	white-space: pre-line;
}

/* 1.1.3: the platform of a YouTube channel (our YouTube platform) next to its name */
.aetStreamPlatform {
	display: inline-block;
	margin-left: 4px;
	padding: 0 6px;
	border: 1px solid currentColor;
	border-radius: 4px;
	font-size: 0.7em;
	font-weight: 600;
	letter-spacing: .03em;
	opacity: .8;
	vertical-align: middle;
}

/* 1.3.0: a YouTube entry whose owner has not verified the channel with Google sign-in (staff only) */
.aetStreamPlatform--unverified {
	color: #e8a33a;
	opacity: 1;
}
.aetYoutubeVerifyNotice .button,
.aetTwitchVerifyNotice .button,
.aetKickVerifyNotice .button {
	margin-left: 8px;
}

/* 1.3.3: the languages a partner streams in (flags of the site's language switcher) */
.aetStreamCard__langs {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	margin: 2px 0;
}
.aetStreamCard__langs img {
	border-radius: 2px;
	display: block;
}

/* 1.3.5: the platform tag of a Kick channel in Kick's green */
.aetStreamPlatform--kick {
	color: #53fc18;
}
.aetKickIcon {
	vertical-align: -0.125em;
}
