/* =========================================================================
   Single Entries & Winners entry — single-entries-winners.php
   Layout follows the NZDW single event page (#single-event): coloured side rail,
   large heading, 2-column body with a credits sidebar.
   ========================================================================= */

.entry-single {
	--rail: 40px;
	--ink: #000;
	--ink-mid: #6b6b6b;
	--line: rgba(0, 0, 0, 0.5);
	--pill: #efefef;

	position: relative;
	padding: 65px var(--xm) 120px calc(var(--rail) + var(--xm));
	background: #fff;
	color: var(--ink);
}

/* The design has no newsletter block on entry pages. */
body.single-entries-winners #newsletter {
	display: none;
}

/* ---- Side rail ---------------------------------------------------------- */

.entry-single__rail {
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	z-index: 5;
	display: flex;
	flex-direction: column;
	align-items: center;
	width: var(--rail);
	padding-top: 12px;
	background: var(--programme-colour, #00D098);
	color: #000;
}

.entry-single__rail-icon {
	display: grid;
	place-items: center;
	width: 20px;
	height: 20px;
}

.entry-single__rail-icon img,
.entry-single__rail-icon svg {
	display: block;
	width: 100%;
	height: 100%;
}

.entry-single__rail-label {
	margin-top: 12px;
	font-family: "Sohne Mono", monospace;
	font-size: 12px;
	line-height: 1;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	white-space: nowrap;
	writing-mode: vertical-rl;
	transform: rotate(180deg);
}

/* ---- Header ------------------------------------------------------------- */

.entry-single__header {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 24px;
	margin: 0 0 48px;
}

.entry-single__title {
	max-width: 50%;
	margin: 0;
	color: var(--ink);
	font-family: "Sohne Breit Halbfett", sans-serif;
	font-size: var(--font_60, 3.75rem);
	font-weight: 400;
	line-height: 0.98;
	letter-spacing: 0.01em;
	text-transform: uppercase;
	overflow-wrap: break-word;
}

.entry-single__gallery-nav {
	display: flex;
	flex: 0 0 auto;
	gap: 8px;
}

.entry-single__gallery-nav[hidden] {
	display: none;
}

.entry-single__arrow {
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 1px solid #000;
	border-radius: 50%;
	background: #fff;
	color: #000;
	cursor: pointer;
	transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease;
}

.entry-single__arrow:hover:not(:disabled) {
	background: #000;
	color: #fff;
}

.entry-single__arrow:disabled {
	border-color: #c4c4c4;
	color: #c4c4c4;
	cursor: default;
}

.entry-single__arrow:focus-visible,
.entry-gallery__track:focus-visible,
.entry-feature__play:focus-visible {
	outline: 2px solid #000;
	outline-offset: 3px;
}

/* ---- Gallery (bleeds off the right edge) ------------------------------- */

.entry-gallery {
	margin: 0 calc(-1 * var(--xm)) 64px 0;
}

.entry-gallery__track {
	display: flex;
	gap: 12px;
	margin: 0;
	padding: 0 var(--xm) 0 0;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	scrollbar-width: none;
	list-style: none;
	-webkit-overflow-scrolling: touch;
}

.entry-gallery__track::-webkit-scrollbar {
	display: none;
}

.entry-gallery__item {
	flex: 0 0 clamp(260px, 38vw, 640px);
	margin: 0;
	scroll-snap-align: start;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	background: #e6e6e6;
}

.entry-gallery__image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* ---- Body grid ---------------------------------------------------------- */

.entry-single__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(280px, 365px);
	column-gap: 64px;
	padding-right: 40px;
}

/* Write-up (from the editor) */

.entry-writeup {
	font-family: "Sohne", sans-serif;
	font-size: 16px;
	line-height: 1.5;
}

.entry-writeup h2,
.entry-writeup h3,
.entry-writeup h4,
.entry-writeup h5 {
	margin: 48px 0 18px;
	color: var(--ink);
	font-family: "Sohne Breit Halbfett", sans-serif;
	font-size: var(--font_24, 1.5rem);
	font-weight: 400;
	line-height: 1.1;
	letter-spacing: 0.01em;
	text-transform: uppercase;
}

.entry-writeup > :first-child {
	margin-top: 0;
}

.entry-writeup p,
.entry-writeup ul,
.entry-writeup ol {
	margin: 0 0 16px;
}

.entry-writeup ul,
.entry-writeup ol {
	padding-left: 1.25em;
}

.entry-writeup > :last-child {
	margin-bottom: 0;
}

.entry-writeup a {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.entry-writeup img {
	max-width: 100%;
	height: auto;
}

/* Sidebar */

.entry-results {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin: 0 0 32px;
	padding: 0;
	list-style: none;
}

.entry-results__row {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	margin: 0;
}

.entry-tag {
	display: inline-flex;
	align-items: center;
	min-height: 28px;
	padding: 2px 12px 1px;
	border-radius: 999px;
	background: var(--pill);
	color: #000;
	font-family: "Sohne", sans-serif;
	font-size: 13px;
	line-height: 1.1;
}

.entry-tag--award {
	background: #000;
	color: #fff;
}

.entry-credits {
	margin: 0 0 56px;
	border-bottom: 1px solid var(--line);
}

.entry-credits__row {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	padding: 10px 0;
	border-top: 1px solid var(--line);
}

.entry-credits dt,
.entry-credits dd {
	margin: 0;
	font-family: "Sohne Mono", monospace;
	font-size: var(--font_14, 14px);
	line-height: 1.25;
	text-transform: uppercase;
}

.entry-credits dt {
	flex: 0 0 auto;
}

.entry-credits dd {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	text-align: right;
}

.entry-jury__heading {
	margin: 0 0 14px;
	color: var(--programme-colour, #00D098);
	font-family: "Sohne Mono Kraftig", "Sohne Mono", monospace;
	font-size: 20px;
	font-weight: 400;
	line-height: 1.2;
	letter-spacing: 0.02em;
	text-transform: uppercase;
}

.entry-jury__content {
	color: var(--ink-mid);
	font-family: "Sohne", sans-serif;
	font-size: 14px;
	line-height: 1.45;
}

.entry-jury__content p {
	margin: 0 0 14px;
}

.entry-jury__content > :last-child {
	margin-bottom: 0;
}

/* ---- Feature video / closing image ------------------------------------- */

.entry-feature {
	position: relative;
	margin-top: 80px;
	overflow: hidden;
	background: #e6e6e6;
}

.entry-feature__poster {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	object-fit: cover;
}

.entry-feature__play {
	position: absolute;
	top: 50%;
	left: 50%;
	display: grid;
	place-items: center;
	width: 48px;
	height: 48px;
	padding: 0 0 0 2px;
	border: 0;
	border-radius: 50%;
	background: #fff;
	color: #000;
	transform: translate(-50%, -50%);
	cursor: pointer;
	transition: transform 150ms ease;
}

.entry-feature__play:hover {
	transform: translate(-50%, -50%) scale(1.08);
}

.entry-feature__video,
.entry-feature.is-playing {
	aspect-ratio: 16 / 9;
}

.entry-feature__video iframe,
.entry-feature__video video,
.entry-feature.is-playing iframe,
.entry-feature.is-playing video {
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
	background: #000;
}

.entry-feature.is-playing .entry-feature__poster,
.entry-feature.is-playing .entry-feature__play {
	display: none;
}

/* ---- Utilities ---------------------------------------------------------- */

.entry-single .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

@media (prefers-reduced-motion: reduce) {
	.entry-gallery__track {
		scroll-behavior: auto;
	}

	.entry-feature__play,
	.entry-single__arrow {
		transition: none;
	}
}

/* ---- Responsive --------------------------------------------------------- */

@media (max-width: 1199.98px) {
	.entry-single__title {
		max-width: 70%;
	}

	.entry-single__grid {
		column-gap: 48px;
		padding-right: 0;
	}
}

@media (max-width: 991.98px) {
	/* Sidebar moves above the write-up, as in the mobile design. */
	.entry-single__grid {
		display: flex;
		flex-direction: column;
	}

	.entry-single__aside {
		order: -1;
		margin-bottom: 40px;
		padding-bottom: 40px;
		border-bottom: 1px solid #000;
	}

	.entry-credits {
		margin-bottom: 40px;
	}
}

@media (max-width: 767.98px) {
	.entry-single {
		--rail: 32px;
		padding-top: 40px;
		padding-bottom: 72px;
	}

	.entry-single__rail {
		padding-top: 10px;
	}

	.entry-single__rail-icon {
		width: 18px;
		height: 18px;
	}

	.entry-single__header {
		margin-bottom: 24px;
	}

	.entry-single__title {
		max-width: none;
		/* Sized so long single words ("COURTYARD") fit a 375px screen. */
		font-size: clamp(28px, 9.4vw, 40px);
	}

	/* Swipe on mobile; the arrows are for desktop. */
	.entry-single__gallery-nav {
		display: none !important;
	}

	.entry-gallery {
		margin-bottom: 32px;
	}

	.entry-gallery__track {
		gap: 8px;
	}

	.entry-gallery__item {
		flex-basis: 82vw;
	}

	.entry-credits dt,
	.entry-credits dd {
		font-size: var(--font_12, 12px);
	}

	.entry-writeup h2,
	.entry-writeup h3,
	.entry-writeup h4,
	.entry-writeup h5 {
		margin-top: 40px;
		font-size: var(--font_20, 1.25rem);
	}

	.entry-feature {
		margin-top: 48px;
	}
}
