/* Turborenov — vehicle finder. Sits on the dark homepage panel. */
.tr-vf {
	--vf-accent: #ff3100;
	--vf-accent-dark: #d92a00;
	--vf-ok: #22c55e;
	--vf-ink: #1a1a1a;
	--vf-muted: rgba(255,255,255,.6);
	--tr-vf-progress: 0;
	color: #fff;
	margin: 0;
	width: 100%;
}

/* Progress: 5 dots on a line that fills as steps are chosen. */
.tr-vf__progress {
	position: relative; display: flex; justify-content: space-between;
	margin: 4px 0 18px; padding: 0; list-style: none;
}
.tr-vf__progress::before,
.tr-vf__progress::after {
	content: ""; position: absolute; top: 13px; left: 14px; right: 14px; height: 2px;
	background: rgba(255,255,255,.18);
}
.tr-vf__progress::after {
	right: auto; width: calc((100% - 28px) * var(--tr-vf-progress));
	background: var(--vf-accent); transition: width .25s ease;
}
.tr-vf__progress li { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.tr-vf__dot {
	display: flex; align-items: center; justify-content: center; width: 28px; height: 28px;
	border-radius: 50%; font-size: 13px; font-weight: 700;
	background: #2b3142; color: var(--vf-muted); border: 2px solid rgba(255,255,255,.18);
	transition: background .2s, border-color .2s, color .2s;
}
.tr-vf__plabel { font-size: 11px; letter-spacing: .02em; color: var(--vf-muted); white-space: nowrap; }
.tr-vf__progress li.is-active .tr-vf__dot { border-color: var(--vf-accent); color: #fff; }
.tr-vf__progress li.is-active .tr-vf__plabel { color: #fff; }
.tr-vf__progress li.is-done .tr-vf__dot { background: var(--vf-accent); border-color: var(--vf-accent); color: #fff; font-size: 0; }
.tr-vf__progress li.is-done .tr-vf__dot::before { content: "✓"; font-size: 14px; }
.tr-vf__progress li.is-done .tr-vf__plabel { color: #fff; }

/* Fields */
.tr-vf__fields { display: grid; gap: 8px; }
.tr-vf__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tr-vf__select { position: relative; }
.tr-vf__field { position: relative; transition: opacity .2s; }
.tr-vf__field .tr-vf__num { display: none; } /* visual number comes from the CSS counter badge */

.tr-vf select {
	appearance: none; -webkit-appearance: none;
	width: 100%; height: 46px; margin: 0; padding: 0 40px 0 46px;
	font-size: 15px; font-weight: 500; color: var(--vf-ink);
	background: #fff; border: 2px solid transparent; border-radius: 8px;
	box-shadow: 0 1px 2px rgba(0,0,0,.2); cursor: pointer;
	transition: border-color .15s, box-shadow .15s, background .15s;
}
.tr-vf select:focus { outline: none; border-color: var(--vf-accent); box-shadow: 0 0 0 3px rgba(255,49,0,.25); }
.tr-vf select:disabled { cursor: not-allowed; background: rgba(255,255,255,.12); color: var(--vf-muted); box-shadow: none; }

/* Step number badge inside each select + chevron. */
.tr-vf__select::after {
	content: ""; position: absolute; right: 16px; top: 50%; width: 8px; height: 8px; margin-top: -6px;
	border-right: 2px solid #6b7280; border-bottom: 2px solid #6b7280; transform: rotate(45deg); pointer-events: none;
}
.tr-vf__fields { counter-reset: vfstep; }
.tr-vf__field { counter-increment: vfstep; }
.tr-vf__field .tr-vf__select::before {
	display: flex; content: counter(vfstep);
	position: absolute; left: 10px; top: 50%; transform: translateY(-50%); z-index: 1;
	width: 24px; height: 24px; align-items: center; justify-content: center;
	border-radius: 50%; background: #eef0f4; color: #4b5563; font-size: 12px; font-weight: 700; pointer-events: none;
}
.tr-vf__field.is-active .tr-vf__select::before { background: var(--vf-accent); color: #fff; }
.tr-vf__field.is-done .tr-vf__select::before { content: "✓"; background: var(--vf-ok); color: #fff; }
.tr-vf__field:has(select:disabled) .tr-vf__select::before { background: rgba(255,255,255,.15); color: var(--vf-muted); }
.tr-vf__field.is-empty { opacity: .45; }

/* Actions */
.tr-vf__actions { display: flex; align-items: center; gap: 14px; margin-top: 14px; }
.tr-vf__submit {
	flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
	min-height: 50px; padding: 0 18px; border-radius: 8px;
	background: var(--vf-accent); color: #fff !important; text-decoration: none !important;
	font-size: 15px; font-weight: 700; letter-spacing: .01em;
	transition: background .15s, transform .15s, opacity .15s;
}
.tr-vf__submit:hover { background: var(--vf-accent-dark); transform: translateY(-1px); }
.tr-vf__submit.is-disabled { opacity: .55; cursor: default; transform: none; }
.tr-vf__reset {
	background: none; border: 0; padding: 0; color: var(--vf-muted); font-size: 13px; text-decoration: underline; cursor: pointer;
}
.tr-vf__reset:hover { color: #fff; }
.tr-vf__live { margin: 10px 0 0; min-height: 1.2em; font-size: 12px; color: var(--vf-muted); }

@media (max-width: 480px) {
	.tr-vf__plabel { display: none; }
	.tr-vf__progress { margin-bottom: 14px; }
	.tr-vf select { font-size: 16px; } /* no iOS zoom on focus */
}

/* Light variant (shop sidebar on a white background). */
.tr-vf--light { color: #1a1a1a; --vf-muted: #6b7280; }
.tr-vf--light .tr-vf__progress::before { background: #e5e7eb; }
.tr-vf--light .tr-vf__dot { background: #fff; border-color: #d1d5db; color: #6b7280; }
.tr-vf--light .tr-vf__progress li.is-active .tr-vf__dot { color: #1a1a1a; }
.tr-vf--light .tr-vf__progress li.is-active .tr-vf__plabel,
.tr-vf--light .tr-vf__progress li.is-done .tr-vf__plabel { color: #1a1a1a; }
.tr-vf--light select { border-color: #d1d5db; box-shadow: none; }
.tr-vf--light select:disabled { background: #f3f4f6; color: #9ca3af; }
.tr-vf--light .tr-vf__field:has(select:disabled) .tr-vf__select::before { background: #e5e7eb; color: #9ca3af; }
.tr-vf--light .tr-vf__reset:hover { color: #1a1a1a; }
/* Narrow columns (sidebar): hide step labels, keep the dots. */
.tr-vf--light .tr-vf__plabel { display: none; }
.tr-vf--light .tr-vf__actions { flex-direction: column; align-items: stretch; gap: 8px; }
.tr-vf--light .tr-vf__submit { font-size: 14px; }
.tr-vf--light .tr-vf__reset { align-self: center; }
@media (max-width: 480px) {
	.tr-vf__actions { flex-direction: column; align-items: stretch; gap: 8px; }
	.tr-vf__reset { align-self: center; }
}

/* A level this vehicle doesn't have: muted dash instead of an "active" ring. */
.tr-vf__progress li.is-na .tr-vf__dot { background: transparent; border-style: dashed; color: transparent; font-size: 0; }
.tr-vf__progress li.is-na .tr-vf__dot::before { content: "–"; font-size: 14px; color: var(--vf-muted); }
.tr-vf--light .tr-vf__progress li.is-na .tr-vf__dot::before { color: #9ca3af; }
.tr-vf__field.is-empty { display: none; } /* no empty, disabled select for a level that doesn't exist */

/* Mobile: the sidebar finder (light) collapses to one summary bar; tap "Modifier" to open. */
.tr-vf__toggle { display: none; }
@media (max-width: 767px) {
	.tr-vf--light .tr-vf__toggle {
		display: flex; align-items: center; gap: 10px; width: 100%; min-height: 52px; padding: 10px 14px;
		background: #fff; border: 1px solid #d9dbe1; border-radius: 10px; color: #1e2331; font-size: 14px; font-weight: 700; text-align: left; cursor: pointer;
	}
	.tr-vf--light .tr-vf__toggle svg { flex: 0 0 auto; color: #ff3100; }
	.tr-vf--light .tr-vf__toggle-text { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
	.tr-vf--light .tr-vf__toggle-edit { flex: 0 0 auto; font-size: 12px; color: #ff3100; text-decoration: underline; }
	.tr-vf--light .tr-vf__body { display: none; margin-top: 14px; }
	.tr-vf--light.is-open .tr-vf__body { display: block; }
	.tr-vf--light.is-open .tr-vf__toggle-edit { visibility: hidden; }
	/* The sidebar's own heading + big padding go too: only the bar remains. */
	.elementor-widget-wrap:has(> .elementor-element .tr-vf--light) > .elementor-widget-heading,
	.e-con:has(> .elementor-element .tr-vf--light) > .elementor-widget-heading,
	.elementor-column:has(.tr-vf--light) .elementor-widget-heading { display: none !important; }
	.elementor-column:has(.tr-vf--light) > .elementor-widget-wrap,
	.elementor-column:has(.tr-vf--light) .elementor-widget-wrap { padding: 0 !important; background: transparent !important; }
	.elementor-section:has(.tr-vf--light) .elementor-column:has(.tr-vf--light) { padding: 0 !important; }
}

/* Nothing chosen yet: the bar itself is the call to action, no "Modifier". */
@media (max-width: 767px) {
	.tr-vf--light:not(.has-choice) .tr-vf__toggle-edit { display: none; }
	.tr-vf--light:not(.has-choice) .tr-vf__toggle { justify-content: flex-start; }
	.tr-vf--light:not(.has-choice) .tr-vf__toggle::after { content: ""; margin-left: auto; width: 8px; height: 8px; border-right: 2px solid #6b7280; border-bottom: 2px solid #6b7280; transform: rotate(45deg); }
	.tr-vf--light.is-open .tr-vf__toggle::after { transform: rotate(-135deg); }
}
