/* =========================================================
   MoVix — раздел «Телевидение» (IPTV): страница /tv.php, карточки каналов
   Не путать с tv.css — тот файл про отображение всего сайта на ТВ-приставке.

   Сетка каналов использует те же токены, что каталог фильмов/сериалов:
   --unified-card-width, --gap-card (см. core.css + cards.css .grid).
   В режиме html.tv / webos-app ширина колонки синхронизируется с --tv-tiles-grid
   через правила в tv.css (селектор .tv-channel-grid добавлен рядом с .grid).
   ========================================================= */

.tv-page {
    --tv-accent-rgb: 229, 9, 20;
    --tv-text-main: rgba(255, 255, 255, 0.96);
    --tv-text-muted: rgba(255, 255, 255, 0.68);
    --tv-surface-0: #090a0d;
    --tv-surface-1: #111319;
    --tv-surface-2: #151821;
    --tv-border-soft: rgba(255, 255, 255, 0.1);
    --tv-shadow-soft: 0 18px 46px rgba(0, 0, 0, 0.38);
    --tv-focus-ring: 0 0 0 3px rgba(var(--tv-accent-rgb), 0.92);
    --tv-radius-s: 10px;
    --tv-radius-m: 14px;
    --tv-dur-fast: 120ms;
    --tv-dur-mid: 180ms;
    --tv-ease-out: cubic-bezier(0.2, 0.8, 0.3, 1);
    --tv-type-title: clamp(1.22rem, 2.1vw, 1.68rem);
    --tv-type-label: clamp(0.8rem, 0.75rem + 0.3vw, 0.95rem);
    padding: 0 var(--tv-padding-x, 2.2vw) 3rem;
}

.tv-page-head {
    margin: 1.25rem 0 1.5rem;
}

.tv-page-title {
    font-size: var(--tv-type-title);
    font-weight: 700;
    margin: 0 0 0.35rem;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
}

.tv-page-live-badge {
    display: inline-flex;
    align-items: center;
    height: 1.5rem;
    padding: 0 0.52rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    background: rgba(34, 197, 94, 0.22);
    color: #86efac;
    border: 1px solid rgba(34, 197, 94, 0.55);
}

.tv-page-subtitle {
    margin: 0;
    font-size: 0.86rem;
    color: var(--tv-text-muted);
}

.tv-page-lead {
    opacity: 0.72;
    margin: 0;
    font-size: 0.95rem;
}

.tv-empty {
    padding: 2rem;
    text-align: center;
    opacity: 0.75;
}

/* Страница 403: раздел ТВ отключён в админке (без шапки/подвала не используем — разметка в tv.php + header/footer) */
.tv-page--access-denied {
    min-height: min(72vh, 620px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem var(--tv-padding-x, 2.2vw) 3.5rem;
    box-sizing: border-box;
}

.tv-access-denied {
    width: 100%;
    max-width: 26rem;
    margin: 0 auto;
    text-align: center;
    padding: 2rem 1.5rem 2.25rem;
    border-radius: var(--tv-radius-m);
    background: linear-gradient(165deg, var(--tv-surface-2) 0%, var(--tv-surface-0) 100%);
    border: 1px solid var(--tv-border-soft);
    box-shadow: var(--tv-shadow-soft);
}

.tv-access-denied__icon {
    display: flex;
    justify-content: center;
    margin-bottom: 1.25rem;
    opacity: 0.95;
}

.tv-access-denied__title {
    font-size: clamp(1.15rem, 2.4vw, 1.45rem);
    font-weight: 700;
    margin: 0 0 0.85rem;
    color: var(--tv-text-main);
    line-height: 1.25;
}

.tv-access-denied__lead,
.tv-access-denied__note {
    margin: 0 0 1rem;
    font-size: 0.92rem;
    line-height: 1.55;
    color: var(--tv-text-muted);
}

.tv-access-denied__note:last-of-type {
    margin-bottom: 0;
}

.tv-access-denied__note strong {
    color: rgba(255, 255, 255, 0.88);
    font-weight: 600;
}

.tv-access-denied__link {
    color: #7ec8ff;
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

.tv-access-denied__link:hover {
    color: #a8d9ff;
}

.tv-access-denied__code {
    font-size: 0.88em;
    padding: 0.12em 0.4em;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--tv-border-soft);
}

.tv-access-denied__actions {
    margin-top: 1.75rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

.tv-access-denied__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.65rem;
    padding: 0 1.35rem;
    border-radius: 999px;
    font-size: 0.92rem;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    background: linear-gradient(180deg, rgba(229, 9, 20, 0.95), rgba(180, 6, 16, 0.98));
    border: 1px solid rgba(255, 80, 90, 0.45);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    transition: transform var(--tv-dur-fast) var(--tv-ease-out), filter var(--tv-dur-fast) var(--tv-ease-out);
}

.tv-access-denied__btn:hover {
    filter: brightness(1.06);
    transform: translateY(-1px);
}

.tv-access-denied__btn:focus-visible {
    outline: none;
    box-shadow: var(--tv-focus-ring), 0 8px 24px rgba(0, 0, 0, 0.35);
}

.tv-groups-layout {
    /* Контент сетки уходит под фиксированную шапку; отступ задаётся из JS по фактической высоте. */
    display: block;
    padding-top: var(--tv-groups-head-offset, 0px);
}

/* Карусель групп: фиксированная зона под панелью LIVE */
.tv-page-sticky-head {
    position: fixed;
    top: var(--iptv-tv-bar-h, var(--navbar-h, 60px));
    left: 0;
    right: 0;
    z-index: 90;
    margin: 0;
    padding: 0.65rem var(--tv-padding-x, 2.2vw) 0.75rem;
    background: linear-gradient(
        180deg,
        rgba(9, 10, 13, 0.98) 0%,
        rgba(9, 10, 13, 0.95) 72%,
        rgba(9, 10, 13, 0.74) 100%
    );
    border-bottom: 1px solid var(--tv-border-soft);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* TV-платформы: принудительно оставляем sticky-цепочку "чистой" */
html.tv .tv-page,
html.tv .tv-groups-layout,
html.tv .tv-groups-panels,
html.webos-app .tv-page,
html.webos-app .tv-groups-layout,
html.webos-app .tv-groups-panels {
    overflow: visible !important;
    transform: none !important;
}

.tv-page-sticky-head .tv-page-head {
    margin: 0 0 0.5rem;
}

.tv-page-sticky-head .tv-page-title {
    margin-bottom: 0;
}

.tv-groups-nav-row{
    display:flex;
    align-items:center;
    gap:0.65rem;
    min-width: 0;
}

.tv-groups-nav-total{
    flex:0 0 auto;
    white-space:nowrap;
    font-size:0.84rem;
    color:rgba(255,255,255,0.68);
    padding:0 0.25rem 0 0;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}
.tv-groups-nav-total b {
    font-size: 0.94rem;
    color: rgba(255, 255, 255, 0.95);
}

/* Android TV: компактный фикс-бар групп, чтобы оставить больше места для плиток. */
html.tv-android .tv-page {
    padding-top: 0;
}
html.tv-android .tv-page-sticky-head {
    padding: 0.22rem 2.9rem 0.28rem;
}
html.tv-android .tv-page-sticky-head .tv-page-head {
    margin: 0 0 0.18rem;
}
html.tv-android .tv-page-title {
    font-size: clamp(0.8rem, 0.88vw, 0.96rem) !important;
    font-weight: 600;
    line-height: 1.25;
}
html.tv-android .tv-page-live-badge {
    height: 1.28rem;
    font-size: 0.64rem;
    padding: 0 0.42rem;
}
html.tv-android .tv-page-subtitle {
    display: none;
}
html.tv-android .tv-groups-nav-row {
    gap: 0.35rem;
}
html.tv-android .tv-groups-nav {
    gap: calc(0.3rem * 1.05);
    margin: 0;
    padding: 0.05rem max(0.12rem, 2.5%) 0.18rem max(0.12rem, 2.5%);
}
html.tv-android .tv-groups-nav__tab {
    max-width: none;
    flex: 1 1 0;
    min-width: 0;
    padding: 0.28rem 0.6rem;
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0;
    border-radius: 2px;
}
html.tv-android .tv-groups-nav-total {
    display: none;
}
html.tv-android .tv-groups-nav__label {
    font-weight: 500;
}

.tv-groups-nav {
    display: flex;
    flex-wrap: nowrap;
    flex: 1 1 0;
    min-width: 0;
    gap: calc(0.45rem * 1.05);
    overflow-x: hidden;
    overflow-y: hidden;
    padding: 0.15rem max(0.35rem, 2.5%) 0.35rem max(0.35rem, 2.5%);
    margin: 0 0 0.35rem;
    box-sizing: border-box;
}

/* Все вкладки — один стиль «ромбовидного» прямоугольника (skew + текст без наклона) */
.tv-groups-nav__tab {
    flex: 1 1 0;
    min-width: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    max-width: none;
    padding: 0.45rem 0.85rem;
    border-radius: var(--tv-radius-s);
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.07);
    color: inherit;
    font: inherit;
    font-size: var(--tv-type-label);
    font-weight: 600;
    cursor: pointer;
    transform: skewX(-10deg);
    transition:
        background var(--tv-dur-fast) var(--tv-ease-out),
        border-color var(--tv-dur-fast) var(--tv-ease-out),
        box-shadow var(--tv-dur-mid) var(--tv-ease-out),
        color var(--tv-dur-fast) var(--tv-ease-out);
}

.tv-groups-nav__tab:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.24);
}

/* Выбранная группа — тот же ромб, красная заливка */
.tv-groups-nav__tab[aria-selected="true"] {
    border-color: rgba(255, 255, 255, 0.28);
    background: rgb(var(--tv-accent-rgb));
    color: #fff;
    box-shadow: 0 8px 22px rgba(var(--tv-accent-rgb), 0.35);
}

.tv-groups-nav__tab[aria-selected="true"]:hover {
    background: #d32f2f;
    border-color: rgba(255, 255, 255, 0.28);
}

.tv-groups-nav__tab:focus-visible {
    outline: 2px solid var(--accent, #e50914);
    outline-offset: 2px;
}

.tv-groups-nav__tab--with-logo {
    position: relative;
    padding: 0.38rem 0.72rem;
}

.tv-groups-nav__logo {
    display: block;
    width: auto;
    height: 1.15rem;
    max-width: 2.65rem;
    object-fit: contain;
    flex-shrink: 0;
    transform: skewX(10deg);
    pointer-events: none;
}

.tv-groups-nav__tab[aria-selected="true"] .tv-groups-nav__logo {
    filter: brightness(1.05);
}

.tv-groups-nav__label {
    display: inline-block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    transform: skewX(10deg);
}

.tv-groups-nav__label--sr {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.tv-groups-panels {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.tv-group-panel[hidden] {
    display: none !important;
}

.tv-group-panel .tv-channel-grid {
    padding: 0.75rem 0.65rem 1rem;
}

/* Число колонок — из админки (--tv-tiles-per-row в header_iptv.php) */
.tv-channel-grid {
    display: grid;
    grid-template-columns: repeat(var(--tv-tiles-per-row, 5), minmax(0, 1fr));
    gap: var(--gap-card);
    align-items: stretch;
    position: relative;
    overflow: visible;
    padding: var(--gap) 0;
}

/* Как .card в cards.css: фон, тень, тонкая светлая обводка */
.tv-channel-card {
    --tv-channel-logo-size: clamp(5.5rem, 4rem + 3.5vw, 7.5rem);
    --tv-channel-name-lines: 2;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    align-self: stretch;
    height: 100%;
    gap: 0.5rem;
    padding: 0.65rem 0.6rem 0.75rem;
    border-radius: var(--tv-radius-m);
    background: linear-gradient(180deg, var(--tv-surface-2) 0%, var(--tv-surface-1) 100%);
    box-shadow: var(--tv-shadow-soft);
    border: var(--b1) solid var(--tv-border-soft);
    text-decoration: none;
    color: inherit;
    transition:
        transform var(--tv-dur-mid) var(--tv-ease-out),
        box-shadow var(--tv-dur-mid) var(--tv-ease-out),
        border-color var(--tv-dur-fast) var(--tv-ease-out),
        outline var(--tv-dur-fast) var(--tv-ease-out);
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    /* overflow: visible — иначе нижний блок EPG (как в модалке «Каналы») может обрезаться */
    overflow: visible;
    z-index: var(--z-base);
}

@media (hover: hover) and (pointer: fine) {
    .tv-channel-grid .tv-channel-card:hover,
    .tv-home-row-wrap .tv-channel-card:hover {
        transform: scale(1.18) translateY(-10px);
        z-index: var(--z-card-hover);
        box-shadow: 0 0 40px 10px rgba(255, 255, 255, 0.1), 0 2.5rem 5rem rgba(0, 0, 0, 0.7);
        /*border-color: rgba(255, 255, 255, 0.25);*/
        outline: 2px solid rgba(255, 255, 255, 0.2);
        outline-offset: 4px;
    }
}

/* Базовый фокус плитки: нужен и :focus (часть TV-браузеров без корректного :focus-visible). */
.tv-channel-card:focus,
.tv-channel-card:focus-visible,
.tv-channel-card.tv-focused {
    outline: 0;
    box-shadow: var(--tv-focus-ring), var(--tv-shadow-soft);
    transform: scale(1.12);
    z-index: var(--z-card-hover);
}

/* Текущий канал (?channel= после просмотра) */
.tv-channel-card.tv-channel-card--active {
    outline: 0;
    border-color: rgba(var(--tv-accent-rgb), 0.42);
    z-index: calc(var(--z-card-hover) + 1);
    box-shadow: 0 0 0 3px rgba(var(--tv-accent-rgb), 0.9), 0 0 28px rgba(var(--tv-accent-rgb), 0.22);
}

/* В TV-режиме — как html.tv .card:focus-visible в tv.css */
html.tv .tv-channel-card:focus-visible,
html.tv .tv-channel-card:focus,
html.tv .tv-channel-card.tv-focused {
    transform: scale(1.04);
    z-index: var(--z-card-hover);
    outline: 6px solid rgba(229, 9, 20, 0.92) !important;
    outline-offset: 5px;
    transition: transform 80ms ease;
}

/* Те же правила для платформ, где ставится только специфичный TV-класс. */
html.tv-android .tv-channel-card:focus,
html.tv-android .tv-channel-card:focus-visible,
html.tv-android .tv-channel-card.tv-focused,
html.tv-webos .tv-channel-card:focus,
html.tv-webos .tv-channel-card:focus-visible,
html.tv-webos .tv-channel-card.tv-focused,
html.tv-tizen .tv-channel-card:focus,
html.tv-tizen .tv-channel-card:focus-visible,
html.tv-tizen .tv-channel-card.tv-focused,
html.webos-app .tv-channel-card:focus,
html.webos-app .tv-channel-card:focus-visible,
html.webos-app .tv-channel-card.tv-focused {
    transform: scale(1.04);
    z-index: var(--z-card-hover);
    outline: 6px solid rgba(229, 9, 20, 0.92) !important;
    outline-offset: 5px;
    transition: transform 80ms ease;
}

/* На пульте без hover — как html.tv .card:hover
   (Android TV / webOS с Magic Remote — отдельно ниже). */
html.tv:not(.tv-android):not(.tv-webos):not(.webos-app) .tv-channel-grid .tv-channel-card:hover,
html.tv:not(.tv-android):not(.tv-webos):not(.webos-app) .tv-home-row-wrap .tv-channel-card:hover {
    transform: none;
    box-shadow: 0 0.625rem 1.375rem rgba(0, 0, 0, 0.25);
    border-color: rgba(255, 255, 255, 0.06);
    outline: none;
    outline-offset: 0;
}

/* Android TV / webOS + аэромышь: как у карточек фильмов/сериалов при наведении.
   Часть движков не даёт :hover под (pointer: fine) — правило без media query. */
html.tv-android .tv-channel-grid .tv-channel-card:hover:not(:focus):not(:focus-visible):not(.tv-focused),
html.tv-android .tv-home-row-wrap .tv-channel-card:hover:not(:focus):not(:focus-visible):not(.tv-focused),
html.tv-webos .tv-channel-grid .tv-channel-card:hover:not(:focus):not(:focus-visible):not(.tv-focused),
html.tv-webos .tv-home-row-wrap .tv-channel-card:hover:not(:focus):not(:focus-visible):not(.tv-focused),
html.webos-app .tv-channel-grid .tv-channel-card:hover:not(:focus):not(:focus-visible):not(.tv-focused),
html.webos-app .tv-home-row-wrap .tv-channel-card:hover:not(:focus):not(:focus-visible):not(.tv-focused) {
    transform: scale(1.12) translateY(-8px);
    z-index: var(--z-card-hover);
    box-shadow:
        0 0 32px 8px rgba(255, 255, 255, 0.08),
        0 1.75rem 3.5rem rgba(0, 0, 0, 0.65);
    border-color: rgba(255, 255, 255, 0.22);
    outline: 2px solid rgba(255, 255, 255, 0.28);
    outline-offset: 4px;
}

html.tv-android .tv-channel-grid .tv-channel-card.tv-channel-card--active:hover:not(:focus):not(:focus-visible):not(.tv-focused),
html.tv-android .tv-home-row-wrap .tv-channel-card.tv-channel-card--active:hover:not(:focus):not(:focus-visible):not(.tv-focused),
html.tv-webos .tv-channel-grid .tv-channel-card.tv-channel-card--active:hover:not(:focus):not(:focus-visible):not(.tv-focused),
html.tv-webos .tv-home-row-wrap .tv-channel-card.tv-channel-card--active:hover:not(:focus):not(:focus-visible):not(.tv-focused),
html.webos-app .tv-channel-grid .tv-channel-card.tv-channel-card--active:hover:not(:focus):not(:focus-visible):not(.tv-focused),
html.webos-app .tv-home-row-wrap .tv-channel-card.tv-channel-card--active:hover:not(:focus):not(:focus-visible):not(.tv-focused) {
    outline: 6px solid rgba(229, 9, 20, 0.92) !important;
    outline-offset: 5px;
    border-color: rgba(229, 9, 20, 0.45);
    box-shadow: 0 0 32px rgba(229, 9, 20, 0.22);
    transform: scale(1.06);
}

html.tv .tv-channel-grid .tv-channel-card.tv-channel-card--active,
html.tv .tv-channel-grid .tv-channel-card.tv-channel-card--active:hover {
    outline: 6px solid rgba(229, 9, 20, 0.92) !important;
    outline-offset: 5px;
    border-color: rgba(229, 9, 20, 0.45);
    box-shadow: 0 0 32px rgba(229, 9, 20, 0.22);
    transform: none;
}

.tv-channel-card__logo-wrap {
    flex: 0 0 var(--tv-channel-logo-size);
    width: var(--tv-channel-logo-size);
    height: var(--tv-channel-logo-size);
    border: var(--b1) solid rgba(255, 255, 255, 0.08);
    border-radius: calc(var(--radius) * 0.65);
    overflow: hidden;
    background: #0a0a0a;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tv-channel-card__logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.tv-channel-card__logo-fallback {
    font-size: clamp(0.95rem, 0.7rem + 0.8vw, 1.2rem);
    font-weight: 700;
    color: rgba(100, 200, 220, 0.9);
}

.tv-channel-card__body {
    flex: 0 0 auto;
    width: 100%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0.35rem;
    text-align: center;
}

.tv-channel-card__name {
    font-weight: 700;
    font-size: var(--tv-type-label);
    line-height: 1.3;
    width: 100%;
    min-height: calc(var(--tv-channel-name-lines) * 1.3 * 1em);
    max-height: calc(var(--tv-channel-name-lines) * 1.3 * 1em);
    text-align: center;
    overflow-wrap: anywhere;
    word-break: break-word;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    flex-shrink: 0;
}

/* EPG: те же классы, что модалка «Каналы» (tv_watch.css → .tv-ch-epg) */
.tv-channel-card__epg {
    width: 100%;
    flex-shrink: 0;
    margin-top: 0.12rem;
}

.tv-channel-card .tv-ch-epg {
    display: flex;
    flex-direction: column;
    gap: 0.22rem;
    width: 100%;
    min-width: 0;
}

.tv-channel-card .tv-ch-epg__line {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: clamp(0.72rem, 0.68rem + 0.22vw, 0.84rem);
    line-height: 1.35;
    text-align: center;
    color: rgba(255, 255, 255, 0.92);
}

.tv-channel-card .tv-ch-epg__line--cur {
    min-height: 1.35em;
    opacity: 0.92;
}

.tv-channel-card .tv-ch-epg__line--next {
    opacity: 0.78;
    font-size: 0.92em;
    color: rgba(255, 255, 255, 0.72);
}

.tv-channel-card .tv-ch-epg__next-label {
    opacity: 0.62;
    font-weight: 600;
    margin-right: 0.25em;
}

.tv-channel-card .tv-ch-epg__bar {
    display: block;
    width: 100%;
    height: 3px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    overflow: hidden;
    flex-shrink: 0;
}

.tv-channel-card .tv-ch-epg__bar-fill {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #2ea043, #56d364);
    min-width: 0;
    transition: width 0.3s ease;
}

.tv-channel-card .tv-ch-item__now--epg {
    display: block;
    overflow: visible;
}

/* Главная: узкий слот — чуть меньше иконка, но всё ещё крупная */
.tv-home-row-wrap .tv-home-scroller .tv-channel-card {
    --tv-channel-logo-size: clamp(3.75rem, 2.5rem + 2.8vw, 5.75rem);
    flex: 0 0 var(--tv-channel-cards-width);
    width: var(--tv-channel-cards-width);
    min-width: var(--tv-channel-cards-width);
    max-width: var(--tv-channel-cards-width);
    box-sizing: border-box;
}

/* TV-режим: иконка в сетке каналов ещё чуть крупнее */
html.tv .tv-channel-grid .tv-channel-card {
    --tv-channel-logo-size: clamp(6rem, 4.5rem + 2.5vw, 8rem);
}

/* EPG выключен: только иконка + название под ней */
.tv-channel-card--no-logo {
  grid-template-columns: 1fr;
}

.tv-channel-card--no-logo .tv-channel-card__body {
  padding-left: 0;
}

    align-items: center;
    padding: 0.55rem 0.5rem 0.65rem;
    gap: 0.45rem;
    min-height: calc(var(--tv-channel-logo-size) + 3.4rem + (var(--tv-channel-name-lines) * 1.3 * 1em));
}

.tv-channel-card--no-epg .tv-channel-card__body {
    justify-content: flex-start;
    gap: 0.25rem;
}

/* С EPG: название + блок как в модалке (текущая передача + полоса + опционально «Далее») */
.tv-channel-card:not(.tv-channel-card--no-epg) {
    min-height: calc(
        var(--tv-channel-logo-size) + 0.65rem + 0.75rem + (var(--tv-channel-name-lines) * 1.3 * 1em) + 0.12rem + 1.35em + 0.22rem + 3px +
            0.22rem + 1.35em
    );
}

@media (prefers-reduced-motion: reduce) {
    .tv-groups-nav__tab,
    .tv-channel-card {
        transition: none !important;
    }
    .tv-channel-card:hover,
    .tv-channel-card:focus,
    .tv-channel-card:focus-visible {
        transform: none !important;
    }
}
