/* Custom Native WooCommerce Filters - Tailwind / Radix UI Style */

.cld-filters-widget {
	background-color: #ffffff;
	border-radius: 16px;
	border: 1px solid #e5e7eb;
	box-shadow: none !important;
	overflow: hidden;
	margin-bottom: 30px;
	font-family: inherit;
}

.cld-filters-header {
	padding: 1.25rem 1.5rem;
	border-bottom: 1px solid rgba(15, 23, 42, 0.04);
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.cld-filters-title {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-weight: 600;
	font-size: 1rem;
	color: #0f172a;
}

.cld-filters-badge {
	width: 1.25rem;
	height: 1.25rem;
	border-radius: 9999px;
	background-color: var(--fs-color-primary);
	color: #ffffff;
	font-size: 0.875rem;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 500;
}

.cld-filter-reset {
	color: #64748b;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0.25rem;
	border-radius: 0.375rem;
	transition: background-color 0.2s, color 0.2s;
}

.cld-filter-reset:hover {
	background-color: rgba(15, 23, 42, 0.04);
	color: var(--fs-color-primary);
}

.cld-filters-accordion-wrap {
	display: flex;
	flex-direction: column;
}

.cld-accordion-item {
	border-bottom: 1px solid rgba(15, 23, 42, 0.04);
}
.cld-accordion-item:last-child {
	border-bottom: none;
}

.cld-accordion-trigger {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	padding: 0 1.5rem !important;
	margin: 0 !important;
	background: transparent;
	border: none;
	cursor: pointer;
	transition: background-color 0.2s ease;
}

.cld-accordion-trigger:hover {
	background-color: #f8fafc;
}

.cld-accordion-trigger-inner {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

.cld-icon {
	color: #64748b;
	width: 1.1rem;
	height: 1.1rem;
	transition: color 0.2s ease;
}

.cld-accordion-trigger:hover .cld-icon {
	color: #0f172a;
}

.cld-accordion-trigger-inner span {
	font-weight: 500;
	font-size: 0.9rem;
	color: #111827;
	text-transform: none !important;
}

.cld-chevron {
	color: #94a3b8;
	width: 0.85rem;
	height: 0.85rem;
	transition: transform 0.2s ease;
}

.cld-accordion-trigger[aria-expanded="true"] .cld-chevron {
	transform: rotate(180deg);
}

.cld-accordion-content {
	padding: 0 1.5rem 1rem 1.5rem;
}

.cld-accordion-content-inner {
	padding-top: 0.5rem;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

/* Search Box Inside Accordions */
.cld-search-box {
	position: relative;
	display: flex;
	align-items: center;
	margin-bottom: 0.5rem;
}

.cld-search-icon {
	position: absolute;
	left: 0.75rem;
	color: #94a3b8;
	width: 1rem;
	height: 1rem;
	pointer-events: none;
	z-index: 2;
}

.cld-search-input {
	width: 100%;
	height: 38px !important;
	padding: 0.375rem 0.625rem 0.375rem 2.25rem !important;
	font-size: 0.8125rem !important;
	border: 1px solid #e2e8f0 !important;
	border-radius: 8px !important;
	background-color: #f8fafc !important;
	color: #0f172a !important;
	box-sizing: border-box;
	transition: border-color 0.2s, box-shadow 0.2s;
	box-shadow: none !important;
}

.cld-search-input:focus {
	outline: none !important;
	border-color: var(--fs-color-primary) !important;
	background-color: #ffffff !important;
	box-shadow: 0 0 0 1px var(--fs-color-primary) !important;
}

/* Scrollable Container */
.cld-filter-scrollable {
	max-height: 9.5rem;
	overflow-y: auto;
	padding-right: 0.25rem;
	scrollbar-width: thin;
	scrollbar-color: var(--fs-color-primary) transparent;
}

.cld-filter-scrollable::-webkit-scrollbar {
	width: 0.375rem;
}
.cld-filter-scrollable::-webkit-scrollbar-track {
	background: transparent;
}
.cld-filter-scrollable::-webkit-scrollbar-thumb {
	background-color: var(--fs-color-primary);
	border-radius: 9999px;
}

.cld-filter-checkboxes {
	display: flex;
	flex-direction: column;
	gap: 0.375rem;
}

/* Custom Round Checkboxes */
.cld-filter-round-check {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	cursor: pointer;
	padding: 0.125rem 0;
	transition: transform 0.2s ease;
}

.cld-filter-round-check:hover {
	transform: translateX(2px);
}

.cld-sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border-width: 0;
}

.cld-round-indicator {
	position: relative;
	width: 1rem;
	height: 1rem;
	flex-shrink: 0;
	border-radius: 9999px;
	border: 1px solid rgba(15, 23, 42, 0.2);
	transition: background-color 0.2s, border-color 0.2s;
}

.cld-round-indicator::after {
	content: '';
	position: absolute;
	left: 50%;
	top: 50%;
	width: 0.5rem;
	height: 0.5rem;
	transform: translate(-50%, -50%);
	border-radius: 9999px;
	background-color: var(--fs-color-primary);
	opacity: 0;
	transition: opacity 0.2s;
}

.cld-sr-only:checked + .cld-round-indicator {
	border-color: var(--fs-color-primary);
	background-color: transparent;
}

.cld-sr-only:checked + .cld-round-indicator::after {
	opacity: 1;
}

.cld-sr-only:focus-visible + .cld-round-indicator {
	box-shadow: 0 0 0 2px var(--fs-color-primary);
}

.cld-check-label {
	font-size: 0.875rem;
	color: #475569;
	transition: color 0.2s ease;
}

.cld-filter-round-check:hover .cld-check-label {
	color: #0f172a;
}

/* jQuery UI Slider Styling */
.cld-slider-container {
	padding: 0 0.5rem 0.5rem 0.5rem;
}

.ui-slider {
	position: relative;
	text-align: left;
	background: rgba(15, 23, 42, 0.08);
	border-radius: 9999px;
	height: 6px;
	margin-top: 1rem;
}

.ui-slider .ui-slider-handle {
	position: absolute;
	z-index: 2;
	width: 1.25rem;
	height: 1.25rem;
	cursor: ew-resize;
	background: #ffffff;
	border: 2px solid var(--fs-color-primary);
	border-radius: 50%;
	top: 50%;
	transform: translateY(-50%);
	margin-left: -0.625rem;
	touch-action: none;
	box-sizing: border-box;
	box-shadow: 0 2px 4px rgba(15, 23, 42, 0.1);
	transition: border-width 0.1s, transform 0.2s;
}

.ui-slider .ui-slider-handle:hover,
.ui-slider .ui-slider-handle:active {
	border-width: 4px;
	outline: none;
	transform: translateY(-50%) scale(1.1);
}

.ui-slider .ui-slider-range {
	position: absolute;
	z-index: 1;
	display: block;
	border: 0;
	background: var(--fs-color-primary);
	height: 100%;
	border-radius: 9999px;
}

.cld-slider-values {
	display: flex;
	justify-content: space-between;
	margin-top: 1rem;
	font-size: 0.75rem;
	color: #64748b;
	font-weight: 500;
}

.cld-filter-submit {
	display: none !important;
}
