/* Быстрый поиск CYB: разметка задаётся скриптом плагина, здесь только вид как у .film-card */

.cyb-search-panel {
	background: #141414;
	color: #fff;
	border: 0;
	border-radius: 10px;
	box-shadow: 0 16px 40px rgba(0, 0, 0, .5);
	min-width: 0;
	padding: 6px;
	scrollbar-width: thin;
	scrollbar-color: #3a3a3a transparent;
}

.cyb-search-panel::-webkit-scrollbar {
	width: 6px;
}

.cyb-search-panel::-webkit-scrollbar-track {
	background: transparent;
	margin: 8px 0;
}

.cyb-search-panel::-webkit-scrollbar-thumb {
	background: #3a3a3a;
	border-radius: 99px;
}

.cyb-search-panel::-webkit-scrollbar-thumb:hover {
	background: #555;
}

.cyb-search-group-title {
	display: flex;
	align-items: baseline;
	justify-content: flex-start;
	gap: 8px;
	color: #8d8d8d;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	padding: 8px 8px 4px;
}

.cyb-search-count {
	color: #9a9a9a;
	font-weight: 500;
	letter-spacing: 0;
}

.cyb-search-count::before {
	content: "·";
	margin-right: 8px;
	color: #5c5c5c;
}

.cyb-search-option {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 4px;
	padding: 6px 8px;
	background: transparent;
	border-radius: 8px;
	color: inherit;
	text-decoration: none;
}

.cyb-search-option:hover,
.cyb-search-option.is-active {
	background: rgba(242, 193, 75, 0.1);
}

.cyb-search-option:hover .cyb-search-option-title,
.cyb-search-option.is-active .cyb-search-option-title,
.cyb-search-option:hover .cyb-search-cat-query,
.cyb-search-option.is-active .cyb-search-cat-query {
	color: var(--primary-color);
}

.cyb-search-poster {
	width: 42px;
	height: 60px;
	object-fit: cover;
	border-radius: 4px;
	box-shadow: none;
	background: #111;
	flex: 0 0 42px;
}

.cyb-search-option-body {
	flex: 1 1 auto;
	min-width: 0;
	padding-top: 1px;
}

.cyb-search-option-head {
	display: flex;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 6px;
}

.cyb-search-option-title {
	font-weight: 650;
	font-size: 14px;
	line-height: 1.25;
	color: #fff;
}

.cyb-search-season {
	color: #9a9a9a;
	font-size: 12px;
	font-weight: 500;
	white-space: nowrap;
}

.cyb-search-rate {
	--cyb-pct: 0;
	--cyb-rate: #e23d3d;
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	margin-left: 8px;
	flex: 0 0 38px;
	border-radius: 50%;
	background: conic-gradient(var(--cyb-rate) calc(var(--cyb-pct) * 1%), rgba(255, 255, 255, .16) 0);
	color: #fff;
	box-sizing: border-box;
}

.cyb-search-rate::before {
	content: "";
	position: absolute;
	inset: 3px;
	border-radius: 50%;
	background: #161616;
}

.cyb-search-rate > span {
	position: relative;
	z-index: 1;
	font-size: 10px;
	font-weight: 700;
	line-height: 1;
	letter-spacing: -.02em;
}

.cyb-search-rate.is-low {
	--cyb-rate: #e23d3d;
}

.cyb-search-rate.is-mid {
	--cyb-rate: #f5c518;
}

.cyb-search-rate.is-high {
	--cyb-rate: #22c55e;
}

.cyb-search-cat {
	gap: 8px;
	color: #c8c8c8;
	font-size: 14px;
}

.cyb-search-cat-icon {
	width: 16px;
	height: 16px;
	color: #8d8d8d;
	font-size: 12px;
	text-align: center;
	flex: 0 0 16px;
	vertical-align: middle;
}

.cyb-search-cat-query {
	color: #fff;
	font-weight: 700;
}

.cyb-search-cat-count {
	color: #8d8d8d;
}

.cyb-search-group-trend {
	margin-top: 6px;
	padding-top: 6px;
	border-top: 1px solid rgba(255, 255, 255, .08);
}

.cyb-search-trend-link {
	display: block;
	padding: 7px 8px;
	gap: 0;
}

.cyb-search-trend-link:hover,
.cyb-search-trend-link.is-active {
	background: rgba(242, 193, 75, 0.1);
}

.cyb-search-trend-link:hover .cyb-search-trend-title,
.cyb-search-trend-link.is-active .cyb-search-trend-title {
	color: var(--primary-color);
}

.cyb-search-trend-body {
	display: block;
	min-width: 0;
	flex: 1 1 auto;
}

.cyb-search-trend-title {
	display: block;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.35;
	color: #fff;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.cyb-search-trend-meta {
	display: block;
	margin-top: 2px;
	color: #9a9a9a;
	font-size: 12px;
	line-height: 1.3;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.cyb-search-option-excerpt {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	margin-top: 2px;
	color: #8a8a8a;
	font-size: 12px;
	line-height: 1.35;
}

.cyb-search-option-meta,
.cyb-search-option-label,
.cyb-search-option-count,
.cyb-search-note,
.cyb-search-state {
	color: #bbb;
	font-size: 13px;
}

.cyb-search-option-meta {
	display: block;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.cyb-search-mark {
	background: transparent;
	color: inherit;
	font-weight: 700;
}

.cyb-search-note {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 12px;
	color: #9a9a9a;
	font-size: 12px;
	line-height: 1.4;
}

.cyb-search-again {
	color: #fff;
	text-decoration: none;
	border-bottom: 1px solid rgba(255, 255, 255, .35);
	white-space: nowrap;
}

.cyb-search-again:hover {
	color: #fff;
	border-bottom-color: #fff;
}

.cyb-search-all {
	display: block;
	padding: 10px 0;
	text-align: center;
	background: #444;
	color: #fff;
	border-radius: 6px;
	font-weight: 600;
	text-decoration: none;
}

.cyb-search-all:hover {
	background: #555;
	color: #fff;
}

.cyb-search-state-error {
	color: #ff4b4b;
}

.cyb-search-state-wait {
	position: relative;
	min-height: 108px;
	margin: 8px 4px;
	overflow: hidden;
}

.cyb-search-state-wait::before,
.cyb-search-state-wait::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	border-radius: 50%;
}

.cyb-search-state-wait::before {
	width: 64px;
	height: 64px;
	margin: -32px 0 0 -32px;
	background: var(--secondary-color, #f2c14b);
}

.cyb-search-state-wait::after {
	width: 28px;
	height: 28px;
	margin: -22px 0 0 -22px;
	border: 8px solid rgba(255, 255, 255, 0.22);
	border-left-color: #fff;
	animation: cyb-search-spin 1s infinite linear;
}

@keyframes cyb-search-spin {
	to {
		transform: rotate(360deg);
	}
}

/* Полный поиск: карточки как у shortstory */

.cyb-search-page .section__items {
	display: flex;
	flex-wrap: wrap;
}

.cyb-search-page .search-page__title {
	margin: 0;
}

.cyb-search-page #container-fullstory.mydeaf-bcat h1 {
	margin-bottom: 0;
}

.cyb-search-page .search-page__form {
	position: relative;
	display: block;
	width: 100%;
	max-width: none;
	margin: 0 0 16px;
}

.cyb-search-page .search-page__input {
	display: block;
	width: 100%;
	height: 44px;
	margin: 0;
	padding: 0 46px 0 14px;
	border: 1px solid var(--line);
	border-radius: 10px;
	background: #121212;
	color: #f3f3f3;
	box-shadow: none;
	box-sizing: border-box;
	font-size: 14px;
}

.cyb-search-page .search-page__input:focus {
	border-color: rgba(242, 193, 75, 0.7);
	outline: none;
}

.cyb-search-page .search-page__submit {
	position: absolute;
	top: 0;
	right: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	color: var(--primary-color);
	line-height: 1;
}

.cyb-search-page .search-page__submit:hover {
	background: none;
	color: #fff;
	box-shadow: none;
}

.cyb-search-page .message-info {
	margin: 2px 0 14px;
	padding: 0;
	border: 0;
	background: transparent;
	color: #9a9a9a;
	font-size: 13px;
	font-weight: 500;
	letter-spacing: 0;
	line-height: 1.4;
	text-transform: none;
}

.cyb-search-page .message-info--title {
	display: none;
}

.cyb-search-page .message-info a {
	color: var(--primary-color);
	text-decoration: none;
}

.cyb-search-page .message-info a:hover {
	text-decoration: underline;
}

.cyb-search-page .cyb-search-note {
	margin: 0 0 16px;
	color: #9a9a9a;
}

.cyb-search-page .cyb-search-note a {
	color: #fff;
}

.cyb-search-page .section__items {
	clear: both;
}

.cyb-search-page .movie-item__img {
	position: relative;
}

.cyb-search-card-rate:empty,
.cyb-search-season:empty {
	display: none;
}

.cyb-search-card-rate {
	position: absolute;
	top: 8px;
	right: 8px;
	z-index: 6;
	min-width: 28px;
	padding: 2px 7px;
	border-radius: 8px;
	background: rgba(0, 0, 0, .72);
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.3;
	text-align: center;
}

.cyb-search-history-all {
	display: block;
	width: 100%;
	margin-top: 4px;
	padding: 10px 0;
	border: 0;
	border-top: 1px solid rgba(255, 255, 255, .08);
	background: transparent;
	color: #fff;
	font-weight: 650;
	cursor: pointer;
}

.cyb-search-history-all:hover {
	background: #222;
	color: #fff;
	box-shadow: none;
}

@media screen and (max-width: 960px) {
	.cyb-search-panel {
		min-width: 0;
		width: calc(100vw - 40px);
		max-width: calc(100vw - 24px);
	}
	.cyb-search-poster {
		width: 36px;
		height: 52px;
		flex-basis: 36px;
	}
	.cyb-search-option-title {
		font-size: 13px;
	}
	.cyb-search-page-history-row {
		grid-template-columns: 1fr;
	}
}

.cyb-search-page-history {
	width: 100%;
	margin: 16px 0 8px;
}

.cyb-search-page-history-title {
	margin-bottom: 10px;
	color: #8d8d8d;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
}

.cyb-search-page-history-row {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
	width: 100%;
}

.cyb-search-page-card {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	min-width: 0;
	padding: 8px;
	border: 1px solid var(--line);
	border-radius: 10px;
	background: #161616;
	color: #fff;
	text-decoration: none;
}

.cyb-search-page-card:hover {
	border-color: rgba(242, 193, 75, 0.45);
	background: rgba(242, 193, 75, 0.08);
	color: #fff;
}

.cyb-search-page-card:hover .cyb-search-page-card-title {
	color: var(--primary-color);
}

.cyb-search-page-card-poster {
	width: 42px;
	height: 60px;
	object-fit: cover;
	border-radius: 4px;
	flex: 0 0 42px;
	background: #111;
}

.cyb-search-page-card-body {
	flex: 1 1 auto;
	min-width: 0;
}

.cyb-search-page-card-title {
	display: block;
	font-size: 14px;
	font-weight: 650;
	line-height: 1.25;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.cyb-search-page-card-meta {
	display: block;
	margin-top: 3px;
	color: #9a9a9a;
	font-size: 12px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* Быстрый поиск. Панель на body, выше баннеров. */
.cyb-search-panel {
    box-sizing: border-box;
    position: fixed;
    z-index: 100000;
    border: 1px solid rgba(255, 255, 255, 0.08);
    max-height: 75vh;
    max-height: 75dvh;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.cyb-search-option {
    transition: background-color 150ms ease;
}

.cyb-search-option-title {
    line-height: 1.35;
}

.cyb-search-option-excerpt {
    -webkit-line-clamp: 1;
    color: #999;
}

.cyb-search-option-meta {
    margin-top: 3px;
    font-size: 12px;
    line-height: 1.4;
    color: #aaa;
}

/* Выделение найденного текста. */
.cyb-search-mark {
    color: var(--primary-color, #feca03);
    background: transparent;
}

/* Разделитель нужен только между группами. */
.cyb-search-group-trend:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

/* Переход к полной выдаче. */
.cyb-search-all {
    margin-top: 6px;
    padding: 11px 12px;
    border: 1px solid rgba(254, 202, 3, 0.25);
    border-radius: 6px;

    color: var(--primary-color, #feca03);
    background: #1a1a1a;
    font-size: 14px;
    font-weight: 600;
    line-height: 20px;

    transition:
        background-color 150ms ease,
        border-color 150ms ease;
}

.cyb-search-all:hover {
    color: var(--primary-color, #feca03);
    background: #242424;
    border-color: var(--primary-color, #feca03);
}

/* Видимый фокус при управлении клавиатурой. */
.cyb-search-option:focus-visible,
.cyb-search-all:focus-visible,
.cyb-search-page-card:focus-visible,
.cyb-search-history-all:focus-visible {
    outline: 2px solid var(--primary-color, #feca03);
    outline-offset: -2px;
}

/* Полная страница поиска. */
.cyb-search-page .search-page__input {
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #121212;
}

.cyb-search-page .search-page__input:focus-visible {
    outline: 2px solid var(--primary-color, #feca03);
    outline-offset: 2px;
}

.cyb-search-page .search-page__submit {
    height: 44px;
    line-height: 44px;
}

.cyb-search-page .search-page__submit .mydeaf-ico {
    width: 22px;
    height: 22px;
    vertical-align: middle;
}

.cyb-search-page .search-page__submit:focus-visible {
    outline: 2px solid var(--primary-color, #feca03);
    outline-offset: -3px;
    border-radius: 6px;
}

.cyb-search-page-card {
    box-sizing: border-box;
}

/* Исправление порядка мобильных правил. */
@media screen and (max-width: 960px) {
    .cyb-search-page-history-row {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (prefers-reduced-motion: reduce) {
    .cyb-search-option,
    .cyb-search-all {
        transition: none;
    }
}
