// Homepage

#homepage-items {
    padding: 25px;

    .dropdown-toggle {
        border-top-left-radius: 3px !important;
        border-bottom-left-radius: 3px !important;
    }

    .bg-info {
        background: $theme !important;
    }

    .btn-group {
        margin-top: 4px;

        .btn {
            background: transparent !important;
            color: $white70a !important;
            padding: 6px 12px;
            margin: 0 12.5px;
            transition: color 0.2s ease;

            &.focus,
            &:focus,
            &:hover {
                color: $white !important;
            }
        }
    }

    h2 {
        &.text-center {
            color: $white30a;
            font-size: 14px !important;
            margin: 0;
            cursor: default;
            user-select: none;
        }
    }

    h3 {
        text-transform: none;
    }

    h4 {
        &.pull-left {
            margin: 0;
            padding: 0 0 18px 0;
        }
    }

    .flexbox {
        margin: 0 0 0px;
    }

    .white-box {
        margin: 0;

        &.bg-info {
            background: transparent !important;
            padding: 0 0 5px 0 !important;
            background-color: transparent !important;
        }

        &.p-0 {
            padding: 0 !important;
            margin: 0 0 25px !important;
        }
    }

    .panel {
        padding: 0;
        margin: 0 0 20px !important;
    }

    .panel-heading {
        padding: 0 0 10px !important;
        background: transparent !important;
    }

    h4.pull-left,
    .panel-heading {
        @extend %header;
        color: $text !important;
        font-size: 15px;
        cursor: default;
        user-select: none;
    }

    .pull-left.m-t-5 {
        margin: 0 !important;
    }

    .dropdown-toggle {
        padding: 6px 4px !important;
    }
}

@media screen and (max-width: 320px) {
    #homepage-items .pull-left {
        font-size: 0;
    }
}

@media screen and (min-width: 768px) {
    #homepage-items {
        padding: 35px 60px;

        .flexbox {
            margin: 0 0 0px;
        }

        .panel {
            margin: 0 0 48px;
        }

        .panel-heading {
            padding: 0 0 20px !important;
            background: transparent !important;
        }

        .white-box {
            &.bg-info {
                padding: 0 0 15px !important;
            }

            &.p-0 {
                margin: 0 0 45px !important;
            }
        }

        .owl-item {
            margin-right: 28px !important;
            margin-top: 2px;
            margin-left: 2px;
            margin-bottom: 28px;
        }
    }
}

.homepageImageTitle {
    margin-top: 0px;
}

// Home Page Request Button

#newRequestButton {
    margin: 0 !important;
}

// Poster Image Refresh Button

.refreshImage {
    color: $white70a;
    opacity: 0;
    transition: all 0.2s ease;

    &:focus,
    &:hover {
        color: $white;
    }

    &.default {
        padding: 0 5px !important;
        top: -49px;
        right: 0;
    }
}

.item:hover .refreshImage {
    top: 0;
    opacity: 1;
}

// Scroll-To-Top Button

#scroll {
    background: $white25a;
    transition: all 0.1s;
    border-radius: 1000px;

    &:focus,
    &:hover {
        background: $white30a;
    }

    span {
        transition: all 0.1s;
        border-bottom-color: $white;
    }
}

// Content Streams

#embyStreams,
#plexStreams {
    hr.hidden-xs {
        display: none;
    }
}

.nowPlayingItem {
    margin: 0 0 30px !important;

    &:first-child:nth-last-child(3),
    + .white-popup + .white-popup + .nowPlayingItem {
        margin: 0;
    }
}

@media screen and (min-width: 768px) {
    .nowPlayingItem {
        margin: 0;
    }
}

.nowPlayingHover {
    margin-bottom: 40px;
}

.el-info {
    .inline-popups,
    .metadata-get,
    .openTab,
    .refreshImage {
        padding: 10px !important;
        opacity: 0;
        transform: translateY(100%);
        transition: all 0.2s ease;
    }
}

.el-overlay-1:hover {
    .inline-popups,
    .metadata-get,
    .openTab,
    .refreshImage {
        opacity: 1;
        transform: none;
    }
}

// Content Thumbnails

#ombi-requests .panel {
    margin: 0 0 19px;
}

@media screen and (min-width: 768px) {
    #ombi-requests .panel {
        margin: 0 0 44px;
    }
}

.owl-stage-outer {
    overflow: hidden !important;
    padding-left: 2px;
    padding-bottom: 1px;
}

.owl-stage {
    width: 9999999px !important;
}

.recent-items .owl-item {
    margin-bottom: 27px;
}

@media screen and (min-width: 768px) {
    #homepage-items .owl-item {
        margin-right: 28px !important;
        margin-bottom: 30px;
    }
}

.hover-homepage-item {
    transition: all 0.2s ease;
}

.badge .inside-request-div {
    background: $theme !important;
}

.outside-request-div {
    transition: all 0.2s ease;
    z-index: 1;
}

.item:hover {
    .hover-homepage-item {
        background: radial-gradient(
            farthest-corner at 50% 50%,
            $black50a 50%,
            $black20 100%
        );
        opacity: 1;
    }

    .inside-over-request-div {
        opacity: 0;
        top: -60px;
    }

    .inside-request-div {
        opacity: 0;
        top: -46px;
    }
}

#homepage-items .recent-title {
    transition: 0.2s ease color;

    &:hover {
        &::first-line {
            color: $white;
            text-decoration: underline;
        }
    }
}

// Override Ombi Icon

img[src*='ombi'] {
    &.homepageImageTitle {
        width: 40px;
        padding-left: 40px;
    }
}

// Download Queues

tbody[class$='-queue'] {
    cursor: default;

    td.hidden-xs {
        font-weight: 400;
        user-select: none;
    }
}

.table {
    margin-bottom: 0;
}

.simplebar-content {
    padding-bottom: 0 !important;
}

#homepage-items {
    .table-bordered,
    .table {
        > tbody,
        > tfoot,
        > thead {
            > tr {
                > th,
                > td {
                    border: 0;
                }

                &:not(:first-of-type):not(:last-of-type) > td {
                    border-width: 1px 0;
                    border-style: solid;
                    border-color: $white08a;
                    min-width: 100px;
                }

                > td {
                    &[lang] {
                        color: $white30a;
                        text-transform: uppercase;
                    }
                }
            }
        }
    }
}

td span.label.label-info {
    min-width: initial !important;
    width: 100%;
    max-width: 80px;
}

.table-hover tbody tr:hover {
    background: $black15a !important;

    &:only-child {
        background: transparent !important;
    }
}

// Progress Bars

.progress {
    background: $black15a;
    height: 3px;
    margin-bottom: 5px;
    cursor: default;
    user-select: none;
    transition: height 0.2s ease;
}

.progress-lg {
    margin-left: -2px;
    width: calc(100% + 4px);
}

.progress-bar-info {
    background: $theme;
}

.progress-bar-inverse {
    background: $white08a;
}

.max-texts {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media screen and (min-width: 768px) {
    .max-texts {
        max-width: none;
    }
}

tbody {
    &[class$='queue'],
    &[class$='history'] {
        td.text-right {
            max-width: 65px;
        }

        .progress,
        .progress-bar {
            border-radius: 1000px;
            height: 16px !important;
        }

        .progress {
            min-width: 72px;
            max-width: 80px;
            float: right;
        }

        .progress-bar {
            font-size: 75% !important;
            line-height: 16px !important;
        }
    }
}
