/**
 * Single Event (single-event.php).
 * Built from the site's own patterns (lizzie-bell/site-style-audit.md):
 * hero = Home hero text box, details = Home pattern section with a Donate-style
 * card for the facts, flyer = plain image,
 * sponsorship = Home yellow banner. Width: .w-1200. Buttons: tlb_button().
 */

/*--------------------------------------------------------------
# Block contents
--------------------------------------------------------------*/
.lp-event .lp-block {
	padding-block: var(--tlb-space-section);
}

.lp-event .block-contents {
	display: flex;
	flex-direction: column;
	position: relative;
	z-index: 3;
}

/* Hero (Home hero: text box 605px aligned right in 1520px)
--------------------------------------------- */
.lp-event-hero {
	display: flex;
	align-items: center;
	position: relative;
	min-height: 430px;
	padding: calc(var(--tlb-header-offset) + 1em) 1em 1em;
	overflow: hidden;
	background-color: var(--tlb-hero-bg);
	border-bottom: 8px solid var(--tlb-yellow);
}

.lp-event-hero__image {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 0% 50%;
	z-index: 0;
}

.lp-event-hero__contents {
	display: flex;
	justify-content: flex-end;
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 1520px;
	margin-inline: auto;
}

/* Logo or graphic header: show it whole on the dark backing, centered in the
   free space left of the text box (photos keep cover). */
.lp-event-hero--logo {
	background-color: var(--tlb-logo-backing);
}

.lp-event-hero--logo .lp-event-hero__image {
	inset: calc(var(--tlb-header-offset) + 1em) auto 1em 1em;
	width: calc(min(100% - 1em, 50% + 760px) - 605px - 3em);
	height: auto;
	max-height: calc(100% - var(--tlb-header-offset) - 2em);
	object-fit: contain;
	object-position: 50% 50%;
}

.lp-event-hero--no-image .lp-event-hero__contents {
	justify-content: center;
}

.lp-event-hero__box {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 20px;
	width: 100%;
	max-width: 605px;
}

.lp-event-hero__bar {
	width: 100%;
}

/* Sponsors
--------------------------------------------- */
.lp-event-sponsors {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.lp-event-sponsors__list {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 20px 40px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.lp-event-sponsors__logo {
	display: block;
	width: auto;
	max-width: 240px;
	height: auto;
	max-height: 96px;
}

/* Details (Home pattern section)
--------------------------------------------- */
.lp-event-details {
	position: relative;
	background-color: #f2f2f2;
	background-image: url("../images/subtle-pattern.png");
	background-position: center;
	background-size: cover;
}

.lp-event-details .block-contents {
	align-items: center;
	gap: var(--tlb-space-block);
}

/* Same container as the Donate cards (.three-col-cards-container) */
.lp-event-details__contents {
	width: 100%;
	max-width: 1240px;
	margin-inline: auto;
	padding-inline: 20px;
	box-sizing: border-box;
}

/* Facts box (Donate card: radius 28, shadow, padding 32/16)
   Equal cells, site dashed divider (.dotted-left707) between them.
--------------------------------------------- */
.lp-event-facts {
	display: grid;
	grid-auto-columns: minmax(0, 1fr);
	grid-auto-flow: column;
	width: 100%;
	margin: 0;
	padding: 32px 16px;
	list-style: none;
	border-radius: var(--tlb-radius-card);
	background-color: var(--tlb-white);
	box-shadow: var(--tlb-shadow-card);
	box-sizing: border-box;
}

.lp-event-fact {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	padding: 0 16px;
	text-align: center;
}

.lp-event-fact + .lp-event-fact {
	border-left: var(--tlb-divider);
}

/* Icon over the site's yellow splash (as .help-icons on How to Help) */
.lp-event-fact__icon {
	display: flex;
	justify-content: center;
	width: var(--tlb-icon-row);
	height: var(--tlb-icon-row);
	background: url("../images/splash.svg") center 20% / 100% auto no-repeat;
}

.lp-event-fact__icon img {
	display: block;
	width: var(--tlb-icon-row);
	height: var(--tlb-icon-row);
}

.lp-event-details__body {
	width: 100%;
	max-width: 605px;
}

.lp-event-details__body > :last-child {
	margin-bottom: 0;
}

.lp-event-details__actions {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 20px;
}

.lp-event-details__calendar {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px 12px;
	margin: 0;
}

/* Ticket row: main button + "Limited Availability" label
--------------------------------------------- */
.lp-event-tickets {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px 16px;
}

.lp-event-tickets--details {
	justify-content: center;
}

.lp-event-tickets__label {
	display: inline-block;
	padding: 4px 16px;
	border-radius: var(--tlb-radius-pill);
	background-color: var(--tlb-yellow);
}

/* Flyer
--------------------------------------------- */
.lp-event-flyer .block-contents {
	align-items: center;
}

.lp-event-flyer__image {
	display: block;
	max-width: 100%;
	height: auto;
}

/* Sponsorship (Home yellow banner)
--------------------------------------------- */
.lp-event.lp-event .lp-event-sponsorship {
	display: flex;
	align-items: center;
	position: relative;
	overflow: hidden;
	min-height: 189px;
	padding: 1em;
	background-color: var(--tlb-yellow);
}

.lp-event-sponsorship .block-contents {
	flex-direction: row;
	gap: 20px;
}

.lp-event-sponsorship__header {
	flex: 0 1 500px;
	max-width: 500px;
}

.lp-event-sponsorship__body {
	flex: 1 1 0;
	max-width: 605px;
}

.lp-event-sponsorship__contact {
	margin: 0;
}

.lp-event-sponsorship__word {
	position: absolute;
	right: 40px;
	bottom: -115px;
	z-index: 1;
	pointer-events: none;
}

/* Back link
--------------------------------------------- */
.lp-event-back .block-contents {
	align-items: center;
	padding-top: var(--tlb-space-section);
}

/* Responsive
--------------------------------------------- */
@media (max-width: 1100px) {
	.lp-event-facts {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		grid-auto-flow: row;
		padding-block: 0;
	}

	.lp-event-fact,
	.lp-event-fact + .lp-event-fact {
		padding-block: 24px;
		border-left: 0;
	}

	.lp-event-fact:nth-child(2n) {
		border-left: var(--tlb-divider);
	}

	.lp-event-fact:nth-child(n + 3) {
		border-top: var(--tlb-divider);
	}

	/* Odd count (e.g. no price): the last cell takes the full row, no empty cell. */
	.lp-event-fact:last-child:nth-child(odd) {
		grid-column: 1 / -1;
	}
}

@media (max-width: 900px) {
	.lp-event.lp-event .lp-event-sponsorship {
		padding: 40px 0;
	}

	.lp-event-sponsorship .block-contents {
		flex-direction: column;
	}

	.lp-event-sponsorship__header {
		flex-basis: auto;
	}
}

@media (max-width: 781px) {
	.lp-event-hero {
		display: block;
		min-height: 0;
		padding: var(--tlb-header-offset) 0 0;
		background-color: transparent;
	}

	.lp-event-hero__image {
		position: static;
		height: auto;
		aspect-ratio: 4 / 3;
		background-color: var(--tlb-hero-bg);
	}

	.lp-event-hero--logo .lp-event-hero__image {
		width: 100%;
		max-height: none;
		background-color: var(--tlb-logo-backing);
	}

	.lp-event-details__calendar {
		flex-direction: column;
		align-items: center;
	}

	.lp-event-details__separator {
		display: none;
	}

	.lp-event-hero__contents {
		padding: var(--tlb-space-block) 3%;
	}

	.lp-event-facts {
		grid-template-columns: minmax(0, 1fr);
	}

	.lp-event-fact:nth-child(2n) {
		border-left: 0;
	}

	.lp-event-fact + .lp-event-fact {
		border-top: var(--tlb-divider);
	}

	/* Sponsor logos are white: keep a dark backing once the hero turns white (CC .gala-logo-mobile). */
	.lp-event-sponsors__item {
		padding: 16px;
		border-radius: var(--tlb-radius-image);
		background-color: var(--tlb-logo-backing);
	}
}

/*--------------------------------------------------------------
# Typography
--------------------------------------------------------------*/

/* Hero (white on the header image)
--------------------------------------------- */
.lp-event-hero__title {
	margin: 0;
	text-wrap: balance;
	color: var(--tlb-white);
	font-size: var(--tlb-text-title-lg);
	line-height: 1;
}

.lp-event-hero__meta,
.lp-event-hero__notice {
	margin: 0;
	color: var(--tlb-white);
	font-size: var(--tlb-text-lead);
}

.lp-event-sponsors__header {
	margin: 0;
	color: var(--tlb-white);
	font-size: 1em;
}

/* Details
--------------------------------------------- */
.lp-event-fact__header {
	margin: 0;
	font-size: var(--tlb-text-lead);
	font-weight: 700;
	line-height: 1.3;
}

.lp-event-fact__body {
	margin: 0;
}

.lp-event-tickets__label {
	color: var(--tlb-ink);
	font-size: var(--tlb-text-body);
	font-weight: 700;
}


.lp-event-details__body {
	font-size: var(--tlb-text-lead);
	text-align: left;
}

.lp-event-details__body :is(h2, h3, h4) {
	text-align: center;
}

.lp-event-details__body img {
	max-width: 100%;
	height: auto;
}

/* Sponsorship
--------------------------------------------- */
.lp-event-sponsorship__header {
	margin: 0;
	font-size: var(--tlb-text-title-md);
	line-height: 1;
}

.lp-event-sponsorship__text {
	margin: 0 0 12px;
	font-size: var(--tlb-text-body);
}

.lp-event-sponsorship__word {
	color: var(--tlb-orange);
	font-size: 200px;
	font-weight: 700;
	line-height: normal;
	text-transform: uppercase;
	opacity: 0.25;
}

@media (max-width: 1100px) {
	.lp-event-hero__title {
		font-size: var(--tlb-text-title-lg-mobile);
	}

	.lp-event-sponsorship__word {
		bottom: -60px;
		font-size: 120px;
	}
}

@media (max-width: 781px) {
	.lp-event-hero__title,
	.lp-event-hero__meta,
	.lp-event-hero__notice,
	.lp-event-sponsors__header {
		color: var(--tlb-body);
	}
}

@media (max-width: 750px) {
	.lp-event-sponsorship__word {
		right: -20px;
		bottom: -40px;
		font-size: 90px;
	}
}
