/* ──────────────────────────────────────────────────────────────
 * FilterVier-style sidebar filter widgets
 * ────────────────────────────────────────────────────────────── */

/* --- Filter widget wrapper --- */
.fv-filter-widget {
	border: 1px solid #ddd !important;
	border-radius: 4px;
	background: #fff;
	margin-bottom: 15px !important;
	padding: 0 !important;
	overflow: visible;
}

/* --- Override theme hide rules --- */
#column-left .fv-filter-widget.panel-default {
	border: 1px solid #ddd !important;
	box-shadow: none;
}

#column-left .fv-filter-widget .panel-heading.fv-collapsible {
	display: flex !important;
}

/* --- Collapsible heading --- */
.fv-filter-widget .panel-heading.fv-collapsible {
	display: flex;
	align-items: center;
	justify-content: space-between;
	cursor: pointer;
	padding: 8px 12px;
	margin: 0;
	border-bottom: 1px solid #eee;
	background: #f8f8f8;
	border-radius: 4px 4px 0 0;
	user-select: none;
}

.fv-filter-widget .panel-heading.fv-collapsible h3.panel-title {
	font: 500 13px/normal Ubuntu, sans-serif !important;
	color: #151515 !important;
	margin: 0 !important;
	padding: 0 !important;
	border: none !important;
	background: none !important;
	font-size: 13px !important;
}

.fv-collapsible .fv-icon.fv-icon_items {
	display: inline-block;
	width: 0;
	height: 0;
	border-left: 5px solid transparent;
	border-right: 5px solid transparent;
	border-top: 6px solid #666;
	transition: transform .2s;
	flex-shrink: 0;
}

.fv-filter-widget.fv-collapsed .fv-collapsible .fv-icon.fv-icon_items {
	transform: rotate(-90deg);
}

/* --- List body (scrollable) --- */
.fv-filter-widget .woocommerce-widget-layered-nav-list {
	list-style: none !important;
	margin: 0 !important;
	padding: 8px 12px 12px !important;
	max-height: 220px;
	overflow-y: auto;
	overflow-x: hidden;
}

.fv-filter-widget .woocommerce-widget-layered-nav-list::-webkit-scrollbar {
	width: 4px;
}

.fv-filter-widget .woocommerce-widget-layered-nav-list::-webkit-scrollbar-thumb {
	background: #ccc;
	border-radius: 2px;
}

/* --- Disable WooCommerce default ::before checkmark on chosen items (WooCommerce icon font) --- */
.woocommerce .fv-filter-widget .woocommerce-widget-layered-nav-list .woocommerce-widget-layered-nav-list__item--chosen a::before,
.woocommerce #column-left .fv-filter-widget .woocommerce-widget-layered-nav-list__item--chosen a::before,
.fv-filter-widget .woocommerce-widget-layered-nav-list .woocommerce-widget-layered-nav-list__item--chosen a::before,
.fv-filter-widget .woocommerce-widget-layered-nav-list__item.chosen a::before {
	content: none !important;
	display: none !important;
	margin: 0 !important;
	width: 0 !important;
	height: 0 !important;
	font-size: 0 !important;
	line-height: 0 !important;
}

/* --- Item row --- */
.fv-filter-widget .wc-layered-nav-term {
	padding: 0 !important;
	margin: 0 0 2px !important;
	list-style: none !important;
}

.fv-filter-widget .wc-layered-nav-term .fv-send_url {
	display: block;
	text-decoration: none !important;
	color: #666;
	padding: 3px 0;
}

.fv-filter-widget .wc-layered-nav-term .fv-send_url:hover {
	color: #333;
	text-decoration: none !important;
}

.fv-filter-widget .wc-layered-nav-term .fv-send_url:hover .fv-checkbox {
	border-color: #cc14ba;
	box-shadow: 0 0 3px rgba(217,24,211,.25);
}

/* --- Selected filter (OpenCart / FilterVier style) --- */
.fv-filter-widget .woocommerce-widget-layered-nav-list__item.chosen,
.fv-filter-widget .wc-layered-nav-term.chosen {
	background: #fdf5fc;
	border-radius: 4px;
	margin: 0 -4px 2px;
	padding: 0 4px;
	border: 1px solid rgba(214, 34, 208, 0.35);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

.fv-filter-widget .wc-layered-nav-term.chosen .fv-send_url,
.fv-filter-widget .wc-layered-nav-term.chosen .fv-send_url.fv-chosen {
	color: #b010a8;
	padding: 4px 2px;
}

.fv-filter-widget .wc-layered-nav-term.chosen .fv-item_text {
	font-weight: 500;
	color: #b010a8;
}

.fv-filter-widget .wc-layered-nav-term.chosen .fv-send_url:hover {
	color: #8a0d85;
}

.fv-filter-widget .wc-layered-nav-term.chosen .fv-active .fv-checkbox {
	background: #d622d0;
	border-color: #c11ebb;
	box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.9) inset;
}

/* --- Custom checkbox --- */
.fv-item_label.fv-ucheck {
	display: flex;
	align-items: center;
	gap: 8px;
	font: 300 13px/normal Ubuntu, sans-serif;
	color: inherit;
	cursor: pointer;
}

.fv-checkbox {
	display: block;
	flex-shrink: 0;
	width: 16px;
	height: 16px;
	border: 1px solid #d918d3;
	border-radius: 3px;
	background: #fff;
	position: relative;
	transition: background .15s, box-shadow .15s;
}

.fv-active .fv-checkbox {
	background: #d622d0;
	border-color: #d622d0;
}

.fv-active .fv-checkbox::after {
	content: '';
	position: absolute;
	top: 1px;
	left: 4px;
	width: 5px;
	height: 9px;
	border: solid #fff;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

.fv-item_text {
	font: 300 13px/normal Ubuntu, sans-serif;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* --- Price filter widget body --- */
.fv-filter-widget .fv-box_item.fv-item_slider {
	padding: 10px 12px 12px;
}

.fv-box_input_slider.fv-box_flex {
	display: flex;
	align-items: center;
	gap: 4px;
	margin-bottom: 10px;
}

.fv-input_slider {
	display: block !important;
	width: 65px;
	font: 300 12px/17px Ubuntu, sans-serif;
	color: #666;
	border: 1px solid #ccc;
	border-radius: 4px;
	padding: 5px 6px;
	height: 30px;
	box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
	background: #fff;
	text-align: center;
}

.fv-input_slider:focus {
	border-color: #d918d3;
	outline: none;
	box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 4px rgba(217,24,211,.3);
}

.fv-symbol_prs {
	font: 300 11px/normal Ubuntu, sans-serif;
	color: #999;
	flex-shrink: 0;
}

.fv-symbol_slider {
	font: 300 14px/normal Ubuntu, sans-serif;
	color: #999;
	flex-shrink: 0;
	margin: 0 2px;
}

/* --- jQuery UI price slider overrides --- */
.fv-filter-widget .price_slider_wrapper {
	margin: 0 0 12px;
}

.fv-filter-widget .price_slider_amount .price_slider {
	margin: 10px 0 12px;
}

.fv-filter-widget .ui-slider.ui-slider-horizontal {
	background: #e8e8e8 !important;
	border: none !important;
	height: 4px !important;
	border-radius: 2px;
	position: relative;
}

.fv-filter-widget .ui-slider .ui-slider-range {
	background: #db15bd !important;
	border-radius: 2px;
}

.fv-filter-widget .ui-slider .ui-slider-handle {
	width: 18px !important;
	height: 18px !important;
	top: -7px !important;
	margin-left: -9px !important;
	background: #cc14ba !important;
	border: 3px solid #fff !important;
	border-radius: 50% !important;
	box-shadow: 1px 1px 3px rgba(0,0,0,.3);
	cursor: pointer;
	outline: none;
}

/* .price_slider_amount must stay visible — WC JS reads inputs inside it. Hide duplicate WC price text only. */
.fv-filter-widget .price_label {
	display: none !important;
}

/* --- Apply button --- */
.fv-ajax_btn.fv-ajax_btn_apply {
	display: inline-block;
	background: #d622d0;
	color: #fff;
	border: 1px solid #ed32e7;
	border-radius: 4px;
	padding: 5px 16px;
	font: 300 13px/normal Ubuntu, sans-serif;
	cursor: pointer;
	transition: background .15s;
	margin-top: 4px;
}

.fv-ajax_btn.fv-ajax_btn_apply:hover {
	background: #c11ebb;
}

/* --- Collapse behaviour --- */
.fv-filter-widget.fv-collapsed .woocommerce-widget-layered-nav-list,
.fv-filter-widget.fv-collapsed .fv-box_item.fv-item_slider,
.fv-filter-widget.fv-collapsed form {
	display: none !important;
}

/* --- WC default resets --- */
.fv-filter-widget .woocommerce-widget-layered-nav-list .count {
	display: none !important;
}

.fv-filter-widget > .panel-heading:not(.fv-collapsible) {
	display: none;
}

/* --- Hide empty term items (scoped-out terms return empty HTML) --- */
.fv-filter-widget .wc-layered-nav-term:empty {
	display: none;
}

/* --- Sale filter widget --- */
.bretel_sale_filter_widget .fv-send_url {
	display: block;
	text-decoration: none !important;
	color: #666;
}

.bretel_sale_filter_widget .fv-send_url:hover {
	color: #333;
	text-decoration: none !important;
}

.bretel_sale_filter_widget .fv-send_url:hover .fv-checkbox {
	border-color: #cc14ba;
	box-shadow: 0 0 3px rgba(217,24,211,.25);
}
