/* Repair Selector — frontend styles. All colors/spacing driven by CSS vars injected from admin settings. */
.rs-wrap {
	--rs-panel-height: 460px;
	font-family: var(--rs-font);
	font-size: var(--rs-font-size);
	color: var(--rs-text);
	background: var(--rs-bg);
	max-width: var(--rs-width);
	margin: 0 auto;
	padding: calc(var(--rs-padding) * 1.4) var(--rs-padding);
	border-radius: calc(var(--rs-radius) * 1.4);
	box-shadow: var(--rs-shadow);
	box-sizing: border-box;
}
.rs-wrap *, .rs-wrap *::before, .rs-wrap *::after { box-sizing: border-box; }

.rs-header { text-align: center; margin-bottom: var(--rs-gap); }
.rs-title { margin: 0 0 6px; font-size: 1.6em; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; }
.rs-title .rs-accent { color: var(--rs-primary); }
.rs-subtitle { margin: 0; color: var(--rs-muted); font-size: .95em; }

.rs-search-wrap { position: relative; max-width: 640px; margin: 0 auto var(--rs-gap); }
.rs-search-input {
	width: 100%;
	padding: 12px 14px 12px 40px;
	border-radius: var(--rs-radius);
	border: 1px solid var(--rs-border);
	background: var(--rs-panel);
	color: var(--rs-text);
	font-size: 0.95em;
}
.rs-search-input:focus { outline: 2px solid var(--rs-primary); outline-offset: 1px; }
.rs-search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--rs-muted); }
.rs-search-icon svg { width: 100%; height: 100%; }
.rs-search-results {
	position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; right: 0;
	background: var(--rs-panel); border: 1px solid var(--rs-border); border-radius: var(--rs-radius);
	max-height: 320px; overflow-y: auto; box-shadow: var(--rs-shadow);
}
.rs-search-result {
	display: flex; justify-content: space-between; gap: 8px; width: 100%; text-align: left;
	padding: 10px 14px; background: transparent; border: 0; border-bottom: 1px solid var(--rs-border);
	color: var(--rs-text); cursor: pointer; font-size: .92em;
}
.rs-search-result:last-child { border-bottom: 0; }
.rs-search-result:hover, .rs-search-result:focus { background: var(--rs-hover); }
.rs-search-result .rs-search-brand { color: var(--rs-muted); font-size: .85em; }
.rs-search-empty { padding: 12px 14px; color: var(--rs-muted); font-size: .9em; }

.rs-columns {
	display: grid;
	grid-template-columns: minmax(220px, 22%) minmax(220px, 22%) 1fr;
	gap: var(--rs-gap);
	align-items: start;
}

.rs-col {
	background: var(--rs-panel);
	border: 1px solid var(--rs-border);
	border-radius: var(--rs-radius);
}

/* Brands column */
.rs-col-brands { height: var(--rs-panel-height); overflow-y: auto; border-radius: var(--rs-radius); }
.rs-brand-list, .rs-model-list { list-style: none; margin: 0; padding: 6px; }
.rs-brand-item, .rs-model-item {
	display: flex; align-items: center; gap: 10px; width: 100%;
	padding: 12px 12px; margin-bottom: 4px;
	background: transparent; border: 0; border-radius: calc(var(--rs-radius) * .6);
	color: var(--rs-text); text-align: left; cursor: pointer;
	font-size: .95em; font-weight: 600;
	transition: background var(--rs-anim) ease, color var(--rs-anim) ease;
}
.rs-brand-item:hover, .rs-model-item:hover { background: var(--rs-hover); }
.rs-brand-item:focus-visible, .rs-model-item:focus-visible { outline: 2px solid var(--rs-primary); outline-offset: -2px; }
.rs-brand-item.is-active {
	background: var(--rs-active-brand);
	color: var(--rs-button-text, #111);
}
.rs-model-item.is-active { background: var(--rs-active-model); }
.rs-brand-icon { width: 20px; height: 20px; flex: 0 0 20px; display: flex; align-items: center; justify-content: center; }
.rs-brand-icon svg, .rs-brand-icon img { width: 100%; height: 100%; object-fit: contain; }
.rs-brand-name, .rs-model-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rs-chevron { opacity: .5; font-size: 1.1em; line-height: 1; }

/* Models column */
.rs-col-models { height: var(--rs-panel-height); overflow-y: auto; border-radius: var(--rs-radius); }

.rs-empty { padding: 20px 14px; color: var(--rs-muted); font-size: .9em; text-align: center; }

/* Detail column — intentionally NOT height-limited or scrollable. It grows to fit
   its content; only the brand/model list columns beside it scroll internally. */
.rs-col-detail { padding: var(--rs-padding); }
.rs-empty-detail { display: flex; align-items: center; justify-content: center; min-height: var(--rs-panel-height); }

.rs-detail { display: flex; align-items: flex-start; gap: var(--rs-padding); flex-wrap: wrap; }
.rs-detail-media {
	flex: 0 0 220px; width: 220px; height: 220px; align-self: flex-start;
	display: flex; align-items: center; justify-content: center;
	background: var(--rs-hover); border-radius: var(--rs-radius); overflow: hidden;
}
.rs-detail-media img { width: 100%; height: 100%; object-fit: contain; padding: 10px; }
.rs-media-placeholder { width: 60px; height: 60px; color: var(--rs-muted); }
.rs-media-placeholder svg { width: 100%; height: 100%; }

.rs-detail-body { flex: 1 1 280px; min-width: 240px; }
.rs-detail-name { margin: 0 0 8px; font-size: 1.3em; font-weight: 800; }
.rs-detail-short { margin: 0 0 6px; color: var(--rs-muted); font-weight: 600; }
.rs-detail-long { margin: 0 0 14px; color: var(--rs-muted); line-height: 1.6; font-size: .95em; }
.rs-detail-long p { margin: 0 0 .75em; }

.rs-features { list-style: none; display: flex; flex-wrap: wrap; gap: 18px; margin: 0 0 20px; padding: 0; }
.rs-feature { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 68px; text-align: center; }
.rs-feature-icon { width: 26px; height: 26px; color: var(--rs-primary); }
.rs-feature-icon svg { width: 100%; height: 100%; }
.rs-feature-label { font-size: .74em; color: var(--rs-muted); line-height: 1.2; }

.rs-cta-button {
	display: inline-block;
	background: var(--rs-button);
	color: var(--rs-button-text);
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: .03em;
	padding: 13px 26px;
	border-radius: calc(var(--rs-radius) * .5);
	text-decoration: none;
	font-size: .92em;
	transition: filter var(--rs-anim) ease, transform var(--rs-anim) ease;
}
.rs-cta-button:hover { filter: brightness(1.08); transform: translateY(-1px); }
.rs-cta-button:focus-visible { outline: 2px solid var(--rs-text); outline-offset: 2px; }

/* Services carousel */
.rs-services-carousel { display: flex; align-items: center; gap: 8px; margin-top: 22px; }
.rs-carousel-track {
	display: flex; gap: 12px; overflow-x: auto; scroll-behavior: smooth;
	padding: 4px 2px; flex: 1; scrollbar-width: thin;
}
.rs-service-card {
	flex: 0 0 auto; width: 92px; display: flex; flex-direction: column; align-items: center; gap: 6px;
	padding: 12px 8px; background: var(--rs-hover); border-radius: calc(var(--rs-radius) * .6);
	text-align: center;
}
.rs-service-icon { width: 26px; height: 26px; color: var(--rs-primary); }
.rs-service-icon svg, .rs-service-icon img { width: 100%; height: 100%; object-fit: contain; }
.rs-service-name { font-size: .74em; color: var(--rs-muted); line-height: 1.25; }
.rs-carousel-nav {
	flex: 0 0 30px; height: 30px; border-radius: 50%; border: 1px solid var(--rs-border);
	background: var(--rs-panel); color: var(--rs-text); cursor: pointer; font-size: 1.1em; line-height: 1;
}
.rs-carousel-nav:hover { background: var(--rs-hover); }

.rs-loading { opacity: .5; pointer-events: none; }

/* ---------- Responsive ---------- */
/* Tablets: keep the 3-column layout (per spec) but let the two list columns
   narrow instead of forcing a fixed 260px, so everything still fits. */
@media (max-width: 900px) {
	.rs-columns { grid-template-columns: minmax(150px, 24%) minmax(150px, 24%) 1fr; }
}

/* Phones only: stack brands → models → details vertically. */
@media (max-width: 640px) {
	.rs-wrap { --rs-panel-height: 280px; }
	.rs-columns { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
	.rs-detail { flex-direction: column; }
	.rs-detail-media { flex-basis: auto; width: 100%; height: 200px; }
	.rs-title { font-size: 1.25em; }
}
