/* Ella Shop Filters – custom styles for WooCommerce filter widgets. */

/* Color filter shortcode: [ella_color_filters]
 * Colors themselves come from term meta; CSS only defines layout/shape.
 */
.ella-color-filter-list {
	list-style: none;
	margin: 0;
	padding: 0 0.5rem 0 0;
}

.ella-color-filter-list__item + .ella-color-filter-list__item {
	margin-top: 0.5rem;
}

.ella-color-filter-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	text-decoration: none;
	color: inherit;
}

.ella-color-filter-count {
	min-width: 1.75rem;
	height: 1.75rem;
	border-radius: 999px;
	border: 1px solid rgba(0, 0, 0, 0.08);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 0.75rem;
	color: rgba(0, 0, 0, 0.6);
	background-color: rgba(0, 0, 0, 0.02);
}

.ella-color-filter-label {
	flex: 1;
	font-size: 0.875rem;
	white-space: nowrap;
}

.ella-color-filter-swatch {
	width: 1.75rem;
	height: 1.75rem;
	border-radius: 999px;
	border: 1px solid rgba(0, 0, 0, 0.08);
	box-sizing: border-box;
	position: relative;
	overflow: hidden;
}

.ella-color-filter-swatch-check {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	font-size: 0.85rem;
	line-height: 1;
	opacity: 0;
	transition: opacity 0.15s ease-in-out;
}

.ella-color-filter-swatch-check--light {
	color: #ffffff;
}

.ella-color-filter-swatch-check--dark {
	color: #000000;
}

.ella-color-filter-item.is-selected .ella-color-filter-swatch-check {
	opacity: 1;
}

/* Size filter shortcode: [ella_size_filters] */
.ella-size-filter-list {
	list-style: none;
	margin: 0;
	padding: 0 0.5rem 0 0;
}

.ella-size-filter-list__item + .ella-size-filter-list__item {
	margin-top: 0.5rem;
}

.ella-size-filter-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	text-decoration: none;
	color: inherit;
}

.ella-size-filter-label {
	flex: 1;
	font-size: 0.875rem;
	white-space: nowrap;
}

.ella-size-filter-count {
	min-width: 1.75rem;
	height: 1.75rem;
	border-radius: 999px;
	border: 1px solid rgba(0, 0, 0, 0.08);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 0.75rem;
	color: rgba(0, 0, 0, 0.6);
	background-color: rgba(0, 0, 0, 0.02);
}

.ella-size-filter-item.is-selected .ella-size-filter-count {
	background-color: rgba(0, 0, 0, 0.15);
	border-color: rgba(0, 0, 0, 0.4);
	color: rgba(0, 0, 0, 0.8);
}

/* Category filter shortcode: [ella_category_filters] */
.ella-category-filter-list {
	list-style: none;
	margin: 0;
	padding: 0 0.5rem 0 0;
}

.ella-category-filter-list__item + .ella-category-filter-list__item {
	margin-top: 0.5rem;
}

.ella-category-filter-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	text-decoration: none;
	color: inherit;
}

.ella-category-filter-label {
	flex: 1;
	font-size: 0.875rem;
	white-space: nowrap;
}

.ella-category-filter-count {
	min-width: 1.75rem;
	height: 1.75rem;
	border-radius: 999px;
	border: 1px solid rgba(0, 0, 0, 0.08);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 0.75rem;
	color: rgba(0, 0, 0, 0.6);
	background-color: rgba(0, 0, 0, 0.02);
}

.ella-category-filter-item.is-selected .ella-category-filter-count {
	background-color: rgba(0, 0, 0, 0.15);
	border-color: rgba(0, 0, 0, 0.4);
	color: rgba(0, 0, 0, 0.8);
}

/* Minimal checkbox‑style switches for:
 * - [ella_sale_filter]
 * - [ella_stock_filter]
 */
.ella-switch {
	position: relative;
	display: inline-block;
	text-decoration: none;
	color: inherit;
	font-size: 0.875rem;
	padding-right: 1.5rem; /* space for box on the right (RTL‑friendly) */
	line-height: 1.5;
	vertical-align: middle;
}

.ella-switch::before {
	content: "";
	width: 1rem;
	height: 1rem;
	border-radius: 0.15rem;
	border: 1px solid rgba(0, 0, 0, 0.3);
	box-sizing: border-box;
	background-color: #ffffff;
	position: absolute;
	top: 50%;
	right: 0;
	transform: translateY(-50%);
}

.ella-switch::after {
	content: "";
	position: absolute;
	top: 50%;
	right: 0.25rem;
	width: 0.45rem;
	height: 0.25rem;
	border-left: 2px solid transparent;
	border-bottom: 2px solid transparent;
	transform: translateY(-50%) rotate(-45deg);
}

.ella-switch--on::before {
	background-color: #ffffff;
	border-color: #000000;
}

.ella-switch--on::after {
	border-left-color: #000000;
	border-bottom-color: #000000;
}

/* Price slider: [ella_price_filter] */
.ella-price-filter-widget {
	font-size: 0.875rem;
}

.ella-price-filter-range {
	position: relative;
	height: 24px;
}

.ella-price-filter-range input[type="range"] {
	position: absolute;
	top: 10%;
	left: 0;
	transform: translateY(-50%);
	width: 100%;
	height: 2px;
	-webkit-appearance: none;
	appearance: none;
	margin: 0;
	padding: 0;
	background: transparent;
	pointer-events: none;
}

.ella-price-filter-range input[type="range"]::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	width: 10px;
	height: 20px;
	background-color: #000000;
	cursor: pointer;
	pointer-events: all;
	position: relative;
	margin-top: -9px; /* Center thumb on track: (20px thumb - 2px track) / 2 = 9px */
	z-index: 10;
}

.ella-price-filter-range input[type="range"]::-moz-range-thumb {
	width: 10px;
	height: 20px;
	background-color: #000000;
	cursor: pointer;
	border: none;
	pointer-events: all;
	z-index: 10;
}

.ella-price-filter-range input[type="range"]::-moz-range-track {
	height: 2px;
}

.ella-price-filter-input--max {
	z-index: 1;
}

.ella-price-filter-input--max::-webkit-slider-runnable-track {
	height: 2px;
	background-color: #e5e5e5;
	pointer-events: none;
}

.ella-price-filter-input--max::-moz-range-track {
	height: 2px;
	background-color: #e5e5e5;
	pointer-events: none;
}

.ella-price-filter-input--min {
	z-index: 2;
}

.ella-price-filter-input--min::-webkit-slider-runnable-track {
	height: 2px;
	background-color: transparent;
	pointer-events: none;
}

.ella-price-filter-input--min::-moz-range-track {
	height: 2px;
	background-color: transparent;
	pointer-events: none;
}

.ella-price-filter-summary {
	margin: 0.5rem 0 0.75rem;
}

.ella-price-filter-summary-label {
	font-weight: 500;
}

.ella-price-filter-submit {
	border: 1px solid #1A1A1A;
	padding: 0.2rem 1.2rem;
	background-color: transparent;
	color: #1A1A1A;
	font-size: 0.85rem;
	cursor: pointer;
}
