/* ACJC Search - filtr vozu */

.acjc-filters {
	--acjc-accent: #0a7d3e;
	--acjc-border: #dfe3e8;
	--acjc-muted: #6b7480;
	font-size: 15px;
	line-height: 1.45;
}

.acjc-filters__toggle {
	display: none;
	width: 100%;
	padding: 0.85rem 1rem;
	margin-bottom: 0.75rem;
	background: var(--acjc-accent);
	color: #fff;
	border: 0;
	border-radius: 6px;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}

/* Zvolene filtry */
.acjc-chips {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.4rem;
	margin-bottom: 1rem;
}

.acjc-chips__label {
	color: var(--acjc-muted);
	font-size: 0.85rem;
}

.acjc-chip {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	padding: 0.3rem 0.6rem;
	border: 1px solid var(--acjc-border);
	border-radius: 999px;
	background: #f6f8fa;
	font-size: 0.85rem;
	text-decoration: none;
	color: inherit;
}

.acjc-chip:hover,
.acjc-chip:focus-visible {
	border-color: var(--acjc-accent);
	color: var(--acjc-accent);
}

.acjc-chip__key {
	color: var(--acjc-muted);
}

.acjc-chip__x {
	font-size: 1.05em;
	line-height: 1;
	opacity: 0.6;
}

.acjc-chip--reset {
	background: none;
	border-style: dashed;
}

/* Skupina filtru */
.acjc-group {
	border: 0;
	border-top: 1px solid var(--acjc-border);
	margin: 0;
	padding: 0.9rem 0 0.4rem;
}

.acjc-group:first-of-type {
	border-top: 0;
}

.acjc-group__title {
	display: block;
	width: 100%;
	padding: 0;
	margin: 0 0 0.6rem;
	float: none;
}

.acjc-group__toggle {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	padding: 0;
	background: none;
	border: 0;
	font: inherit;
	font-weight: 700;
	text-align: left;
	color: inherit;
	cursor: pointer;
}

.acjc-group__toggle::after {
	content: "";
	width: 0.5rem;
	height: 0.5rem;
	margin-left: 0.5rem;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg) translate(-2px, -2px);
	transition: transform 0.15s ease;
	opacity: 0.55;
}

.acjc-group__toggle[aria-expanded="false"]::after {
	transform: rotate(-45deg) translate(-2px, 2px);
}

.acjc-group.is-collapsed .acjc-group__items {
	display: none;
}

.acjc-group__items {
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
	max-height: 17rem;
	overflow-y: auto;
}

.acjc-group--swatch .acjc-group__items {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr));
	gap: 0.15rem 0.5rem;
}

/* Jedna volba */
.acjc-option label {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.28rem 0.2rem;
	border-radius: 4px;
	cursor: pointer;
	margin: 0;
	font-weight: 400;
}

.acjc-option label:hover {
	background: #f2f5f8;
}

.acjc-option input[type="checkbox"] {
	flex: none;
	width: 1.05rem;
	height: 1.05rem;
	margin: 0;
	accent-color: var(--acjc-accent);
}

.acjc-option__name {
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.acjc-option__count {
	flex: none;
	color: var(--acjc-muted);
	font-size: 0.82rem;
	font-variant-numeric: tabular-nums;
}

.acjc-option.is-checked .acjc-option__name {
	font-weight: 600;
}

.acjc-swatch {
	flex: none;
	width: 1rem;
	height: 1rem;
	border-radius: 50%;
	border: 1px solid rgba(0, 0, 0, 0.18);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

/* Ciselny rozsah */
.acjc-range {
	flex-direction: row;
	align-items: center;
	gap: 0.4rem;
	overflow: visible;
}

.acjc-range__field {
	flex: 1 1 0;
	min-width: 0;
	margin: 0;
}

.acjc-range__field input {
	width: 100%;
	padding: 0.45rem 0.55rem;
	border: 1px solid var(--acjc-border);
	border-radius: 4px;
	font: inherit;
	background: #fff;
}

.acjc-range__dash,
.acjc-range__unit {
	flex: none;
	color: var(--acjc-muted);
	font-size: 0.85rem;
}

/* Akce */
.acjc-filters__actions {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin-top: 1rem;
	padding-top: 1rem;
	border-top: 1px solid var(--acjc-border);
}

.acjc-filters__submit {
	flex: 1 1 auto;
	padding: 0.7rem 1rem;
	background: var(--acjc-accent);
	color: #fff;
	border: 0;
	border-radius: 6px;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}

.acjc-filters__reset {
	flex: none;
	color: var(--acjc-muted);
	font-size: 0.88rem;
}

/* Na mobilu je panel skryty za tlacitkem */
@media (max-width: 900px) {
	.acjc-filters__toggle {
		display: block;
	}

	.acjc-filters__body {
		display: none;
	}

	.acjc-filters.is-open .acjc-filters__body {
		display: block;
	}
}

/* Vyhledavani na titulni strance */
.acjc-home-search {
	--acjc-accent: #0a7d3e;
	--acjc-border: #dfe3e8;
}

.acjc-home-search__row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
	align-items: end;
}

.acjc-home-search__row--types {
	margin-top: 0.75rem;
	gap: 1rem;
}

.acjc-home-search__field {
	flex: 1 1 12rem;
	min-width: 0;
}

.acjc-home-search__field select,
.acjc-home-search__field button {
	width: 100%;
	padding: 0.7rem 0.75rem;
	border: 1px solid var(--acjc-border);
	border-radius: 6px;
	font: inherit;
	background: #fff;
	color: inherit;
}

.acjc-home-search__field--price {
	flex: 1 1 16rem;
}

.acjc-home-search__field--price label {
	display: block;
	margin-bottom: 0.3rem;
	font-size: 0.88rem;
}

.acjc-home-search__field--price input[type="range"] {
	width: 100%;
	accent-color: var(--acjc-accent);
}

.acjc-home-search__field--submit {
	flex: 0 1 9rem;
}

.acjc-home-search__field--submit button {
	background: var(--acjc-accent);
	border-color: var(--acjc-accent);
	color: #fff;
	font-weight: 600;
	cursor: pointer;
}

.acjc-home-search__type {
	display: flex;
	align-items: center;
	gap: 0.4rem;
}

.acjc-home-search__type input {
	accent-color: var(--acjc-accent);
}

.acjc-home-search__type label {
	margin: 0;
	cursor: pointer;
}

@media (max-width: 600px) {
	.acjc-home-search__field,
	.acjc-home-search__field--submit {
		flex: 1 1 100%;
	}
}

/* Pomocna trida, pokud ji tema nedefinuje */
.acjc-filters .screen-reader-text,
.acjc-home-search .screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
}
