/**
 * Venom Player theme classic — меню настроек, верхние chip-выпадашки.
 */
html.tv-watch .tv-player-shell {
    --vp-bg-menu: hsla(0, 0%, 0%, 0.78);
    --vp-bg-item-hover: hsla(0, 0%, 100%, 0.1);
    --vp-bg-item-active: hsla(0, 0%, 100%, 0.14);
    --vp-text-muted: hsla(0, 0%, 100%, 0.55);
    --vp-text-main: hsla(0, 0%, 100%, 0.95);
    --vp-menu-min-w: 11.5rem;
    --vp-menu-max-w: min(17rem, 78vw);
}

/* —— Панель меню —— */
.vp-menu-panel {
    position: absolute;
    z-index: 96;
    display: flex;
    flex-direction: column;
    min-width: var(--vp-menu-min-w);
    max-width: var(--vp-menu-max-w);
    max-height: min(62vh, 26rem);
    overflow: hidden;
    border-radius: 0;
    border: 0;
    background: var(--vp-bg-menu);
    box-shadow: none;
    backdrop-filter: blur(8px);
}

.vp-menu-panel[hidden] {
    display: none !important;
}

.vp-menu-head {
    padding: 0.5rem 0.75rem 0.35rem;
    border-bottom: 1px solid hsla(0, 0%, 100%, 0.08);
}

.vp-menu-head__title {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    color: var(--vp-text-muted);
}

.vp-menu-body {
    display: flex;
    flex-direction: column;
    padding: 0.15rem 0;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

.vp-menu-section {
    padding: 0.45rem 0.75rem 0.15rem;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: hsla(0, 0%, 100%, 0.38);
}

.vp-menu-divider {
    height: 1px;
    margin: 0.12rem 0.65rem;
    background: hsla(0, 0%, 100%, 0.08);
}

/* —— Пункт classic: заголовок + значение + chevron —— */
.vp-menu-item {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    width: 100%;
    margin: 0;
    padding: 0.42rem 0.75rem;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--vp-text-main);
    text-align: left;
    cursor: pointer;
    transition: background 0.1s ease;
}

.vp-menu-item::after {
    display: none !important;
}

.vp-menu-item:hover,
.vp-menu-item:focus-visible {
    outline: none;
    background: var(--vp-bg-item-hover);
    color: var(--vp-text-main);
}

.vp-menu-item.is-active {
    background: var(--vp-bg-item-active);
    color: var(--vp-text-main);
}

.vp-menu-item--muted,
.vp-menu-item[disabled],
.vp-menu-item[aria-disabled='true'] {
    opacity: 0.45;
    cursor: default;
}

.vp-menu-item--classic .vp-menu-item__icon {
    display: none;
}

.vp-menu-item__main {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.08rem;
}

.vp-menu-item__title {
    font-size: 0.68rem;
    font-weight: 500;
    line-height: 1.2;
    color: var(--vp-text-muted);
}

.vp-menu-item__value {
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.25;
    color: var(--vp-text-main);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vp-menu-item--leaf {
    min-height: 2rem;
}

.vp-menu-item--leaf .vp-menu-item__title {
    font-size: 0.84rem;
    color: var(--vp-text-main);
}

.vp-menu-item--leaf .vp-menu-item__main {
    flex-direction: row;
    align-items: center;
}

.vp-menu-item__chevron {
    flex: 0 0 auto;
    opacity: 0.45;
    font-size: 0.95rem;
    line-height: 1;
    color: var(--vp-text-muted);
}

.vp-menu-item__chevron-svg {
    width: 1rem !important;
    height: 1rem !important;
}

/* Настройки — справа над шестерёнкой */
.tv-player-settings-dd__list.vp-menu-panel {
    right: 0;
    bottom: calc(100% + 0.2rem);
    min-width: 12.5rem;
}

/* —— Верхняя панель chip (сезон / серия / аудио) —— */
.vp-top-bar {
    position: absolute;
    left: max(0.55rem, env(safe-area-inset-left));
    top: calc(env(safe-area-inset-top, 0px) + var(--tvw-bar-core, 3.5rem) + 0.35rem);
    z-index: 84;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.35rem;
    max-width: min(92vw, 36rem);
    pointer-events: none;
}

.vp-top-bar > * {
    pointer-events: auto;
}

.vp-top-bar[hidden] {
    display: none !important;
}

.vp-top-chip-wrap {
    position: relative;
}

.vp-top-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    min-height: 1.85rem;
    padding: 0.22rem 0.55rem;
    border: 0;
    border-radius: 0;
    background: var(--vp-bg-menu);
    color: var(--vp-text-main);
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    backdrop-filter: blur(6px);
}

.vp-top-chip:hover,
.vp-top-chip:focus-visible,
.vp-top-chip.is-open {
    outline: none;
    background: hsla(0, 0%, 100%, 0.12);
}

.vp-top-chip__caret {
    opacity: 0.55;
    font-size: 0.65rem;
}

.vp-top-chip__list.vp-menu-panel {
    position: absolute;
    left: 0;
    top: calc(100% + 0.15rem);
    min-width: 100%;
    max-height: min(50vh, 18rem);
}

/* Аудио chip (classic top-left) */
.tv-player-audio-dd.vp-menu-anchor--classic {
    position: static;
    left: auto;
    top: auto;
}

.tv-player-audio-dd.vp-menu-anchor--classic .tv-player-audio-dd__toggle {
    min-height: 1.85rem;
    padding: 0.22rem 0.55rem;
    border: 0;
    border-radius: 0;
    background: var(--vp-bg-menu);
    color: var(--vp-text-main);
    font-size: 0.78rem;
    font-weight: 600;
    box-shadow: none;
    backdrop-filter: blur(6px);
}

.tv-player-audio-dd.vp-menu-anchor--classic .tv-player-audio-dd__toggle:hover,
.tv-player-audio-dd.vp-menu-anchor--classic .tv-player-audio-dd__toggle:focus-visible,
.tv-player-audio-dd.vp-menu-anchor--classic .tv-player-audio-dd__toggle.is-open {
    outline: none;
    background: hsla(0, 0%, 100%, 0.12);
    color: var(--vp-text-main);
    box-shadow: none;
}

.tv-player-audio-dd__list.vp-menu-panel {
    position: absolute;
    left: 0;
    top: calc(100% + 0.15rem);
    margin-top: 0;
    min-width: 12rem;
}

html.tv-watch .tv-player-audio-dd__list.vp-menu-panel:not([hidden]) {
    z-index: 85;
}

/* Movix Player — стили дорожек субтитров (VTT / native cues) */
.tv-player-shell.mvx-subtitles-active .tv-player-video::cue {
    line-height: 1.35;
}
