/*
 * Atrophy Live — video grids, page links and the player, following the design's video cards.
 * Colours and fonts come from the site's Elementor variables; the values after each comma are fallbacks.
 */

/* --- Parts of the Members and Atrophy BTW pages that depend on who is looking --- */

body.al-can-watch-members #al-members-gate,
body:not(.al-can-watch-members) #al-members-heading,
body.al-can-watch-btw #al-btw-locked,
body:not(.al-can-watch-btw) #al-btw-heading,
body.logged-in #al-members-gate-login {
	display: none !important;
}

/* A grid with nothing to show (someone who may not watch it) takes no space. */
.elementor-widget-shortcode:has(> .elementor-shortcode:empty) {
	display: none !important;
}

.al-video-count {
	margin: 0 0 40px !important;
	font-family: var(--font-body, Archivo), sans-serif;
	font-size: 14px;
	letter-spacing: 0.02em;
	color: color-mix(in srgb, var(--color-text, #eef3ef) 62%, transparent);
}

.al-video-empty {
	margin: 0;
	font-family: var(--font-body, Archivo), sans-serif;
	font-size: 15px;
	color: color-mix(in srgb, var(--color-text, #eef3ef) 70%, transparent);
}

/* --- Cards --- */

.al-video-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, max(260px, calc((100% - 56px) / 3))), 1fr));
	gap: 28px;
	scroll-margin-top: 96px;
}

.al-video-card,
.al-video-card:visited {
	position: relative;
	display: flex;
	flex-direction: column;
	background: transparent;
	border: 1px solid var(--color-divider, rgba(238, 243, 239, 0.14));
	color: var(--color-text, #eef3ef);
	text-decoration: none !important;
	cursor: pointer;
	transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

.al-video-card:hover,
.al-video-card:focus-visible {
	transform: translateY(-6px);
	border-color: var(--color-accent, #4fd1a1);
	box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
	color: var(--color-text, #eef3ef);
}

.al-video-card:focus-visible {
	outline: 2px solid var(--color-accent, #4fd1a1);
	outline-offset: 2px;
}

.al-video-thumb {
	position: relative;
	display: grid;
	place-items: center;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: repeating-linear-gradient(135deg, #13221c 0 12px, #101d18 12px 24px);
}

.al-video-thumb .al-video-img {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
}

.al-video-play {
	position: relative;
	z-index: 1;
	display: grid;
	place-items: center;
	width: 60px;
	height: 60px;
	background: rgba(7, 13, 11, 0.55);
	border: 1px solid var(--color-text, #eef3ef);
	color: var(--color-text, #eef3ef);
}

.al-video-duration {
	position: absolute;
	z-index: 1;
	right: 10px;
	bottom: 10px;
	padding: 3px 10px;
	background: rgba(7, 13, 11, 0.8);
	color: var(--color-text, #eef3ef);
	font-family: var(--font-body, Archivo), sans-serif;
	font-size: 11px;
	letter-spacing: 0.02em;
	line-height: 1.55;
}

.al-video-caption {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 16px;
}

.al-video-title {
	min-width: 0;
	font-family: var(--font-heading, Archivo), sans-serif;
	font-size: 19px;
	font-weight: 600;
	line-height: 1.25;
	overflow-wrap: anywhere;
}

.al-video-meta {
	display: inline-flex;
	flex-shrink: 0;
	align-items: center;
	gap: 12px;
}

.al-video-kind {
	font-family: var(--font-body, Archivo), sans-serif;
	font-size: 11px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--color-gold, #c8a97e);
}

.al-video-likes {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-family: var(--font-body, Archivo), sans-serif;
	font-size: 12px;
	color: color-mix(in srgb, var(--color-text, #eef3ef) 70%, transparent);
}

/* --- Page links --- */

.al-pagination {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 8px;
	margin-top: 40px;
}

.al-page,
.al-page:visited {
	display: inline-flex;
	justify-content: center;
	align-items: center;
	gap: 6px;
	min-width: 42px;
	padding: 9px 14px;
	border: 1px solid var(--color-divider, rgba(238, 243, 239, 0.14));
	border-radius: 2px;
	color: var(--color-text, #eef3ef);
	font-family: var(--font-heading, Archivo), sans-serif;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.04em;
	line-height: 1.2;
	text-decoration: none !important;
	transition: background-color 0.18s ease, border-color 0.18s ease;
}

a.al-page:hover,
a.al-page:focus-visible {
	background: rgba(238, 243, 239, 0.07);
	border-color: color-mix(in srgb, var(--color-text, #eef3ef) 45%, transparent);
	color: var(--color-text, #eef3ef);
}

.al-page--current {
	background: var(--color-accent, #4fd1a1);
	border-color: var(--color-accent, #4fd1a1);
	color: var(--color-bg, #0b1411);
}

.al-page--gap {
	min-width: 0;
	padding-inline: 4px;
	border-color: transparent;
}

.al-page.is-disabled {
	opacity: 0.3;
}

@media (max-width: 767px) {
	.al-page__word,
	.al-page--near {
		display: none;
	}
}

/* --- Player --- */

.al-modal {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 99999;
	display: flex;
	justify-content: center;
	padding: 24px;
	overflow-y: auto;
	overscroll-behavior: contain;
	/* Darker than the design's 90% so the page behind doesn't show through the comments. */
	background: rgba(6, 10, 14, 0.96);
}

.al-modal[hidden] {
	display: none;
}

/* Centred when it fits, scrolls from the top when the comments make it tall. The video is sized
   so the title, the picture and the like bar fit on a laptop screen together. */
.al-modal__box {
	display: flex;
	flex-direction: column;
	gap: 14px;
	width: min(1080px, 100%, calc((100vh - 220px) * 16 / 9));
	min-width: min(560px, 100%);
	margin: auto 0;
}

.al-modal__bar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
}

.al-modal__title {
	margin: 0;
	font-family: var(--font-heading, Archivo), sans-serif;
	font-size: 24px;
	font-weight: 600;
	line-height: 1.25;
	color: var(--color-text, #eef3ef);
}

/* The theme colours every button, focused ones included, so these hold their ground with !important. */
.al-modal__close,
.al-modal__close:focus {
	flex-shrink: 0;
	padding: 7px 14px !important;
	background: transparent !important;
	border: 1px solid var(--color-divider, rgba(238, 243, 239, 0.14)) !important;
	border-radius: 2px !important;
	box-shadow: none !important;
	color: var(--color-text, #eef3ef) !important;
	font-family: var(--font-heading, Archivo), sans-serif !important;
	font-size: 14px !important;
	font-weight: 700 !important;
	letter-spacing: 0.04em !important;
	line-height: 1.2 !important;
	text-transform: none !important;
	cursor: pointer;
	transition: background-color 0.18s ease;
}

.al-modal__close:hover,
.al-modal__close:focus-visible {
	background: rgba(238, 243, 239, 0.07) !important;
	color: var(--color-text, #eef3ef) !important;
}

.al-modal__close:focus-visible {
	outline: 2px solid var(--color-accent, #4fd1a1);
	outline-offset: 2px;
}

.al-modal__frame {
	position: relative;
	aspect-ratio: 16 / 9;
	background: #000;
	border: 1px solid var(--color-divider, rgba(238, 243, 239, 0.14));
}

.al-modal__frame iframe {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.al-modal__message {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	display: grid;
	place-items: center;
	margin: 0;
	padding: 24px;
	text-align: center;
	font-family: var(--font-body, Archivo), sans-serif;
	font-size: 13px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: color-mix(in srgb, var(--color-text, #eef3ef) 55%, transparent);
}

/* The member's username, faint over the picture; it moves between corners every 45 seconds. */
.al-modal__mark {
	position: absolute;
	z-index: 2;
	pointer-events: none;
	user-select: none;
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: 11px;
	letter-spacing: 0.08em;
	color: #ffffff;
	opacity: 0.16;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
	transition: opacity 0.6s ease, top 0.6s ease, left 0.6s ease, right 0.6s ease, bottom 0.6s ease;
}

/* --- Likes and comments under the player --- */

.al-social {
	display: flex;
	flex-direction: column;
	gap: 16px;
	padding-top: 4px;
	color: var(--color-text, #eef3ef);
	font-family: var(--font-body, Archivo), sans-serif;
	font-size: 15px;
	line-height: 1.55;
}

.al-social[hidden] {
	display: none;
}

.al-social__bar {
	display: flex;
	align-items: center;
	gap: 16px;
	flex-wrap: wrap;
}

.al-social__count {
	font-size: 14px;
	color: color-mix(in srgb, var(--color-text, #eef3ef) 62%, transparent);
}

/* The theme colours every button, focused ones included, so these hold their ground with !important. */
.al-like,
.al-like:focus {
	display: inline-flex !important;
	align-items: center !important;
	gap: 8px !important;
	padding: 8px 14px !important;
	background: transparent !important;
	border: 1px solid var(--color-divider, rgba(238, 243, 239, 0.14)) !important;
	border-radius: 2px !important;
	box-shadow: none !important;
	color: var(--color-text, #eef3ef) !important;
	font-family: var(--font-heading, Archivo), sans-serif !important;
	font-size: 14px !important;
	font-weight: 700 !important;
	letter-spacing: 0.04em !important;
	line-height: 1.2 !important;
	text-transform: none !important;
	cursor: pointer;
	transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.al-like:hover,
.al-like:focus-visible {
	background: rgba(238, 243, 239, 0.07) !important;
	border-color: color-mix(in srgb, var(--color-text, #eef3ef) 45%, transparent) !important;
}

.al-like svg path {
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
}

.al-like.is-liked,
.al-like.is-liked:focus {
	background: var(--color-accent-100, #16392c) !important;
	border-color: var(--color-accent, #4fd1a1) !important;
	color: var(--color-accent, #4fd1a1) !important;
}

.al-like.is-liked svg path {
	fill: currentColor;
}

.al-like__count {
	font-weight: 400;
	color: inherit;
	opacity: 0.8;
}

.al-like:disabled {
	opacity: 0.6;
	cursor: default;
}

.al-social__note {
	margin: 0;
	font-size: 14px;
	color: color-mix(in srgb, var(--color-text, #eef3ef) 70%, transparent);
}

.al-social__note[hidden] {
	display: none;
}

.al-social__note a {
	color: var(--color-accent, #4fd1a1) !important;
	text-decoration: underline;
}

.al-comment-form {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin: 0;
}

.al-comment-form__input,
.al-comment-form__input:focus {
	width: 100% !important;
	min-height: 84px;
	margin: 0 !important;
	padding: 10px 12px !important;
	background: var(--color-surface, #14231d) !important;
	border: 1px solid var(--color-divider, rgba(238, 243, 239, 0.14)) !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	color: var(--color-text, #eef3ef) !important;
	caret-color: var(--color-accent, #4fd1a1);
	font-family: var(--font-body, Archivo), sans-serif !important;
	font-size: 15px !important;
	line-height: 1.5 !important;
	resize: vertical;
}

.al-comment-form__input:focus {
	border-color: var(--color-accent, #4fd1a1) !important;
	outline: none;
}

.al-comment-form__input::placeholder {
	color: color-mix(in srgb, var(--color-text, #eef3ef) 50%, transparent);
	opacity: 1;
}

.al-comment-form__row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
}

.al-comment-form__left {
	font-size: 12px;
	letter-spacing: 0.02em;
	color: color-mix(in srgb, var(--color-text, #eef3ef) 55%, transparent);
}

.al-comment-form__post,
.al-comment-form__post:focus {
	padding: 9px 20px !important;
	background: var(--color-accent, #4fd1a1) !important;
	border: 1px solid var(--color-accent, #4fd1a1) !important;
	border-radius: 2px !important;
	box-shadow: none !important;
	color: var(--color-bg, #0b1411) !important;
	font-family: var(--font-heading, Archivo), sans-serif !important;
	font-size: 14px !important;
	font-weight: 700 !important;
	letter-spacing: 0.04em !important;
	line-height: 1.2 !important;
	text-transform: none !important;
	cursor: pointer;
}

.al-comment-form__post:hover,
.al-comment-form__post:focus-visible {
	background: var(--color-accent-600, #7fe0bb) !important;
	border-color: var(--color-accent-600, #7fe0bb) !important;
}

.al-comment-form__post:disabled {
	opacity: 0.6;
	cursor: default;
}

.al-comment-form__error {
	margin: 0;
	padding: 10px 14px;
	background: rgba(255, 180, 168, 0.08);
	border: 1px solid #ffb4a8;
	color: #ffb4a8;
	font-size: 14px;
}

.al-comment-form__error[hidden] {
	display: none;
}

.al-comments {
	margin: 0;
	padding: 0;
	list-style: none;
	border-top: 1px solid var(--color-divider, rgba(238, 243, 239, 0.14));
}

.al-comment {
	margin: 0;
	padding: 14px 0;
	border-bottom: 1px solid var(--color-divider, rgba(238, 243, 239, 0.14));
}

.al-comment__head {
	display: flex;
	align-items: baseline;
	gap: 10px;
	flex-wrap: wrap;
	margin-bottom: 4px;
}

.al-comment__author {
	font-family: var(--font-heading, Archivo), sans-serif;
	font-size: 14px;
	font-weight: 700;
	color: var(--color-text, #eef3ef);
}

.al-comment__when {
	font-size: 12px;
	color: color-mix(in srgb, var(--color-text, #eef3ef) 55%, transparent);
}

.al-comment__text {
	margin: 0;
	font-size: 15px;
	line-height: 1.55;
	white-space: pre-wrap;
	overflow-wrap: anywhere;
	color: color-mix(in srgb, var(--color-text, #eef3ef) 88%, transparent);
}

.al-comments__empty {
	margin: 0;
	font-size: 14px;
	color: color-mix(in srgb, var(--color-text, #eef3ef) 62%, transparent);
}

.al-comments__empty[hidden],
.al-comments__more[hidden] {
	display: none !important;
}

.al-comments__more,
.al-comments__more:focus {
	align-self: center;
	padding: 8px 16px !important;
	background: transparent !important;
	border: 1px solid var(--color-divider, rgba(238, 243, 239, 0.14)) !important;
	border-radius: 2px !important;
	box-shadow: none !important;
	color: var(--color-text, #eef3ef) !important;
	font-family: var(--font-heading, Archivo), sans-serif !important;
	font-size: 14px !important;
	font-weight: 700 !important;
	letter-spacing: 0.04em !important;
	text-transform: none !important;
	cursor: pointer;
}

.al-comments__more:hover {
	background: rgba(238, 243, 239, 0.07) !important;
}

@media (max-width: 767px) {
	.al-modal {
		padding: 12px;
	}

	.al-modal__box {
		min-width: 0;
		width: 100%;
	}

	.al-modal__title {
		font-size: 19px;
	}
}
