/* CPFW Filter Widget Styles (Scrollable Sections) */

.cpfw-filter-group {
	border-bottom: 1px solid #e5e5e5;
	padding: 15px 0;
	margin: 0;
}

.cpfw-filter-group:first-child {
	padding-top: 0;
}

.cpfw-filter-group:last-child {
	border-bottom: none;
	padding-bottom: 0;
}

.cpfw-filter-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	cursor: pointer;
	padding: 5px 0;
	user-select: none;
	transition: all 0.3s ease;
}

.cpfw-filter-header h3 {
	margin: 0;
	font-size: 14px;
	font-weight: 600;
	color: #333333;
	flex: 1;
}

.cpfw-filter-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
	color: #666666;
	transition: transform 0.3s ease;
	flex-shrink: 0;
	margin-left: 8px;
}

.cpfw-filter-header.collapsed .cpfw-filter-toggle {
	transform: rotate(180deg);
}

.cpfw-filter-options {
	max-height: 250px;
	overflow-y: auto;
	margin-top: 10px;
	padding-right: 8px;
	display: flex;
	flex-direction: column;
	gap: 5px;
	transition: max-height 0.3s ease, opacity 0.3s ease;
}

.cpfw-filter-header.collapsed ~ .cpfw-filter-options {
	max-height: 0;
	overflow: hidden;
	margin-top: 0;
	padding-right: 0;
	opacity: 0;
}

.cpfw-filter-label {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 5px 0;
	cursor: pointer;
	font-size: 13px;
	color: #555555;
	transition: color 0.2s ease;
	margin: 0;
}

.cpfw-filter-label:hover {
	color: #000000;
}

.cpfw-filter-label input[type="checkbox"] {
	cursor: pointer;
	width: 16px;
	height: 16px;
	min-width: 16px;
	accent-color: #333333;
}

.cpfw-filter-text {
	flex: 1;
	word-break: break-word;
}

/* Scrollbar styling for filter options */
.cpfw-filter-options::-webkit-scrollbar {
	width: 6px;
}

.cpfw-filter-options::-webkit-scrollbar-track {
	background: #f1f1f1;
	border-radius: 3px;
}

.cpfw-filter-options::-webkit-scrollbar-thumb {
	background: #cccccc;
	border-radius: 3px;
}

.cpfw-filter-options::-webkit-scrollbar-thumb:hover {
	background: #999999;
}

/* Firefox scrollbar */
.cpfw-filter-options {
	scrollbar-color: #cccccc #f1f1f1;
	scrollbar-width: thin;
}

/* CPFW Active Filters Widget Styles - Luxury Dwelling Theme (Production Style) */

.cpfw-active-filters {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 15px;
	margin-top: -15px;
	margin-bottom: 15px;
	min-height: 1px;
	font-size: 95%;
	line-height: 1;
}

.cpfw-active-filters-container {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 15px;
	align-items: center;
	width: 100%;
}

.cpfw-active-filters-label {
	font-weight: 400;
	white-space: nowrap;
	margin: 0;
	padding: 0;
	font-size: 14px;
	color: #333333;
	display: none;
	align-items: center;
	gap: 4px;
}

.cpfw-active-filters-tags {
	display: inline-flex;
	flex-wrap: wrap;
	gap: 5px 15px;
	align-items: center;
	flex: 0;
	margin: 0;
	padding: 0;
}

/* Filter tags - simple text style matching production */
.cpfw-filter-tag {
	display: inline-flex;
	align-items: center;
	gap: 0;
	padding: 0;
	background-color: transparent;
	color: #333333;
	border-radius: 0;
	font-size: inherit;
	font-weight: inherit;
	border: none;
	margin: 0;
	box-shadow: none;
	transition: opacity 0.2s ease;
}

.cpfw-filter-tag:hover {
	background-color: transparent;
	box-shadow: none;
	opacity: 0.7;
}

.cpfw-filter-tag a {
	color: inherit;
	text-decoration: none;
	cursor: pointer;
	transition: opacity 0.2s ease;
}

.cpfw-filter-tag a:hover {
	opacity: 0.7;
}

.cpfw-filter-tag .cpfw-filter-label {
	margin: 0;
	padding: 0;
	font-size: inherit;
	font-weight: inherit;
	color: inherit;
	cursor: pointer;
	display: inline;
	gap: 0;
}

.cpfw-remove-filter {
	display: none;
}

/* Clear all filters button - production style with right border separator */
.cpfw-clear-all-btn {
	flex: 0 0 auto;
	padding-inline-end: 15px;
	border-inline-end: 1px solid #d0d0d0;
	background-color: transparent;
	color: #333333;
	border: none;
	border-radius: 0;
	font-size: inherit;
	font-weight: inherit;
	cursor: pointer;
	transition: opacity 0.2s ease;
	white-space: nowrap;
	margin-left: 0;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	gap: 0;
}

.cpfw-clear-all-btn::before {
	content: "✕";
	font-weight: bold;
	font-size: inherit;
	margin-right: 5px;
}

.cpfw-clear-all-btn:hover {
	color: #333333;
	opacity: 0.7;
}

.cpfw-clear-all-btn:active {
	opacity: 0.5;
}

.cpfw-clear-all-btn a {
	color: inherit;
	text-decoration: none;
	display: inline;
}

/* Responsive design - matches production behavior */
@media (max-width: 1024px) {
	.cpfw-active-filters {
		flex-wrap: nowrap;
	}

	.cpfw-active-filters-tags {
		overflow-x: auto;
		direction: rtl;
		flex-wrap: nowrap;
		white-space: nowrap;
	}

	.cpfw-active-filters-tags ul {
		flex-wrap: nowrap;
		white-space: nowrap;
		direction: ltr;
	}

	.cpfw-filter-tag {
		flex-shrink: 0;
	}
}
