/* Vigilante PeerTube Gallery */

.vpg {
	--vpg-accent: #bb872f;
	--vpg-radius: 6px;
	--vpg-display: "Pathway Gothic One", "Oswald", "Arial Narrow", sans-serif;
	margin: 0 0 2em;
}

.vpg__grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
	gap: 28px 22px;
}

.vpg__item {
	margin: 0;
	padding: 0;
	min-width: 0;
}

.vpg__card {
	display: flex;
	flex-direction: column;
	gap: 8px;
	color: inherit;
	text-decoration: none !important;
	border: 0;
	box-shadow: none;
	outline-offset: 4px;
	border-radius: var(--vpg-radius);
}

.vpg__card:focus-visible {
	outline: 2px solid var(--vpg-accent);
}

.vpg__thumb {
	position: relative;
	display: block;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	border-radius: var(--vpg-radius);
	background: #151515;
}

.vpg__thumb img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	margin: 0;
	object-fit: cover;
	transition: transform .35s ease, filter .35s ease;
}

.vpg__card:hover .vpg__thumb img,
.vpg__card:focus-visible .vpg__thumb img {
	transform: scale(1.04);
	filter: brightness(.8);
}

/* Gold play button, shown on hover / focus. */
.vpg__play {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 58px;
	height: 58px;
	margin: -29px 0 0 -29px;
	border-radius: 50%;
	background: var(--vpg-accent);
	box-shadow: 0 6px 24px rgba(0, 0, 0, .45);
	opacity: 0;
	transform: scale(.85);
	transition: opacity .2s ease, transform .2s ease;
}

.vpg__play::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	margin: -10px 0 0 -6px;
	border-style: solid;
	border-width: 10px 0 10px 17px;
	border-color: transparent transparent transparent #111;
}

.vpg__card:hover .vpg__play,
.vpg__card:focus-visible .vpg__play {
	opacity: 1;
	transform: scale(1);
}

.vpg__badge {
	position: absolute;
	right: 8px;
	bottom: 8px;
	padding: 2px 6px;
	border-radius: 3px;
	background: rgba(0, 0, 0, .8);
	color: #fff;
	font: 600 12px/1.4 ui-monospace, "SF Mono", Menlo, Consolas, monospace;
	letter-spacing: .02em;
}

.vpg__badge--live {
	background: #c62828;
	font-family: inherit;
	text-transform: uppercase;
}

.vpg__title {
	font-family: var(--vpg-display);
	font-size: 21px;
	line-height: 1.2;
	letter-spacing: .01em;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	transition: color .2s ease;
}

.vpg__card:hover .vpg__title {
	color: var(--vpg-accent);
}

.vpg__date {
	margin-top: -4px;
	font-size: 14px;
	opacity: .65;
}

.vpg__more-wrap {
	margin-top: 32px;
	text-align: center;
}

.vpg__more {
	padding: 12px 28px;
	border: 2px solid var(--vpg-accent);
	border-radius: 999px;
	background: transparent;
	color: inherit;
	font-family: var(--vpg-display);
	font-size: 19px;
	line-height: 1.2;
	letter-spacing: .04em;
	text-transform: uppercase;
	cursor: pointer;
	transition: background .2s ease, color .2s ease;
}

.vpg__more:hover:not(:disabled),
.vpg__more:focus-visible {
	background: var(--vpg-accent);
	color: #111;
}

.vpg__more:disabled {
	opacity: .6;
	cursor: wait;
}

/* ------------------------------------------------------------ player popup */

html.vpg-locked {
	overflow: hidden;
}

.vpg-modal {
	width: min(1100px, calc(100vw - 32px));
	max-width: none;
	max-height: calc(100vh - 32px);
	padding: 0;
	border: 0;
	background: transparent;
	color: #f4f1ea;
	overflow: visible;
}

.vpg-modal::backdrop {
	background: rgba(0, 0, 0, .88);
}

.vpg-modal__box {
	position: relative;
}

.vpg-modal__frame {
	position: relative;
	aspect-ratio: 16 / 9;
	max-height: calc(100vh - 110px);
	margin: 0 auto;
	background: #000;
	border-radius: 6px;
	overflow: hidden;
	box-shadow: 0 20px 60px rgba(0, 0, 0, .6);
}

.vpg-modal__frame iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.vpg-modal__meta {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	padding: 12px 2px 0;
}

.vpg-modal__title {
	font-family: "Pathway Gothic One", "Oswald", "Arial Narrow", sans-serif;
	font-size: 24px;
	line-height: 1.2;
}

.vpg-modal__link {
	flex-shrink: 0;
	color: #bb872f !important;
	font-size: 15px;
	white-space: nowrap;
}

.vpg-modal__close {
	position: absolute;
	top: -44px;
	right: -4px;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0 !important;
	box-shadow: none !important;
	background: transparent !important;
	color: #fff !important;
	font-size: 34px;
	line-height: 40px;
	cursor: pointer;
	opacity: .8;
}

.vpg-modal__close:hover,
.vpg-modal__close:focus-visible {
	opacity: 1;
	color: #bb872f !important;
}

@media (max-width: 600px) {
	.vpg__grid {
		gap: 22px;
	}

	.vpg-modal__meta {
		flex-direction: column;
		gap: 4px;
	}

	.vpg-modal__close {
		top: -42px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.vpg__thumb img,
	.vpg__play,
	.vpg__title {
		transition: none;
	}

	.vpg__card:hover .vpg__thumb img {
		transform: none;
	}
}

/* ==================================================================== showcase
 * [peertube_showcase] — streaming-style page: featured video, rows, library.
 */

/* Dark, full-width page (body class added by the plugin). */
body.vpg-dark,
body.vpg-dark .fl-page,
body.vpg-dark .fl-page-content {
	background: #0a0a0a !important;
}

body.vpg-dark .fl-post-header {
	display: none;
}

body.vpg-dark .fl-content-full.container {
	width: 100%;
	max-width: none;
	padding: 0;
}

body.vpg-dark .fl-content-full > .row {
	margin: 0;
}

body.vpg-dark .fl-content-full .fl-content,
body.vpg-dark .fl-content-full .fl-post,
body.vpg-dark .fl-content-full .fl-post-content {
	margin: 0;
	padding: 0;
}

.vpg-showcase {
	--vpg-gutter: clamp(16px, 4vw, 60px);
	--vpg-gap: 8px;
	--vpg-n: 5;
	--vpg-ink: #0a0a0a;
	--vpg-text: #f2f0eb;
	--vpg-dim: #a3a09a;
	--vpg-accent: #bb872f;
	--vpg-display: "Pathway Gothic One", "Oswald", "Arial Narrow", sans-serif;
	position: relative;
	overflow: hidden;
	background: var(--vpg-ink);
	color: var(--vpg-text);
	font-size: 16px;
	line-height: 1.45;
	padding-bottom: 64px;
}

.vpg-showcase h2,
.vpg-showcase p {
	margin: 0;
	color: inherit;
}

/* ------------------------------------------------------------ featured video */

.vpg-hero {
	position: relative;
	display: flex;
	align-items: flex-end;
	min-height: clamp(460px, 46vw, 760px);
	padding: 0 var(--vpg-gutter) clamp(96px, 9vw, 150px);
	isolation: isolate;
}

.vpg-hero__art {
	position: absolute;
	inset: 0 0 0 auto;
	width: min(100%, 78%);
	z-index: -1;
}

.vpg-hero__art img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	object-position: center 30%;
}

/* Fade the artwork into the page on the left and at the bottom. */
.vpg-hero__art::before,
.vpg-hero__art::after {
	content: "";
	position: absolute;
	inset: 0;
}

.vpg-hero__art::before {
	background: linear-gradient(90deg, var(--vpg-ink) 0%, rgba(10, 10, 10, .85) 18%, rgba(10, 10, 10, .25) 55%, rgba(10, 10, 10, 0) 75%);
}

.vpg-hero__art::after {
	background: linear-gradient(0deg, var(--vpg-ink) 0%, rgba(10, 10, 10, .6) 22%, rgba(10, 10, 10, 0) 50%),
		linear-gradient(180deg, rgba(10, 10, 10, .55) 0%, rgba(10, 10, 10, 0) 22%);
}

.vpg-hero__body {
	max-width: 620px;
}

.vpg-hero__eyebrow {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 14px !important;
	color: var(--vpg-dim) !important;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .18em;
	text-transform: uppercase;
}

.vpg-hero__new {
	padding: 3px 8px 2px;
	border-radius: 3px;
	background: var(--vpg-accent);
	color: #111;
	letter-spacing: .12em;
}

.vpg-hero__title {
	font-family: var(--vpg-display) !important;
	font-size: clamp(40px, 4.6vw, 72px) !important;
	font-weight: 400 !important;
	line-height: 1.02 !important;
	letter-spacing: .005em;
	text-shadow: 0 2px 24px rgba(0, 0, 0, .5);
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.vpg-hero__meta {
	margin-top: 14px !important;
	color: var(--vpg-dim) !important;
	font-size: 15px;
	white-space: pre;
}

.vpg-hero__desc {
	margin-top: 12px !important;
	font-size: 17px;
	line-height: 1.5;
	color: #dcd9d3 !important;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.vpg-hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 26px;
}

.vpg-showcase .vpg-btn {
	display: inline-flex;
	flex-direction: row;
	align-items: center;
	gap: 10px;
	padding: 12px 26px 12px 22px;
	border: 0;
	border-radius: 4px;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none !important;
	box-shadow: none;
	transition: background .15s ease, transform .15s ease;
}

.vpg-showcase .vpg-btn--play {
	background: #fff;
	color: #111 !important;
}

.vpg-showcase .vpg-btn--play:hover,
.vpg-showcase .vpg-btn--play:focus-visible {
	background: rgba(255, 255, 255, .78);
}

.vpg-btn__icon {
	width: 0;
	height: 0;
	border-style: solid;
	border-width: 10px 0 10px 16px;
	border-color: transparent transparent transparent currentColor;
}

.vpg-showcase .vpg-btn--ghost {
	padding-left: 24px;
	background: rgba(109, 109, 110, .55);
	color: #fff !important;
	font-weight: 600;
}

.vpg-showcase .vpg-btn--ghost:hover,
.vpg-showcase .vpg-btn--ghost:focus-visible {
	background: rgba(109, 109, 110, .35);
}

.vpg-showcase .vpg-btn:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 3px;
}

/* ------------------------------------------------------------ rows */

.vpg-rows {
	position: relative;
	z-index: 1;
	margin-top: clamp(-90px, -6vw, -40px);
}

.vpg-row {
	position: relative;
	margin-bottom: clamp(28px, 3vw, 44px);
}

.vpg-showcase .vpg-row__title {
	display: flex;
	align-items: baseline;
	gap: 14px;
	padding: 0 var(--vpg-gutter);
	margin-bottom: 4px !important;
	font-family: var(--vpg-display) !important;
	font-size: clamp(22px, 1.9vw, 30px) !important;
	font-weight: 400 !important;
	line-height: 1.2 !important;
	letter-spacing: .02em;
	color: var(--vpg-text) !important;
}

.vpg-row__all {
	color: var(--vpg-accent) !important;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: .02em;
	text-decoration: none !important;
	opacity: 0;
	transform: translateX(-6px);
	transition: opacity .2s ease, transform .2s ease;
}

.vpg-row:hover .vpg-row__all,
.vpg-row__all:focus-visible {
	opacity: 1;
	transform: none;
}

.vpg-row__viewport {
	position: relative;
}

.vpg-showcase .vpg-row__track {
	list-style: none;
	margin: 0 !important;
	display: flex;
	gap: var(--vpg-gap);
	/* Room above/below so hovered tiles can grow without being clipped. */
	padding: 14px var(--vpg-gutter) 22px;
	overflow-x: auto;
	overflow-y: hidden;
	scroll-snap-type: x proximity;
	scroll-padding-inline: var(--vpg-gutter);
	scrollbar-width: none;
	overscroll-behavior-x: contain;
}

.vpg-row__track::-webkit-scrollbar {
	display: none;
}

.vpg-row__item {
	position: relative;
	flex: 0 0 calc((100% - (var(--vpg-n) - 1) * var(--vpg-gap)) / var(--vpg-n));
	margin: 0;
	padding: 0;
	min-width: 0;
	scroll-snap-align: start;
}

.vpg-tile {
	position: relative;
	display: block;
	color: inherit !important;
	text-decoration: none !important;
	border: 0;
	box-shadow: none;
	border-radius: 4px;
	transition: transform .25s cubic-bezier(.2, .7, .3, 1), box-shadow .25s ease;
}

.vpg-showcase .vpg-tile .vpg__thumb {
	border-radius: 4px;
	background: #1c1c1c;
}

.vpg-tile .vpg__thumb img {
	transition: none;
}

.vpg-tile__info {
	position: absolute;
	inset: auto 0 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: 40px 12px 10px;
	border-radius: 0 0 4px 4px;
	background: linear-gradient(0deg, rgba(0, 0, 0, .95) 0%, rgba(0, 0, 0, .75) 55%, rgba(0, 0, 0, 0) 100%);
	opacity: 0;
	transition: opacity .2s ease;
	pointer-events: none;
}

.vpg-tile__title {
	font-family: var(--vpg-display);
	font-size: 18px;
	line-height: 1.15;
	color: #fff;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.vpg-tile__meta {
	font-size: 12px;
	color: #c9c6c0;
}

@media (hover: hover) {
	.vpg-tile:hover,
	.vpg-tile:focus-visible {
		z-index: 3;
		transform: scale(1.12);
		box-shadow: 0 14px 34px rgba(0, 0, 0, .7);
	}

	/* Edge tiles grow inward so they stay on screen. */
	.vpg-row__item:first-child .vpg-tile {
		transform-origin: left center;
	}

	.vpg-row__item:last-child .vpg-tile {
		transform-origin: right center;
	}

	.vpg-tile:hover .vpg-tile__info,
	.vpg-tile:focus-visible .vpg-tile__info {
		opacity: 1;
	}

	.vpg-tile:hover .vpg__badge,
	.vpg-tile:focus-visible .vpg__badge {
		opacity: 0;
	}
}

.vpg-tile:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

.vpg-row__item:hover {
	z-index: 3;
}

/* Touch screens: no hover, so show the title under each tile. */
@media (hover: none) {
	.vpg-tile__info {
		position: static;
		padding: 8px 2px 0;
		background: none;
		opacity: 1;
	}

	.vpg-tile__title {
		font-size: 16px;
		color: #e6e3de;
	}

	.vpg-tile__meta {
		color: var(--vpg-dim);
	}
}

/* Arrows */
.vpg-row__nav {
	position: absolute;
	top: 14px;
	bottom: 22px;
	z-index: 4;
	width: var(--vpg-gutter);
	min-width: 36px;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: rgba(10, 10, 10, .55) !important;
	box-shadow: none !important;
	color: #fff !important;
	font-size: 46px !important;
	line-height: 1 !important;
	cursor: pointer;
	opacity: 0;
	transition: opacity .2s ease, background .2s ease;
}

.vpg-row__nav[hidden] {
	display: none;
}

.vpg-row__nav--prev {
	left: 0;
}

.vpg-row__nav--next {
	right: 0;
}

.vpg-row__nav span {
	display: inline-block;
	transition: transform .15s ease;
}

.vpg-row:hover .vpg-row__nav,
.vpg-row__nav:focus-visible {
	opacity: 1;
}

.vpg-row__nav:hover {
	background: rgba(10, 10, 10, .8) !important;
}

.vpg-row__nav:hover span {
	transform: scale(1.25);
}

@media (hover: none) {
	.vpg-row__nav {
		display: none;
	}
}

/* Touch: titles sit under the tiles, so line the numbers up with the thumbnail. */
@media (hover: none) {
	.vpg-row--ranked .vpg-row__item--ranked {
		align-items: flex-start;
	}

	.vpg-row--ranked .vpg-row__item--ranked .vpg-rank {
		margin-top: 2cqw;
		margin-bottom: 0;
	}
}

/* ------------------------------------------------------------ Top 10 */

.vpg-row--ranked {
	--vpg-n: 4;
}

.vpg-row__item--ranked {
	display: flex;
	align-items: flex-end;
	container-type: inline-size;
}

.vpg-rank {
	flex: 0 0 34%;
	margin-right: -7%;
	font-family: "Arial Black", "Helvetica Neue", Arial, sans-serif;
	font-weight: 900;
	font-size: 50cqw;
	line-height: .72;
	margin-bottom: .055em;
	letter-spacing: -.09em;
	text-align: right;
	color: var(--vpg-ink);
	-webkit-text-stroke: 3px #5f5c57;
	paint-order: stroke fill;
	user-select: none;
	transition: -webkit-text-stroke-color .2s ease;
}

.vpg-row__item--ranked:hover .vpg-rank {
	-webkit-text-stroke-color: var(--vpg-accent);
}

.vpg-row__item--ranked .vpg-tile {
	flex: 1 1 auto;
	min-width: 0;
}

/* ------------------------------------------------------------ library grid */

.vpg-library {
	padding: 24px var(--vpg-gutter) 0;
}

.vpg-library .vpg-row__title {
	padding: 0;
	margin-bottom: 22px !important;
}

.vpg-library__count {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-size: 14px;
	letter-spacing: .02em;
	color: var(--vpg-dim);
}

.vpg-showcase .vpg__grid {
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
	gap: 26px 10px;
}

.vpg-showcase .vpg__thumb {
	border-radius: 4px;
}

.vpg-showcase .vpg__title {
	font-size: 19px;
	color: #e6e3de;
}

.vpg-showcase .vpg__date {
	color: var(--vpg-dim);
	opacity: 1;
}

.vpg-showcase .vpg__more {
	border-color: rgba(255, 255, 255, .35);
	color: #fff;
}

.vpg-showcase .vpg__more:hover:not(:disabled) {
	border-color: var(--vpg-accent);
}

/* ------------------------------------------------------------ breakpoints */

@media (min-width: 1600px) {
	.vpg-showcase { --vpg-n: 6; }
	.vpg-row--ranked { --vpg-n: 5; }
}

@media (max-width: 1199px) {
	.vpg-showcase { --vpg-n: 4; }
	.vpg-row--ranked { --vpg-n: 3; }
}

@media (max-width: 899px) {
	.vpg-showcase { --vpg-n: 3; }
	.vpg-row--ranked { --vpg-n: 2.3; }

	.vpg-hero {
		min-height: 0;
		flex-direction: column;
		align-items: stretch;
		padding-top: 0;
		padding-bottom: 56px;
	}

	/* Artwork on top, full width, text underneath. */
	.vpg-hero__art {
		position: relative;
		inset: auto;
		width: auto;
		margin: 0 calc(-1 * var(--vpg-gutter)) -64px;
		aspect-ratio: 16 / 9;
	}

	.vpg-hero__art::before {
		background: none;
	}

	.vpg-hero__art::after {
		background: linear-gradient(0deg, var(--vpg-ink) 0%, rgba(10, 10, 10, .4) 35%, rgba(10, 10, 10, 0) 65%);
	}

	.vpg-rows {
		margin-top: 0;
	}
}

@media (max-width: 599px) {
	.vpg-showcase { --vpg-n: 1.7; --vpg-gap: 10px; }
	.vpg-row--ranked { --vpg-n: 1.5; }

	.vpg-hero__title {
		font-size: 38px !important;
	}

	.vpg-hero__desc {
		font-size: 15px;
	}

	.vpg-showcase .vpg-btn {
		flex: 1 1 auto;
		justify-content: center;
		font-size: 16px;
	}

}

@media (prefers-reduced-motion: reduce) {
	.vpg-tile,
	.vpg-row__all,
	.vpg-row__nav span {
		transition: none;
	}

	.vpg-tile:hover,
	.vpg-tile:focus-visible {
		transform: none;
	}
}
