/* Filmų ir serialų filtras */
.filter-wrap {
	margin: 0 0 30px;
	padding: 30px 30px 20px;
	background: #171b26;
	border-radius: 3px;
	box-shadow: 0 0 10px rgba(0, 0, 0, .8);
	color: #ccc;
}

.movie-filter {
	display: grid;
	grid-template-columns: minmax(150px, 1fr) minmax(150px, 1fr) minmax(150px, 1fr) minmax(132px, .7fr) minmax(180px, 1fr);
	gap: 22px;
	align-items: end;
}

.movie-filter--no-genre {
	grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) minmax(132px, .7fr) minmax(200px, 1fr);
}

.movie-filter__field {
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
}

.movie-filter__field > label,
.movie-filter__field > legend,
.movie-filter__field > .movie-filter__label {
	display: block;
	margin: 0 0 7px 4px;
	padding: 0;
	color: #ccc;
	font-size: 13px;
	font-weight: 400;
	line-height: 1;
}

.movie-filter select,
.movie-filter__years > summary,
.movie-filter input[type="number"] {
	box-sizing: border-box;
	width: 100%;
	height: 32px;
	margin: 0;
	padding: 0 10px;
	border: 0;
	border-radius: 4px;
	background-color: #0c101b;
	box-shadow: 0 0 0 1px #000;
	color: #ccc;
	font: 14px 'DIN Pro', sans-serif;
	line-height: 32px;
	appearance: auto;
	-webkit-appearance: auto;
	color-scheme: dark;
}

.movie-filter select:focus,
.movie-filter__years > summary:focus,
.movie-filter input[type="number"]:focus {
	box-shadow: 0 0 0 1px #297fd7;
}

.movie-filter__years {
	position: relative;
}

.movie-filter__years > summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	list-style: none;
	cursor: pointer;
	user-select: none;
}

.movie-filter__years > summary::-webkit-details-marker {
	display: none;
}

.movie-filter__years > summary::after {
	content: "";
	width: 7px;
	height: 7px;
	margin: -4px 2px 0 10px;
	border-right: 2px solid #ccc;
	border-bottom: 2px solid #ccc;
	transform: rotate(45deg);
	transition: transform .15s ease, margin .15s ease;
	flex: 0 0 auto;
}

.movie-filter__years[open] > summary {
	box-shadow: 0 0 0 1px #297fd7;
}

.movie-filter__years[open] > summary::after {
	margin-top: 4px;
	transform: rotate(225deg);
}

#filter-years-summary {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.movie-filter__year-options {
	position: absolute;
	z-index: 30;
	top: calc(100% + 2px);
	left: 0;
	display: none;
	box-sizing: border-box;
	width: 100%;
	min-width: 160px;
	max-height: 260px;
	padding: 4px;
	overflow-y: auto;
	overscroll-behavior: contain;
	border: 1px solid #000;
	border-radius: 0 0 4px 4px;
	background: #0c101b;
	box-shadow: 0 4px 5px rgba(0, 0, 0, .3);
	scrollbar-color: #297fd7 #0c101b;
}

.movie-filter__years[open] > .movie-filter__year-options {
	display: block;
}

.movie-filter__year-options label {
	position: relative;
	display: block;
	margin: 0;
	padding: 0;
	color: #ccc;
	font-size: 13px;
	line-height: 1;
	cursor: pointer;
}

.movie-filter__year-options label span {
	display: flex;
	align-items: center;
	min-height: 30px;
	padding: 5px 8px;
	border-radius: 2px;
	background: transparent;
	color: #ccc;
	transition: background-color .15s ease, color .15s ease;
}

.movie-filter__year-options label:hover span {
	background: rgba(41, 127, 215, .22);
	color: #fff;
}

.movie-filter__year-options input[type="checkbox"] {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

.movie-filter__year-options input[type="checkbox"]:checked + span {
	background: #297fd7;
	color: #fff;
	font-weight: 700;
}

.movie-filter__year-options label:hover input[type="checkbox"]:checked + span {
	background: #2980b9;
}

.movie-filter__year-options input[type="checkbox"]:focus-visible + span {
	box-shadow: inset 0 0 0 1px #fff, 0 0 0 1px #297fd7;
}

.movie-filter__range {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 8px;
}

.movie-filter input[type="number"] {
	-moz-appearance: textfield;
}

.movie-filter input[type="number"]::-webkit-inner-spin-button,
.movie-filter input[type="number"]::-webkit-outer-spin-button {
	margin: 0;
	-webkit-appearance: none;
}

.movie-filter__actions {
	display: flex;
	align-items: flex-end;
}

.movie-filter button.movie-filter__submit {
	width: 100%;
	height: 32px;
	padding: 0 20px;
	border: 0;
	border-radius: 3px;
	background: #297fd7 !important;
	box-shadow: none;
	color: #fff;
	font-family: 'DIN Pro', sans-serif !important;
	font-size: 14px;
	font-weight: 700;
	line-height: 32px;
	text-transform: uppercase;
}

.movie-filter button.movie-filter__submit:hover,
.movie-filter button.movie-filter__submit:focus {
	background: #2980b9 !important;
	box-shadow: 0 0 0 1px rgba(255, 255, 255, .12);
	color: #fff;
}

.movie-filter button.movie-filter__submit:active {
	box-shadow: inset 0 1px 4px rgba(0, 0, 0, .25);
}

@media screen and (max-width: 970px) {
	.movie-filter {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.movie-filter__actions {
		grid-column: span 2;
	}

	.movie-filter--no-genre .movie-filter__actions {
		grid-column: auto;
	}
}

@media screen and (max-width: 560px) {
	.filter-wrap {
		padding: 20px 18px;
	}

	.movie-filter {
		grid-template-columns: minmax(0, 1fr);
		gap: 14px;
	}

	.movie-filter__actions {
		grid-column: auto;
	}

	.movie-filter__year-options {
		position: static;
		width: 100%;
		max-height: 280px;
		margin-top: 2px;
		box-shadow: none;
	}

	.movie-filter__year-options label span {
		min-height: 42px;
		padding: 8px 10px;
	}
}
