/*
 * Idaho Potato Chef Recipe Contest: /foodservice/chef-recipe-contest-phase1 (concept
 * entry), /foodservice/chef-recipe-contest-phase2 (full recipe) and
 * /foodservice/chef-recipe-contest-release (the release phase 2 links to), plus
 * the teaser on the Foodservice landing page.
 *
 * Measurements are from the Figma page "UI Design - 11.05 Foodservice Chef Forms"
 * in 23-1206 IPC 2024 Web Redesign. Everything is scoped to .crc-* so nothing
 * here can reach another page; headings and buttons still come from custom.css
 * (.h1, .accent-after, .btn).
 */

:root {
	--crc-brown: #3F211D;
	--crc-ink: #2C1B15;
	--crc-cream: #F5EBDD;
	--crc-paper: #FAF6EE;
	--crc-gold: #F3BC4D;
	--crc-blue: #3F61AA;
	--crc-required: #D30003;
	--crc-border: rgb(2 1 34 / 25%);
}

/* Hero: the supplied 2880x800 collage, shown whole at any width. */
.crc-hero img {
	display: block;
	width: 100%;
	height: auto;
}

/* Sections: 96px top and bottom on desktop, 16px body copy at 1.2. */
.crc-section {
	padding: 56px 0;
	font-size: 16px;
	line-height: 1.2;
	color: var(--crc-ink);
}

@media (min-width: 768px) {
	.crc-section {
		padding: 96px 0;
	}
}

.crc-section-dark {
	background-color: var(--crc-brown);
	color: var(--crc-paper);
}

.crc-section-cream {
	background-color: var(--crc-cream);
}

/* Title block: 951px wide, 32px from the rule to the copy. */
.crc-title-block {
	max-width: 951px;
}

.crc-title-block .h1 {
	margin-bottom: 32px;
}

.crc-section-dark .h1 {
	color: var(--crc-paper);
}

/* The dark band's rule is gold, not the light blue .accent-after draws. */
.crc-section-dark .accent-after::after {
	background-color: var(--crc-gold);
}

.crc-subtitle {
	font-family: "minion-pro", serif;
	font-weight: 500;
	font-size: 24px;
	line-height: 28px;
	margin: -20px 0 0;
	padding-bottom: 32px;
	position: relative;
}

.crc-subtitle::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 0;
	width: 80px;
	height: 4px;
	background-color: var(--color-palette-3);
}

.crc-copy {
	margin-top: 32px;
}

.crc-copy p {
	margin: 0 0 19px;
}

.crc-copy p:last-child {
	margin-bottom: 0;
}

.crc-copy a {
	text-decoration: underline;
	text-underline-offset: 2px;
}

/* The Recipe and Publicity Release page: the copy is the whole section, and it is
   legal text meant to be read through, so it gets more leading than the intros. */
.crc-release {
	margin-top: 0;
	line-height: 1.5;
}

/* Form: 590px wide, 40px between groups, 24px between fields, 8px label to input. */
.crc-form-wrap {
	max-width: 590px;
	margin-top: 40px;
}

.crc-form fieldset {
	border: 0;
	padding: 0;
	margin: 0 0 40px;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.crc-form legend {
	font-family: "minion-pro", serif;
	font-weight: 500;
	font-size: 24px;
	line-height: 28px;
	color: #000;
	padding: 0;
	margin-bottom: 24px;
}

.crc-form legend small {
	font-family: elza-text, sans-serif;
	font-weight: 400;
	font-size: 16px;
	margin-left: 6px;
	white-space: nowrap;
}

.crc-req {
	color: var(--crc-required);
}

.crc-form label,
.crc-form .crc-label {
	display: block;
	font-size: 16px;
	line-height: 1.2;
	margin: 0 0 8px;
}

/* Phase 2 field names: Elza 600 18px, upper case. */
.crc-form .crc-label-caps {
	font-weight: 600;
	font-size: 18px;
	text-transform: uppercase;
}

.crc-form .crc-label-strong {
	font-weight: 700;
}

.crc-form .crc-help {
	margin: 8px 0;
	font-size: 16px;
	line-height: 1.2;
}

/* The design leaves a blank line between a field name and its help text. */
.crc-form label + .crc-help {
	margin-top: 16px;
}

.crc-form .crc-help ul {
	list-style: disc;
	padding-left: 24px;
	margin: 0;
}

.crc-form input[type="text"],
.crc-form input[type="email"],
.crc-form input[type="tel"],
.crc-form input[type="number"],
.crc-form input[type="date"],
.crc-form select,
.crc-form textarea {
	display: block;
	width: 100%;
	height: 36px;
	background-color: #fff;
	color: var(--crc-ink);
	border: 1px solid var(--crc-border);
	border-radius: 0;
	padding: 0 10px;
	font-family: elza-text, sans-serif;
	font-size: 16px;
	line-height: 1.2;
}

.crc-form textarea {
	height: 200px;
	padding: 8px 10px;
	resize: vertical;
}

/* Select: 48px, bold upper-case value, chevron 16px from the right edge. */
.crc-form select {
	height: 48px;
	padding: 0 44px 0 16px;
	font-weight: 700;
	letter-spacing: 0.32px;
	text-transform: uppercase;
	appearance: none;
	-webkit-appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' viewBox='0 0 12 7' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%232C1B15' stroke-width='1.5'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 16px center;
	cursor: pointer;
}

.crc-form input:focus,
.crc-form select:focus,
.crc-form textarea:focus {
	outline: 2px solid var(--crc-blue);
	outline-offset: 1px;
}

.crc-form .crc-pair {
	display: flex;
	gap: 16px;
}

.crc-form .crc-pair > div {
	flex: 1 1 0;
	min-width: 0;
}

.crc-form .crc-narrow {
	max-width: 283px;
}

/* File input: 117x34 button, 3px radius, #EFEFEF. */
.crc-form input[type="file"] {
	display: block;
	width: 100%;
	color: var(--crc-ink);
	font-family: elza-text, sans-serif;
	font-size: 16px;
	line-height: 34px;
}

.crc-form input[type="file"]::file-selector-button {
	height: 34px;
	padding: 0 11px;
	margin-right: 13px;
	border: 0.5px solid var(--crc-ink);
	border-radius: 3px;
	background-color: #EFEFEF;
	color: var(--crc-ink);
	font-family: elza-text, sans-serif;
	font-size: 16px;
	cursor: pointer;
}

/* Checkboxes (20px white box) and radios (17px ring, 11px dot). */
.crc-form .crc-check,
.crc-form .crc-choice {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	margin: 0;
	cursor: pointer;
}

.crc-form .crc-choices {
	display: flex;
	flex-wrap: wrap;
	gap: 12px 24px;
	padding: 6px;
}

.crc-form input[type="checkbox"],
.crc-form input[type="radio"] {
	appearance: none;
	-webkit-appearance: none;
	flex: 0 0 auto;
	margin: 0;
	background-color: #fff;
	cursor: pointer;
	display: inline-grid;
	place-content: center;
}

.crc-form input[type="checkbox"] {
	width: 20px;
	height: 20px;
	border: 1px solid var(--crc-border);
}

.crc-form input[type="checkbox"]::before {
	content: "";
	width: 11px;
	height: 6px;
	border-left: 2px solid var(--crc-ink);
	border-bottom: 2px solid var(--crc-ink);
	transform: translateY(-1px) rotate(-45deg) scale(0);
	transition: transform .1s ease;
}

.crc-form input[type="checkbox"]:checked::before {
	transform: translateY(-1px) rotate(-45deg) scale(1);
}

.crc-form input[type="radio"] {
	width: 17px;
	height: 17px;
	border: 1px solid var(--crc-ink);
	border-radius: 50%;
	background-color: transparent;
}

.crc-form input[type="radio"]::before {
	content: "";
	width: 11px;
	height: 11px;
	border-radius: 50%;
	background: var(--crc-ink);
	transform: scale(0);
	transition: transform .1s ease;
}

.crc-form input[type="radio"]:checked::before {
	transform: scale(1);
}

.crc-form .crc-check a {
	text-decoration: underline;
	text-underline-offset: 2px;
}

/* Validation feedback and the thank-you. */
.crc-form .crc-field-error {
	margin: 6px 0 0;
	font-size: 14px;
	line-height: 1.4;
	color: var(--crc-required);
}

.crc-form [aria-invalid="true"] {
	border: 2px solid var(--crc-required);
}

.crc-notice {
	background-color: #fff;
	border-left: 6px solid var(--crc-blue);
	padding: 24px 28px;
	font-size: 16px;
	line-height: 1.4;
}

.crc-notice h2,
.crc-notice h3 {
	font-family: "minion-pro", serif;
	font-weight: 600;
	font-size: 24px;
	line-height: 28px;
	margin: 0 0 8px;
}

.crc-notice p {
	margin: 0 0 12px;
}

.crc-notice p:last-child {
	margin-bottom: 0;
}

.crc-notice a {
	text-decoration: underline;
	text-underline-offset: 2px;
}

.crc-notice-error {
	border-left-color: var(--crc-required);
	margin-bottom: 32px;
}

.crc-notice-error ul {
	list-style: disc;
	padding-left: 22px;
	margin: 0;
}

.crc-recaptcha {
	margin-bottom: 32px;
}

/* Foodservice Recipes cards under the concept form: paper background, 64px above the grid. */
.crc-recipes {
	background-color: var(--crc-paper);
}
