/* Плеер: flex + осторожные свойства для старых ТВ-браузеров */
html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #000;
    color: #fff;
    font-family: Arial, Helvetica, sans-serif;
}

.tv-body,
.tv-root {
    width: 100%;
    height: 100%;
    position: relative;
}

.tv-placeholder {
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 3vh;
    padding: 2vh;
    box-sizing: border-box;
    background: #111;
    color: #fff;
    z-index: 10;
}

/* На части ТВ [hidden] не убирает слой из композиции — дублируем явно */
.tv-placeholder[hidden] {
    display: none !important;
    pointer-events: none !important;
}

.tv-slider {
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    background: #000;
    z-index: 1;
}

.tv-slider-inner,
.tv-main-slider-inner {
    position: absolute;
    left: 50%;
    top: 50%;
    right: auto;
    bottom: auto;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    transform: translate(-50%, -50%);
    overflow: hidden;
}

/* Сцена слайда: два слоя для кроссфейда / сдвига */
.tv-slide-item {
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    opacity: 1;
    -webkit-transition: opacity 0.48s ease, -webkit-transform 0.48s ease;
    transition: opacity 0.48s ease, transform 0.48s ease;
}

.tv-slide-item.tv-slide-top {
    z-index: 2;
}

.tv-slide-item.tv-slide-instant {
    transition: none;
}

.tv-slider img,
.tv-slider video,
.tv-main-slider img,
.tv-main-slider video {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
}

.tv-main {
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    background: #0b0f14;
    z-index: 2;
}

.tv-clock {
    font-size: 10vh;
    font-weight: bold;
    letter-spacing: 0.05em;
    color: #fff;
    text-align: center;
}

.tv-weather {
    font-size: 2vh;
    opacity: 0.9;
    color: #fff;
}

.tv-weather.tv-weather--informer {
    text-align: center;
}

.tv-weather.tv-weather--informer .ww-informers-box-854754 {
    font-size: 1.65vh !important;
    line-height: 1.35 !important;
    white-space: normal !important;
    overflow: visible !important;
    -o-text-overflow: clip !important;
    text-overflow: clip !important;
}

.tv-weather.tv-weather--informer a {
    color: #9cf;
}

.tv-main-slider-column {
    flex: 1 1 0;
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.tv-main-inner {
    flex: 1;
    display: flex;
    flex-direction: row;
    min-height: 0;
}

.tv-main-slider-wrap {
    flex: 1 1 0;
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    background: #000;
}

/* Часы только над зоной слайда (ширина = колонка слайдера), по центру */
.tv-main-clock-strip {
    flex-shrink: 0;
    width: 100%;
    text-align: center;
    box-sizing: border-box;
    padding: 0.2vh 1vw 0.2vh;
}

.tv-main-slider {
    position: relative;
    flex: 0 0 auto;
    min-height: 0;
    width: 100%;
}

.tv-news {
    width: 28%;
    max-width: 360px;
    min-width: 200px;
    box-sizing: border-box;
    padding: 1.5vh;
    border-left: 1px solid #223;
    overflow: hidden;
    font-size: 1.8vh;
    background: #0e131a;
    display: flex;
    flex-direction: column;
}

.tv-news-weather {
    padding-bottom: 0.8vh;
    margin-bottom: 0.8vh;
    border-bottom: 1px solid #223;
}

.tv-news-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    line-height: 1.35;
    word-wrap: break-word;
}

.tv-social-qr {
    flex: 0 0 auto;
    margin-top: 1vh;
    padding-top: 1vh;
    border-top: 1px solid #223;
    text-align: center;
}

.tv-social-qr img {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: 26vh;
    height: auto;
    margin: 0 auto;
    background: #fff;
}

.tv-news-title {
    font-size: 2vh;
    font-weight: bold;
    margin-bottom: 1vh;
}

.tv-news-item {
    padding: 0.9vh 0;
    border-bottom: 1px solid #223;
}

.tv-news-item-title {
    font-size: 1.75vh;
    font-weight: bold;
    line-height: 1.2;
    color: #fff;
}

.tv-news-item-time {
    margin-top: 0.45vh;
    color: #bfdbfe;
    font-size: 1.55vh;
}

.tv-news-item-place {
    margin-top: 0.35vh;
    color: #cbd5e1;
    font-size: 1.45vh;
}

.tv-news-empty {
    color: #cbd5e1;
}

/* Вход / выход слайда (классы выставляет player.js) */
.tv-slide-fade-in {
    opacity: 0;
}
.tv-slide-fade-show {
    opacity: 1;
}
.tv-slide-fade-out {
    opacity: 0;
}

.tv-slide-sl-in {
    -webkit-transform: translateX(100%);
    transform: translateX(100%);
}
.tv-slide-sl-show {
    -webkit-transform: translateX(0);
    transform: translateX(0);
}
.tv-slide-sl-out {
    -webkit-transform: translateX(-100%);
    transform: translateX(-100%);
}

.tv-slide-sr-in {
    -webkit-transform: translateX(-100%);
    transform: translateX(-100%);
}
.tv-slide-sr-show {
    -webkit-transform: translateX(0);
    transform: translateX(0);
}
.tv-slide-sr-out {
    -webkit-transform: translateX(100%);
    transform: translateX(100%);
}

.tv-slide-zm-in {
    opacity: 0;
    -webkit-transform: scale(0.9);
    transform: scale(0.9);
}
.tv-slide-zm-show {
    opacity: 1;
    -webkit-transform: scale(1);
    transform: scale(1);
}
.tv-slide-zm-out {
    opacity: 0;
    -webkit-transform: scale(1);
    transform: scale(1);
}

.tv-body.theme-light {
    background: #fff;
    color: #111827;
}

.tv-body.theme-light .tv-placeholder {
    background: #f8fafc;
    color: #111827;
}

.tv-body.theme-light .tv-slider,
.tv-body.theme-light .tv-main-slider-wrap {
    background: #fff;
}

.tv-body.theme-light .tv-main {
    background: #fff;
    color: #111827;
}

.tv-body.theme-light .tv-clock,
.tv-body.theme-light .tv-weather,
.tv-body.theme-light .tv-news-item-title {
    color: #111827;
}

.tv-body.theme-light .tv-weather {
    opacity: 1;
}

.tv-body.theme-light .tv-weather.tv-weather--informer {
    -webkit-filter: invert(1) hue-rotate(180deg);
    filter: invert(1) hue-rotate(180deg);
}

.tv-body.theme-light .tv-weather.tv-weather--informer a {
    color: #a6bdff;
}

.tv-body.theme-light .tv-news {
    background: #f8fafc;
    border-left-color: #e5e7eb;
    color: #111827;
}

.tv-body.theme-light .tv-news-weather,
.tv-body.theme-light .tv-news-item,
.tv-body.theme-light .tv-social-qr {
    border-color: #e5e7eb;
}

.tv-body.theme-light .tv-news-item-time {
    color: #1d4ed8;
}

.tv-body.theme-light .tv-news-item-place,
.tv-body.theme-light .tv-news-empty {
    color: #4b5563;
}

.tv-body.theme-light .tv-social-qr {
    filter: none;
}

/* Вертикальная ориентация: поворот логической сцены 1920×1080 в портретное окно */
.tv-body.orientation-portrait .tv-root {
    position: absolute;
    width: 1920px;
    height: 1080px;
    left: 50%;
    top: 50%;
    margin-left: -960px;
    margin-top: -540px;
    transform: rotate(90deg);
    transform-origin: center center;
}

@media screen and (max-width: 1200px) {
    .tv-body.orientation-portrait .tv-root {
        transform: rotate(90deg) scale(0.55);
    }
}
