/**
 * Doosvinder (page-templates/template-doosvinder.php) – loaded on that
 * template only.
 *
 * Mobile: header, form, result stacked. From 1024px the form is a sticky
 * column on the left and the result (or the list of standard boxes) on the
 * right. The help block itself lives in project.css.
 */

.eno-finder {
	width: 100%;
	padding-block: 1.5rem 4rem;
}

/* Header ------------------------------------------------------------------ */

.eno-finder__header {
	max-width: 46rem;
	margin-bottom: 2rem;
}

.eno-finder__title {
	margin: 0;
	font-size: var(--eno-text-headline-lg);
	font-weight: 800;
	line-height: 1.1;
	letter-spacing: -0.02em;
	text-wrap: balance;
}

.eno-finder__intro {
	margin: 1rem 0 0;
	color: var(--eno-color-text-muted);
	font-size: var(--eno-text-body-lg);
	line-height: 1.6;
}

.eno-finder__notice {
	padding: 1rem 1.25rem;
	border-radius: var(--eno-radius);
	background-color: var(--eno-color-surface-low);
}

/* Layout ------------------------------------------------------------------ */

.eno-finder__layout {
	display: grid;
	gap: 2rem;
	align-items: start;
}

.eno-finder__result {
	min-width: 0;
	scroll-margin-top: 1.5rem;
}

.eno-finder__result:focus {
	outline: none;
}

@media (min-width: 1024px) {
	.eno-finder__layout {
		grid-template-columns: minmax(0, 25rem) minmax(0, 1fr);
		gap: 3rem;
	}

	.eno-finder-form {
		position: sticky;
		top: 1.5rem;
	}
}

@media (min-width: 1280px) {
	.eno-finder__layout {
		grid-template-columns: minmax(0, 27rem) minmax(0, 1fr);
		gap: 4rem;
	}
}

/* Form -------------------------------------------------------------------- */

.eno-finder-form {
	padding: 1.5rem 1.25rem;
	border: 1px solid var(--eno-color-surface-high);
	border-radius: var(--eno-radius-lg);
	background-color: var(--eno-color-white);
}

.eno-finder-form__step {
	position: relative;
	min-width: 0;
	margin: 0;
	padding: 0 0 1.5rem;
	border: 0;
	border-bottom: 1px solid var(--eno-color-surface-high);
}

.eno-finder-form__step + .eno-finder-form__step {
	padding-top: 1.5rem;
}

.eno-finder-form__legend {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	float: left;
	width: 100%;
	margin: 0 0 1rem;
	padding: 0;
	font-family: var(--eno-font-heading);
	font-size: 1.125rem;
	font-weight: 700;
	line-height: 1.3;
}

/* Legend floats, so the content below starts on a new line. */
.eno-finder-form__legend + * {
	clear: both;
}

.eno-finder-form__number {
	display: inline-grid;
	flex-shrink: 0;
	place-items: center;
	width: 1.75rem;
	height: 1.75rem;
	border: 1.5px solid var(--eno-color-orange);
	border-radius: 50%;
	color: var(--eno-color-orange-dark);
	font-size: var(--eno-text-label);
	font-weight: 800;
}

/* Room for the cm / mm toggle next to the first question. */
.eno-finder-form__step:first-of-type .eno-finder-form__legend {
	padding-right: 6.5rem;
}

/* cm / mm toggle, top right of step 1. */
.eno-finder-form__units {
	position: absolute;
	top: 0;
	right: 0;
	display: inline-flex;
	padding: 2px;
	border-radius: var(--eno-radius);
	background-color: var(--eno-color-surface-low);
}

.eno-finder-form__units + * {
	clear: both;
}

.eno-finder-form__unit {
	position: relative;
	cursor: pointer;
}

.eno-finder-form__unit input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.eno-finder-form__unit span {
	display: block;
	min-width: 2.5rem;
	padding: 0.25rem 0.625rem;
	border-radius: var(--eno-radius-sm);
	color: var(--eno-color-text-muted);
	font-size: var(--eno-text-label);
	font-weight: 600;
	text-align: center;
}

.eno-finder-form__unit input:checked + span {
	background-color: var(--eno-color-white);
	box-shadow: var(--eno-shadow-sm);
	color: var(--eno-color-text);
}

.eno-finder-form__unit input:focus-visible + span {
	outline: 2px solid var(--eno-color-orange);
	outline-offset: 1px;
}

.eno-finder-form__sizes {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 0.75rem;
}

.eno-finder-form__field label {
	display: block;
	margin-bottom: 0.375rem;
	color: var(--eno-color-text-muted);
	font-size: var(--eno-text-label);
	font-weight: 500;
}

.eno-finder-form .eno-finder-form__input {
	width: 100%;
	height: 3rem;
	padding: 0.5rem 0.875rem;
	border: 1px solid transparent;
	border-radius: var(--eno-radius-sm);
	background-color: var(--eno-color-surface-low);
	color: var(--eno-color-text);
	font-size: var(--eno-text-body-lg);
	appearance: textfield;
	-moz-appearance: textfield;
}

.eno-finder-form .eno-finder-form__input::-webkit-outer-spin-button,
.eno-finder-form .eno-finder-form__input::-webkit-inner-spin-button {
	margin: 0;
	-webkit-appearance: none;
}

.eno-finder-form .eno-finder-form__input:focus {
	border-color: var(--eno-color-orange);
	outline: none;
	background-color: var(--eno-color-white);
}

.eno-finder-form__field--quantity {
	max-width: 14rem;
}

.eno-finder-form__examples {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
	margin-top: 1rem;
}

.eno-finder-form__examples-label {
	color: var(--eno-color-text-muted);
	font-size: var(--eno-text-label);
}

.eno-finder-form__example {
	padding: 0.3125rem 0.75rem;
	border: 1px solid var(--eno-color-surface-high);
	border-radius: 999px;
	color: var(--eno-color-text);
	font-size: var(--eno-text-label);
	text-decoration: none;
	transition: border-color 150ms var(--eno-ease), background-color 150ms var(--eno-ease);
}

.eno-finder-form__example:hover,
.eno-finder-form__example:focus-visible {
	border-color: var(--eno-color-orange);
	background-color: var(--eno-color-orange-tint);
	color: var(--eno-color-text);
}

/* Protection level: radio cards. */
.eno-finder-form__options {
	display: grid;
	gap: 0.5rem;
}

.eno-finder-form__option {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
	padding: 0.75rem 1rem;
	border: 1px solid var(--eno-color-surface-high);
	border-radius: var(--eno-radius);
	cursor: pointer;
	transition: border-color 150ms var(--eno-ease), background-color 150ms var(--eno-ease);
}

.eno-finder-form__option:hover {
	border-color: var(--eno-color-outline);
}

.eno-finder-form__option:has(input:checked) {
	border-color: var(--eno-color-orange);
	background-color: var(--eno-color-orange-tint);
}

.eno-finder-form__option input {
	flex-shrink: 0;
	width: 1.125rem;
	height: 1.125rem;
	margin: 0.125rem 0 0;
	accent-color: var(--eno-color-orange);
}

.eno-finder-form__option-body {
	display: grid;
	gap: 0.125rem;
	line-height: 1.4;
}

.eno-finder-form__option-body strong {
	font-weight: 600;
}

.eno-finder-form__option-body span {
	color: var(--eno-color-text-muted);
	font-size: var(--eno-text-label);
}

.eno-finder-form__step:last-of-type {
	border-bottom: 0;
}

.eno-finder-form__submit {
	width: 100%;
	margin-top: 0.5rem;
}

@media (min-width: 768px) {
	.eno-finder-form {
		padding: 2rem;
	}
}

/* Error ------------------------------------------------------------------- */

.eno-finder__error {
	display: flex;
	gap: 0.5rem;
	align-items: flex-start;
	margin: 0 0 1.5rem;
	padding: 0.875rem 1rem;
	border-left: 3px solid var(--eno-color-orange);
	border-radius: 0 var(--eno-radius) var(--eno-radius) 0;
	background-color: var(--eno-color-orange-tint);
	font-weight: 500;
}

.eno-finder__error .eno-icon {
	margin-top: 0.125rem;
	color: var(--eno-color-orange-dark);
}

/* Result ------------------------------------------------------------------ */

.eno-finder-result {
	display: grid;
	gap: 1.5rem;
}

.eno-finder-result__title,
.eno-finder-overview__title {
	margin: 0;
	font-size: var(--eno-text-headline-md);
	font-weight: 800;
	line-height: 1.2;
	letter-spacing: -0.01em;
}

.eno-finder-result__summary {
	margin: 0.5rem 0 0;
	color: var(--eno-color-text-muted);
	font-size: var(--eno-text-label);
}

.eno-finder-result__hint {
	display: flex;
	gap: 0.5rem;
	align-items: flex-start;
	margin: 0;
	color: var(--eno-color-text-muted);
	font-size: var(--eno-text-label);
}

.eno-finder-result__hint .eno-icon {
	margin-top: 0.0625rem;
}

.eno-finder-result__subhead {
	margin: 0.5rem 0 -0.5rem;
	color: var(--eno-color-text-muted);
	font-size: var(--eno-text-small);
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.eno-finder-result__more {
	display: grid;
	gap: 1rem;
}

@media (min-width: 640px) {
	.eno-finder-result__more {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

/* Box card ---------------------------------------------------------------- */

.eno-finder-box {
	display: grid;
	grid-template-columns: 5.5rem minmax(0, 1fr);
	gap: 1rem;
	align-items: start;
	padding: 1rem;
	border: 1px solid var(--eno-color-surface-high);
	border-radius: var(--eno-radius-lg);
	background-color: var(--eno-color-white);
}

.eno-finder-box__media {
	display: block;
	overflow: hidden;
	aspect-ratio: 1;
	border-radius: var(--eno-radius);
	background-color: var(--eno-color-surface-low);
}

.eno-finder-box__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.eno-finder-box__body {
	display: grid;
	gap: 0.625rem;
	justify-items: start;
	min-width: 0;
}

.eno-finder-box__badge {
	display: inline-flex;
	align-items: center;
	gap: 0.375rem;
	padding: 0.25rem 0.625rem 0.25rem 0.5rem;
	border-radius: 999px;
	background-color: var(--eno-color-green-soft);
	color: var(--eno-color-green-ink);
	font-size: var(--eno-text-small);
	font-weight: 700;
}

.eno-finder-box__title {
	margin: 0;
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.3;
}

.eno-finder-box__title a {
	color: inherit;
	text-decoration: none;
}

.eno-finder-box__title a:hover,
.eno-finder-box__title a:focus-visible {
	color: var(--eno-color-orange-dark);
	text-decoration: underline;
}

.eno-finder-box__facts {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 1.5rem;
	margin: 0;
	font-size: var(--eno-text-label);
}

.eno-finder-box__facts dt {
	color: var(--eno-color-text-muted);
	font-size: var(--eno-text-small);
}

.eno-finder-box__facts dd {
	margin: 0;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
}

.eno-finder-box__price {
	margin: 0;
	color: var(--eno-color-text-muted);
	font-size: var(--eno-text-label);
}

.eno-finder-box__price strong {
	color: var(--eno-color-text);
	font-family: var(--eno-font-heading);
	font-size: 1.5rem;
	font-weight: 800;
}

.eno-finder-box__total {
	display: block;
	margin-top: 0.125rem;
	color: var(--eno-color-text);
	font-weight: 600;
}

.eno-finder-box__note {
	margin: 0;
	color: var(--eno-color-text-muted);
	font-size: var(--eno-text-small);
}

.eno-finder-box__cart {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-top: 0.25rem;
}

.eno-finder-box__cart .eno-finder-box__qty {
	width: 6.5rem;
	height: 2.875rem;
	padding: 0.5rem 0.75rem;
	border: 1px solid var(--eno-color-surface-high);
	border-radius: var(--eno-radius-sm);
	background-color: var(--eno-color-white);
	font-size: var(--eno-text-body);
}

.eno-finder-box__cart .eno-finder-box__qty:focus {
	border-color: var(--eno-color-orange);
	outline: none;
}

.eno-finder-box__link {
	font-size: var(--eno-text-label);
}

/* Best match: bigger, with an orange edge. */
.eno-finder-box--best {
	grid-template-columns: minmax(0, 1fr);
	padding: 1.25rem;
	border-color: var(--eno-color-orange);
	box-shadow: inset 0 3px 0 var(--eno-color-orange);
}

.eno-finder-box--best .eno-finder-box__media {
	max-width: 12rem;
}

.eno-finder-box--best .eno-finder-box__title {
	font-size: 1.25rem;
}

@media (min-width: 640px) {
	.eno-finder-box--best {
		grid-template-columns: 11rem minmax(0, 1fr);
		gap: 1.5rem;
		padding: 1.5rem;
	}

	.eno-finder-box--best .eno-finder-box__media {
		max-width: none;
	}
}

/* Custom size (configurator) ---------------------------------------------- */

.eno-finder-custom {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	gap: 1rem;
	align-items: start;
	padding: 1.25rem;
	border: 1px solid var(--eno-color-surface-high);
	border-radius: var(--eno-radius-lg);
	background-color: var(--eno-color-surface-low);
}

.eno-finder-custom--lead {
	border-color: transparent;
	background-color: var(--eno-color-kraft-soft);
}

.eno-finder-custom__icon {
	display: grid;
	place-items: center;
	width: 2.5rem;
	height: 2.5rem;
	border-radius: 50%;
	background-color: var(--eno-color-white);
	color: var(--eno-color-orange-dark);
}

.eno-finder-custom__title {
	margin: 0;
	font-size: 1.125rem;
	font-weight: 700;
	line-height: 1.3;
}

.eno-finder-custom__text {
	margin: 0.375rem 0 0;
	color: var(--eno-color-text-muted);
	font-size: var(--eno-text-label);
	line-height: 1.55;
}

.eno-finder-custom__size {
	margin: 0.625rem 0 0;
	font-size: var(--eno-text-label);
}

.eno-finder-custom__size strong {
	font-variant-numeric: tabular-nums;
}

.eno-finder-custom__button {
	grid-column: 1 / -1;
	justify-self: start;
}

@media (min-width: 768px) {
	.eno-finder-custom {
		grid-template-columns: auto minmax(0, 1fr) auto;
		align-items: center;
		padding: 1.5rem;
	}

	.eno-finder-custom__button {
		grid-column: auto;
	}
}

/* Extras ------------------------------------------------------------------ */

.eno-finder-extras__title {
	margin: 0 0 0.75rem;
	font-size: 1.125rem;
	font-weight: 700;
}

.eno-finder-extras__list {
	display: grid;
	gap: 0.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.eno-finder-extras__item {
	display: grid;
	grid-template-columns: 3rem minmax(0, 1fr) auto;
	gap: 0.875rem;
	align-items: center;
	padding: 0.5rem 1rem 0.5rem 0.5rem;
	border: 1px solid var(--eno-color-surface-high);
	border-radius: var(--eno-radius);
	background-color: var(--eno-color-white);
	color: var(--eno-color-text);
	text-decoration: none;
	transition: border-color 150ms var(--eno-ease);
}

.eno-finder-extras__item:hover,
.eno-finder-extras__item:focus-visible {
	border-color: var(--eno-color-orange);
	color: var(--eno-color-text);
}

.eno-finder-extras__item img {
	display: block;
	width: 3rem;
	height: 3rem;
	border-radius: var(--eno-radius-sm);
	object-fit: cover;
}

.eno-finder-extras__name {
	font-size: var(--eno-text-label);
	font-weight: 600;
}

.eno-finder-extras__price {
	color: var(--eno-color-text-muted);
	font-size: var(--eno-text-label);
	white-space: nowrap;
}

/* Overview of all standard boxes ------------------------------------------ */

.eno-finder-overview__text {
	margin: 0.5rem 0 1.25rem;
	color: var(--eno-color-text-muted);
}

.eno-finder-overview__table {
	width: 100%;
	margin: 0;
	border: 0;
	border-collapse: collapse;
	font-size: var(--eno-text-label);
	font-variant-numeric: tabular-nums;
}

.eno-finder-overview__table th,
.eno-finder-overview__table td {
	padding: 0.75rem 0.75rem 0.75rem 0;
	border: 0;
	border-bottom: 1px solid var(--eno-color-surface-high);
	text-align: left;
	vertical-align: middle;
}

.eno-finder-overview__table thead th {
	color: var(--eno-color-text-muted);
	font-size: var(--eno-text-small);
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.eno-finder-overview__table tbody th {
	font-weight: 700;
}

.eno-finder-overview__table tbody th a {
	color: var(--eno-color-text);
	text-decoration: none;
}

.eno-finder-overview__table tbody th a:hover,
.eno-finder-overview__table tbody th a:focus-visible {
	color: var(--eno-color-orange-dark);
	text-decoration: underline;
}

.eno-finder-overview__table td:last-child,
.eno-finder-overview__table th:last-child {
	padding-right: 0;
	text-align: right;
	white-space: nowrap;
}

.eno-finder-overview__note {
	margin: 0.75rem 0 0;
	color: var(--eno-color-text-muted);
	font-size: var(--eno-text-small);
}

/* Page text and help block ------------------------------------------------ */

.eno-finder__content {
	max-width: 50rem;
	margin-top: 4rem;
	font-size: 1.0625rem;
	line-height: 1.75;
}

.eno-finder__content > :first-child {
	margin-top: 0;
}

.eno-finder__content h2 {
	margin: 2.5rem 0 0.75rem;
	font-size: var(--eno-text-headline-md);
	line-height: 1.25;
}

.eno-finder__content h3 {
	margin: 2rem 0 0.5rem;
	font-size: 1.25rem;
}

.eno-finder__help {
	max-width: 50rem;
	margin-top: 3rem;
}
