/* Vehicle Fitment front end. Inherits the theme's fonts and colours;
   override the variables (or use the Elementor style controls). */
:root {
	--vbf-gap: 12px;
	--vbf-radius: 4px;
	--vbf-border: #c9cdd2;
	--vbf-accent: #1d4ed8;
	--vbf-focus: #1d4ed8;
	--vbf-ok: #166534;
	--vbf-ok-bg: #f0fdf4;
	--vbf-warn: #92400e;
	--vbf-warn-bg: #fffbeb;
	--vbf-muted: #5b616a;
}

.vbf-selector *,
.vbf-garage-bar *,
.vbf-fit-check * {
	box-sizing: border-box;
}

.vbf-sr-only {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.vbf-selector [hidden],
.vbf-garage-bar [hidden],
.vbf-garage-bar[hidden],
.vbf-fit-check [hidden],
.vbf-compat [hidden],
.vbf-vehicle-parts [hidden] {
	display: none !important;
}

/* Selector ------------------------------------------------------- */
.vbf-selector {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: var(--vbf-gap);
	margin: 0 0 1em;
}

.vbf-selector__title {
	flex: 1 0 100%;
	margin: 0;
}

.vbf-selector__fields {
	display: flex;
	flex-wrap: wrap;
	gap: var(--vbf-gap);
	flex: 1 1 auto;
	min-width: 0;
}

.vbf-selector__field {
	display: flex;
	flex-direction: column;
	gap: 4px;
	flex: 1 1 150px;
	min-width: 0;
}

.vbf-selector__field label {
	font-size: 0.875em;
	font-weight: 600;
}

.vbf-hide-labels .vbf-selector__field label {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
}

.vbf-selector__select {
	width: 100%;
	min-height: 44px;
	padding: 8px 10px;
	border: 1px solid var(--vbf-border);
	border-radius: var(--vbf-radius);
	background-color: #fff;
	color: inherit;
	font: inherit;
}

.vbf-selector__select:disabled {
	opacity: 0.55;
	cursor: not-allowed;
}

.vbf-selector__select:focus-visible,
.vbf-button:focus-visible,
.vbf-link:focus-visible,
.vbf-location-tabs a:focus-visible,
.vbf-parts-nav a:focus-visible {
	outline: 2px solid var(--vbf-focus);
	outline-offset: 2px;
}

/* Element + class beats theme button resets (e.g. Hello Elementor's
   [type=submit]); Elementor widget style controls are more specific still. */
button.vbf-button,
.vbf-selector button.vbf-selector__submit {
	min-height: 44px;
	padding: 10px 22px;
	border: 1px solid var(--vbf-accent);
	border-radius: var(--vbf-radius);
	background-color: var(--vbf-accent);
	color: #fff;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
	transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}

button.vbf-button:hover,
.vbf-selector button.vbf-selector__submit:hover:not(:disabled),
button.vbf-button:focus,
.vbf-selector button.vbf-selector__submit:focus {
	border-color: var(--vbf-accent);
	background-color: var(--vbf-accent);
	color: #fff;
	filter: brightness(0.92);
}

.vbf-selector button.vbf-selector__submit:disabled {
	opacity: 0.5;
	filter: none;
	cursor: not-allowed;
}

.vbf-selector.is-loading .vbf-selector__fields {
	opacity: 0.7;
}

/* Vertical: one per line. */
.vbf-layout-vertical,
.vbf-layout-vertical .vbf-selector__fields {
	flex-direction: column;
	align-items: stretch;
}

.vbf-layout-vertical .vbf-selector__field {
	flex-basis: auto;
}

/* Stacked: two per row, button full width. */
.vbf-layout-stacked .vbf-selector__fields {
	flex: 1 0 100%;
}

.vbf-layout-stacked .vbf-selector__field {
	flex: 1 1 calc(50% - var(--vbf-gap));
}

.vbf-layout-stacked .vbf-selector__submit {
	flex: 1 0 100%;
}

@media (max-width: 600px) {
	.vbf-selector,
	.vbf-selector__fields {
		flex-direction: column;
		align-items: stretch;
	}

	.vbf-selector__field,
	.vbf-layout-stacked .vbf-selector__field {
		flex-basis: auto;
	}

	.vbf-selector__submit {
		width: 100%;
	}
}

/* My vehicle bar --------------------------------------------------- */
.vbf-garage-bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 12px;
	padding: 12px 16px;
	margin: 0 0 1em;
	border: 1px solid var(--vbf-border);
	border-radius: var(--vbf-radius);
	background: #f8f9fa;
}

.vbf-garage-bar__selector {
	flex: 1 0 100%;
}

.vbf-garage-bar__selector .vbf-selector {
	margin: 4px 0 0;
}

.vbf-garage-bar__switch-select {
	padding: 4px 6px;
	font: inherit;
}

button.vbf-link,
button.vbf-link:hover,
button.vbf-link:focus {
	border: 0;
	background: none;
	color: var(--vbf-accent);
}

.vbf-link {
	padding: 0;
	border: 0;
	background: none;
	color: var(--vbf-accent);
	font: inherit;
	text-decoration: underline;
	cursor: pointer;
}

.vbf-link--danger {
	color: #b91c1c;
}

/* Location tabs (shop) and parts nav ------------------------------ */
.vbf-location-tabs ul,
.vbf-parts-nav ul {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	padding: 0;
	margin: 0 0 1.25em;
	list-style: none;
}

/* ul a: beats theme rules such as Hello Elementor's .page-content a. */
.vbf-location-tabs ul a,
.vbf-parts-nav ul a {
	display: inline-block;
	padding: 6px 12px;
	border: 1px solid var(--vbf-border);
	border-radius: 999px;
	color: inherit;
	text-decoration: none;
	line-height: 1.3;
}

.vbf-location-tabs ul a.is-active,
.vbf-parts-nav ul a.is-active {
	border-color: var(--vbf-accent);
	background: var(--vbf-accent);
	color: #fff;
}

.vbf-count {
	opacity: 0.75;
	font-size: 0.9em;
}

/* Product cards ---------------------------------------------------- */
.vbf-card-fit {
	margin: 4px 0;
	color: var(--vbf-ok);
	font-size: 0.875em;
}

.vbf-badge {
	display: inline-block;
	padding: 1px 8px;
	border-radius: 999px;
	background: var(--vbf-ok-bg, #f0fdf4);
	color: var(--vbf-ok, #166534);
	font-size: 0.8em;
	font-weight: 600;
}

/* Parts page ------------------------------------------------------- */
.vbf-parts-section {
	margin-bottom: 2em;
}

.vbf-parts-section h3 .vbf-count {
	font-weight: 400;
}

/* Fit check -------------------------------------------------------- */
.vbf-fit-check {
	margin: 0 0 1em;
}

.vbf-fit {
	margin: 0;
	padding: 10px 14px;
	border-radius: var(--vbf-radius);
	border-left: 4px solid var(--vbf-border);
	background: #f8f9fa;
}

.vbf-fit--yes,
.vbf-fit--universal {
	border-left-color: var(--vbf-ok);
	background: var(--vbf-ok-bg);
}

.vbf-fit--yes .vbf-tick,
.vbf-fit--options .vbf-tick {
	color: var(--vbf-ok);
	font-weight: 700;
}

.vbf-fit--no,
.vbf-fit--options {
	border-left-color: var(--vbf-warn);
	background: var(--vbf-warn-bg);
}

.vbf-fit-check__change {
	margin: 6px 0 0;
	font-size: 0.875em;
}

.vbf-fit-check__selector {
	margin-top: 10px;
}

/* Compatibility table --------------------------------------------- */
.vbf-table-scroll {
	overflow-x: auto;
}

/* The table scrolls inside a fixed-height box instead of growing the page. */
.vbf-compat .vbf-table-scroll {
	max-height: var(--vbf-compat-height, 420px);
	overflow: auto;
	border: 1px solid var(--vbf-border);
	border-radius: var(--vbf-radius);
	-webkit-overflow-scrolling: touch;
}

.vbf-compat__table {
	width: 100%;
	min-width: 560px;
	margin: 0 !important;
	border: 0 !important;
}

.vbf-compat__table thead th {
	position: sticky;
	top: 0;
	z-index: 1;
	background: var(--vbf-compat-head, #f6f7f7);
}

.vbf-compat__search input {
	max-width: 280px;
	min-height: 40px;
}

/* My Account garage ------------------------------------------------ */
.vbf-garage-list__items {
	padding: 0;
	margin: 0 0 1.5em;
	list-style: none;
}

.vbf-garage-list__item {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 6px 16px;
	padding: 10px 0;
	border-bottom: 1px solid var(--vbf-border);
}

.vbf-garage-list__tools {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

.vbf-garage-bar__actions,
.vbf-garage-bar__switch {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 8px;
}
