/**
 * Elan Loop Filter — STRUCTURAL styles only.
 *
 * Deliberately contains NO colours, fonts or spacing opinions beyond what is
 * needed for layout. Every visual property (colour, font, weight, padding,
 * radius, sizing) is controlled from the Elementor editor via the widget's
 * Style tab. This file only makes the dual-range slider and layout work.
 */

.elan-lf__form {
	display: flex;
	flex-direction: column;
}

.elan-lf__section {
	min-width: 0;
}

/* ---- Category lists ------------------------------------------------- */
.elan-lf__options {
	display: flex;
}

.elan-lf__options--list {
	flex-direction: column;
}

.elan-lf__options--pills {
	flex-direction: row;
	flex-wrap: wrap;
}

.elan-lf__option-label {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
}

.elan-lf__pill {
	cursor: pointer;
	border: 1px solid currentColor;
	background: transparent;
	line-height: 1;
}

.elan-lf__count-badge {
	opacity: 0.6;
}

/* ---- Selects & text inputs ----------------------------------------- */
.elan-lf__select,
.elan-lf__text {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
}

.elan-lf__select {
	cursor: pointer;
}

/* ---- No-flash: hide collapsible form until JS sets the open/closed state */
.elan-lf__form {
	transition: opacity 0.15s ease;
}

.elan-lf[data-collapsible="1"]:not(.elan-lf--ready) .elan-lf__form {
	opacity: 0;
}

/* ---- Collapsible accordion (Hikvision style) ----------------------- */
.elan-lf__section--collapsible > .elan-lf__title {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	cursor: pointer;
	user-select: none;
}

.elan-lf__toggle-icon {
	position: relative;
	flex: 0 0 auto;
	width: 14px;
	height: 14px;
}

.elan-lf__toggle-icon::before,
.elan-lf__toggle-icon::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate( -50%, -50% );
	background: currentColor;
}

.elan-lf__toggle-icon::before { /* horizontal bar */
	width: 14px;
	height: 2px;
}

.elan-lf__toggle-icon::after { /* vertical bar — makes the "+" */
	width: 2px;
	height: 14px;
}

.elan-lf__section.is-open .elan-lf__toggle-icon::after {
	display: none; /* "+" becomes "−" when open */
}

.elan-lf__body {
	display: none;
	padding-top: 12px;
}

.elan-lf__section.is-open > .elan-lf__body {
	display: block;
}

/* ---- Sorting widget (inline) --------------------------------------- */
.elan-lf__form--inline {
	flex-direction: row;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
}

.elan-lf--sorting .elan-lf__sort {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
}

/* Dropdown (+ optional count) grouped on one side, so "Space between" puts the
   label hard-left and the dropdown hard-right regardless of the count. */
.elan-lf__sort-right {
	display: flex;
	align-items: center;
	gap: 10px;
}

.elan-lf--sorting .elan-lf__select {
	width: auto;
}

.elan-lf__sort-label {
	white-space: nowrap;
}

/* Hide the result-count chip while it is empty (e.g. in the editor) so it
   doesn't steal the right-hand slot in a space-between layout. */
.elan-lf__count:empty {
	display: none;
}

/* ---- Rating stars --------------------------------------------------- */
.elan-lf__stars {
	display: inline-flex;
	gap: 4px;
	line-height: 1;
	font-size: 24px;
}

.elan-lf__star {
	cursor: pointer;
	color: #d6d6d6;
	transition: color 0.15s ease;
	user-select: none;
}

.elan-lf__star.is-filled {
	color: #f5a623;
}

/* ---- Active filter chips ------------------------------------------- */
.elan-lf__chips {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

.elan-lf__chips:empty {
	display: none;
}

.elan-lf__chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	cursor: pointer;
	border: none;
	line-height: 1.2;
	padding: 6px 12px;
}

.elan-lf__chip-x {
	font-weight: 700;
	line-height: 1;
}

.elan-lf__chip-clear {
	background: none;
	border: none;
	cursor: pointer;
	text-decoration: underline;
	padding: 6px 4px;
}

/* ---- Price slider --------------------------------------------------- */
.elan-lf__price-values {
	display: flex;
	gap: 6px;
	margin-bottom: 12px;
}

.elan-lf__slider {
	position: relative;
	height: 24px;
	display: flex;
	align-items: center;
}

.elan-lf__slider-track,
.elan-lf__slider-range {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	height: 4px;
	border-radius: 999px;
	background: #e0e0e0;
}

.elan-lf__slider-track {
	left: 0;
	right: 0;
	width: 100%;
}

.elan-lf__slider-range {
	background: #6c5ce7;
	left: 0;
	width: 100%;
}

.elan-lf__range {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	background: none;
	pointer-events: none;
	-webkit-appearance: none;
	appearance: none;
}

.elan-lf__range::-webkit-slider-runnable-track {
	background: none;
	border: none;
}

.elan-lf__range::-moz-range-track {
	background: none;
	border: none;
}

.elan-lf__range::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	pointer-events: auto;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	border: none;
	background: #6c5ce7;
	cursor: pointer;
	box-shadow: 0 1px 4px rgba( 0, 0, 0, 0.25 );
}

.elan-lf__range::-moz-range-thumb {
	pointer-events: auto;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	border: none;
	background: #6c5ce7;
	cursor: pointer;
	box-shadow: 0 1px 4px rgba( 0, 0, 0, 0.25 );
}

/* ---- Actions -------------------------------------------------------- */
.elan-lf__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
}

.elan-lf__btn {
	cursor: pointer;
	border: none;
	line-height: 1.2;
}

/* ---- AJAX loading state -------------------------------------------- */
.elan-lf-loading {
	position: relative;
	opacity: 0.5;
	transition: opacity 0.2s ease;
	pointer-events: none;
}
