/**
 * Warrington.TV events.
 *
 * Loads after directory.css and inherits its tokens. Cards are image-led, unlike
 * directory cards — an event is sold on its poster, a business on its words.
 */

.wtv-events {
	--wtv-ink: #16202b;
	--wtv-ink-muted: #5c6b7a;
	--wtv-line: #dfe5ea;
	--wtv-surface: #fff;
	--wtv-surface-alt: #f5f7f9;
	--wtv-accent: #3b5ba5;
	--wtv-accent-dark: #2f4a86;
	--wtv-link: var(--wtv-accent);
	--wtv-cta-bg: var(--wtv-accent);
	--wtv-cta-ink: #ffd400;
	--wtv-radius: 6px;
	--wtv-gap: 1.25rem;
}

/* Controls
   ------------------------------------------------------------------------ */

.wtv-events__controls {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0.75rem;
	margin-bottom: var(--wtv-gap);
}

.wtv-events .wtv-input {
	width: 100%;
	padding: 0.65rem 0.75rem;
	border: 1px solid var(--wtv-line);
	border-radius: var(--wtv-radius);
	background: var(--wtv-surface);
	color: var(--wtv-ink);
	font: inherit;
	line-height: 1.4;
}

.wtv-events .wtv-input:focus {
	outline: 2px solid var(--wtv-accent);
	outline-offset: 1px;
}

.wtv-events__count {
	margin: 0 0 0.75rem;
	color: var(--wtv-ink-muted);
	font-size: 0.875rem;
}

/* Grid
   ------------------------------------------------------------------------ */

.wtv-events__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--wtv-gap);
}

.wtv-events.is-loading .wtv-events__grid {
	opacity: 0.5;
	transition: opacity 120ms ease-out;
}

.wtv-event-card {
	display: flex;
	flex-direction: column;
	border: 1px solid var(--wtv-line);
	border-radius: var(--wtv-radius);
	background: var(--wtv-surface);
	overflow: hidden;
}

.wtv-event-card__image {
	display: block;
	aspect-ratio: 16 / 9;
	background: var(--wtv-surface-alt);
}

.wtv-event-card__image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.wtv-event-card__body {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	gap: 0.4rem;
	padding: 1rem 1.1rem;
}

.wtv-event-card__badge {
	align-self: flex-start;
	padding: 0.2rem 0.6rem;
	border-radius: 999px;
	background: var(--wtv-accent);
	color: #fff;
	font-size: 0.75rem;
	font-weight: 600;
	line-height: 1.5;
}

.wtv-event-card__title {
	margin: 0;
	font-size: 1.0625rem;
	line-height: 1.3;
}

.wtv-event-card__title a {
	color: var(--wtv-link);
	text-decoration: none;
}

.wtv-event-card__title a:hover,
.wtv-event-card__title a:focus-visible {
	text-decoration: underline;
}

.wtv-event-card__venue {
	margin: 0;
	font-size: 0.9375rem;
	font-weight: 700;
}

.wtv-event-card__address,
.wtv-event-card__when {
	margin: 0;
	color: var(--wtv-ink-muted);
	font-size: 0.875rem;
	line-height: 1.5;
}

.wtv-event-card__when {
	margin-top: auto;
	padding-top: 0.35rem;
	color: var(--wtv-ink);
}

.wtv-event-card__foot {
	padding: 0.75rem 1.1rem;
	border-top: 1px solid var(--wtv-line);
}

.wtv-event-card__more {
	color: var(--wtv-link);
	font-size: 0.875rem;
	font-weight: 600;
	text-decoration: none;
}

.wtv-event-card__more::after {
	content: " \2192";
}

.wtv-event-card__more:hover,
.wtv-event-card__more:focus-visible {
	text-decoration: underline;
}

/* Single event
   ------------------------------------------------------------------------ */

.wtv-event {
	--wtv-ink: #16202b;
	--wtv-ink-muted: #5c6b7a;
	--wtv-line: #dfe5ea;
	--wtv-surface: #fff;
	--wtv-surface-alt: #f5f7f9;
	--wtv-accent: #3b5ba5;
	--wtv-link: var(--wtv-accent);
	--wtv-radius: 6px;
}

.wtv-event__title {
	margin: 0 0 1rem;
}

.wtv-event__venue {
	margin: 0 0 1.25rem;
	padding: 1rem 1.1rem;
	border: 1px solid var(--wtv-line);
	border-radius: var(--wtv-radius);
}

.wtv-event__venue-name,
.wtv-event__venue-address {
	margin: 0;
	line-height: 1.5;
}

.wtv-event__venue-address {
	color: var(--wtv-ink-muted);
}

.wtv-event__image {
	margin: 0 0 1.5rem;
	border-radius: var(--wtv-radius);
	overflow: hidden;
}

.wtv-event__image img {
	display: block;
	width: 100%;
	height: auto;
}

.wtv-event__image.is-placeholder {
	border: 1px dashed var(--wtv-line);
}

.wtv-event__columns {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.5rem;
}

.wtv-event__subtitle {
	margin: 0 0 0.75rem;
	font-size: 1.25rem;
}

.wtv-event__description {
	line-height: 1.65;
	overflow-wrap: anywhere;
}

.wtv-event__aside {
	padding-top: 0.25rem;
}

.wtv-event__aside-heading {
	margin: 0 0 0.5rem;
	font-size: 1.0625rem;
}

.wtv-event__meta {
	margin: 0 0 0.75rem;
}

.wtv-event__meta-label {
	display: block;
	color: var(--wtv-ink-muted);
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.wtv-event__meta-value {
	display: block;
	font-weight: 700;
	line-height: 1.4;
}

.wtv-event__type {
	margin: 0 0 1.25rem;
	padding: 0.5rem 0.75rem;
	border-radius: var(--wtv-radius);
	background: var(--wtv-surface-alt);
}

.wtv-event__type a {
	color: var(--wtv-link);
	text-decoration: none;
}

.wtv-event__share {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.wtv-share {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 999px;
	background: var(--wtv-accent);
	color: #fff;
	font-weight: 700;
	text-decoration: none;
}

.wtv-share:hover,
.wtv-share:focus-visible {
	background: #2f4a86;
	color: #fff;
}

.wtv-event .screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	border: 0;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

/* Wider screens
   ------------------------------------------------------------------------ */

@media (min-width: 600px) {
	.wtv-events__controls {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.wtv-events__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 900px) {
	.wtv-events__controls {
		grid-template-columns: 2fr 1fr 1fr 1.5fr auto;
		align-items: end;
	}

	.wtv-events__grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.wtv-event__columns {
		grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
		gap: 2.5rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.wtv-events.is-loading .wtv-events__grid {
		transition: none;
	}
}

/* Manage my events
   ------------------------------------------------------------------------ */

.wtv-my-event {
	margin: 0 0 1.5rem;
	padding: 1.25rem;
	border: 1px solid var(--wtv-line);
	border-radius: var(--wtv-radius);
	background: var(--wtv-surface);
}

.wtv-my-event__title {
	margin: 0 0 0.35rem;
	font-size: 1.125rem;
}

.wtv-my-event__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.6rem;
	margin: 0 0 1rem;
	color: var(--wtv-ink-muted);
	font-size: 0.875rem;
}

.wtv-my-event__status {
	padding: 0.15rem 0.55rem;
	border-radius: 999px;
	background: var(--wtv-surface-alt);
	font-weight: 600;
}

.wtv-my-event__fixed {
	margin: 0 0 0.75rem;
	padding: 0.75rem 1rem;
	border-radius: var(--wtv-radius);
	background: var(--wtv-surface-alt);
}

.wtv-my-event__fixed-row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1rem;
	margin: 0 0 0.25rem;
}

.wtv-my-event__fixed-row:last-child {
	margin-bottom: 0;
}

.wtv-my-event__fixed-label {
	min-width: 4.5rem;
	color: var(--wtv-ink-muted);
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	line-height: 1.6;
	text-transform: uppercase;
}

.wtv-my-event__fixed-value {
	font-weight: 700;
}

.wtv-my-event__meta a {
	color: var(--wtv-link);
	font-weight: 600;
	text-decoration: none;
}

.wtv-my-event__meta a:hover {
	text-decoration: underline;
}

.wtv-my-event__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}

.wtv-my-event__repeat {
	margin-top: 1.25rem;
	padding-top: 1.25rem;
	border-top: 1px solid var(--wtv-line);
}

.wtv-my-event__repeat[hidden] {
	display: none;
}

/* Image guidance
   ------------------------------------------------------------------------ */

.wtv-image-help {
	margin-top: 0.6rem;
	padding: 0.85rem 1rem;
	border-left: 3px solid var(--wtv-accent);
	border-radius: var(--wtv-radius);
	background: var(--wtv-surface-alt);
}

.wtv-image-help__lead {
	margin: 0 0 0.5rem;
	font-weight: 700;
}

.wtv-image-help__list {
	margin: 0;
	padding-left: 1.15rem;
	color: var(--wtv-ink-muted);
	font-size: 0.875rem;
	line-height: 1.6;
}

.wtv-image-help__list li + li {
	margin-top: 0.35rem;
}

.wtv-image-preview {
	margin-top: 1rem;
}

.wtv-image-preview[hidden] {
	display: none;
}

.wtv-image-preview__note {
	margin: 0 0 0.75rem;
	font-size: 0.875rem;
	font-weight: 600;
}

.wtv-image-preview__note.is-warning {
	color: #8a5a00;
}

.wtv-image-preview__panes {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1rem;
}

.wtv-image-preview__pane {
	margin: 0;
}

.wtv-image-preview__pane figcaption {
	margin-top: 0.35rem;
	color: var(--wtv-ink-muted);
	font-size: 0.8125rem;
}

/* Mirrors the real card exactly: 16:9, cropped from the centre. */
.wtv-image-preview__card {
	aspect-ratio: 16 / 9;
	border: 1px solid var(--wtv-line);
	border-radius: var(--wtv-radius);
	overflow: hidden;
	background: var(--wtv-surface-alt);
}

.wtv-image-preview__card img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.wtv-image-preview__full {
	border: 1px solid var(--wtv-line);
	border-radius: var(--wtv-radius);
	overflow: hidden;
	background: var(--wtv-surface-alt);
}

.wtv-image-preview__full img {
	display: block;
	width: 100%;
	height: auto;
}

@media (min-width: 600px) {
	.wtv-image-preview__panes {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		align-items: start;
	}
}
