/**
 * Food26 Video Gallery
 *
 * Contents
 * 1. Grid (variables) and filter tabs
 * 2. Card, poster, play button, duration, Members flag
 * 3. Title, views and date
 * 4. Featured layout and playlist rows (also the list layout)
 * 5. Smaller screens, reduced motion
 * 6. Page numbers and nothing found (This archive's videos)
 *
 * Colours read the Food26 Design Scheme (--inoforest-color-*, --inoforest-custom-*) with the design's values as
 * fallbacks. The design's gallery sits on a dark section: its title and meta colours are set in the Style tab. Rules
 * use two or three classes; the Style tab's controls one more (or set the variables).
 */

/* 1. Grid ------------------------------------------------------------------------- */
.food26-video-gallery {
	--food26-vg-columns: 3;
	--food26-vg-gap: 24px;
	--food26-vg-radius: 16px;
	--food26-vg-primary: var(--inoforest-color-primary, #b23a1e);
	--food26-vg-dark: var(--inoforest-custom-dark, #22150f);
	--food26-vg-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

.food26-video-gallery .food26-video-gallery__list {
	display: grid;
	grid-template-columns: repeat(var(--food26-vg-columns), minmax(0, 1fr));
	gap: var(--food26-vg-gap);
	margin: 0;
	padding: 0;
	list-style: none;
}

.food26-video-gallery__item {
	min-width: 0;
	margin: 0;
}

.food26-video-gallery__filters {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 36px;
}

.food26-video-gallery .food26-video-gallery__filter {
	min-height: 44px;
	padding: 8px 20px;
	font-family: inherit;
	font-size: 0.925rem;
	font-weight: 600;
	line-height: 1.7;
	color: var(--inoforest-color-heading, #2b1a12);
	text-transform: none;
	background-color: #fff;
	border: 1px solid var(--inoforest-color-border, #ece2d6);
	border-radius: 999px;
	cursor: pointer;
	transition: background-color 0.3s var(--food26-vg-ease), color 0.3s var(--food26-vg-ease), border-color 0.3s var(--food26-vg-ease);
}

.food26-video-gallery .food26-video-gallery__filter:hover,
.food26-video-gallery .food26-video-gallery__filter:focus-visible {
	color: var(--inoforest-color-heading, #2b1a12);
	background-color: #fff;
	border-color: var(--food26-vg-primary);
}

.food26-video-gallery .food26-video-gallery__filter.is-active {
	color: #fff;
	background-color: var(--food26-vg-primary);
	border-color: var(--food26-vg-primary);
}

.food26-video-gallery .food26-video-gallery__item.is-hidden {
	display: none;
}

/* 2. Card, poster, play button, duration, Members flag --------------------------------- */
.food26-video-gallery .food26-video-card {
	display: block;
	height: 100%;
	color: inherit;
	text-decoration: none;
}

.food26-video-gallery .food26-video-card__thumb {
	position: relative;
	display: block;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background-color: var(--inoforest-custom-warm, #f3e9dc);
	border-radius: var(--food26-vg-radius);
}

.food26-video-gallery .food26-video-card__thumb img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	transition: transform 0.6s var(--food26-vg-ease);
}

.food26-video-gallery .food26-video-card__thumb::after {
	content: "";
	position: absolute;
	inset: 0;
	background: color-mix(in srgb, var(--food26-vg-dark) 22%, transparent);
}

.food26-video-gallery .food26-video-card__placeholder {
	display: block;
	height: 100%;
	background-color: var(--inoforest-custom-primary-light, #fbeae4);
}

.food26-video-gallery .food26-video-card__play {
	position: absolute;
	inset: 0;
	z-index: 1;
	display: grid;
	place-items: center;
	width: 58px;
	height: 58px;
	margin: auto;
	font-size: 26px;
	line-height: 1;
	color: #fff;
	background-color: var(--food26-vg-primary);
	border-radius: 50%;
	box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.22);
	transition: scale 0.3s var(--food26-vg-ease);
}

.food26-video-card__play svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
}

.food26-video-gallery .food26-video-card__duration {
	position: absolute;
	inset-block-end: 12px;
	inset-inline-end: 12px;
	z-index: 1;
	padding: 3px 9px;
	font-size: 0.78rem;
	font-weight: 700;
	line-height: 1.7;
	color: #fff;
	background-color: color-mix(in srgb, var(--food26-vg-dark) 82%, transparent);
	border-radius: 6px;
}

.food26-video-gallery .food26-video-card__members {
	position: absolute;
	inset-block-end: 12px;
	inset-inline-start: 12px;
	z-index: 1;
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 4px 11px;
	font-size: 0.75rem;
	font-weight: 700;
	line-height: 1.4;
	color: #fff;
	background-color: var(--food26-vg-dark);
	border-radius: 999px;
}

.food26-video-card__members svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
}

/* 3. Title, views and date -------------------------------------------------------------- */
.food26-video-gallery .food26-video-card__body {
	display: block;
	padding-top: 14px;
}

.food26-video-gallery .food26-video-card__title {
	margin: 0 0 6px;
	font-size: 1.15rem;
	color: var(--inoforest-color-heading, #2b1a12);
	transition: color 0.3s var(--food26-vg-ease);
}

.food26-video-gallery .food26-video-card:hover .food26-video-card__title,
.food26-video-gallery .food26-video-card:focus-visible .food26-video-card__title {
	color: var(--food26-vg-primary);
}

.food26-video-gallery .food26-video-card__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 16px;
	margin: 0;
	padding: 0;
	font-size: 0.825rem;
	color: var(--inoforest-custom-muted, #6e5f55);
	list-style: none;
}

.food26-video-card__meta-item {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 0;
}

.food26-video-gallery .food26-video-card__meta-icon {
	display: inline-flex;
	font-size: 1rem;
	color: var(--food26-vg-primary);
}

.food26-video-card__meta-icon svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
}

.food26-video-gallery .food26-video-card:hover .food26-video-card__thumb img,
.food26-video-gallery .food26-video-card:focus-visible .food26-video-card__thumb img {
	transform: scale(1.05);
}

.food26-video-gallery .food26-video-card:hover .food26-video-card__play,
.food26-video-gallery .food26-video-card:focus-visible .food26-video-card__play {
	scale: 1.08;
}

/* 4. Featured layout and playlist rows ----------------------------------------------------- */
.food26-video-gallery[data-layout="featured"] .food26-video-gallery__list {
	grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
	align-items: start;
}

.food26-video-gallery[data-layout="featured"] .food26-video-gallery__item:first-child {
	grid-row: span var(--food26-vg-rows, 4);
}

.food26-video-gallery[data-layout="featured"] .food26-video-gallery__item:first-child .food26-video-card__play {
	width: 84px;
	height: 84px;
	font-size: 36px;
}

.food26-video-gallery[data-layout="featured"] .food26-video-gallery__item:first-child .food26-video-card__title {
	font-size: clamp(1.4rem, 2.4vw, 1.9rem);
}

.food26-video-gallery[data-layout="featured"] .food26-video-gallery__item:not(:first-child) .food26-video-card,
.food26-video-gallery[data-layout="list"] .food26-video-card {
	display: grid;
	grid-template-columns: clamp(120px, 30%, 320px) minmax(0, 1fr);
	align-items: center;
	gap: 16px;
}

.food26-video-gallery[data-layout="featured"] .food26-video-gallery__item:not(:first-child) .food26-video-card__body,
.food26-video-gallery[data-layout="list"] .food26-video-card__body {
	padding: 0;
}

.food26-video-gallery[data-layout="featured"] .food26-video-gallery__item:not(:first-child) .food26-video-card__title,
.food26-video-gallery[data-layout="list"] .food26-video-card__title {
	font-size: 1.02rem;
}

.food26-video-gallery[data-layout="featured"] .food26-video-gallery__item:not(:first-child) .food26-video-card__play,
.food26-video-gallery[data-layout="list"] .food26-video-card__play {
	width: 38px;
	height: 38px;
	font-size: 18px;
	box-shadow: none;
}

.food26-video-gallery[data-layout="list"] {
	--food26-vg-gap: 18px;
}

.food26-video-gallery[data-layout="list"] .food26-video-gallery__list {
	grid-template-columns: minmax(0, 1fr);
}

.food26-video-gallery[data-layout="list"] .food26-video-card__duration {
	inset-block-end: 6px;
	inset-inline-end: 6px;
	padding: 1px 6px;
	font-size: 0.7rem;
}

/* 5. Smaller screens, reduced motion ----------------------------------------------------------- */
@media (max-width: 991px) {
	.food26-video-gallery[data-layout="featured"] .food26-video-gallery__list {
		grid-template-columns: minmax(0, 1fr);
	}

	.food26-video-gallery[data-layout="featured"] .food26-video-gallery__item:first-child {
		grid-row: auto;
	}
}

@media (max-width: 767px) {
	.food26-video-gallery[data-layout="featured"] .food26-video-gallery__item:not(:first-child) .food26-video-card,
	.food26-video-gallery[data-layout="list"] .food26-video-card {
		grid-template-columns: 120px minmax(0, 1fr);
		gap: 12px;
	}

	/* Two cards a row on phones (1.2.0): a smaller play button and length, the views alone. */
	.food26-video-gallery[data-layout="grid"][data-columns-mobile="2"] .food26-video-card__play {
		width: 38px;
		height: 38px;
		font-size: 18px;
		box-shadow: none;
	}

	.food26-video-gallery[data-layout="grid"][data-columns-mobile="2"] .food26-video-card__duration {
		inset-block-end: 6px;
		inset-inline-end: 6px;
		padding: 1px 6px;
		font-size: 0.7rem;
	}

	.food26-video-gallery[data-layout="grid"][data-columns-mobile="2"] .food26-video-card__body {
		padding-top: 10px;
	}

	.food26-video-gallery[data-layout="grid"][data-columns-mobile="2"] .food26-video-card__title {
		font-size: 0.95rem;
		line-height: 1.3;
	}

	.food26-video-gallery[data-layout="grid"][data-columns-mobile="2"] .food26-video-card__meta {
		font-size: 0.8rem;
	}

	.food26-video-gallery[data-layout="grid"][data-columns-mobile="2"] .food26-video-card__meta-item:nth-child(n+2) {
		display: none;
	}

	.food26-video-gallery[data-layout="grid"][data-columns-mobile="2"] .food26-video-card__members {
		inset-block-end: 6px;
		inset-inline-start: 6px;
		padding: 2px 8px;
		font-size: 0.68rem;
	}
}

.food26-video-gallery__empty,
.food26-video-gallery__hint {
	margin: 0;
}

@media (prefers-reduced-motion: reduce) {
	.food26-video-gallery .food26-video-gallery__filter,
	.food26-video-gallery .food26-video-card__thumb img,
	.food26-video-gallery .food26-video-card__play,
	.food26-video-gallery .food26-video-card__title {
		transition: none;
	}
}

/* 6. Page numbers and nothing found (This archive's videos) --------------------------------------- */
.food26-video-gallery {
	--food26-vg-heading: var(--inoforest-color-heading, #2b1a12);
	--food26-vg-border: var(--inoforest-color-border, #ece2d6);
}

.food26-video-gallery .food26-video-gallery__pagination {
	margin-top: 50px;
}

.food26-video-gallery__pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
}

.food26-video-gallery__pagination .page-numbers {
	display: grid;
	place-items: center;
	min-width: 48px;
	height: 48px;
	padding: 0 12px;
	font-weight: 700;
	text-decoration: none;
	color: var(--food26-vg-heading);
	background-color: #fff;
	border: 1px solid var(--food26-vg-border);
	border-radius: 999px;
	transition: color 0.3s var(--food26-vg-ease), border-color 0.3s var(--food26-vg-ease);
}

.food26-video-gallery__pagination a.page-numbers:hover,
.food26-video-gallery__pagination a.page-numbers:focus-visible {
	color: var(--food26-vg-primary);
	border-color: var(--food26-vg-primary);
}

.food26-video-gallery__pagination .page-numbers.current {
	color: #fff;
	background-color: var(--food26-vg-primary);
	border-color: var(--food26-vg-primary);
}

.food26-video-gallery__pagination .page-numbers.dots {
	background: none;
	border: 0;
}

.food26-video-gallery__pagination svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
}

[dir="rtl"] .food26-video-gallery__pagination :is(.prev, .next) :is(i, svg) {
	scale: -1 1;
}

.food26-video-gallery .food26-video-gallery__nothing {
	padding: 56px 36px;
	text-align: center;
	background-color: var(--inoforest-color-surface, #faf4ec);
	border: 1px dashed var(--food26-vg-border);
	border-radius: 26px;
}

.food26-video-gallery .food26-video-gallery__nothing-icon {
	display: inline-grid;
	place-items: center;
	width: 84px;
	height: 84px;
	margin-bottom: 22px;
	font-size: 36px;
	color: var(--food26-vg-primary);
	background-color: #fff;
	border-radius: 50%;
	box-shadow: 0 6px 20px rgba(43, 26, 18, 0.08);
}

.food26-video-gallery__nothing-icon svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
}

.food26-video-gallery .food26-video-gallery__nothing-title {
	margin: 0 0 0.55em;
}

.food26-video-gallery .food26-video-gallery__nothing-text {
	max-width: 480px;
	margin: 0 auto 1.2em;
}

.food26-video-gallery__nothing-actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 14px;
	margin-top: 24px;
}

.food26-video-gallery .food26-video-gallery__nothing-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 54px;
	padding: 14px 30px;
	font-size: 0.975rem;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
	color: #fff;
	background-color: var(--food26-vg-primary);
	border: 2px solid var(--food26-vg-primary);
	border-radius: 999px;
	transition: background-color 0.3s var(--food26-vg-ease), border-color 0.3s var(--food26-vg-ease), color 0.3s var(--food26-vg-ease);
}

.food26-video-gallery .food26-video-gallery__nothing-button:hover,
.food26-video-gallery .food26-video-gallery__nothing-button:focus-visible {
	color: #fff;
	background-color: var(--inoforest-custom-primary-dark, #8e2c15);
	border-color: var(--inoforest-custom-primary-dark, #8e2c15);
}

.food26-video-gallery .food26-video-gallery__nothing-button--outline {
	color: var(--food26-vg-heading);
	background-color: transparent;
	border-color: var(--food26-vg-border);
}

.food26-video-gallery__nothing-button svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
}
