.tvguide {
    display: flex;
    flex-direction: column;
    align-items: initial;
}

.tvGuideHeader {
    white-space: nowrap;
    width: 100%;
    flex-direction: column;
    flex-shrink: 0;
    display: flex;
}

.guideHeaderDateSelection {
    font-size: 86%;
    padding: .4em 0;
}

.guideHeaderTimeslots {
    display: flex;
}

.tvProgramSectionHeader {
    margin: 0;
}

.tvProgram {
    display: block;
    text-decoration: none;
    white-space: nowrap;
    position: relative;
}

.guideProgramIndicator {
    text-transform: uppercase;
    border-radius: 2px;
    margin-right: .5em;
    font-size: 74%;
    padding: .2em .25em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
}

.channelTimeslotHeader {
    flex-shrink: 0;
    justify-content: center;
}

.timeslotHeaders {
    white-space: nowrap;
}

.programContainer {
    white-space: nowrap;
    position: relative;
    display: flex;
    align-items: flex-start;
    flex-grow: 1;
}

.channelPrograms {
    white-space: nowrap;
    position: relative;
    contain: strict;
}

.timeslotHeadersInner {
    position: relative;
}

.currentTimeIndicatorBar {
    position: absolute;
    bottom: .05em;
    left: 0;
    width: 100%;
    height: 2px;
    display: flex;
    margin-left: .65vh;
    background-color: #52B54B;
    height: 2px;
    transform-origin: left;
    transition: transform 500ms ease-out;
}

.currentTimeIndicatorArrowContainer {
    position: absolute;
    bottom: -1vh;
    width: 100%;
    color: #52B54B;
    margin-left: .65vh;
    transform-origin: left;
    transition: transform 500ms ease-out;
}

.layout-tv .currentTimeIndicatorBar, .layout-tv .currentTimeIndicatorArrowContainer {
    /* Need to account for the scrollbar not being there */
    left: 4px;
}

.currentTimeIndicatorArrow {
    width: 3vh;
    height: 3vh;
    font-size: 3vh;
    color: #52B54B;
    margin-left: -1.5vh;
}

.channelPrograms, .timeslotHeadersInner {
    width: 1800vw;
}

@media all and (min-width: 600px) {

    .channelPrograms, .timeslotHeadersInner {
        width: 1400vw;
    }
}

@media all and (min-width: 800px) {

    .channelPrograms, .timeslotHeadersInner {
        width: 1200vw;
    }
}

@media all and (min-width: 1280px) {

    .channelPrograms, .timeslotHeadersInner {
        width: 660vw;
    }
}

.timeslotHeader {
    display: inline-flex;
    align-items: center;
    text-indent: .35em;
}

.channelHeaderCell, .channelTimeslotHeader {
    overflow: hidden;
    text-overflow: ellipsis;
    border-right: 1px solid #121212;
    width: 24vw;
    background: rgba(40, 40, 40, .9);
    display: flex;
    align-items: center;
    text-decoration: none;
    /* Needed in firefox */
    text-align: left;
    contain: strict;
}

@media all and (min-width: 500px) {

    .channelHeaderCell, .channelTimeslotHeader {
        width: 16vw;
    }
}

@media all and (min-width: 600px) {

    .channelHeaderCell, .channelTimeslotHeader {
        width: 16vw;
    }
}

@media all and (min-width: 800px) {

    .channelHeaderCell, .channelTimeslotHeader {
        width: 14vw;
    }
}

@media all and (min-width: 1280px) {

    .channelHeaderCell, .channelTimeslotHeader {
        width: 12vw;
    }
}

.btnGuideViewSettings {
    margin: 0;
    flex-shrink: 0;
}

.btnGuideViewSettingsIcon {
    font-size: 1.5em !important;
}

.selectDateIcon {
    flex-shrink: 0;
}

.channelHeaderCell {
    border-bottom: .65vh solid #121212 !important;
    background-size: auto 70%;
    background-position: 92% center;
    background-repeat: no-repeat;
}

@media all and (max-width: 800px) {

    .newTvProgram, .liveTvProgram, .premiereTvProgram, .guideHdIcon {
        display: none;
    }
}

@media all and (max-width: 1200px) {

    .guideChannelNumberWithImage {
        display: none;
    }
}

.channelPrograms, .channelHeaderCell {
    height: 4em;
    contain: strict;
}

.channelPrograms {
    display: flex;
    flex-direction: column;
}

.channelPrograms-tv, .channelHeaderCell-tv {
    height: 3.2em;
}

.channelTimeslotHeader {
    border-right-color: transparent;
}

.channelTimeslotHeader, .timeslotHeader {
    background: transparent;
}

.timeslotHeader, .channelTimeslotHeader {
    height: 2.2em;
}

.programGrid {
    padding-bottom: 4px;
    flex-grow: 1;
}

.timeslotHeader {
    width: 2.0833333333333333333333333333333%;
}

.programCell {
    position: absolute;
    top: 0;
    /* Unfortunately the borders using vh get rounded while the bottom property doesn't. So this is a little hack to try and make them even*/
    bottom: .59vh;
    border-left: .65vh solid #121212 !important;
    background-color: rgba(32, 32, 32, .95);
    display: flex;
    text-decoration: none;
    overflow: hidden;
    align-items: center;
    /* Needed for Firefox */
    text-align: left;
    contain: strict;
}

.programAccent {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
}

.sportsAccent {
    background-color: #3949AB;
}

.movieAccent {
    background-color: #5E35B1;
}

.childAccent {
    background-color: #039BE5;
}

.newsAccent {
    background-color: #43A047;
}

.specialsAccent {
    background-color: #FB8C00;
}

.guideProgramName {
    padding: 0 .5em 0;
    overflow: hidden;
    text-overflow: ellipsis;
    align-items: center;
    /* Need block here or the ellipsis overflow is lost */
    display: block;
}

.programIcon {
    margin-left: auto;
    margin-right: .25em;
    height: 1em;
    width: 1em;
    font-size: 1.6em;
    color: #ddd;
    flex-shrink: 0;
}

    .programIcon + .programIcon {
        margin-left: .25em;
    }

.programTextIcon {
    font-weight: bold;
    color: rgb(30,30,30);
    font-size: .9em;
    background: #555;
    padding: .18em .32em;
    border-radius: .25em;
    margin-right: .35em;
}

.programTextIcon-tv {
    font-size: .6em;
}

.guideChannelNumber {
    padding-left: 1em;
    max-width: 30%;
    text-overflow: ellipsis;
    overflow: hidden;
}

.guideChannelName {
    margin-left: auto;
    margin-right: 1em;
    text-overflow: ellipsis;
    overflow: hidden;
    max-width: 70%;
}

@media all and (min-width: 1000px) {

    .guideChannelName {
        max-width: 40%;
    }
}

@media all and (max-width: 1000px) {

    .guideChannelNumber {
        display: none;
    }
}

.channelsContainer {
    display: flex;
    flex-shrink: 0;
}

.channelList {
    display: flex;
    flex-direction: column;
}

.channelList, .programGrid {
    contain: layout style;
}

.programCell, .channelHeaderCell {
    outline: none !important;
}

    .programCell:focus, .channelHeaderCell:focus {
        background-color: #555;
    }

.timerIcon, .seriesTimerIcon {
    color: #cc3333 !important;
}

.seriesTimerIcon-inactive {
    color: inherit !important;
    opacity: .7;
}

.guideOptions {
    color: #eee;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

@media all and (max-width: 800px), all and (max-height: 600px) {

    .tvGuideHeader {
        padding-left: 0;
    }
}

.guideRequiresUnlock {
    margin: 1em auto;
    text-align: center;
    padding: 1em;
    flex-shrink: 0;
}

.noRubberBanding {
    /* This is needed to combat the rubber banding in iOS */
    padding-bottom: 100px;
}

.guideDateTabsSlider {
    text-align: center;
}

.guide-date-tab-button {
    font-weight: normal !important;
    color: inherit !important;
    padding: .3em .7em !important;
    margin: 0 .3em !important;
    opacity: .25;
}

    .guide-date-tab-button.emby-tab-button-active {
        color: #52B54B !important;
        border-color: transparent !important;
        opacity: 1;
        font-weight: normal !important;
    }

    .guide-date-tab-button:focus {
        color: #52B54B !important;
        opacity: 1;
    }

.layout-tv .guide-date-tab-button:focus {
    background-color: #52B54B !important;
    border-radius: .15em !important;
    color: #fff !important;
}
