/* General Filter Widget Styles */

.general-filter-widget {
	width: 100%;
}

.general-filter-form {
	width: 100%;
}

.general-filter-controls {
	display: flex;
	gap: 10px;
	align-items: stretch;
}

.general-filter-button {
	padding: 16px !important;
	background-color: #0073aa;
	color: #fff;
	border: none;
	border-radius: 4px;
	font-size: 16px;
	line-height: 1.5;
	cursor: pointer;
	transition: background-color 0.3s ease;
	white-space: nowrap;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-direction: row;
	gap: 8px;
}

.general-filter-button-icon {
	width: 20px;
	height: 20px;
	mask-image: url('assets/filter-icon.svg');
	mask-size: contain;
	mask-position: center;
	mask-repeat: no-repeat;
	background-color: #000;
}

.general-filter-search-wrapper {
	position: relative;
	flex: 1;
	max-width: 390px;
}

.general-filter-search {
	width: 100%;
	height: 100%;
	padding: 10px 20px 10px 50px !important;
	border: 1px solid #dcdcdc !important;
	border-radius: 99px !important;
}

.general-filter-search-icon {
	position: absolute;
	left: 15px;
	top: 50%;
	transform: translateY(-50%);
	width: 24px;
	height: 24px;
	pointer-events: none;
}

.general-filter-search:focus {
	outline: none;
	border-color: #0073aa;
	box-shadow: 0 0 0 1px #0073aa;
}

/* Popup Styles */
.general-filter-popup {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 9999;
}

.general-filter-popup--active {
	display: block;
}

.general-filter-popup-overlay {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: rgba(0, 0, 0, 0.5);
}

.general-filter-popup-content {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	background-color: var(--white);
	border-radius: 8px;
	padding: 0;
	max-width: 90%;
	max-height: 90vh;
	overflow-y: auto;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
	width: 600px;
}

.general-filter-popup-close {
	background: none;
	border: none !important;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	color: var(--white);
	padding: 0 !important;
	width: 24px;
	height: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-left: auto;
}

.general-filter-popup-close svg{
	width: 24px;
	height: 24px;
}

.general-filter-popup-close:hover {
	color: var(--text);
}

.general-filter-popup-title {
	font-weight: 700;
	margin: 0;
}

.general-filter-popup-header{
	background: #000;
	color: var(--white);
	display: flex;
	flex-direction: row;
	white-space: nowrap;
	align-items: center;
	gap: 15px;
	padding: 20px 30px;
}

.general-filter-popup-header-icon{
	width: 24px;
	height: 24px;
}

.general-filter-filters {
	padding: 30px 30px 0 30px;
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.general-filter-group {
	border-bottom: 1px solid #eee;
	padding-bottom: 15px;
}

.general-filter-label {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	margin: 0 0 10px 0;
	padding: 0 !important;
	border: none !important;
	background: none;
	font-size: 18px;
	font-weight: 600;
	cursor: pointer;
	text-align: left;
	transition: opacity 0.2s ease;
}

.general-filter-label:hover {
	opacity: 0.7;
}

.general-filter-label:focus {
	outline: 2px solid #0073aa;
	outline-offset: 2px;
	border-radius: 2px;
}

.general-filter-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	font-size: 20px;
	line-height: 1;
	transition: transform 0.3s ease;
	flex-shrink: 0;
}

.general-filter-icon::before {
	content: '−';
}

.general-filter-label[aria-expanded="false"] .general-filter-icon::before {
	content: '+';
}

.general-filter-option-wrapper {
	display: flex;
	flex-direction: column;
	gap: 8px;
	overflow: hidden;
}

.general-filter-option-wrapper--pills {
	flex-direction: row;
	flex-wrap: wrap;
	gap: 8px;
}

.general-filter-option-label {
	display: flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
}

.general-filter-option-label input[type="checkbox"] {
	margin: 0;
	cursor: pointer;
	accent-color: var(--black);
}

.general-filter-option-label input[type="checkbox"]:checked {
	background-color: var(--black);
	border-color: var(--black);
}

.general-filter-option-label span {
	font-size: 16px;
}

.general-filter-option-pill {
	display: inline-flex;
	align-items: center;
	padding: 12px 20px;
	border: 2px solid var(--black);
	border-radius: 99px;
	cursor: pointer;
	transition: all 0.2s ease;
	background-color: transparent;
}

.general-filter-option-pill:hover {
	background-color: var(--white85);
}

.general-filter-option-pill input[type="checkbox"] {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
}

.general-filter-option-pill input[type="checkbox"]:checked + span {
	font-weight: 700;
}

.general-filter-option-pill:has(input[type="checkbox"]:checked) {
	background-color: var(--white85);
	color: var(--text);
}

.general-filter-option-pill span {
	font-size: var(--paragraph-s-font-size);
	line-height: 1em;
	font-weight: var(--paragraph-s-font-weight);
	letter-spacing: var(--paragraph-s-letter-spacing);
}

.general-filter-no-taxonomies,
.general-filter-no-filters {
	margin: 20px 0;
	color: var(--black85);
}

.general-filter-popup-actions {
	display: flex;
	gap: 10px;
	justify-content: space-between;
	padding-top: 20px;
	padding: 30px 30px 30px 30px;
}





/* Prevent body scroll when popup is open */
body.general-filter-popup-open {
	overflow: hidden;
}

/* Responsive: tablet and mobile */
@media (max-width: 1024px) {
	.general-filter-button {
		width: min-content;
		min-width: auto;
	}

	.general-filter-button__text {
		display: none;
	}
}

@media (max-width: 768px) {
	.general-filter-popup-content {
		width: 100%;
	}

	.general-filter-controls {
		flex-direction: row;
	}
}
