/* Interactive gallery. Colours, spacing and radii come from the site's global design variables. */
.fck-gallery {
	width: 100%;
	display: flex;
	flex-direction: column;
	gap: var(--gap-md-16-24);
	text-align: center;
}

.fck-gallery ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.fck-gallery__sr {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
}

.fck-gallery a:focus-visible,
.fck-gallery button:focus-visible {
	outline: 2px solid var(--neon-pink-soft);
	outline-offset: 3px;
}

/* Photos | Videos */
.fck-gallery__tabs {
	display: flex;
	justify-content: center;
	gap: var(--gap-xs-8-12);
}

.fck-gallery a.fck-gallery__tab {
	min-width: 130px;
	padding: 0.7rem 1.5rem;
	border: 1px solid var(--btn-secondary-dark-border);
	border-radius: var(--radius-md-8-12);
	color: var(--text-secondary);
	font-family: var(--font-heading);
	font-size: var(--text-body-16-18);
	font-weight: 700;
	text-decoration: none;
	transition: background-color 0.2s, border-color 0.2s;
}

.fck-gallery a.fck-gallery__tab:hover {
	background-color: var(--btn-secondary-dark-bg-hover);
}

.fck-gallery a.fck-gallery__tab[aria-selected="true"] {
	border-color: var(--accent);
	background-color: var(--accent);
}

/* Venue filters */
.fck-gallery__filters ul {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: var(--gap-xs-8-12);
}

.fck-gallery a.fck-gallery__filter {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0.35rem 1rem;
	border: 1px solid var(--border-dark-hover);
	border-radius: 999px;
	color: var(--text-white-90);
	font-family: var(--font-body);
	font-size: var(--text-small-14-16);
	font-weight: 500;
	text-decoration: none;
	transition: border-color 0.2s, color 0.2s;
}

.fck-gallery a.fck-gallery__filter:hover {
	border-color: var(--neon-pink-soft);
	color: var(--text-secondary);
}

.fck-gallery a.fck-gallery__filter[aria-current="true"] {
	border-color: var(--neon-pink-soft);
	background-color: var(--surface-dark);
	color: var(--neon-pink-soft);
	font-weight: 700;
}

.fck-gallery__status {
	min-height: 1.5em;
	margin: 0;
	color: var(--text-muted-light);
	font-family: var(--font-body);
	font-size: var(--text-small-14-16);
}

.fck-gallery__panel:focus {
	outline: none;
}

/* Grids: three columns on desktop, two on tablet and most phones, one on very narrow phones. */
.fck-gallery .fck-gallery__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: var(--gap-md-16-24);
}

.fck-gallery .fck-gallery__grid:empty {
	display: none;
}

@media (max-width: 1024px) {
	.fck-gallery .fck-gallery__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 767px) {
	.fck-gallery .fck-gallery__grid {
		gap: var(--gap-xs-8-12);
	}

	.fck-gallery .fck-gallery__grid[data-kind="videos"] {
		grid-template-columns: minmax(0, 1fr);
	}
}

@media (max-width: 359px) {
	.fck-gallery .fck-gallery__grid {
		grid-template-columns: minmax(0, 1fr);
	}
}

.fck-gallery__photo {
	display: block;
	overflow: hidden;
	aspect-ratio: 1 / 1;
	border: 1px solid var(--border-dark);
	border-radius: var(--radius-lg-12-16);
	background-color: var(--surface-dark);
	transition: border-color 0.2s;
}

.fck-gallery__photo:hover {
	border-color: var(--accent);
}

.fck-gallery__photo img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center 30%;
	transition: transform 0.25s;
}

.fck-gallery__photo:hover img {
	transform: scale(1.03);
}

/* Videos */
.fck-gallery a.fck-gallery__video {
	display: flex;
	flex-direction: column;
	gap: 4px;
	height: 100%;
	padding-bottom: var(--pad-sm-12-16);
	overflow: hidden;
	border: 1px solid var(--border-dark);
	border-radius: var(--radius-lg-12-16);
	background-color: var(--surface-dark);
	color: var(--text-secondary);
	text-decoration: none;
	transition: border-color 0.2s;
}

.fck-gallery a.fck-gallery__video:hover {
	border-color: var(--accent);
}

.fck-gallery__thumb {
	position: relative;
	display: block;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	margin-bottom: 8px;
}

.fck-gallery__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.fck-gallery__play {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 64px;
	height: 64px;
	border-radius: 50%;
	background-color: var(--accent);
	transform: translate(-50%, -50%);
}

.fck-gallery__play::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 54%;
	border-width: 11px 0 11px 18px;
	border-style: solid;
	border-color: transparent transparent transparent var(--text-secondary);
	transform: translate(-50%, -50%);
}

.fck-gallery__title {
	padding: 0 var(--pad-sm-12-16);
	font-family: var(--font-heading);
	font-size: var(--text-body-16-18);
	font-weight: 700;
	line-height: var(--line-height-tight);
}

.fck-gallery__meta {
	padding: 0 var(--pad-sm-12-16);
	color: var(--text-muted-light);
	font-family: var(--font-body);
	font-size: var(--text-small-14-16);
}

.fck-gallery__empty {
	margin: 0;
	padding: var(--pad-xl-32-48) var(--pad-lg-24-32);
	border: 1px dashed var(--border-dark-hover);
	border-radius: var(--radius-lg-12-16);
	background-color: var(--surface-dark);
	color: var(--text-white-90);
	font-family: var(--font-body);
	font-size: var(--text-body-16-18);
}

.fck-gallery [hidden] {
	display: none !important;
}

.fck-gallery__more-wrap {
	display: flex;
	justify-content: center;
	margin-top: var(--gap-xs-8-12);
}

.fck-gallery__panel[aria-busy="true"] {
	opacity: 0.5;
}

/* Lightbox and video player */
html:has(.fck-gallery__dialog[open]) {
	overflow: hidden;
}

.fck-gallery__dialog {
	width: 100vw;
	max-width: 100vw;
	height: 100dvh;
	max-height: 100dvh;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--text-secondary);
}

.fck-gallery__dialog[open] {
	display: flex;
	align-items: center;
	justify-content: center;
}

.fck-gallery__dialog::backdrop {
	background-color: rgba(0, 0, 0, 0.92);
}

.fck-gallery__figure {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: var(--gap-xs-8-12);
	max-width: calc(100vw - 140px);
	margin: 0;
}

.fck-gallery__large {
	display: block;
	max-width: 100%;
	max-height: calc(100dvh - 130px);
	width: auto;
	height: auto;
	border-radius: var(--radius-md-8-12);
}

.fck-gallery__caption {
	max-width: 720px;
	color: var(--text-white-90);
	font-family: var(--font-body);
	font-size: var(--text-small-14-16);
	text-align: center;
}

.fck-gallery__dialog button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	padding: 0;
	border: 1px solid var(--btn-secondary-dark-border);
	border-radius: 50%;
	background-color: var(--surface-dark);
	color: var(--text-secondary);
	font-size: 1.75rem;
	line-height: 1;
	cursor: pointer;
}

.fck-gallery__dialog button:hover {
	border-color: var(--accent);
	background-color: var(--surface-dark);
	color: var(--text-secondary);
}

.fck-gallery__dialog button[disabled] {
	visibility: hidden;
}

.fck-gallery__close {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 2;
}

.fck-gallery__prev,
.fck-gallery__next {
	position: absolute;
	top: 50%;
	z-index: 2;
	transform: translateY(-50%);
}

.fck-gallery__prev {
	left: 12px;
}

.fck-gallery__next {
	right: 12px;
}

.fck-gallery__frame {
	width: min(calc(100vw - 32px), 1100px, calc((100dvh - 96px) * 16 / 9));
	aspect-ratio: 16 / 9;
	background-color: #000;
}

.fck-gallery__frame iframe {
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
}

@media (max-width: 767px) {
	.fck-gallery__figure {
		max-width: calc(100vw - 16px);
	}

	.fck-gallery__prev,
	.fck-gallery__next {
		top: auto;
		bottom: 16px;
		transform: none;
	}

	.fck-gallery__prev {
		left: calc(50% - 60px);
	}

	.fck-gallery__next {
		right: calc(50% - 60px);
	}

	.fck-gallery__large {
		max-height: calc(100dvh - 190px);
	}

	.fck-gallery a.fck-gallery__tab {
		flex: 1 1 0;
		min-width: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.fck-gallery__photo img,
	.fck-gallery a.fck-gallery__tab,
	.fck-gallery a.fck-gallery__filter,
	.fck-gallery a.fck-gallery__video {
		transition: none;
	}

	.fck-gallery__photo:hover img {
		transform: none;
	}
}
