/*
 * Events page.
 *
 * The page is built from core blocks; these styles cover the parts drawn by
 * the theme's event blocks: the next-event card in the hero, the list with
 * its filters and calendar view, and the past events row.
 */

/* ---------- Hero: the next-event card is wider than a facts card ---------- */

.te-phero--event,
.te-phero--event .te-phero__grid {
	min-height: 660px;
}

.te-phero--event .te-phero__grid {
	grid-template-columns: minmax(0, 1fr) minmax(0, 470px);
}

.ev-next__top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin: 0;
}

.ev-next .lozenge-new {
	font-size: 14px;
}

.ev-next__facts {
	color: var(--te-text-3);
	font-size: 14px;
}

.ev-next__head {
	display: flex;
	align-items: center;
	gap: 20px;
	margin-top: 20px;
}

.ev-next .ev-date {
	flex: 0 0 84px;
	width: 84px;
	padding: 10px 0 9px;
	background: var(--te-warm-grey);
}

.ev-next.is-ours .ev-date {
	background: var(--te-peach);
}

.ev-next__title {
	margin: 0;
	font-size: 28px;
	line-height: 32px;
}

.ev-next__when {
	margin: 6px 0 0;
	color: var(--te-text-2);
}

.ev-next__text {
	margin: 20px 0 0;
	color: var(--te-text-2);
}

.ev-next__cta {
	margin-top: 24px;
}

/* ---------- Heading row: calendar link and view switch ---------- */

.te-sechead--tools {
	margin-bottom: 0;
}

.ev-tools {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px 20px;
}

.ev-seg {
	display: inline-flex;
	gap: 4px;
	padding: 4px;
	border-radius: 50px;
	background: var(--te-white);
}

.ev-seg[hidden] {
	display: none;
}

.ev-segbtn {
	min-height: 40px;
	padding: 0 18px;
	border: 0;
	border-radius: 50px;
	background: transparent;
	color: var(--te-meteorite);
	font: inherit;
	font-size: 15px;
	cursor: pointer;
}

.ev-segbtn[aria-pressed="true"] {
	background: var(--te-meteorite);
	color: var(--te-on-dark);
}

/* ---------- Filters ---------- */

.ev-filters {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 16px 20px;
	margin: 28px 0 8px;
	padding: 18px 20px;
	border-radius: var(--r-l);
	background: var(--te-white);
}

.ev-filters[hidden] {
	display: none;
}

.ev-filters .te-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	width: auto;
	margin: 0;
	padding: 0;
	overflow: visible;
}

.ev-filters .te-chips > * {
	flex: 0 0 auto;
}

.ev-field {
	display: flex;
	flex-direction: column;
	gap: 4px;
	color: var(--te-text-2);
	font-size: 14px;
}

.ev-sel {
	position: relative;
	display: block;
}

.ev-sel svg {
	position: absolute;
	top: 50%;
	right: 14px;
	margin-top: -4px;
	pointer-events: none;
}

.ev-field select {
	min-width: 190px;
	min-height: 44px;
	padding: 0 36px 0 14px;
	border: 1px solid var(--te-stone);
	border-radius: 10px;
	background: var(--te-white);
	color: var(--te-meteorite);
	font: inherit;
	font-size: 15px;
	appearance: none;
}

.ev-check {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-height: 44px;
	cursor: pointer;
}

.ev-check input {
	width: 20px;
	height: 20px;
	accent-color: var(--te-meteorite);
}

.ev-count {
	display: flex;
	align-items: center;
	min-height: 44px;
	margin: 0 0 0 auto;
	color: var(--te-text-2);
	font-size: 15px;
}

.ev-clear {
	min-height: 44px;
	padding: 0 2px;
	border: 0;
	background: transparent;
	color: var(--te-meteorite);
	font: inherit;
	text-decoration: underline;
	text-underline-offset: 0.2em;
	cursor: pointer;
}

.ev-empty {
	margin-top: 24px;
	padding: 36px;
	border-radius: var(--r-l);
	background: var(--te-white);
	text-align: center;
}

.ev-empty[hidden] {
	display: none;
}

.ev-empty__title {
	margin: 0;
	font-size: 24px;
}

.ev-empty p:not(.ev-empty__title) {
	margin: 8px 0 0;
	color: var(--te-text-2);
}

.ev-empty .v-btn {
	margin-top: 18px;
}

/* ---------- The list ---------- */

.te-evlist .ev-month {
	margin: 36px 0 12px;
}

/* No filter bar above: the first month sits closer to the heading. */
.te-evlist > [data-ev-listview]:first-child .ev-group:first-child .ev-month {
	margin-top: 28px;
}

.ev-group[hidden],
.ev-row[hidden] {
	display: none;
}

.ev-rows {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ev-row {
	display: grid;
	grid-template-columns: 84px minmax(0, 1fr) 90px auto;
	gap: 8px 24px;
	align-items: center;
	padding: 12px 24px 12px 12px;
	border-radius: var(--r-s);
	background: var(--te-white);
}

.ev-row.is-ours .ev-date {
	background: var(--te-peach);
}

.ev-row__body {
	min-width: 0;
}

.ev-when {
	margin: 0;
	color: var(--te-text-3);
	font-size: 14px;
}

.ev-row__title {
	margin: 2px 0 0;
	font-size: 21px;
	line-height: 26px;
}

.ev-row__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 10px;
	margin: 6px 0 0;
	color: var(--te-text-3);
}

.ev-price {
	margin: 0;
	font-weight: 600;
	text-align: right;
}

/* The button keeps its column when an event has no link. */
.ev-row > .v-btn {
	grid-column: 4;
}

/* A title links to the event's own page. */
.ev-row__title a,
.ev-next__title a {
	color: inherit;
	text-decoration: none;
}

.ev-row__title a:hover,
.ev-next__title a:hover {
	text-decoration: underline;
	text-underline-offset: 0.15em;
}

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

.ps-ev-cta {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 24px 0 0;
}

.ps-ev-note {
	margin: 24px 0 0;
	color: var(--te-text-2);
}

.ps-ev-note + .ps-ev-cta {
	margin-top: 12px;
}

.ev-rows--more {
	margin-top: 28px;
}

.ev-rows--more .ev-row {
	background: var(--te-warm-grey);
}

.ev-rows--more .ev-row .ev-date:not(.is-ours *) {
	background: var(--te-warm-white);
}

/* ---------- Calendar view ---------- */

.ev-cal {
	margin-top: 28px;
	padding: 24px;
	border-radius: var(--r-l);
	background: var(--te-white);
}

.ev-cal[hidden] {
	display: none;
}

.ev-cal__nav {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 14px;
}

.ev-cal__label {
	margin: 0;
	font-size: 26px;
}

.ev-calnav {
	width: 44px;
	height: 44px;
	border: 1px solid var(--te-stone);
	border-radius: 1000px;
	background: transparent;
	color: var(--te-meteorite);
	font: inherit;
	font-size: 18px;
	cursor: pointer;
}

.ev-calnav[aria-disabled="true"] {
	opacity: 0.35;
	cursor: default;
}

.ev-dow {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	padding: 0 0 6px;
}

.ev-dow span {
	padding: 8px;
	color: var(--te-text-3);
	font-size: 14px;
	font-weight: 600;
}

.ev-cells {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	margin: 0;
	padding: 0;
	border-top: 1px solid var(--te-warm-grey);
	border-left: 1px solid var(--te-warm-grey);
	list-style: none;
}

.ev-cell {
	min-width: 0;
	min-height: 118px;
	padding: 8px;
	border-right: 1px solid var(--te-warm-grey);
	border-bottom: 1px solid var(--te-warm-grey);
}

.ev-cell.is-out {
	background: #FAF8F4;
}

.ev-num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 28px;
	height: 28px;
	border-radius: 1000px;
	font-size: 14px;
	font-weight: 600;
}

.ev-cell.is-out .ev-num {
	color: #6E6862;
	font-weight: 400;
}

.ev-num[aria-current="date"] {
	background: var(--te-meteorite);
	color: var(--te-on-dark);
}

.ev-chip {
	display: -webkit-box;
	overflow: hidden;
	margin-top: 4px;
	padding: 4px 8px;
	border-radius: 6px;
	background: var(--te-white);
	box-shadow: inset 0 0 0 1px #D3CEC7;
	color: var(--te-meteorite);
	font-size: 13px;
	line-height: 17px;
	text-decoration: none;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

.ev-chip.is-ours {
	background: var(--te-peach);
}

a.ev-chip:hover {
	text-decoration: underline;
}

.ev-cal__key {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 20px;
	margin: 14px 0 0;
	color: var(--te-text-2);
	font-size: 14px;
}

.ev-cal__key > span {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.ev-key {
	width: 14px;
	height: 14px;
	border-radius: 4px;
	background: var(--te-white);
	box-shadow: inset 0 0 0 1px #D3CEC7;
}

.ev-key--te {
	background: var(--te-peach);
	box-shadow: none;
}

/* ---------- Past events ---------- */

.te-sechead:has(+ .ev-past) {
	margin-bottom: 32px;
}

.te-cardgrid--4 {
	grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ev-past__more {
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 0.2em;
}

/* ---------- List your event ---------- */

.ev-ask {
	margin: 24px 0 0;
	color: var(--te-text-2);
}

.ev-form .ev-check {
	font-weight: 400;
}

/* ---------- Smaller screens ---------- */

@media (max-width: 1180px) {
	.te-phero--event .te-phero__grid {
		grid-template-columns: minmax(0, 1fr);
		min-height: 0;
	}

	.ev-next {
		max-width: 560px;
	}
}

@media (max-width: 1000px) {
	.te-cardgrid--4 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

/* A month grid needs room: below this the list is the only view. */
@media (max-width: 860px) {
	.ev-seg[data-ev-views] {
		display: none;
	}

	.ev-cal {
		display: none;
	}

	.te-evlist [data-ev-listview][hidden] {
		display: block;
	}
}

@media (max-width: 720px) {
	.te-phero--event {
		min-height: 0;
	}

	.ev-row {
		grid-template-columns: 64px minmax(0, 1fr);
		gap: 8px 16px;
		align-items: start;
		padding: 12px 16px 16px 12px;
	}

	.ev-row .ev-date {
		grid-row: 1 / span 3;
	}

	.ev-row__body,
	.ev-price,
	.ev-row > .v-btn {
		grid-column: 2;
	}

	.ev-price {
		text-align: left;
	}

	.ev-price:empty {
		display: none;
	}

	.ev-row > .v-btn {
		justify-self: start;
	}

	.ev-row__title {
		font-size: 19px;
		line-height: 24px;
	}

	.ev-filters {
		padding: 16px;
	}

	.ev-field,
	.ev-field select {
		width: 100%;
		min-width: 0;
	}

	.ev-count {
		width: 100%;
		margin-left: 0;
	}

	.te-cardgrid--4.m-rail {
		grid-template-columns: none;
	}

	.ev-next {
		padding: 22px;
	}

	.ev-next__title {
		font-size: 24px;
		line-height: 28px;
	}

	.ev-next .ev-date {
		flex-basis: 68px;
		width: 68px;
	}
}

/* On a phone the details and booking button come before the description. */
@media (max-width: 1000px) {
	.ps-wrap.ps-wrap--event {
		flex-direction: column;
	}
}

/* ---------- Past events page ---------- */

.pe-top {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px 32px;
	margin-top: 24px;
}

.pe-years {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.pe-years[hidden] {
	display: none;
}

.pe-chip {
	background: var(--te-warm-white);
}

.pe-chip:hover {
	border-color: var(--te-meteorite);
}

.pe-status {
	display: flex;
	align-items: center;
	min-height: 44px;
	margin: 0 0 0 auto;
	color: var(--te-text-2);
	font-size: 15px;
}

.pe-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 40px 16px;
	margin: 32px 0 0;
	padding: 0;
	list-style: none;
}

.pe-grid > li[hidden] {
	display: none;
}

.pe-grid .v-news .te-small-heading {
	color: var(--te-text-2);
}

.pe-title {
	font-size: 24px;
	line-height: 28px;
}

.pe-line {
	color: var(--te-text-2);
	font-size: 15px;
	line-height: 22px;
}

.pe-note {
	margin: 40px 0 0;
	color: var(--te-text-2);
	font-size: 15px;
}

/* The "Don't miss the next one" band: text on the left, buttons on the right. */
.pe-next {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 24px 48px;
}

.pe-next .te-h2 {
	max-width: 720px;
	margin-top: 18px;
}

.pe-next .te-lead {
	max-width: 560px;
	margin-top: 20px;
}

@media (max-width: 1000px) {
	.pe-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 640px) {
	.pe-grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 32px;
	}

	.pe-status {
		margin-left: 0;
	}
}
