/* Advanced archive filters — same visual language as homepage quick search */

.novo-filters {
	--novo-filters-accent: var(--sand);
	--novo-filters-accent-text: var(--primary);
	--novo-filters-field-bg: rgba(255, 255, 255, 0.08);
	--novo-filters-panel-bg: #222f43;
	--novo-filters-label: color-mix(in oklab, var(--primary-foreground) 70%, transparent);
	--novo-filters-text: var(--white);
	--novo-filters-muted: color-mix(in oklab, var(--primary-foreground) 80%, transparent);
	--novo-filters-border: rgba(255, 255, 255, 0.12);
	--novo-filters-radius: 12px;
	--novo-filters-gap: 10px;

	background: var(--primary);
	border-radius: var(--radius-m);
	color: var(--novo-filters-text);
	font: inherit;
	padding: calc(var(--space-m) * .88);
	width: 100%;
}

.novo-filters label {
	margin-bottom: 0;
}

.novo-filters__row {
	align-items: stretch;
	display: flex;
	flex-wrap: wrap;
	gap: var(--novo-filters-gap);
	margin-bottom: var(--novo-filters-gap);
}

.novo-filters__row--primary {
	margin-bottom: var(--novo-filters-gap);
}

.novo-filters__row--primary > .novo-filters__field,
.novo-filters__row--more > .novo-filters__field {
	flex: 1 1 160px;
}

.novo-filters__row--primary > .novo-filters__range,
.novo-filters__row--more > .novo-filters__range {
	flex: 1 1 140px;
}

.novo-filters__row--more {
	margin-bottom: 0;
}

/* Expandable “more filters” panel */
.novo-filters__more-bar {
	margin: 0;
	padding-bottom: 2px;
}

.novo-filters__more-toggle {
	align-items: center;
	appearance: none;
	background: transparent;
	border: 0;
	color: var(--novo-filters-muted);
	cursor: pointer;
	display: inline-flex;
	font: inherit;
	font-size: 13px;
	font-weight: 500;
	gap: 8px;
	line-height: 1.2;
	padding: 0;
	transition: color 0.15s ease;
}

.novo-filters__more-toggle:hover {
	color: var(--novo-filters-text);
}

.novo-filters__more-badge {
	align-items: center;
	background: var(--novo-filters-accent);
	border-radius: 999px;
	color: var(--novo-filters-accent-text);
	display: inline-flex;
	font-size: 11px;
	font-weight: 500;
	justify-content: center;
	line-height: 1;
	min-width: 18px;
	padding: 3px 6px;
}

.novo-filters__more-badge[hidden] {
	display: none !important;
}

.novo-filters__more-chevron {
	border-right: 1.5px solid currentColor;
	border-top: 1.5px solid currentColor;
	height: 6px;
	margin-top: -2px;
	transform: rotate(135deg);
	transition: transform 0.2s ease;
	width: 6px;
}

.novo-filters.is-more-open .novo-filters__more-chevron {
	margin-top: 2px;
	transform: rotate(-45deg);
}

.novo-filters__more-panel {
	display: grid;
	grid-template-rows: 0fr;
	transition: grid-template-rows 0.28s ease;
}

.novo-filters.is-more-open .novo-filters__more-panel {
	grid-template-rows: 1fr;
}

/* Middle layer: clips height during animation — no padding/border here */
.novo-filters__more-panel-clip {
	min-height: 0;
	overflow: hidden;
}

/* After open animation, allow dropdown menus to escape the clip */
.novo-filters.is-more-open.is-more-ready .novo-filters__more-panel-clip {
	overflow: visible;
}

/* Inner content: spacing + line only exist here (fully clipped when closed) */
.novo-filters__more-panel-content {
	padding-top: 12px;
}

.novo-filters__more-panel-content > .novo-filters__row--more {
	border-top: 1px solid var(--novo-filters-border);
	padding-top: 14px;
}

@media (prefers-reduced-motion: reduce) {
	.novo-filters__more-panel {
		transition: none;
	}
}

.novo-filters__field {
	background: var(--novo-filters-field-bg);
	border-radius: var(--novo-filters-radius);
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-height: 58px;
	min-width: 0;
	position: relative;
}

.novo-filters__field[hidden] {
	display: none !important;
}

.novo-filters__field-label {
	color: var(--novo-filters-label);
	display: block;
	font-size: 10px;
	font-weight: 500;
	letter-spacing: 0.08em;
	line-height: 1.2;
	margin-bottom: 4px;
	text-transform: uppercase;
}

.novo-filters__dropdown-toggle {
	align-items: flex-start;
	appearance: none;
	background: transparent;
	border: 0;
	box-sizing: border-box;
	color: inherit;
	cursor: pointer;
	display: flex;
	flex-direction: column;
	font: inherit;
	height: 100%;
	justify-content: center;
	min-height: 58px;
	padding: 10px 36px 10px 14px;
	position: relative;
	text-align: left;
	width: 100%;
}

.novo-filters__dropdown-summary {
	font-size: var(--text-s, 14px);
	font-weight: 500;
	line-height: calc(1.25 / 0.875);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	width: 100%;
}

.novo-filters__chevron {
	border-right: 1.5px solid currentColor;
	border-top: 1.5px solid currentColor;
	color: rgba(255, 255, 255, 0.55);
	height: 7px;
	pointer-events: none;
	position: absolute;
	right: 14px;
	top: 50%;
	transform: translateY(-65%) rotate(135deg);
	width: 7px;
}

.novo-filters__dropdown.is-open .novo-filters__chevron {
	transform: translateY(-35%) rotate(-45deg);
}

.novo-filters__dropdown-panel {
	background: var(--novo-filters-panel-bg);
	border: 1px solid var(--novo-filters-border);
	border-radius: 12px;
	box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
	left: 0;
	max-height: 280px;
	min-width: 100%;
	overflow: auto;
	padding: 8px;
	position: absolute;
	top: calc(100% + 6px);
	z-index: 40;
}

.novo-filters__dropdown-panel[hidden] {
	display: none;
}

.novo-filters__check {
	align-items: center;
	border-radius: 6px;
	cursor: pointer;
	display: flex;
	gap: 8px;
	padding: 7px 8px;
	font-weight: 500;
	position: relative;
	transition: background-color 0.15s ease;
	user-select: none;
	color: var(--novo-filters-text);
}

.novo-filters__check:hover {
	background: rgba(255, 255, 255, 0.06);
}

.novo-filters__check input {
	cursor: pointer;
	height: 100%;
	left: 0;
	margin: 0;
	opacity: 0;
	position: absolute;
	top: 0;
	width: 100%;
	z-index: 1;
}

.novo-filters__check-box {
	align-items: center;
	
	border: 1px solid var(--border-color);
	border-radius: 3px;
	box-sizing: border-box;
	color: var(--novo-filters-accent-text);
	display: inline-flex;
	flex-shrink: 0;
	height: 14px;
	justify-content: center;
	transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
	width: 14px;
}

.novo-filters__check-box::after {
	border-bottom: 1.5px solid currentColor;
	border-right: 1.5px solid currentColor;
	content: '';
	height: 7px;
	opacity: 0;
	transform: translateY(-1px) rotate(45deg) scale(0.6);
	transition: opacity 0.12s ease, transform 0.12s ease;
	width: 4px;
}

/* Radio looks round; checkbox stays square */
.novo-filters__check input[type='radio'] + .novo-filters__check-box {
	border-radius: 50%;
}

.novo-filters__check input[type='radio'] + .novo-filters__check-box::after {
	background: currentColor;
	border: 0;
	border-radius: 50%;
	height: 6px;
	transform: none;
	width: 6px;
}

.novo-filters__check input:checked + .novo-filters__check-box {
	background: var(--novo-filters-accent);
	border-color: var(--novo-filters-accent);
}

.novo-filters__check input:checked + .novo-filters__check-box::after {
	opacity: 1;
	transform: translateY(-1px) rotate(45deg) scale(1);
}

.novo-filters__check input[type='radio']:checked + .novo-filters__check-box::after {
	transform: none;
}

.novo-filters__check input:focus-visible + .novo-filters__check-box {
	box-shadow: 0 0 0 2px rgba(232, 220, 200, 0.35);
}

.novo-filters__check span:not(.novo-filters__check-box) {
	font-size: 14px;
	line-height: 1.3;
}

.novo-filters__check[hidden] {
	display: none !important;
}

/* Range as compact dropdown + popover */
.novo-filters__field-unit {
	font-weight: 400;
	letter-spacing: 0.04em;
	text-transform: none;
}

.novo-filters__range-panel {
	min-width: 260px;
	padding: calc(var(--content-gap) / 4);
}

.novo-filters__range-box {
	align-items: center;
	display: flex;
	gap: 0;
}

.novo-filters__range-half {
	background: rgba(255, 255, 255, 0.06);
	border-radius: 8px;
	display: block;
	flex: 1;
	min-width: 0;
	padding: 8px 12px;
}

.novo-filters__range-half input {
	appearance: textfield;
	background: transparent;
	border: 0;
	color: var(--novo-filters-text);
	font: inherit;
	font-size: 14px;
	font-weight: 400;
	min-width: 0;
	padding: 0;
	width: 100%;
}

.novo-filters__range-half input::placeholder {
	color: var(--novo-filters-muted);
	font-weight: 400;
	opacity: 1;
}

.novo-filters__range-half input:focus {
	outline: none;
}

.novo-filters__range-half input::-webkit-outer-spin-button,
.novo-filters__range-half input::-webkit-inner-spin-button {
	appearance: none;
	margin: 0;
}

.novo-filters__range-divider {
	align-self: stretch;
	background: var(--novo-filters-border);
	flex-shrink: 0;
	margin: 0 8px;
	width: 1px;
}

/* Visually hidden, kept for screen readers */
.novo-filters .screen-reader-text {
	border: 0;
	clip: rect(0, 0, 0, 0);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
}

/* Active filters + reset — hidden when nothing is selected */
.novo-filters__footer {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 8px;
	justify-content: space-between;
}

.novo-filters__footer[hidden] {
	display: none !important;
}

.novo-filters__active {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.novo-filters__chip {
	align-items: center;
	background: rgba(255, 255, 255, 0.1);
	border: 0;
	border-radius: 999px;
	color: var(--novo-filters-text);
	cursor: pointer;
	display: inline-flex;
	font: inherit;
	font-size: 12px;
	gap: 8px;
	line-height: 1;
	padding: 8px 12px;
}

.novo-filters__chip:hover {
	background: rgba(255, 255, 255, 0.16);
}

.novo-filters__chip-x {
	opacity: 0.7;
}

.novo-filters__reset {
	appearance: none;
	background: transparent;
	border: 0;
	color: var(--novo-filters-accent);
	cursor: pointer;
	font: inherit;
	font-size: 13px;
	font-weight: 500;
	margin-left: auto;
	padding: 6px 0;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.novo-filters__reset[hidden] {
	display: none;
}

@media (max-width: 992px) {
	.novo-filters__row--primary > .novo-filters__field,
	.novo-filters__row--more > .novo-filters__field {
		flex: 1 1 calc(50% - 10px);
	}
	.novo-filters__row--search .novo-filters__submit {
		flex: 1 1 100%;
		width: 100%;
		height: 44px;
	}
}

@media (max-width: 640px) {
	

	.novo-filters__reset {
		margin-left: 0;
	}
}

/* Homepage quick search — same fields as archive, no panel chrome */
.novo-filters--search {
	background: transparent;
	padding: 0;
}

.novo-filters__row--search {
	align-items: stretch;
}

.novo-filters__submit {
	align-items: center;
	appearance: none;
	background: var(--novo-filters-accent);
	border: 0;
	border-radius: var(--novo-filters-radius);
	color: var(--novo-filters-accent-text);
	cursor: pointer;
	display: inline-flex;
	flex: 0 0 52px;
	height: 58px;
	justify-content: center;
	transition: opacity 0.2s ease, transform 0.2s ease;
	width: 52px;
}

.novo-filters__submit:hover {
	opacity: 0.92;
}

.novo-filters__submit:active {
	transform: scale(0.98);
}

/* Homepage search — reset only */
.novo-filters--search .novo-filters__footer--search {
	justify-content: flex-end;
	margin-top: 8px;
}

.novo-filters--search .novo-filters__footer--search .novo-filters__reset {
	margin-left: 0;
}

