.apf {
	display: none;
	flex-direction: column;
	position: fixed;
	left: 0;
	top: 0;
	width: 100%;
	height: 100vh;
	background-color: #ffffff;
	box-shadow: 6px 0px 10px rgba(0, 0, 0, 0.14);
	z-index: 1001;
}

html.filters-open .apf {
	display: flex;
}

.apf__inside {
	height: 100%;
}

.apf__header {
	display: flex;
	align-items: center;
	padding: 16px 10px 12px;
	border-bottom: 1px solid #D8D8D8;
}

.apf__title {
	font-size: 18px;
	line-height: 20px;
	font-weight: bold;
}

.apf__close {
	display: block;
	width: 24px;
	height: 24px;
	margin-left: auto;
	padding: 0;
	background-color: transparent;
	border: 0;
}

.apf__close:hover .apf__close-icon {
	fill: var(--pastel-green-500);
}

.apf__close-icon {
	display: block;
	width: 100%;
	height: 100%;
}

.apf__content {
	height: 100%;
	padding: 16px 10px 180px 10px;
	overflow-y: auto;
}

.apf__footer {
	position: fixed;
	left: 0;
	bottom: 0;
	width: 100%;
	padding: 10px;
	background-color: #ffffff;
	border-top: 1px solid #F6F5F6;
	z-index: 10;
}

.apf__reset {
	display: none;
	align-items: center;
	justify-content: center;
	margin: 0 auto 15px;
	padding: 0;
	color: var(--thunderbird-500);
	text-decoration: underline;
	background-color: transparent;
	border: 0;
}

.apf__reset:hover {
	text-decoration: none;
}

.apf__reset--visible {
	display: flex;
}

.apf__empty {
	margin: 50px 0 30px;
	font-size: 18px;
	font-weight: bold;
}

.apf-field:not(:last-child) {
	margin-bottom: 12px;
	padding-bottom: 12px;
	border-bottom: 1px solid #F6F5F6;
}

.apf-field__title {
	display: flex;
	align-items: center;
	justify-content: space-between;
	cursor: pointer;
}

.apf-field__title:hover {
	color: var(--pastel-green-500);
}

.apf-field--visible .apf-field__title {
	color: #000000 !important;
	margin-bottom: 24px;
}

.apf-field__title:after {
	content: "";
	display: block;
	flex-shrink: 0;
	width: 24px;
	height: 24px;
	background-size: contain;
	background-repeat: no-repeat;
	background-position: center;
	background-image: url("data:image/svg+xml, %3Csvg id='chevron' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7.41 8.58984L12 13.1698L16.59 8.58985L18 9.99985L12 15.9998L6 9.99984L7.41 8.58984Z'/%3E%3C/svg%3E");
}

.apf-field--visible .apf-field__title:after {
	transform: rotate(180deg);
}

.apf-field__title-text {
	font-size: 16px;
	line-height: 20px;
}

.apf-field--visible .apf-field__title-text {
	font-weight: bold;
}

.apf-field__title-btn {
	display: block;
	padding: 0;
	font-size: 14px;
	line-height: 16px;
	color: #999999;
	background-color: transparent;
	border: 0;
	border-bottom: 1px dashed;
}

.apf-field__title-btn:hover {
	color: #FF0000;
}

.apf-field__content,
.apf-field__range {
	display: none;
}

.comment-form .apf-field__content,
.comment-form .apf-field__range,
#commentform-cloned .apf-field__content,
#commentform-cloned .apf-field__range,
.apf-field--visible .apf-field__content,
.apf-field--visible .apf-field__range {
	display: flex;
}

.apf-field_checkbox .apf-field__content,
.apf-field_radio .apf-field__content,
.apf-field_taxonomy .apf-field__content {
	flex-direction: column;
}

.apf-checkbox:not(:last-child),
.apf-radio:not(:last-child) {
	margin-bottom: 15px;
}

.apf-checkbox input[type="checkbox"],
.apf-radio input[type="radio"] {
	display: none;
}

.apf-checkbox__label,
.apf-radio__label {
	display: flex;
	align-items: center;
	cursor: pointer;
	font-size: 16px;
}

.apf-checkbox__label:before {
	flex-shrink: 0;
	content: "";
	display: block;
	width: 18px;
	height: 18px;
	margin-right: 7px;
	border: 1px solid #D8D8D8;
	border-radius: 2px;
}

.apf-checkbox input[type="checkbox"]:checked + .apf-checkbox__label:before {
	background-color: var(--pastel-green-500);
	border-color: var(--pastel-green-500);
	background-size: 100%;
	background-repeat: no-repeat;
	background-position: center;
	background-image: url("data:image/svg+xml,%3Csvg id='check' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8.9999 16.2L4.7999 12L3.3999 13.4L8.9999 19L20.9999 7.00001L19.5999 5.60001L8.9999 16.2Z' fill='%23ffffff' /%3E%3C/svg%3E%0A");
}

.apf-radio__label:before {
	flex-shrink: 0;
	content: "";
	display: block;
	width: 16px;
	height: 16px;
	margin-right: 7px;
	outline: 1px solid #D8D8D8;
	border-radius: 50%;
}

.apf-radio input[type="radio"]:checked + .apf-radio__label:before {
	border: 2px solid #ffffff;
	background: #ff0000;
}

.apf-field_number .apf-field__content {
	justify-content: space-between;
}

.apf-field_number .apf-field__content input {
	width: calc(50% - 5px);
}

.apf-field__range {
	margin-top: 22px;
}

.apf-field_text .apf-field__content input {
	width: 100%;
}

.apf__help {
	margin-bottom: 4px;
	font-size: 14px;
	line-height: 16px;
	color: #9C9C9C;
}

.apf__submit {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;

	color: var(--mirage-950);
	background: var(--pastel-green-500);
	box-shadow: 0 3px 0 0 var(--pastel-green-600);
	padding: 0;
	border: 0;
	width: 100%;
	font-size: 14px;
	font-weight: 600;
	text-align: center;
	height: 48px;
	border-radius: 8px;
	cursor: pointer;
	transition: all ease .1s;
}

.apf__submit:hover {
	background: var(--pastel-green-500);
}

.apf__icon {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	margin-right: 4px;
}

.apf__icon-image {
	display: block;
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
}

.apf-fields--horizontal {
	display: flex;
	flex-direction: column;
}

.apf-fields--horizontal:not(:last-child) {
	margin-bottom: 8px;
}

.apf-fields--horizontal:last-child {
	margin-top: 24px;
}

.apf-fields--horizontal .apf-field:not(:last-child) {
	margin-bottom: 8px;
	padding-bottom: 0;
}

.apf-field .noUi-horizontal {
	height: 2px;
	padding: 0 8px;
	border: 0;
}

.apf-field .noUi-horizontal .noUi-handle {
	width: 34px !important;
	height: 28px !important;
	right: -17px !important;
	top: -12px !important;
	border-radius: 3px !important;
	border: 1px solid #EFEFEF;
	box-shadow: 0px 3px 5px -1px rgba(0, 0, 0, 0.2), 0px 6px 10px rgba(0, 0, 0, 0.14), 0px 1px 18px rgba(0, 0, 0, 0.12);
	outline: none;
	cursor: pointer;
}

.apf-field .noUi-target {
	background-color: rgba(255, 0, 0, 0.3);
}

.apf-field .noUi-connect {
	background-color: var(--pastel-green-500);
}

.apf-field .noUi-handle {
	background-color: #ffffff;
}

.apf-field .noUi-handle {
	background-color: var(--pastel-green-500) !important;
	border-color: var(--pastel-green-500) !important;
}

#commentform-cloned .apf-fields--advantages {
	display: none;
}

.apf-fields--advantages .apf-field_textarea {
	margin-top: 4px;
}

.apf-fields--advantages .apf-field_textarea:before {
	display: block;
	margin-bottom: 12px;
	padding-left: 34px;
	font-size: 16px;
	line-height: 20px;
	color: #9c9c9c;
}

.apf-fields--advantages .apf-field_textarea:first-child:before {
	content: "Плюсы";
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none'%3E%3Crect width='20' height='20' fill='%23C1E3BF' rx='3'/%3E%3Cpath fill='%2300C34D' fill-rule='evenodd' d='M9 15a1 1 0 1 0 2 0v-4h4a1 1 0 1 0 0-2h-4V5a1 1 0 1 0-2 0v4H5a1 1 0 0 0 0 2h4v4Z' clip-rule='evenodd'/%3E%3C/svg%3E") left center no-repeat;
}

.apf-fields--advantages .apf-field_textarea:last-child:before {
	content: "Минусы";
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none'%3E%3Crect width='20' height='20' fill='%23FFB4A8' rx='3'/%3E%3Crect width='12' height='2' x='4' y='9' fill='red' rx='1'/%3E%3C/svg%3E") left center no-repeat;
}

/*** Responsive ***/

@media (min-width: 360px) {

	.apf__header {
		padding: 16px 15px 12px;
	}

	.apf__content {
		padding: 16px 15px 250px 15px;
	}

	.apf__footer {
		padding: 15px;
	}
}

@media (min-width: 768px) {

	.apf__header {
		padding: 16px 20px 12px;
	}

	.apf-fields--horizontal {
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
	}

	.apf-fields--horizontal:not(:last-child) {
		margin-bottom: 12px;
	}

	.apf-fields--horizontal .apf-field {
		width: calc(50% - 6px);
	}

	.apf-fields--horizontal .apf-field.apf-field_textarea {
		width: 100%;
	}

	.apf-fields--horizontal .apf-field:not(:last-child) {
		margin-bottom: 0;
		padding-bottom: 0;
	}

	.apf-fields--horizontal .apf__submit {
		max-width: 178px;
		margin-left: auto;
	}

	.apf-fields--advantages {
		gap: 12px;
	}
}

@media (min-width: 768px) {

	.apf {
		position: fixed;
		top: 0;
		left: 0;
		max-width: initial;
		max-height: initial;
		width: 100vw;
		height: 100vh;
		padding: 80px;
		background-color: rgba(0, 0, 0, 0.6);
	}

	.apf__inside {
		position: relative;
		max-width: 500px;
		max-height: 700px;
		width: 100%;
		height: 100%;
		margin: auto;
		border-radius: 10px;
		background-color: #ffffff;
		overflow: hidden;
	}

	.apf__footer {
		position: absolute;
	}
}
