/*
 * An event's detail page and its registration dialog (single-event.php, template-parts/event-rsvp.php).
 *
 * Colours an editor picks arrive as custom properties on .ev-single; the values here are the design's
 * own defaults.
 */

.ev-single {
	--ev-page-bg: #f8d9e5;
	--ev-page-ink: #0a0a0a;
	--ev-btn-bg: #ef1d40;
	--ev-btn-ink: #fff;
	--ev-rule: rgba(25, 25, 25, 0.3);
	background: var(--ev-page-bg);
	color: var(--ev-page-ink);
	padding-block: 40px 64px;
}

.ev-single .ev-single__inner {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 32px;
	max-width: 1190px;
	margin-inline: auto;
	padding-inline: 20px;
}

/* ---- Head ---- */

.ev-single .ev-single__head {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 24px;
}

.ev-single .ev-single__tag {
	margin: 0;
	padding: 4px 6px;
	border-radius: 3px;
	font-size: 10px;
	font-weight: 700;
	line-height: 1.2;
}

.ev-single .ev-single__title {
	margin: 0;
	color: inherit;
	font-size: 40px;
	font-weight: 700;
	line-height: 1.05;
	letter-spacing: 0.075em;
	text-transform: uppercase;
	overflow-wrap: anywhere;
}

.ev-single .ev-single__subhead {
	margin: 0;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.375;
	letter-spacing: 0.005em;
	text-transform: uppercase;
}

/* ---- Side panel ---- */

.ev-single .ev-rail {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.ev-single .ev-rail__media {
	position: relative;
	display: block;
	border-radius: 3px;
	overflow: hidden;
	aspect-ratio: 500 / 281;
	background: linear-gradient(90deg, #c23799, #ef1d40);
}

.ev-single .ev-rail__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.ev-single .ev-rail__media--video .icon-play {
	position: absolute;
	inset-block-end: 16px;
	inset-inline-start: 16px;
	display: grid;
	place-items: center;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: var(--ev-btn-bg);
	color: var(--ev-btn-ink);
}

.ev-single .ev-rail__meta {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.ev-when {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.ev-when__date {
	margin: 0;
	font-size: 28px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: -0.03em;
}

.ev-when__line {
	display: flex;
	align-items: center;
	gap: 6px;
	margin: 0;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.2;
}

.ev-icon {
	flex: none;
	width: 14px;
	height: 14px;
}

/* ---- Buttons ---- */

.ev-single .ev-rsvp {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 52px;
	padding: 15px 30px;
	border: 0;
	border-radius: 100px;
	background: var(--ev-btn-bg);
	color: var(--ev-btn-ink);
	font: inherit;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
}

.ev-single .ev-rsvp:hover,
.ev-single .ev-rsvp:focus-visible {
	color: var(--ev-btn-ink);
	filter: brightness(0.92);
}

.ev-single .ev-rsvp:focus-visible,
.ev-modal .ev-form__submit:focus-visible,
.ev-modal .ev-done__btn:focus-visible,
.ev-modal .ev-modal__close:focus-visible,
.ev-single .ev-person__card:focus-visible {
	outline: 3px solid currentColor;
	outline-offset: 3px;
}

.ev-single .ev-rsvp--closed {
	background: transparent;
	color: inherit;
	border: 1px solid currentColor;
	cursor: default;
	filter: none;
}

.ev-single .ev-rail__act .ev-rsvp {
	width: 100%;
}

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

.ev-single .ev-single__main {
	min-width: 0;
}

.ev-single .ev-block {
	padding-block: 32px;
	border-block-start: 1px solid var(--ev-rule);
}

.ev-single .ev-block__title {
	margin: 0 0 22px;
	color: inherit;
	font-size: 26px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: 0.075em;
	text-transform: uppercase;
}

.ev-single .ev-people .ev-block__title::after,
.ev-single .ev-partners .ev-block__title::after {
	content: "";
	display: block;
	width: 440px;
	max-width: 100%;
	height: 1px;
	margin-block-start: 22px;
	background: rgba(255, 255, 255, 0.3);
}

.ev-single .ev-copy__text {
	font-size: 18px;
	line-height: 1.4;
}

.ev-single .ev-copy__text > * + * {
	margin-block-start: 26px;
}

.ev-single .ev-copy__text a {
	color: inherit;
	text-decoration: underline;
}

.ev-single .ev-copy__text img,
.ev-single .ev-copy__text iframe {
	max-width: 100%;
	height: auto;
}

.ev-single .ev-copy__text iframe[src*="youtube"],
.ev-single .ev-copy__text iframe[src*="vimeo"] {
	width: 100%;
	aspect-ratio: 16 / 9;
}

/* Speakers */

.ev-single .ev-people__list,
.ev-single .ev-partners__list {
	display: grid;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ev-single .ev-people__list {
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
}

.ev-single .ev-person__card {
	display: flex;
	flex-direction: column;
	height: 100%;
	color: #fff;
	text-decoration: none;
}

.ev-single .ev-person__photo {
	display: block;
	aspect-ratio: 290 / 330;
	overflow: hidden;
	background: #0a0a0a;
}

.ev-single .ev-person__photo img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.ev-single .ev-person__caption {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 8px;
	min-height: 160px;
	padding: 16px;
	background: #0a0a0a;
}

.ev-single .ev-person__caption::before {
	content: "";
	width: 42px;
	height: 5px;
	background: #ef1d40;
}

/* The right-hand column; the grid is two columns at every width. */
.ev-single .ev-person:nth-child(even) .ev-person__caption::before {
	background: #c23799;
}

.ev-single .ev-person__name {
	font-size: 18px;
	font-weight: 700;
	line-height: 1;
	text-transform: uppercase;
}

.ev-single .ev-person__role {
	font-size: 14px;
	font-weight: 700;
	line-height: 1.1;
}

.ev-single .ev-person__org {
	color: #ef1d40;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
}

/* Partners */

.ev-single .ev-partners__list {
	grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
	align-items: center;
	gap: 24px 40px;
}

.ev-single .ev-partner img {
	display: block;
	max-width: 100%;
	max-height: 56px;
	width: auto;
	height: auto;
}

.ev-single .ev-single__cta .ev-rsvp {
	width: 100%;
}

/* ---- Wide screens ---- */

@media (min-width: 1024px) {
	.ev-single {
		padding-block: 88px 120px;
	}

	.ev-single .ev-single__inner {
		grid-template-columns: minmax(0, 600px) minmax(0, 500px);
		grid-template-rows: auto 1fr;
		justify-content: space-between;
		column-gap: 64px;
		row-gap: 40px;
	}

	.ev-single .ev-single__head {
		grid-column: 1;
		grid-row: 1;
		gap: 40px;
	}

	.ev-single .ev-single__title {
		font-size: 56px;
		letter-spacing: 0.075em;
	}

	/*
	 * Sticky within this grid only, so it stops where the grid ends, before the river. The theme's
	 * .wrapper-inner clips with overflow: clip, which does not create a scroll container and so does
	 * not disable sticky positioning.
	 */
	.ev-single .ev-single__rail {
		grid-column: 2;
		grid-row: 1 / span 2;
		align-self: start;
		position: sticky;
		top: 140px;
		margin-top: -24px;
	}

	.ev-single .ev-rail {
		gap: 30px;
	}

	.ev-single .ev-rail__meta {
		flex-direction: row;
		align-items: flex-start;
		justify-content: space-between;
		gap: 16px;
	}

	.ev-single .ev-rail__act .ev-rsvp {
		width: auto;
	}

	.ev-single .ev-single__main {
		grid-column: 1;
		grid-row: 2;
	}

	.ev-single .ev-block {
		padding-block: 40px;
	}

	.ev-single .ev-block__title {
		font-size: 33px;
	}

	.ev-single .ev-people__list {
		gap: 20px;
	}

	.ev-single .ev-person__caption {
		padding: 22px;
		min-height: 175px;
	}

	.ev-single .ev-person__name {
		font-size: 22px;
	}

	.ev-single .ev-person__role {
		font-size: 16px;
	}

	.ev-single .ev-single__cta .ev-rsvp {
		width: auto;
	}
}

/* ---- Registration dialog ---- */

.ev-modal {
	width: min(1240px, calc(100% - 32px));
	max-width: none;
	max-height: calc(100% - 32px);
	padding: 0;
	border: 0;
	border-radius: 10px;
	background: #fff;
	color: #191919;
	overflow: auto;
}

.ev-modal::backdrop {
	background: rgba(10, 10, 10, 0.6);
}

.ev-modal .ev-modal__panels {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
}

.ev-modal .ev-modal__aside {
	display: flex;
	flex-direction: column;
	gap: 16px;
	padding: 24px 20px;
}

.ev-modal .ev-modal__eyebrow {
	margin: 0;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.1;
}

.ev-modal .ev-modal__event {
	margin: 0;
	font-size: 22px;
	font-weight: 700;
	line-height: 1.1;
	text-transform: uppercase;
}

.ev-modal .ev-modal__img {
	display: none;
}

.ev-modal .ev-modal__main {
	position: relative;
	padding: 56px 20px 32px;
}

.ev-modal .ev-modal__close {
	position: absolute;
	inset-block-start: 16px;
	inset-inline-end: 16px;
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	background: none;
	color: #191919;
	cursor: pointer;
}

.ev-modal .ev-modal__close svg {
	width: 22px;
	height: 22px;
}

.ev-modal .ev-modal__title {
	margin: 0 0 20px;
	color: #191919;
	font-size: 30px;
	font-weight: 500;
	line-height: 1.2;
	letter-spacing: -0.03em;
	text-transform: none;
}

.ev-modal .ev-form {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.ev-modal .ev-form__field {
	display: flex;
	flex-direction: column;
}

.ev-modal .ev-form__field label {
	margin: 0;
	color: #4f4f4f;
	font-size: 16px;
	font-weight: 400;
	line-height: 1.6;
	text-transform: none;
}

.ev-modal .ev-form__field input {
	width: 100%;
	height: auto;
	margin: 0;
	padding: 2px 0 6px;
	border: 0;
	border-block-end: 1px solid #4f4f4f;
	border-radius: 0;
	background: transparent;
	color: #191919;
	font: inherit;
	font-size: 16px;
}

.ev-modal .ev-form__field input:focus-visible {
	outline: none;
	border-block-end: 2px solid #191919;
	box-shadow: 0 1px 0 #191919;
}

.ev-modal .ev-form__field input.error {
	border-block-end-color: #c00;
}

.ev-modal .ev-form__consent {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	color: #4f4f4f;
	font-size: 13px;
	line-height: 1.3;
}

.ev-modal .ev-form__consent input {
	flex: none;
	width: 15px;
	height: 15px;
	margin: 1px 0 0;
}

.ev-modal .ev-form__consent a {
	color: inherit;
	text-decoration: underline;
}

.ev-modal .ev-form__error,
.ev-modal .ev-form__status {
	display: none;
	margin: 0;
	font-size: 14px;
}

.ev-modal .ev-form__error {
	color: #c00;
}

.ev-modal .ev-form__submit {
	align-self: flex-start;
	padding: 12px 25px;
	border: 1px solid #191919;
	border-radius: 100px;
	background: #191919;
	color: #fff;
	font: inherit;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.16;
	cursor: pointer;
}

.ev-modal .ev-form__submit:disabled {
	opacity: 0.6;
	cursor: progress;
}

/* Confirmation */

.ev-modal .ev-done {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

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

.ev-modal .ev-done__top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}

.ev-modal .ev-done__check {
	display: grid;
	place-items: center;
	width: 64px;
	height: 64px;
	border-radius: 50%;
	background: #f8d9e5;
	color: #191919;
}

.ev-modal .ev-done__check svg {
	width: 28px;
	height: 28px;
}

.ev-modal .ev-done__eyebrow {
	margin: 0;
	font-size: 13px;
	font-weight: 500;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.ev-modal .ev-done__title {
	margin: 0;
	color: #191919;
	font-size: 40px;
	font-weight: 500;
	line-height: 1.1;
	letter-spacing: -0.03em;
	text-transform: none;
}

.ev-modal .ev-done__title:focus {
	outline: none;
}

.ev-modal .ev-done__text {
	margin: 0;
	font-size: 18px;
	line-height: 1.5;
}

.ev-modal .ev-done__note {
	display: flex;
	align-items: flex-start;
	gap: 16px;
	margin: 0;
	padding-block: 20px;
	border-block: 1px solid #d9d9d9;
	font-size: 15px;
	line-height: 1.4;
}

.ev-modal .ev-done__note .ev-icon {
	width: 20px;
	height: 16px;
	margin-block-start: 2px;
}

.ev-modal .ev-done__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-block-start: 12px;
}

.ev-modal .ev-done__btn {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 14px 24px;
	border: 1px solid #191919;
	border-radius: 100px;
	background: #fff;
	color: #191919;
	font: inherit;
	font-size: 15px;
	font-weight: 500;
	letter-spacing: 0.02em;
	text-decoration: none;
	text-transform: uppercase;
	cursor: pointer;
}

.ev-modal .ev-done__btn--primary {
	border-color: #ef1d40;
	background: #ef1d40;
	color: #fff;
}

.ev-modal .ev-done__btn--primary:hover,
.ev-modal .ev-done__btn--primary:focus-visible {
	color: #fff;
}

.ev-modal .ev-done__help {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 8px;
	margin: 0;
	color: #8a8a8a;
	font-size: 13px;
}

.ev-modal .ev-done__help a {
	color: #191919;
	font-weight: 700;
	text-decoration: underline;
}

@media (min-width: 900px) {
	.ev-modal .ev-modal__panels {
		grid-template-columns: 600px minmax(0, 1fr);
		min-height: min(745px, calc(100vh - 32px));
	}

	.ev-modal .ev-modal__aside {
		gap: 24px;
		padding: 28px 50px 50px 33px;
	}

	.ev-modal .ev-modal__event {
		display: none;
	}

	.ev-modal .ev-modal__img {
		display: block;
		width: 100%;
		max-width: 500px;
		margin-block-start: 60px;
		aspect-ratio: 500 / 281;
		object-fit: cover;
		border-radius: 3px;
	}

	.ev-modal .ev-modal__main {
		display: flex;
		flex-direction: column;
		justify-content: center;
		padding: 64px 43px 48px 37px;
	}

	.ev-modal .ev-modal__title {
		font-size: 40px;
	}

	.ev-modal .ev-done__title {
		font-size: 56px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ev-single .ev-rsvp,
	.ev-modal .ev-done__btn {
		transition: none;
	}
}
