/*
 * WyoHS: /assets/exhibitions.css
 *
 * The exhibition list row and the single exhibition's where/when block.
 *
 * The list is the Statewide Calendar's list row, not a card grid. Every
 * measurement below was read off `/events-calendar/` with getComputedStyle
 * rather than guessed, so the two lists read as one device at two durations:
 * a 160px date rail with 24px of right padding, a 432px 16:9 plate at the
 * right, 40px of row padding, and one 1px rgba(27,58,92,.14) hairline between
 * rows.
 *
 * The calendar's rail stacks a weekday label over a day numeral. An exhibition
 * runs for months, so the rail carries the range instead: month label over day
 * numeral, twice, with a short sand rule between them.
 *
 * `.wyohs-venue-events` is NOT here. Those lists render on museum record
 * pages, where this sheet does not enqueue; their rules live in museums.css.
 */

.wyohs-exh {
	--exh-rail: 160px;
	--exh-rail-gap: 24px;
	--exh-plate: 360px;
	--exh-pad: 40px;
	--exh-rule: rgba(27, 58, 92, .14);
	--exh-navy: var(--wyohs-navy, #1b3a5c);
	--exh-ink: var(--wyohs-ink, #1a1a1a);
	--exh-accent: var(--wyohs-sand, #d2a56c);
	--exh-display: var(--wyohs-display, 'Special Gothic Condensed One', 'Arial Narrow', sans-serif);
	--exh-meta: 'Special Gothic', 'Helvetica Neue', Arial, sans-serif;
	--exh-serif: var(--wyohs-serif, 'Young Serif', Georgia, serif);

	/* The theme gives every module 20px of side margin above 992px and a
	   percentage resolves against the column's content box, so width:100%
	   without these runs 40px wider than its column and puts a horizontal
	   scrollbar on the document at 1200px. */
	width: 100%;
	margin-left: 0;
	margin-right: 0;
}

.wyohs-exh__row {
	display: flex;
	align-items: flex-start;
	gap: 0;
	padding: var(--exh-pad) 0;
	border-top: 1px solid var(--exh-rule);
}

.wyohs-exh__row:last-child {
	border-bottom: 1px solid var(--exh-rule);
}

/* -- The date rail -------------------------------------------------------- */

.wyohs-exh__when {
	flex: 0 0 var(--exh-rail);
	width: var(--exh-rail);
	margin: 0;
	padding: 0 var(--exh-rail-gap) 0 0;
}

.wyohs-exh__when-vis {
	display: block;
}

/* Announced once, in words, so the rail's two halves are not read as two
   separate dates with a stray rule between them. */
.wyohs-exh__when-sr {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

.wyohs-exh__when-part {
	display: block;
}

.wyohs-exh__when-mon {
	display: block;
	font-family: var(--exh-display);
	font-weight: 400;
	font-size: 13px;
	line-height: 1.5;
	letter-spacing: 2px;
	text-transform: uppercase;
	color: rgba(27, 58, 92, .7);
}

.wyohs-exh__when-day {
	display: block;
	font-family: var(--exh-display);
	font-weight: 400;
	font-size: 24px;
	line-height: 1.42;
	color: var(--exh-navy);
}

.wyohs-exh__when-sep {
	display: block;
	width: 16px;
	height: 1px;
	margin: 7px 0;
	background: var(--exh-accent);
}

/* An open-ended run has no closing numeral, so the label carries the line. */
.wyohs-exh__when-part--open .wyohs-exh__when-mon {
	color: var(--exh-navy);
}

/* -- The middle ----------------------------------------------------------- */

.wyohs-exh__main {
	flex: 1 1 auto;
	min-width: 0;
	padding-right: 32px;
}

.wyohs-exh__status {
	margin: 0 0 2px;
	font-family: var(--exh-display);
	font-weight: 400;
	font-size: 13px;
	line-height: 1.5;
	letter-spacing: 2px;
	text-transform: uppercase;
	color: rgba(27, 58, 92, .7);
}

/* `.fl-builder-content h3` is (0,1,1) and would set this in the condensed
   display face, uppercase. Name the parent and restate face, case and
   tracking; the responsive rule below has to name it too. */
.wyohs-exh .wyohs-exh__title {
	margin: 0 0 .35em;
	padding: 0;
	border: 0;
	font-family: var(--exh-serif);
	font-weight: 400;
	font-size: 24px;
	line-height: 1.42;
	letter-spacing: 0;
	text-transform: none;
	color: var(--exh-navy);
}

.wyohs-exh .wyohs-exh__title a,
.wyohs-exh .wyohs-exh__title a:visited {
	color: inherit;
	text-decoration: none;
	background: none;
	border-bottom: 0;
}

.wyohs-exh .wyohs-exh__title a:hover,
.wyohs-exh .wyohs-exh__title a:focus-visible {
	text-decoration: underline;
	text-decoration-color: var(--exh-accent);
	text-underline-offset: 3px;
}

.wyohs-exh__where {
	margin: 0 0 .5em;
	font-family: var(--exh-meta);
	font-size: 14px;
	line-height: 1.62;
	color: var(--exh-ink);
}

.wyohs-exh__where-name {
	font-weight: 700;
}

/* The dash hangs off the address rather than the name, so a venue with no
   street address never trails a dangling separator. */
.wyohs-exh__where-addr::before {
	content: "\00a0\2014\00a0";
	color: rgba(26, 26, 26, .55);
}

.wyohs-exh__teaser {
	margin: 0;
	max-width: 62ch;
	font-family: var(--exh-meta);
	font-size: 14px;
	line-height: 1.62;
	color: var(--exh-ink);
}

/* -- The plate ------------------------------------------------------------ */

.wyohs-exh__plate {
	position: relative;
	display: block;
	flex: 0 0 var(--exh-plate);
	width: var(--exh-plate);
	max-width: 100%;
	margin-left: auto;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: #2c1f17;
	border-bottom: 0;
}

.wyohs-exh__plate img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* An exhibition with no picture of its own and no host museum photograph gets
   the drawn pediment, the same mark the museums grid uses. Drawn rather than
   placed: the firewall rejects any save whose body holds a literal inline
   vector tag. */
.wyohs-exh__plate:not(:has(img))::before,
.wyohs-exh__plate:not(:has(img))::after {
	content: "";
	position: absolute;
	left: 50%;
	transform: translateX(-50%);
	opacity: .38;
}

.wyohs-exh__plate:not(:has(img))::before {
	top: calc(50% - 26px);
	width: 0;
	height: 0;
	border-left: 39px solid transparent;
	border-right: 39px solid transparent;
	border-bottom: 21px solid var(--exh-accent);
}

.wyohs-exh__plate:not(:has(img))::after {
	top: calc(50% - 3px);
	width: 62px;
	height: 30px;
	border-bottom: 4px solid var(--exh-accent);
	background-image: repeating-linear-gradient(
		to right,
		var(--exh-accent) 0 8px,
		transparent 8px 18px
	);
	background-size: 100% 26px;
	background-repeat: no-repeat;
}

/* -- A closed exhibition stays listed, and steps back --------------------- */

.wyohs-exh__row[data-status="closed"] .wyohs-exh__status {
	color: rgba(27, 58, 92, .45);
}

.wyohs-exh__row[data-status="closed"] .wyohs-exh__when-day,
.wyohs-exh__row[data-status="closed"] .wyohs-exh__when-part--open .wyohs-exh__when-mon {
	color: rgba(27, 58, 92, .55);
}

.wyohs-exh__row[data-status="closed"] .wyohs-exh__when-sep {
	background: rgba(210, 165, 108, .55);
}

.wyohs-exh__row[data-status="closed"] .wyohs-exh__plate img {
	filter: saturate(.55);
}

.wyohs-exh__empty {
	margin: 0;
	font-family: var(--exh-serif);
	font-size: 17px;
	line-height: 1.55;
	color: rgba(26, 26, 26, .72);
}

/* -- The single exhibition's where/when block ----------------------------- */

/* Same grid, hairlines and type as `.wyohs-museum__list`, so a reader moving
   between a museum record and an exhibition sees one kind of fact list. */
.wyohs-exh-facts {
	margin: 0 0 26px;
	padding: 0;
	display: grid;
	grid-template-columns: 132px minmax(0, 1fr);
	gap: 0;
	max-width: 780px;
}

.wyohs-exh-facts dt {
	margin: 0;
	padding: 13px 16px 13px 0;
	border-top: 1px solid rgba(26, 26, 26, .18);
	font-family: var(--wyohs-display, 'Special Gothic Condensed One', 'Arial Narrow', sans-serif);
	font-size: 15px;
	line-height: 1.4;
	letter-spacing: 1.4px;
	text-transform: uppercase;
	color: rgba(26, 26, 26, .72);
}

.wyohs-exh-facts dd {
	margin: 0;
	padding: 13px 0;
	border-top: 1px solid rgba(26, 26, 26, .18);
	font-family: var(--wyohs-serif, 'Young Serif', Georgia, serif);
	font-size: 17px;
	line-height: 1.55;
	color: var(--wyohs-ink, #1a1a1a);
}

.wyohs-exh-facts dd a {
	color: inherit;
	text-decoration: none;
	border-bottom: 1px solid var(--wyohs-sand, #d2a56c);
}

.wyohs-exh-facts dd a:hover {
	border-bottom-color: currentColor;
}

.wyohs-exh-facts .wyohs-venue {
	font-style: normal;
	margin: 0;
}

.wyohs-exh-facts .wyohs-venue__name {
	font-weight: 700;
}

.wyohs-exh-facts__cta {
	margin: 0 0 26px;
}

/* The site's button, as `.wyohs-museum__site` states it. Peach on navy needs
   `!important` on the colour because the theme's link rules reach inside. */
.wyohs-exh-facts__cta .wyohs-button,
.wyohs-exh-facts__cta .wyohs-button:visited {
	display: inline-block;
	padding: 14px 26px 12px;
	background: var(--wyohs-navy, #1b3a5c);
	font-family: var(--wyohs-display, 'Special Gothic Condensed One', 'Arial Narrow', sans-serif);
	font-size: 18px;
	line-height: 1.2;
	letter-spacing: 2px;
	text-transform: uppercase;
	text-decoration: none;
	border-bottom: 0;
	transition: filter .15s;
	color: var(--wyohs-peach, #f6d7b3) !important;
}

.wyohs-exh-facts__cta .wyohs-button::after {
	content: " >";
	font-size: .7em;
	vertical-align: .08em;
}

.wyohs-exh-facts__cta .wyohs-button:hover {
	filter: brightness(1.2);
}

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

@media (max-width: 1200px) {
	.wyohs-exh {
		--exh-plate: 340px;
		--exh-rail: 132px;
	}
}

@media (max-width: 992px) {
	.wyohs-exh {
		--exh-plate: 260px;
		--exh-pad: 32px;
	}

	.wyohs-exh__main {
		padding-right: 24px;
	}
}

/* Below this the three columns stop fitting, so the row becomes a block with
   the picture leading, which is the arrangement a phone reads best. */
@media (max-width: 768px) {
	.wyohs-exh__row {
		display: block;
		padding: 28px 0;
	}

	.wyohs-exh__plate {
		width: 100%;
		max-width: 100%;
		margin: 0 0 18px;
		aspect-ratio: 3 / 2;
	}

	.wyohs-exh__when {
		width: auto;
		padding: 0;
		margin: 0 0 10px;
	}

	.wyohs-exh__when-vis {
		display: flex;
		align-items: baseline;
		gap: 10px;
	}

	.wyohs-exh__when-part {
		display: flex;
		align-items: baseline;
		gap: 6px;
	}

	.wyohs-exh__when-mon,
	.wyohs-exh__when-day {
		display: inline;
	}

	.wyohs-exh__when-day {
		font-size: 20px;
		line-height: 1.2;
	}

	.wyohs-exh__when-sep {
		width: 14px;
		margin: 0;
		align-self: center;
	}

	.wyohs-exh__main {
		padding-right: 0;
	}

	.wyohs-exh .wyohs-exh__title {
		font-size: 22px;
		text-transform: none;
		letter-spacing: 0;
	}

	.wyohs-exh-facts {
		grid-template-columns: 1fr;
	}

	.wyohs-exh-facts dt {
		padding: 13px 0 0;
	}

	.wyohs-exh-facts dd {
		padding: 2px 0 13px;
		border-top: 0;
	}
}
