/**
 * Awards: Past Winners and Submit Nomination.
 *
 * Four components, one stylesheet:
 *   .wyohs-awards--archive   the year index of winner lists
 *   .wyohs-awards--manual    the Awards Manual panel
 *   .wyohs-awards--forms     the eight nomination category cards
 *   .wyohs-awards--coda      the closing statement band
 *
 * The archive deliberately reuses Wyoming History News's measurements — 64px
 * cover, 24px gutter, the 2px section rule, the hairline between rows — so the
 * two archives read as the same kind of object. Anything changed there should
 * be changed in whn.css too.
 *
 * Type comes through the --wyohs-* custom properties defined in home.css. No
 * font family is named here that is not already on the site.
 */

.wyohs-awards {
	max-width: 1160px;
	margin: 60px auto 0;
	text-align: left;
}

.wyohs-awards a {
	text-decoration: none;
}

/* ---------------------------------------------------------------- *
 * Past Winners: the year index
 * ---------------------------------------------------------------- */

.wyohs-awards__head {
	display: flex;
	align-items: baseline;
	gap: 16px;
	flex-wrap: wrap;
	padding-bottom: 14px;
	margin-bottom: 8px;
	border-bottom: 2px solid rgba(26, 26, 26, 0.22);
}

.wyohs-awards__head-title {
	margin: 0;
	font-family: var(--wyohs-serif, "Young Serif"), Georgia, serif;
	font-size: 32px;
	line-height: 1.15;
	font-weight: 400;
	color: var(--wyohs-ink, #1a1a1a);
}

.wyohs-awards__head-count {
	margin: 0;
	font-family: var(--wyohs-display, "Special Gothic Condensed One"), "Arial Narrow", sans-serif;
	font-size: 18px;
	letter-spacing: 1.6px;
	text-transform: uppercase;
	color: var(--wyohs-ink, #1a1a1a);
}

.wyohs-awards__list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.wyohs-awards__item + .wyohs-awards__item {
	border-top: 1px solid rgba(26, 26, 26, 0.12);
}

.wyohs-awards__link {
	display: grid;
	grid-template-columns: 64px 1fr auto;
	align-items: center;
	gap: 24px;
	padding: 18px 16px 18px 8px;
	color: var(--wyohs-ink, #1a1a1a);
	transition: background-color 0.18s ease;
}

.wyohs-awards__link:hover,
.wyohs-awards__link:focus-visible {
	background: rgba(246, 215, 179, 0.34);
}

.wyohs-awards__cover {
	display: block;
	width: 64px;
}

.wyohs-awards__cover-img {
	display: block;
	width: 62px;
	height: auto;
	box-shadow: 0 1px 2px rgba(26, 26, 26, 0.18);
}

.wyohs-awards__text {
	display: block;
	min-width: 0;
}

.wyohs-awards__year {
	display: block;
	font-family: var(--wyohs-serif, "Young Serif"), Georgia, serif;
	font-size: 26px;
	line-height: 1.1;
	color: var(--wyohs-navy, #1b3a5c);
}

.wyohs-awards__teaser {
	display: block;
	margin-top: 5px;
	font-family: "Special Gothic", sans-serif;
	font-size: 15px;
	color: #5c5c5c;
}

/**
 * The meta line sits under the year rather than at the far right of the row.
 * Wyoming History News puts it there because a cover story fills the middle;
 * a winners list has no cover story, and a year alone at the left with two
 * figures 900px away reads as a mistake rather than as a table.
 */
.wyohs-awards__meta {
	display: flex;
	align-items: baseline;
	gap: 16px;
	margin-top: 7px;
}

.wyohs-awards__pages,
.wyohs-awards__size {
	font-family: var(--wyohs-display, "Special Gothic Condensed One"), "Arial Narrow", sans-serif;
	font-size: 13px;
	letter-spacing: 2px;
	text-transform: uppercase;
	color: #5c5c5c;
	white-space: nowrap;
}

.wyohs-awards__chev {
	font-size: 22px;
	line-height: 1;
	color: var(--wyohs-sand, #d2a56c);
	transition: transform 0.18s ease;
}

.wyohs-awards__link:hover .wyohs-awards__chev {
	transform: translateX(4px);
}

@media (max-width: 620px) {

	.wyohs-awards__link {
		grid-template-columns: 48px 1fr auto;
		gap: 16px;
		padding: 16px 4px;
	}

	.wyohs-awards__cover {
		width: 48px;
	}

	.wyohs-awards__cover-img {
		width: 46px;
	}

	.wyohs-awards__year {
		font-size: 23px;
	}

	.wyohs-awards__meta {
		gap: 12px;
	}
}

/* ---------------------------------------------------------------- *
 * The Awards Manual panel
 *
 * Geometry is Wyoming History News's current-issue panel: the plate is taken
 * out of the flow and laps the panel's left edge, so the bar and the field are
 * both indented past it. Change --am-cover-w, --am-cover-out or the tilt and
 * --am-nudge (half the total left overhang) has to be recomputed, or the whole
 * composition sits off centre.
 * ---------------------------------------------------------------- */

.wyohs-awards--manual {
	--am-cover-w: 300px;
	--am-cover-out: 24px;
	--am-cover-gap: 30px;
	--am-nudge: 18px;
	--am-indent: calc(var(--am-cover-w) - var(--am-cover-out) + var(--am-cover-gap));
}

.wyohs-awards__panel {
	position: relative;
	left: var(--am-nudge);
	width: fit-content;
	max-width: 100%;
	margin: 0 auto;
}

.wyohs-awards__plate {
	position: absolute;
	top: 50%;
	left: calc(-1 * var(--am-cover-out));
	z-index: 2;
	display: block;
	width: var(--am-cover-w);
	transform: translateY(-50%) rotate(-3.4deg);
	transform-origin: 50% 50%;
	transition: transform 0.25s ease;
}

.wyohs-awards__plate-img {
	display: block;
	width: 100%;
	height: auto;
	box-shadow: 0 2px 6px rgba(26, 26, 26, 0.22), 0 18px 40px rgba(26, 26, 26, 0.22);
}

.wyohs-awards__panel:hover .wyohs-awards__plate {
	transform: translateY(calc(-50% - 5px)) rotate(-1.1deg);
}

.wyohs-awards__bar {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 30px;
	padding: 11px 28px 11px var(--am-indent);
	background: var(--wyohs-sand, #d2a56c);
}

.wyohs-awards__bar-label,
.wyohs-awards__bar-meta {
	font-family: var(--wyohs-display, "Special Gothic Condensed One"), "Arial Narrow", sans-serif;
	font-size: 14px;
	letter-spacing: 2.2px;
	text-transform: uppercase;
	color: #4a2f14;
	white-space: nowrap;
}

.wyohs-awards__field {
	padding: 28px 34px 32px var(--am-indent);
	background: var(--wyohs-peach, #f6d7b3);
}

.wyohs-awards__manual-title {
	margin: 0;
	font-family: var(--wyohs-serif, "Young Serif"), Georgia, serif;
	font-size: 34px;
	line-height: 1.15;
	font-weight: 400;
	color: var(--wyohs-navy, #1b3a5c);
}

.wyohs-awards__manual-teaser {
	max-width: 46ch;
	margin: 10px 0 0;
	font-size: 16px;
	line-height: 1.55;
	color: #3a2c1c;
}

.wyohs-awards__cta,
.wyohs-prose a.wyohs-awards__cta {
	display: inline-block;
	margin-top: 22px;
	padding: 13px 26px;
	background: var(--wyohs-navy, #1b3a5c);
	border: 0;
	font-family: var(--wyohs-display, "Special Gothic Condensed One"), "Arial Narrow", sans-serif;
	font-size: 16px;
	letter-spacing: 2.4px;
	text-transform: uppercase;
	color: var(--wyohs-cream, #fff8e7);
	text-decoration: none;
	transition: background-color 0.18s ease;
}

.wyohs-awards__cta:hover,
.wyohs-awards__cta:focus-visible,
.wyohs-awards__panel:hover .wyohs-awards__cta,
.wyohs-prose .wyohs-awards__panel:hover a.wyohs-awards__cta {
	background: #14293f;
	color: var(--wyohs-cream, #fff8e7);
}

@media (max-width: 780px) {

	.wyohs-awards--manual {
		--am-cover-w: 220px;
		--am-cover-gap: 22px;
		--am-nudge: 14px;
	}

	.wyohs-awards__manual-title {
		font-size: 28px;
	}
}

@media (max-width: 640px) {

	.wyohs-awards--manual {
		--am-indent: 26px;
	}

	.wyohs-awards__panel {
		left: 0;
		width: auto;
	}

	.wyohs-awards__plate {
		position: static;
		width: 190px;
		margin: 0 0 20px;
		transform: rotate(-2deg);
	}

	.wyohs-awards__panel:hover .wyohs-awards__plate {
		transform: rotate(-1deg);
	}

	.wyohs-awards__bar {
		flex-direction: column;
		gap: 4px;
		padding: 11px 22px;
	}

	.wyohs-awards__bar-label,
	.wyohs-awards__bar-meta {
		white-space: normal;
	}

	.wyohs-awards__field {
		padding: 24px 22px 28px;
	}
}


/* ---------------------------------------------------------------- *
 * The nomination categories
 *
 * From here down, every element is a native Beaver Builder module — Box,
 * Heading, Text Editor, Button — so the Society can edit the words from the
 * front end. Nothing below is generated by a shortcode.
 *
 * Beaver Builder puts the module's Advanced → Class straight onto the module
 * element, so `.wyohs-awards__card-name` **is** the `h3` and
 * `.wyohs-awards__card-foot` **is** the button wrapper. There is no inner
 * wrapper to target, which is why these selectors look flatter than the ones
 * above.
 *
 * The card is the Staff and Board idiom: flat peach field, serif name over a
 * hairline, condensed uppercase supporting copy, navy foot bar with a trailing
 * chevron.
 * ---------------------------------------------------------------- */

/*
 * Section head: one Heading module carrying a span for the note.
 *
 * Two things need saying about the selectors from here down. The theme styles
 * `.fl-heading` at 38px condensed uppercase, which beats a single class, so
 * these carry `.fl-builder-content` in front of them. And the content column is
 * a flex column 1440px wide, where `margin: 0 auto` does not centre a narrower
 * child — `align-self: center` does.
 */
.fl-builder-content h2.wyohs-awards__section {
	align-self: center;
	width: 100%;
	max-width: 1160px;
	margin: 60px auto 0;
	padding-bottom: 14px;
	border-bottom: 2px solid rgba(26, 26, 26, 0.22);
	font-family: var(--wyohs-serif, "Young Serif"), Georgia, serif;
	font-size: 32px;
	line-height: 1.15;
	font-weight: 400;
	letter-spacing: normal;
	text-transform: none;
	color: var(--wyohs-ink, #1a1a1a);
	text-align: left;
}

.wyohs-awards__section-note {
	display: inline-block;
	margin-left: 16px;
	font-family: var(--wyohs-display, "Special Gothic Condensed One"), "Arial Narrow", sans-serif;
	font-size: 18px;
	line-height: 1;
	letter-spacing: 1.6px;
	text-transform: uppercase;
	color: var(--wyohs-ink, #1a1a1a);
}

/*
 * The wrapper Box holding the eight card Boxes.
 *
 * `display: grid` and the cards' vertical stack come from the Box modules' own
 * Layout settings, set in the builder. The **track list does not**: Beaver
 * Builder writes `.fl-builder-content-65 .fl-node-XXXX { display: grid; gap:
 * 10px }` and never emits `grid-template-columns`, whatever the Layout →
 * Columns field is set to, so the grid collapses to one implicit column. Hence
 * the columns and the gap here, at three classes so they clear BB's two.
 */
.wyohs-awards__cards {
	align-self: center;
	width: 100%;
	max-width: 1160px;
	margin: 34px auto 0;
}

.fl-builder-content .wyohs-awards__cards.fl-module-box {
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 26px;
}

.wyohs-awards__card {
	background: var(--wyohs-peach, #f6d7b3);
	transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.wyohs-awards__card:hover {
	transform: translateY(-3px);
	box-shadow: 0 10px 24px rgba(26, 26, 26, 0.16);
}

/*
 * The hairline is a pseudo-element rather than a border, because the column
 * zeroes module side margins, so the rule has to be inset from inside the
 * heading's own padding.
 */
.fl-builder-content .wyohs-awards__card h3.wyohs-awards__card-name {
	position: relative;
	margin: 0 0 14px;
	padding: 26px 28px 12px;
	font-family: var(--wyohs-serif, "Young Serif"), Georgia, serif;
	font-size: 26px;
	line-height: 1.15;
	font-weight: 400;
	letter-spacing: normal;
	text-transform: none;
	color: var(--wyohs-navy, #1b3a5c);
	text-align: left;
}

.fl-builder-content .wyohs-awards__card h3.wyohs-awards__card-name::after {
	content: "";
	position: absolute;
	right: 28px;
	bottom: 0;
	left: 28px;
	border-bottom: 1px solid rgba(26, 26, 26, 0.2);
}

.wyohs-awards__card-blurb {
	flex: 1 1 auto;
	padding: 0 28px 24px;
	text-align: left;
}

.wyohs-awards__card-blurb p {
	margin: 0;
	font-size: 15.5px;
	line-height: 1.6;
	color: #3a2c1c;
}

.wyohs-awards__card-blurb em {
	font-style: italic;
}

/* The sub-awards inside a category, middot separated. */
.wyohs-awards__card-blurb p.wyohs-awards__card-items {
	margin-top: 16px;
	font-family: var(--wyohs-display, "Special Gothic Condensed One"), "Arial Narrow", sans-serif;
	font-size: 13px;
	line-height: 1.7;
	letter-spacing: 1.6px;
	text-transform: uppercase;
	color: #6b4a24;
}

/*
 * The Button module. Beaver Builder writes its own `.fl-node-XXXX .fl-button`
 * rules, so these need the extra class to win, and a few of them need the
 * flag: BB sets padding and colour inline-equivalent per node.
 */
.wyohs-awards__card-foot {
	margin-top: auto;
}

.fl-builder-content .wyohs-awards__card .wyohs-awards__card-foot a.fl-button,
.fl-builder-content .wyohs-awards__card .wyohs-awards__card-foot a.fl-button:visited {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	width: 100%;
	padding: 14px 28px !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: var(--wyohs-navy, #1b3a5c) !important;
	box-shadow: none;
	font-family: var(--wyohs-display, "Special Gothic Condensed One"), "Arial Narrow", sans-serif;
	font-size: 15px;
	line-height: 1.2;
	letter-spacing: 2.4px;
	text-transform: uppercase;
	color: var(--wyohs-cream, #fff8e7) !important;
	text-decoration: none;
	transition: background-color 0.18s ease;
}

.fl-builder-content .wyohs-awards__card .wyohs-awards__card-foot a.fl-button .fl-button-text {
	font-family: inherit;
	font-size: inherit;
	letter-spacing: inherit;
	color: inherit;
}

.fl-builder-content .wyohs-awards__card .wyohs-awards__card-foot a.fl-button::after {
	content: "\203A";
	font-size: 20px;
	line-height: 1;
	color: var(--wyohs-sand, #d2a56c);
	transition: transform 0.18s ease;
}

.wyohs-awards__card:hover .wyohs-awards__card-foot a.fl-button::after {
	transform: translateX(4px);
}

.fl-builder-content .wyohs-awards__card:hover .wyohs-awards__card-foot a.fl-button {
	background: #14293f !important;
}

@media (max-width: 900px) {

	.fl-builder-content .wyohs-awards__cards.fl-module-box {
		grid-template-columns: minmax(0, 1fr);
		gap: 20px;
	}

	.fl-builder-content h2.wyohs-awards__section {
		font-size: 28px;
	}
}

@media (max-width: 620px) {

	.fl-builder-content h2.wyohs-awards__section {
		font-size: 26px;
	}

	.wyohs-awards__section-note {
		display: block;
		margin: 8px 0 0;
		font-size: 15px;
	}

	.fl-builder-content .wyohs-awards__card h3.wyohs-awards__card-name {
		margin: 0 0 12px;
		padding: 22px 22px 10px;
		font-size: 23px;
	}

	.fl-builder-content .wyohs-awards__card h3.wyohs-awards__card-name::after {
		right: 22px;
		left: 22px;
	}

	.wyohs-awards__card-blurb {
		padding: 0 22px 20px;
	}

	.fl-builder-content .wyohs-awards__card .wyohs-awards__card-foot a.fl-button {
		padding: 13px 22px !important;
		font-size: 14px;
	}
}

/* ---------------------------------------------------------------- *
 * The closing statement band
 *
 * Native modules again, inside the navy full-width row, so the row paints the
 * background and nothing here does.
 * ---------------------------------------------------------------- */

.wyohs-awards__eyebrow,
.wyohs-awards__statement,
.wyohs-awards__facts {
	max-width: 1160px;
	margin-left: auto !important;
	margin-right: auto !important;
	text-align: left;
}

.wyohs-awards__eyebrow {
	margin-top: 0 !important;
	margin-bottom: 0 !important;
	font-family: var(--wyohs-display, "Special Gothic Condensed One"), "Arial Narrow", sans-serif;
	font-size: 14px;
	line-height: 1.2;
	font-weight: 400;
	letter-spacing: 2.6px;
	text-transform: uppercase;
	color: var(--wyohs-sand, #d2a56c);
}

.fl-builder-content h2.wyohs-awards__statement {
	margin-top: 16px;
	margin-bottom: 0;
	font-family: var(--wyohs-serif, "Young Serif"), Georgia, serif;
	font-size: 36px;
	line-height: 1.28;
	font-weight: 400;
	letter-spacing: normal;
	text-transform: none;
	color: var(--wyohs-cream, #fff8e7);
}

/* Same story as the cards: BB gives us `display: grid`, we give it its tracks. */
.fl-builder-content .wyohs-awards__facts.fl-module-box {
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 40px;
}

.wyohs-awards__facts {
	margin-top: 44px !important;
	margin-bottom: 0 !important;
	padding-top: 32px;
	border-top: 1px solid rgba(255, 248, 231, 0.28);
}

.wyohs-awards__fact-label {
	margin: 0 0 10px !important;
	font-family: var(--wyohs-display, "Special Gothic Condensed One"), "Arial Narrow", sans-serif;
	font-size: 13px;
	line-height: 1.2;
	font-weight: 400;
	letter-spacing: 2.2px;
	text-transform: uppercase;
	color: var(--wyohs-sand, #d2a56c);
	text-align: left;
}

.wyohs-awards__fact-body,
.wyohs-awards__fact-body p {
	margin: 0;
	font-size: 15.5px;
	line-height: 1.68;
	color: rgba(255, 248, 231, 0.88);
	text-align: left;
}

.wyohs-awards__fact-body strong {
	font-weight: 400;
	color: var(--wyohs-cream, #fff8e7);
	border-bottom: 1px solid rgba(210, 165, 108, 0.7);
}

/* The theme strips underlines from links; these want them back. */
.fl-builder-content .wyohs-awards__fact .wyohs-awards__fact-body a {
	color: var(--wyohs-cream, #fff8e7);
	text-decoration: underline;
	text-decoration-color: rgba(210, 165, 108, 0.8);
	text-underline-offset: 3px;
}

.fl-builder-content .wyohs-awards__fact .wyohs-awards__fact-body a:hover {
	color: var(--wyohs-sand, #d2a56c);
	text-decoration-color: var(--wyohs-sand, #d2a56c);
}

@media (max-width: 900px) {

	.fl-builder-content h2.wyohs-awards__statement {
		font-size: 28px;
	}

	.fl-builder-content .wyohs-awards__facts.fl-module-box {
		grid-template-columns: minmax(0, 1fr);
		gap: 28px;
	}

	.wyohs-awards__facts {
		margin-top: 32px !important;
		padding-top: 26px;
	}
}

/* ---------------------------------------------------------------- *
 * Undoing the host module
 *
 * The two remaining shortcodes are meant to sit in their own HTML modules,
 * siblings of the lead prose rather than inside it. If one ever is printed
 * inside a .wyohs-prose module, that module centres its paragraphs, restyles
 * every heading and paints every link navy.
 * ---------------------------------------------------------------- */

.wyohs-prose .wyohs-awards,
.wyohs-prose .wyohs-awards p,
.wyohs-prose .wyohs-awards h2 {
	text-align: left;
}

.wyohs-prose .wyohs-awards__head-title,
.wyohs-prose .wyohs-awards__manual-title {
	font-family: var(--wyohs-serif, "Young Serif"), Georgia, serif;
	text-transform: none;
	letter-spacing: normal;
}

.wyohs-prose .wyohs-awards a.wyohs-awards__link {
	color: var(--wyohs-ink, #1a1a1a);
	text-decoration: none;
	border: 0;
}
