@import "../../less/variables.less";

@media (min-width: 481px) {
    .container {
        background-color: @color-bg-lightest;
        overflow: hidden;
    }
}

// Common

.sectionTitle {
    line-height: 1;
    font-size: 1.2em;
    font-weight: normal;
    margin-bottom: 0;
    padding-bottom: 16px;
    svg {
        margin-right: 4px;
    }
}

// Main

.main {
    padding: 16px 0;
    margin-bottom: 32px;
    
    @media (min-width: 481px) {
        background-color: #fff;
        box-shadow: 0 0 20px @color-shadow;
        border-radius: 2px;
        margin-top: 16px;
        margin-left: -16px;
        padding: 16px;
    }
}

// Main > Header

.header {
    overflow: hidden;

    @media (max-width: 480px) {
        display: flex;
        align-items: center;
    }
}

@poster-width: 144px;
@mobile-poster-width: 120px;

.poster {
    float: left;
    width: @poster-width;

    @media (max-width: 480px) {
        flex: none;
        width: @mobile-poster-width;
        box-shadow: 0 1px 5px rgba(0, 0, 0, 0.5);
    }
}

.posterImage {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 2px;
}

.headerContent {
    font-size: 14px;
}

.headerContentWithPoster {
    composes: headerContent;
    padding-top: 8px;
    padding-left: 16px;
    margin-left: @poster-width;

    @media (max-width: 480px) {
        padding-top: 0;
        margin-left: 0;
    }
}

.title {
    margin: 0;
    font-size: 24px;
    color: @color-text-dark;
    word-break: keep-all;
    word-wrap: break-word;

    @media (max-width: 480px) {
        font-size: 20px;
    }
}

.stats {
    color: @color-text-light;
    font-size: 13px;
    margin: 10px 0 16px;
}

.stat {
    display: block;
    line-height: 1.8;
    svg {
        width: 16px;
        text-align: center;
        margin-right: 4px;
    }
}

.rankStat {
    composes: stat;
    margin-right: 16px;
}

.userStat {
    composes: stat;
}

// Main > Content

.content {
    clear: left;
}

.episodes {
    padding: 24px 0 16px;

    a {
        margin-right: 16px;
        text-decoration: none;
        color: @color-text-light;
        white-space: nowrap;
        // Added for nowrap (see http://stackoverflow.com/questions/21198456/text-doesnt-wrap-properly-between-elements-having-white-space-nowrap)
        display: inline-block;
        // TODO: css module
        &:global(.recent), &:global(.has-post) {
            font-weight: bold;
        }
        &:hover {
            opacity: 0.8;
        }
        &:global(.active), &:global(.active):hover {
            color: @color-main;
        }
    }
}

.episodeHeader {
    border-top: 1px solid @color-border;
    padding-bottom: 16px;
}

.episodeStats {
    color: @color-text-light;
    font-size: 13px;
    span {
        margin-right: 8px;
    }
    svg {
        width: 16px;
        text-align: center;
        margin-right: 2px;
    }
}

// Sidebar

.sidebar {
    @media (min-width: 481px) {
        padding-top: 24px;
    }
}

.metadataSection {
    padding-bottom: 8px;
}

.metadata {
    color: @color-text-dark;
    padding: 8px 0;

    p {
        font-size: 14px;
        &:first-child {
            margin-top: 0;
        }
    }
}

.metadataLinks {
    p {
        margin: 0;
        line-height: 1.6;
        font-size: 13px;
    }
    a {
        color: @color-text-dark;
        text-decoration: none;
        &:hover {
            text-decoration: underline;
        }
    }
}

.videosSection {
    overflow: hidden;
    padding-bottom: 24px;
}

