/*
 * TV Player Enhancements V1
 * Inline episode navigation + Up Next countdown.
 */

.tv-player-stage {
    position: relative;
}

.tv-player-toolbar {
    gap: 12px;
}

.tv-player-toolbar-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
}

.tv-inline-episode-nav {
    min-height: 34px;
    padding: 0 11px;
    border: 1px solid #303841;
    border-radius: 5px;
    background: #151a20;
    color: #d9dde1;
    font: inherit;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    transition:
        border-color .15s ease,
        background .15s ease,
        color .15s ease,
        opacity .15s ease;
}

.tv-inline-episode-nav:hover:not(:disabled) {
    border-color: #e3262e;
    background: #1b222a;
    color: #fff;
}

.tv-inline-episode-nav:disabled {
    opacity: .34;
    cursor: default;
}

.tv-up-next {
    position: absolute;
    z-index: 12;
    right: 16px;
    bottom: 16px;
    width: min(330px, calc(100% - 32px));
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 13px 14px;
    border: 1px solid #343b44;
    border-radius: 8px;
    background: rgba(10,13,17,.96);
    box-shadow: 0 14px 38px rgba(0,0,0,.55);
    backdrop-filter: blur(8px);
}

.tv-up-next.is-open {
    display: flex;
}

.tv-up-next-copy {
    min-width: 0;
}

.tv-up-next-copy > span,
.tv-up-next-copy > strong,
.tv-up-next-copy > small {
    display: block;
}

.tv-up-next-copy > span {
    margin-bottom: 3px;
    color: #e3262e;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .7px;
    text-transform: uppercase;
}

.tv-up-next-copy > strong {
    overflow: hidden;
    color: #f2f3f5;
    font-size: 13px;
    font-weight: 900;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.tv-up-next-copy > small {
    margin-top: 3px;
    color: #969fa9;
    font-size: 10px;
}

.tv-up-next-actions {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 6px;
}

.tv-up-next-play,
.tv-up-next-cancel {
    min-height: 31px;
    padding: 0 9px;
    border-radius: 5px;
    font: inherit;
    font-size: 9px;
    font-weight: 900;
    cursor: pointer;
}

.tv-up-next-play {
    border: 1px solid #e3262e;
    background: #e3262e;
    color: #fff;
}

.tv-up-next-play:hover {
    background: #f12f38;
}

.tv-up-next-cancel {
    border: 1px solid #343b44;
    background: #151a20;
    color: #b8c0c8;
}

.tv-up-next-cancel:hover {
    border-color: #59636e;
    color: #fff;
}

@media (max-width: 760px) {
    .tv-player-toolbar {
        align-items: stretch;
    }

    .tv-player-toolbar-actions {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        gap: 6px;
    }

    .tv-inline-episode-nav {
        min-width: 0;
        padding: 0 7px;
        font-size: 10px;
    }

    .tv-player-toolbar-actions .tv-report-toggle {
        white-space: nowrap;
    }

    .tv-up-next {
        right: 10px;
        bottom: 10px;
        width: calc(100% - 20px);
    }
}

@media (max-width: 470px) {
    .tv-player-toolbar-actions {
        grid-template-columns: 1fr 1fr;
    }

    .tv-player-toolbar-actions .tv-report-toggle {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    .tv-up-next.is-open {
        align-items: stretch;
        flex-direction: column;
    }

    .tv-up-next-actions {
        width: 100%;
    }

    .tv-up-next-play,
    .tv-up-next-cancel {
        flex: 1 1 50%;
    }
}
