/* Franchise UI polish — только переменные шаблона, без сдвига layout */

@media (prefers-reduced-motion: no-preference) {
	html { scroll-behavior: smooth; }
}
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
}

/* Nav: лёгкий бренд-градиент по краям */
main > nav {
	background: linear-gradient(
		90deg,
		rgba(121, 193, 66, 0.05) 0%,
		var(--color-bg-nav) 14%,
		var(--color-bg-nav) 86%,
		rgba(121, 193, 66, 0.05) 100%
	);
	transition: box-shadow 0.22s ease, border-color 0.22s ease;
}
body.dark main > nav {
	background: linear-gradient(
		90deg,
		rgba(121, 193, 66, 0.07) 0%,
		var(--color-bg-nav) 14%,
		var(--color-bg-nav) 86%,
		rgba(121, 193, 66, 0.07) 100%
	);
}
main > nav.nav--scrolled {
	box-shadow: 0 4px 22px rgba(0, 0, 0, 0.08);
	border-bottom-color: rgba(121, 193, 66, 0.35);
}
body.dark main > nav.nav--scrolled {
	box-shadow: 0 6px 28px rgba(0, 0, 0, 0.42);
	border-bottom-color: rgba(121, 193, 66, 0.4);
}

/* Активный пункт меню (как hover) */
#Menu a.is-active {
	border-bottom: solid 2px var(--color-border-main-dark);
}
#Menu a.is-active > svg {
	stroke: var(--color-font-main-dark);
}
#Menu a.is-active > span {
	color: var(--color-font-main-dark);
}

/* Карусель: вровень с заголовком «Все сезоны» (без бокового padding) */
.series-carousel-viewport {
	position: relative;
	padding: 4px 0 8px;
	margin: 0;
	overflow: visible;
}
#SliderFilmSeries.owl-carousel {
	margin-left: 0;
	margin-right: 0;
}
#SliderFilmSeries.owl-carousel .owl-stage-outer {
	padding-left: 0;
	padding-right: 0;
}
#SliderFilmSeries:not(.owl-loaded) {
	display: flex;
	flex-wrap: nowrap;
	gap: 1.25rem;
	overflow: hidden;
	min-height: 16.5rem;
	padding: 0;
	margin: 0;
}
#SliderFilmSeries:not(.owl-loaded) > * {
	flex: 0 0 auto;
	width: calc(20% - 1rem);
	min-width: 8.5rem;
}
@media (max-width: 1100px) {
	#SliderFilmSeries:not(.owl-loaded) > * {
		width: calc(25% - 1rem);
	}
}
@media (max-width: 767px) {
	#SliderFilmSeries:not(.owl-loaded) > * {
		width: calc(33.333% - 1rem);
	}
}
@media (max-width: 639px) {
	#SliderFilmSeries:not(.owl-loaded) > * {
		width: calc(50% - 0.625rem);
	}
}
#SliderFilmSeries.owl-carousel .owl-stage-outer {
	padding-top: 18px;
	padding-bottom: 22px;
	margin-top: -18px;
	margin-bottom: -14px;
}
#SliderFilmSeries .owl-item {
	z-index: 1;
}
.series-card {
	display: flex;
	flex-direction: column;
	gap: 0.625rem;
	position: relative;
	text-decoration: none;
	color: inherit;
	transform: translateZ(0);
}
.series-card--link {
	display: flex;
}
.series-card--current {
	opacity: 0.6;
}
#SliderFilmSeries .series-card__ep {
	position: absolute;
	top: 0.625rem;
	left: 0;
	z-index: 2;
	color: var(--color-font-active-player);
	pointer-events: none;
}
.series-card__poster {
	overflow: hidden;
	border-radius: 0.25rem;
	line-height: 0;
	transition: box-shadow 0.22s ease;
}
.series-card__poster img {
	display: block;
	width: 100%;
	transition: transform 0.22s ease;
	transform: translateZ(0);
}
.series-card__title {
	margin: 0;
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
	.series-card {
		transition: transform 0.22s ease;
	}
	#SliderFilmSeries .owl-item:hover {
		z-index: 5;
	}
	#SliderFilmSeries .owl-item:hover .series-card {
		transform: translateY(-5px);
	}
	#SliderFilmSeries .owl-item:hover .series-card__poster {
		box-shadow: 0 10px 24px rgba(0, 0, 0, 0.15);
	}
	#SliderFilmSeries .owl-item:hover .series-card__poster img {
		transform: scale(1.05);
	}
	body.dark #SliderFilmSeries .owl-item:hover .series-card__poster {
		box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5);
	}
}
@media (hover: none) {
	#SliderFilmSeries .owl-item:hover .series-card,
	#SliderFilmSeries .owl-item:hover .series-card__poster img {
		transform: none;
	}
	#SliderFilmSeries .owl-item:hover .series-card__poster {
		box-shadow: none;
	}
}

/* Плеер: тень снизу (без рамки) после загрузки iframe */
.playmatic_video.is-ready {
	box-shadow: 0 14px 32px rgba(0, 0, 0, 0.12);
}
body.dark .playmatic_video.is-ready {
	box-shadow: 0 16px 36px rgba(0, 0, 0, 0.42);
}

@media (max-width: 1100px) {
	#ListFilm_wrap { width: 100%; min-width: 0; max-width: none; }
}

/* --- Микро-интеракции: меню, кнопки, ссылки (только hover: hover) --- */
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
	#Menu a > svg {
		transition: stroke 0.2s ease, transform 0.2s ease;
	}
	#Menu a:hover > svg {
		transform: scale(1.08);
	}
	#Logo {
		transition: opacity 0.2s ease;
	}
	#Logo:hover {
		opacity: 0.92;
	}
	#SiteTheme {
		transition: transform 0.2s ease, filter 0.2s ease;
		border-radius: 5px;
	}
	#SiteTheme:hover {
		transform: scale(1.06);
		filter: brightness(1.05);
	}
	#ToggleMenu > svg {
		transition: stroke 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
	}
	#ToggleMenu:hover > svg {
		transform: scale(1.05);
	}
	.owl-carousel .owl-nav button:not(.disabled):hover {
		filter: brightness(1.08);
	}
	#LoadCommentsBlock > button:hover,
	#LoadCommentsBlock > a:hover {
		transform: translateY(-1px);
		filter: brightness(1.05);
		box-shadow: 0 6px 16px rgba(121, 193, 66, 0.35);
	}
	#ListFilm > button {
		transition: background-color 0.2s ease, color 0.2s ease, filter 0.2s ease;
	}
	#ListFilm > button:hover {
		filter: brightness(1.03);
	}
	main a.cursor-pointer,
	.comment > .content .header a {
		transition: color 0.2s ease, opacity 0.2s ease;
	}
	main a.cursor-pointer:hover,
	.comment > .content .header a:hover {
		color: var(--color-font-main-dark);
		opacity: 1;
	}
	.comment .xlike a {
		transition: color 0.2s ease, opacity 0.2s ease;
	}
	.comment .xlike a:hover {
		opacity: 1;
	}
	.comment .xlike a:hover svg {
		transform: scale(1.12);
		fill: var(--color-comments-main);
	}
	.comment .xlike a svg {
		transition: transform 0.2s ease, fill 0.2s ease;
	}
	.comment-form__submit:hover {
		transform: translateY(-1px);
		filter: brightness(1.06);
		box-shadow: 0 6px 18px rgba(121, 193, 66, 0.38);
	}
}
#LoadCommentsBlock > button,
#LoadCommentsBlock > a {
	transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

/* --- Блок комментариев: сетка и дерево --- */
#dle-comments-form {
	height: auto !important;
	padding-bottom: 0 !important;
}
#dle-comments-list > .comments-tree-list {
	padding-left: 0;
	margin-left: 0;
}
.comments-tree-list .comments-tree-list {
	padding-left: 2.5rem;
}
.comment > .content > .header > .name a {
	color: var(--color-font-gray-32);
	font-weight: 500;
	text-decoration: none;
	pointer-events: none;
	cursor: default;
}

/* --- Форма комментария: ширина = reCAPTCHA (304px) + боковые padding --- */
.comment-form {
	box-sizing: border-box;
	width: calc(304px + 2.5rem);
	max-width: 100%;
	padding: 1.25rem 1.25rem 1rem;
	border: 1px solid var(--color-border-gray-E);
	border-radius: 5px;
	background: var(--color-bg-comments);
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}
@media (max-width: 1023px) {
	.comment-form {
		width: 100%;
	}
}
body.dark .comment-form {
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}
.comment-form__label {
	display: block;
	margin: 0 0 0.35rem;
}
.comment-form__field {
	display: block;
	box-sizing: border-box;
	margin: 0 0 1rem;
	padding: 0.65rem 1rem;
	font-size: 15px;
	line-height: 1.45;
	color: var(--color-font-gray-32);
	background: var(--color-bg-body);
	border: 1px solid var(--color-border-gray-E);
	border-radius: 5px;
	outline: none;
	transition: border-color 0.2s ease;
}
.comment-form__field--textarea {
	min-height: 7.5rem;
	resize: vertical;
	padding-top: 0.75rem;
	padding-bottom: 0.75rem;
}
.comment-form__field::placeholder {
	color: var(--color-font-gray-96);
	opacity: 1;
}
.comment-form__field:focus {
	border-color: var(--color-border-main);
	box-shadow: none;
	outline: 2px solid rgba(121, 193, 66, 0.35);
	outline-offset: -2px;
}
.comment-form__captcha,
.comment-form__captcha.c-captcha {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 0.5rem;
	width: 100%;
	max-width: 100%;
	margin-bottom: 0.25rem;
	overflow: hidden;
}
.comment-form__captcha .g-recaptcha,
.comment-form__captcha iframe,
.comment-form__captcha [id^="dle_recaptcha"] {
	max-width: 100%;
}
.comment-form__captcha-img {
	margin-bottom: 0.75rem;
	max-width: 100%;
}
.comment-form__captcha-img img {
	max-width: 100%;
	height: auto;
}
.comment-form__submit {
	color: var(--color-font-active-player);
	background: var(--gradient-main);
	transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
.comment-form__submit:focus-visible {
	outline: 2px solid var(--color-border-main);
	outline-offset: 2px;
}

/* --- Список комментариев --- */
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
	.comment > .content {
		transition: box-shadow 0.22s ease, border-color 0.22s ease;
	}
	.comment > .content:hover {
		box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
		border-color: rgba(121, 193, 66, 0.22);
	}
	body.dark .comment > .content:hover {
		box-shadow: 0 6px 20px rgba(0, 0, 0, 0.28);
	}
}

.comment-form__field:focus-visible,
.comment-form__submit:focus-visible,
#Menu a:focus-visible,
#ToggleMenu:focus-visible,
#SiteTheme:focus-visible,
#ListFilm > button:focus-visible {
	outline: 2px solid var(--color-border-main);
	outline-offset: 2px;
}

/* Playlist sidebar (ex franchise-playlist-fix.css) */
#ListFilm_wrap {
	flex-shrink: 0;
	width: 300px;
	min-width: 300px;
	max-width: 300px;
}
#ListFilm > button > .num {
	width: 40px;
	min-width: 40px;
	height: 40px;
	flex-shrink: 0;
	margin: 0;
	transition: color 0.2s, background 0.2s;
}
#ListFilm > button:hover > .num {
	color: var(--color-player-gray-16);
	background: #fff;
}
#ListFilm > button.active > .num {
	color: var(--color-font-active-player);
	background: var(--gradient-main);
}
#ListFilm > button > .name {
	flex: 1;
	min-width: 0;
	padding: 0 10px;
	overflow: hidden;
	text-overflow: ellipsis;
	transition: color 0.2s, background 0.2s;
}
#ListFilm > button:hover > .name {
	background: var(--color-player-gray-32);
}
#ListFilm > button.active > .name {
	background: var(--color-player-gray-24);
}
@media (max-width: 1100px) {
	#ListFilm_wrap {
		width: 100%;
		min-width: 0;
		max-width: none;
	}
}

/* Яндекс «Поделиться» — зоны нажатия на десктопе (PageSpeed) */
@media (min-width: 901px) {
	.ya-share2--touch .ya-share2__list {
		display: flex !important;
		flex-wrap: wrap;
		gap: 10px !important;
	}
	.ya-share2--touch .ya-share2__item {
		margin: 0 !important;
		padding: 0 !important;
	}
	.ya-share2--touch .ya-share2__link {
		min-width: 48px !important;
		min-height: 48px !important;
		padding: 10px !important;
		margin: 0 !important;
		box-sizing: border-box !important;
		display: inline-flex !important;
		align-items: center !important;
		justify-content: center !important;
	}
	.ya-share2--touch .ya-share2__icon {
		width: 28px !important;
		height: 28px !important;
		background-size: 28px 28px !important;
	}
}
