/**
 * Parts lookup.
 *
 * Uses the theme's tokens where they exist and falls back to literals so the
 * shortcode still looks deliberate if it is ever dropped on a page under a
 * different theme.
 *
 * Brand green (#16A34A) does not reach AA against white, so text uses the
 * darker --green-700.
 */

/*
 * The lookup carries its own page gutter rather than relying on the template.
 * It is placed on the full-width tool template, which deliberately has no
 * padding so the mapping tool can bleed to the edge — without this the parts
 * table and the section index run off both sides of the screen.
 */
.tf-parts {
	font-family: var(--body, sans-serif);
	font-size: var(--fs-body, 1.0625rem);
	width: 100%;
	max-width: calc(var(--max, 1320px) + 2 * var(--gutter, 24px));
	margin-inline: auto;
	padding-inline: var(--gutter, 24px);
	padding-block: clamp(24px, 4vw, 48px);
}

.tf-parts-sent,
.tf-parts-error {
	padding: 12px 16px;
	border-left: 3px solid var(--green-700, #15803D);
	background: var(--sand, #F5F3E7);
	margin-bottom: 24px;
}

.tf-parts-error {
	border-left-color: #B42318;
}

/* Filters ---------------------------------------------------------------- */

.tf-parts-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	align-items: flex-end;
	padding: 20px;
	background: var(--sand, #F5F3E7);
	border: 1px solid var(--sand-line, #DEDBCB);
	border-radius: var(--radius, 2px);
	margin-bottom: 32px;
}

.tf-parts-field {
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 6px;
	flex: 1 1 220px;
}

.tf-parts-field label {
	font-size: var(--fs-label, .75rem);
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--stone-text, #575D68);
}

.tf-parts-field input,
.tf-parts-field select,
.tf-parts-field textarea {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid var(--sand-line, #DEDBCB);
	border-radius: var(--radius, 2px);
	background: var(--white, #fff);
	font: inherit;
	color: inherit;
}

.tf-parts-field button {
	padding: 11px 24px;
	border: 0;
	border-radius: var(--radius, 2px);
	background: var(--green-700, #15803D);
	color: var(--white, #fff);
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}

.tf-parts-field button:hover {
	background: var(--deep, #0B1F1A);
}

.tf-parts-field :focus-visible {
	outline: 2px solid var(--green-700, #15803D);
	outline-offset: 2px;
}

/* Results ---------------------------------------------------------------- */

.tf-parts-group {
	font-family: var(--display, sans-serif);
	font-size: var(--fs-h3, 1.15rem);
	margin: 32px 0 8px;
	padding-bottom: 6px;
	border-bottom: 1px solid var(--sand-line, #DEDBCB);
}

.tf-parts-table {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 8px;
}

.tf-parts-table th {
	text-align: left;
	font-size: var(--fs-label, .75rem);
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--stone-text, #575D68);
	padding: 8px 12px;
	border-bottom: 1px solid var(--sand-line, #DEDBCB);
	font-weight: 600;
}

.tf-parts-table td {
	padding: 12px;
	border-bottom: 1px solid var(--sand-line, #DEDBCB);
	vertical-align: top;
}

.tf-parts-number code {
	font-family: var(--mono, monospace);
	font-size: .9375rem;
	white-space: nowrap;
}

.tf-parts-price {
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
	font-weight: 600;
}

.tf-parts-stock {
	color: var(--stone-text, #575D68);
	font-size: var(--fs-small, .9375rem);
}

.tf-parts-note {
	display: block;
	font-size: var(--fs-small, .9375rem);
	color: var(--stone-text, #575D68);
	font-style: italic;
}

.tf-parts-pick {
	width: 36px;
}

.tf-parts-pick input {
	width: 20px;
	height: 20px;
}

.tf-parts-hint,
.tf-parts-empty {
	padding: 24px 0;
	color: var(--stone-text, #575D68);
}

/* Enquiry ---------------------------------------------------------------- */

.tf-parts-enquiry {
	margin-top: 40px;
	padding: 28px;
	background: var(--deep, #0B1F1A);
	color: var(--white, #fff);
	border-radius: var(--radius, 2px);
}

.tf-parts-enquiry h3 {
	font-family: var(--display, sans-serif);
	margin: 0 0 6px;
	color: var(--white, #fff);
}

.tf-parts-enquiry-intro {
	margin: 0 0 20px;
	color: var(--mist, #A7B3AC);
	font-size: var(--fs-small, .9375rem);
	max-width: 62ch;
}

.tf-parts-enquiry .tf-parts-field {
	margin-bottom: 14px;
}

.tf-parts-enquiry .tf-parts-field label {
	color: var(--mist, #A7B3AC);
}

.tf-parts-enquiry .tf-parts-field input,
.tf-parts-enquiry .tf-parts-field textarea {
	background: var(--deep-2, #10291F);
	border-color: var(--deep-line, #23403A);
	color: var(--white, #fff);
}

.tf-parts-enquiry .tf-parts-field :focus-visible {
	outline-color: var(--fresh, #7ED957);
}

/* The honeypot must be reachable by assistive tech but never seen or tabbed. */
.tf-parts-website {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* Phones: the table becomes a stack of cards ----------------------------- */

@media (max-width: 720px) {
	.tf-parts-table thead {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
		white-space: nowrap;
	}

	.tf-parts-table,
	.tf-parts-table tbody,
	.tf-parts-table tr,
	.tf-parts-table td {
		display: block;
		width: 100%;
	}

	.tf-parts-table tr {
		position: relative;
		padding: 14px 14px 14px 46px;
		border: 1px solid var(--sand-line, #DEDBCB);
		border-radius: var(--radius, 2px);
		margin-bottom: 12px;
	}

	.tf-parts-table td {
		padding: 2px 0;
		border: 0;
	}

	.tf-parts-table .tf-parts-pick {
		position: absolute;
		left: 14px;
		top: 14px;
		width: auto;
	}

	.tf-parts-price::before {
		content: "Price: ";
		font-weight: 400;
		color: var(--stone-text, #575D68);
	}
}

.tf-parts-superseded {
	display: block;
	margin-top: 4px;
	font-size: var(--fs-small, .9375rem);
	color: #8A5A00;
}

.tf-parts-gone {
	color: #8A5A00;
}

/* Illustrated parts diagram ---------------------------------------------- */

.tf-ipl {
	margin: 0 0 24px;
}

.tf-ipl-frame {
	position: relative;
	display: block;
	max-width: 760px;
	margin: 0 auto;
	background: var(--white, #fff);
	border: 1px solid var(--sand-line, #DEDBCB);
	border-radius: var(--radius, 2px);
}

.tf-ipl-img {
	display: block;
	width: 100%;
	height: auto;
}

.tf-ipl-spots {
	position: absolute;
	inset: 0;
}

.tf-ipl-spot {
	position: absolute;
	padding: 0;
	border: 2px solid transparent;
	border-radius: 50%;
	background: transparent;
	cursor: pointer;
	/* Comfortably tappable even where the printed balloon is tiny. */
	min-width: 28px;
	min-height: 28px;
	transform: translate(-2px, -2px);
}

.tf-ipl-spot:hover,
.tf-ipl-spot.is-hot {
	border-color: var(--green-700, #15803D);
	background: rgba(21, 128, 61, .14);
}

.tf-ipl-spot.is-selected {
	border-color: var(--green-700, #15803D);
	background: rgba(21, 128, 61, .3);
	box-shadow: 0 0 0 3px rgba(21, 128, 61, .25);
}

.tf-ipl-spot:focus-visible {
	outline: 2px solid var(--green-700, #15803D);
	outline-offset: 2px;
}

.tf-ipl-caption {
	margin-top: 8px;
	text-align: center;
	font-size: var(--fs-small, .9375rem);
	color: var(--stone-text, #575D68);
}

/* Until the script has measured the image, the hotspots stay hidden rather
   than piling up in the top-left corner. */
.tf-ipl:not(.is-ready) .tf-ipl-spots {
	display: none;
}

.tf-parts-find {
	width: 3em;
	text-align: right;
	color: var(--stone-text, #575D68);
	font-variant-numeric: tabular-nums;
}

.tf-parts-table tr.is-selected {
	background: rgba(21, 128, 61, .10);
}

@media (max-width: 720px) {
	.tf-parts-table tr.is-selected {
		outline: 2px solid var(--green-700, #15803D);
	}
	.tf-parts-find::before {
		content: "No. ";
		color: var(--stone-text, #575D68);
	}
	.tf-parts-find {
		width: auto;
		text-align: left;
	}
}

.tf-parts-buy {
	white-space: nowrap;
	text-align: right;
}

.tf-parts-add {
	display: inline-block;
	padding: 7px 14px;
	border-radius: var(--radius, 2px);
	background: var(--green-700, #15803D);
	color: var(--white, #fff);
	font-size: var(--fs-small, .9375rem);
	font-weight: 600;
	text-decoration: none;
}

.tf-parts-add:hover,
.tf-parts-add:focus {
	background: var(--deep, #0B1F1A);
	color: var(--white, #fff);
}

@media (max-width: 720px) {
	.tf-parts-buy {
		text-align: left;
		padding-top: 10px !important;
	}
}

/* Section index --------------------------------------------------------- */

.tf-parts-index {
	margin: 28px 0 4px;
}

.tf-parts-index-title {
	font-family: var(--display, sans-serif);
	font-size: .6875rem;
	font-weight: 700;
	letter-spacing: .14em;
	text-transform: uppercase;
	opacity: .6;
	margin: 0 0 10px;
}

.tf-parts-index ul {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.tf-parts-index li {
	margin: 0;
}

.tf-parts-index a {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 12px;
	border: 1px solid var(--sand-line, #DEDBCB);
	border-radius: var(--radius, 2px);
	background: var(--sand, #F5F3E7);
	color: inherit;
	text-decoration: none;
	font-size: var(--fs-small, .9375rem);
	line-height: 1.2;
}

.tf-parts-index a:hover,
.tf-parts-index a:focus {
	border-color: var(--green-700, #15803D);
	color: var(--green-700, #15803D);
}

.tf-parts-index a span {
	font-variant-numeric: tabular-nums;
	font-size: .8125rem;
	opacity: .6;
}

/*
 * The section heading and its way back share one rule, so the border that used
 * to sit under the heading alone now sits under the pair.
 */
.tf-parts-section {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	margin: 40px 0 8px;
	padding-bottom: 6px;
	border-bottom: 1px solid var(--sand-line, #DEDBCB);
}

.tf-parts-section .tf-parts-group {
	margin: 0;
	padding: 0;
	border-bottom: 0;
}

.tf-parts-count {
	font-family: var(--body, sans-serif);
	font-size: var(--fs-small, .9375rem);
	font-weight: 400;
	opacity: .55;
	white-space: nowrap;
}

.tf-parts-top {
	font-size: .8125rem;
	text-decoration: none;
	opacity: .65;
	white-space: nowrap;
}

.tf-parts-top:hover,
.tf-parts-top:focus {
	opacity: 1;
	color: var(--green-700, #15803D);
}

/* Confirm the jump landed where the customer asked. */
.tf-parts-section:target {
	border-bottom-color: var(--green-700, #15803D);
}

@media (max-width: 720px) {
	.tf-parts-section {
		flex-direction: column;
		align-items: flex-start;
		gap: 4px;
	}
}

.tf-parts-multisheet {
	margin: 12px 0 0;
	padding: 10px 12px;
	border-left: 3px solid var(--green-700, #15803D);
	background: var(--sand, #F5F3E7);
	font-size: var(--fs-small, .9375rem);
}

.tf-ipl-applies {
	display: inline-block;
	margin: 0 0 8px;
	padding: 5px 10px;
	border-radius: var(--radius, 2px);
	background: var(--deep, #0B1F1A);
	color: var(--white, #fff);
	font-family: var(--display, sans-serif);
	font-size: .6875rem;
	font-weight: 700;
	letter-spacing: .1em;
	text-transform: uppercase;
}
