/* VHS theme overrides — приводим серый Lampa к нашей палитре
   #051736 — основной фон (panels сливаются с body)
   #000    — модалки/попапы (контраст с основным фоном) */

/* Panels — сливаются с основным фоном */
.bell__item,
.console {
    background: #051736 !important;
}

/* Модалки/попапы — чёрные для контраста */
.pincode,
.torrent-serial,
.modal__content,
.settings__content,
.selectbox__content {
    background: #000 !important;
    background-color: #000 !important;
}

/* "Смотреть" — первая кнопка в карточке всегда выглядит активной (белая),
   даже когда фокус на другой кнопке. Это главный CTA на карточке фильма/сериала. */
.full-start-new__buttons .full-start__button:first-child,
.full-start__buttons .full-start__button:first-child {
    background-color: #fff !important;
    color: #000 !important;
}
/* Текст внутри первой кнопки — Lampa скрывает span когда не в фокусе, возвращаем */
.full-start-new__buttons .full-start__button:first-child:not(.focus) span,
.full-start__buttons .full-start__button:first-child:not(.focus) span {
    display: inline-block !important;
    color: #000 !important;
    margin-left: 0.75em !important;
    margin-top: -0.2em !important;
}

/* Кнопка избранного (.button--book) — всегда только иконка, текст не показываем
   даже в фокусе. Иконка bookmark самодостаточна для UX. */
.full-start__button.button--book span {
    display: none !important;
}

/* "Смотреть" placeholder (декоративный) — не кликается, не фокусится мышью.
   Keyboard-нав. скипает её автоматически (нет класса .selector). */
.vhs-play-placeholder {
    pointer-events: none !important;
    cursor: default !important;
}

/* === Holographic hover on poster cards (evanfasquelle.com-style)
   3D-перспектива + блик от курсора. Только мышь. Применяется к:
   .card (списки/строки), главный постер /full, .iptv-channel, постер Ленты
   (.feed-item__poster-box) — JS-драйвер тилта в plugins/vhs_ui.js (HOLO_SEL).
   Прим. 16.06.2026: блок временно подозревали в пропаже карточек — оказалось НЕ он,
   виноват был doctype в index.html (quirks→standards mode). Эффект включён обратно. */
@media (hover: hover) and (pointer: fine) {
    .activity__body .card,
    .full-start-new__poster,
    .full-start__poster,
    .iptv-channel,
    .feed-item__poster-box {
        --vhs-rx: 0deg;
        --vhs-ry: 0deg;
        --vhs-mx: 50%;
        --vhs-my: 50%;
        --vhs-op: 0;
        transition: transform 0.55s cubic-bezier(0.23, 1, 0.32, 1);
        transform-style: preserve-3d;
        will-change: transform;
    }
    .activity__body .card:hover,
    .full-start-new__poster:hover,
    .full-start__poster:hover,
    .iptv-channel:hover,
    .feed-item__poster-box:hover {
        transform: perspective(900px)
                   rotateX(var(--vhs-rx))
                   rotateY(var(--vhs-ry));
        transition: transform 0.08s linear;
        z-index: 20;
    }
    .activity__body .card .card__view,
    .full-start-new__poster,
    .full-start__poster,
    .iptv-channel,
    .feed-item__poster-box {
        overflow: hidden;
    }
    .activity__body .card .card__view,
    .full-start-new__poster,
    .full-start__poster,
    .iptv-channel,
    .feed-item__poster-box {
        position: relative;
    }
    .activity__body .card .card__view::after,
    .full-start-new__poster::after,
    .full-start__poster::after,
    .iptv-channel::after,
    .feed-item__poster-box::after {
        content: '';
        position: absolute;
        inset: 0;
        mix-blend-mode: overlay;
        opacity: var(--vhs-op);
        pointer-events: none;
        transition: opacity 0.35s ease;
        z-index: 2;
        border-radius: inherit;
        /* override Lampa's hover/focus white border (it lives on the same ::after) */
        border: 0;
    }
    /* Main poster on /full — softer-looking due to large surface area */
    .full-start-new__poster::after,
    .full-start__poster::after {
        background-image: radial-gradient(
            circle at var(--vhs-mx) var(--vhs-my),
            rgba(255, 255, 255, 0.45) 0%,
            rgba(255, 255, 255, 0.12) 22%,
            rgba(0, 0, 0, 0.4) 80%
        );
    }
    /* Small cards — much softer values, perceived intensity ≈ main poster.
       Explicit border-radius — Lampa's .card__view не имеет radius (он на .card__img),
       без явного значения наш ::after получит inherit:0 = квадратные углы. */
    .activity__body .card .card__view::after,
    .iptv-channel::after,
    .feed-item__poster-box::after {
        background-image: radial-gradient(
            circle at var(--vhs-mx) var(--vhs-my),
            rgba(255, 255, 255, 0.18) 0%,
            rgba(255, 255, 255, 0.05) 50%,
            rgba(0, 0, 0, 0.08) 95%
        );
        border-radius: 1em;
    }
    /* Older template main poster — kill Lampa's focus box-shadow halo on img */
    .full-start__poster.focus img {
        box-shadow: none;
    }
}

/* Blue focus on menu items — override Lampa's white background */
.menu__item.focus,
.menu__item.traverse,
.menu__item.hover {
    background-color: #007EFF !important;
    color: #fff !important;
}
.menu__item.focus .menu__ico > img,
.menu__item.traverse .menu__ico > img,
.menu__item.hover .menu__ico > img {
    filter: none !important;
}
.menu__item.focus .menu__ico [stroke],
.menu__item.traverse .menu__ico [stroke],
.menu__item.hover .menu__ico [stroke] {
    stroke: #fff !important;
}
.menu__item.focus .menu__ico path[fill],
.menu__item.focus .menu__ico rect[fill],
.menu__item.focus .menu__ico circle[fill],
.menu__item.traverse .menu__ico path[fill],
.menu__item.traverse .menu__ico rect[fill],
.menu__item.traverse .menu__ico circle[fill],
.menu__item.hover .menu__ico path[fill],
.menu__item.hover .menu__ico rect[fill],
.menu__item.hover .menu__ico circle[fill] {
    fill: #fff !important;
}
/* Remove box-shadow from menu items — they use solid blue bg instead */
.menu__item.focus,
.menu__item.traverse,
.menu__item.hover {
    box-shadow: none !important;
}

/* Header action buttons (search, bell, gear, etc.) */
.head__action.focus,
.head__action.hover {
    background-color: #007EFF !important;
    color: #fff !important;
}

/* EPG programme progress bar — толще и синим */
.iptv-program__timeline {
    height: .4em !important;
    border-radius: 1em !important;
}
.iptv-program__timeline > div {
    background: #007EFF !important;
    height: .4em !important;
    min-height: .4em !important;
}

/* IPTV HUD context menu buttons */
.iptv-hud-menu-button.focus,
.iptv-hud-menu-button.hover {
    background-color: #007EFF !important;
    color: #fff !important;
    box-shadow: none !important;
}

/* IPTV menu items — синий фон как в основном меню */
.iptv-menu__list-item.focus,
.iptv-menu__list-item.hover {
    background-color: #007EFF !important;
    color: #fff !important;
    opacity: 1 !important;
    box-shadow: none !important;
}

/* Settings menu — синий фон как в основном меню */
.settings-folder.focus,
.settings-folder.hover,
.settings-param.focus,
.settings-param.hover,
.selectbox-item.focus,
.selectbox-item.hover,
body.glass--style .settings-folder.focus,
body.glass--style .settings-param.focus,
body.glass--style .selectbox-item.focus {
    background-color: #007EFF !important;
    color: #fff !important;
    box-shadow: none !important;
}
.settings-folder.focus .settings-folder__icon,
.settings-folder.hover .settings-folder__icon,
.settings-param.focus .settings-folder__icon,
.settings-param.hover .settings-folder__icon,
.selectbox-item.focus .settings-folder__icon,
body.glass--style .settings-folder.focus .settings-folder__icon,
body.glass--style .settings-param.focus .settings-folder__icon,
body.glass--style .selectbox-item.focus .settings-folder__icon {
    filter: none !important;
}

/* === GLOBAL BLUE FOCUS — синяя обводка, родной фон === */
.items-line__more.focus, .tag-count.focus,
.full-start__button.focus, .full-descr__tag.focus,
.full-person.focus, .full-review.focus,
.info__icon.focus,
.category-full__more.focus, .search-history-key.focus,
.search-source.focus, .modal__button.focus,
.notice.focus, .torrent-file.focus, .torrent-serial.focus,
.simple-button.focus, .console__line.focus, .console__tab.focus,
.broadcast__device.focus, .timetable__item.focus, .online.focus,
.navigation-tabs__button.focus, .lang__selector-item.focus,
.plugins-catalog__line.focus, .menu-edit-list__move.focus,
.menu-edit-list__toggle.focus, .cub-premium__includes > div.focus,
.pincode-keyboard > div.focus, .search-simple__input.focus,
.iptv-playlist-item.focus, .iptv-list__item.focus,
.player-panel .button.focus {
    background-color: unset !important;
    background: unset !important;
    color: unset !important;
    box-shadow: 0 0 0 .25em #007EFF !important;
}


/* Hide playlist URL and load method, keep update date — one line layout */
.iptv-playlist-item__url,
.iptv-playlist-item__details.details-left {
    display: none !important;
}
.iptv-playlist-item {
    display: flex !important;
    align-items: center !important;
    padding: 1em !important;
}
.iptv-playlist-item__body {
    flex: 1 !important;
}
.iptv-playlist-item__name {
    width: 100% !important;
}
.iptv-playlist-item__footer {
    display: flex !important;
    margin-top: 0 !important;
    margin-left: auto !important;
    flex-shrink: 0 !important;
}

/* Kill Lampa's white ::after border on playlist/list items */
.iptv-playlist-item.focus::after,
.iptv-playlist-item.hover::after {
    border: none !important;
}

/* Blue focus ring on movie cards — override Lampa's white border */
.card.focus .card__view::after,
.card.hover .card__view::after {
    border: none !important;
}
.card.focus .card__view,
.card.hover .card__view {
    box-shadow: 0 0 0 .3em #007EFF;
    border-radius: 1em;
}

/* Убираем подскок при ховере карточек (как у постера Ленты — там тоже нет).
   Прыжок даёт animation-card-focus из app.css на .card/.card-episode при .focus/.hover.
   Глушим !important — у самой Lampa правило без !important. Тилт+блик остаются. */
.card.focus .card__view,
.card.hover .card__view,
.card-episode.focus .full-episode,
.card-episode.hover .full-episode {
    animation: none !important;
}

/* === Лента (feed) posters ===
   Только 3D-тилт + голографический блик — .feed-item__poster-box добавлен в блок
   HOLO HOVER выше (там же transition). Обводку (box-shadow) и подскок
   (animation-card-focus) убрали по просьбе: в отличие от карточек фильмов, у постера
   ленты их быть НЕ должно. cursor:pointer — чтобы ощущался кликабельным. */
.feed-item__poster-box {
    cursor: pointer;
}
