/**
 * Фильтр проектов на страницах рубрик и меток.
 * Пункт 5 ТЗ от 20.08.2026.
 */

.pfilter {
	margin: 0 0 20px;
	padding: 15px;
	border: 1px solid #e5ddd2;
	border-radius: 4px;
	background: #fdfaf6;
}

/* Требование ТЗ: значения, которых нет у проектов страницы, не показываем,
   но из разметки не убираем. */
.pfilter .is-empty {
	display: none !important;
}

.pfilter__top {
	margin-bottom: 12px;
}

/* Кнопка «Все проекты» — оранжевая, как кнопка «Цены» (требование ТЗ).
   .btn-orange уже определён в теме (карточка проекта). */
.pfilter__all {
	display: inline-block;
}

.pfilter__group {
	margin-bottom: 14px;
}

.pfilter__label {
	display: block;
	margin-bottom: 6px;
	font-weight: 700;
	font-size: 15px;
}

/* --- Площадь --------------------------------------------------------- */

.pfilter__area {
	display: flex;
	align-items: center;
	gap: 8px;
	max-width: 260px;
}

.pfilter__area-input {
	width: 100%;
	min-width: 0;
	padding: 5px 8px;
	border: 1px solid #cfc4b5;
	border-radius: 3px;
	background: #fff;
	font-size: 15px;
}

.pfilter__area-dash {
	color: #8a7c6a;
}

.pfilter__range {
	position: relative;
	max-width: 260px;
	height: 28px;
	margin-top: 6px;
}

.pfilter__range-track {
	position: absolute;
	top: 12px;
	right: 0;
	left: 0;
	height: 4px;
	border-radius: 2px;
	background: #e0d6c7;
}

.pfilter__range-fill {
	position: absolute;
	top: 0;
	height: 100%;
	border-radius: 2px;
	background: #cda575;
}

/* Два наложенных ползунка: сама дорожка не кликабельна, ловят только бегунки. */
.pfilter__range-input {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 28px;
	margin: 0;
	background: none;
	pointer-events: none;
	-webkit-appearance: none;
	appearance: none;
}

.pfilter__range-input:focus {
	outline: none;
}

.pfilter__range-input::-webkit-slider-thumb {
	width: 16px;
	height: 16px;
	border: 2px solid #fff;
	border-radius: 50%;
	background: #976330;
	box-shadow: 0 1px 3px rgba(0, 0, 0, .3);
	cursor: pointer;
	pointer-events: auto;
	-webkit-appearance: none;
	appearance: none;
}

.pfilter__range-input::-moz-range-thumb {
	width: 16px;
	height: 16px;
	border: 2px solid #fff;
	border-radius: 50%;
	background: #976330;
	box-shadow: 0 1px 3px rgba(0, 0, 0, .3);
	cursor: pointer;
	pointer-events: auto;
}

.pfilter__range-input::-moz-range-track {
	background: none;
}

/* --- Чекбоксы -------------------------------------------------------- */

.pfilter__checks {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 16px;
}

.pfilter__check {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 0;
	font-weight: 400;
	cursor: pointer;
}

.pfilter__check input {
	margin: 0;
	cursor: pointer;
}

/* --- Размеры --------------------------------------------------------- */

.pfilter__select {
	max-width: 260px;
	padding: 5px 8px;
	border: 1px solid #cfc4b5;
	border-radius: 3px;
	background: #fff;
	font-size: 15px;
}

/* --- Кнопки ---------------------------------------------------------- */

.pfilter__actions {
	display: flex;
	align-items: center;
	gap: 16px;
	margin-top: 16px;
}

.pfilter__reset {
	color: #8a7c6a;
	font-size: 14px;
	text-decoration: underline;
}

.pfilter__reset:hover,
.pfilter__reset:focus {
	color: #976330;
	text-decoration: none;
}

/* --- Сортировка (отдельной строкой над проектами) -------------------- */

.pfilter__sort {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 14px;
	margin-top: 16px;
	padding-top: 12px;
	border-top: 1px solid #e5ddd2;
}

.pfilter__sort-label {
	font-weight: 700;
}

.pfilter__sort-link {
	color: #976330;
	text-decoration: underline;
}

.pfilter__sort-link:hover,
.pfilter__sort-link:focus {
	text-decoration: none;
}

.pfilter__sort-link.is-current {
	color: #333;
	font-weight: 700;
	pointer-events: none;
	text-decoration: none;
}

@media (max-width: 575px) {
	.pfilter {
		padding: 12px;
	}

	.pfilter__checks {
		gap: 8px 12px;
	}
}

/* Кнопка «Показать» неактивна, пока параметры фильтра не изменили. */
.pfilter__submit:disabled,
.pfilter__submit.is-disabled {
	opacity: .5;
	cursor: default;
	pointer-events: none;
}
