@charset 'UTF-8';

.channel-header {
    @include flex(0 0 70px);
    border-bottom: 1px solid;
    font-size: 14px;
    position: relative;
    width: 100%;
    z-index: 9;

    .channel-header__icon {
        @include border-radius(50%);
        border: 1px solid;
        cursor: pointer;
        height: 37px;
        line-height: 36px;
        margin: 16px 10px 0 0;
        min-width: 30px;
        text-align: center;
        width: 37px;

        &.wide {
            @include border-radius(37px);
            padding: 0;
            white-space: nowrap;
            width: auto;

            > div {
                padding: 0 13px 0 15px;
            }
        }

        .icon__text {
            font-weight: 600;
            margin-right: 9px;
        }

        a {
            display: block;
        }

        .fa {
            font-size: 19px;
        }

        & + div {
            display: none;
        }

        .icon {
            position: relative;
        }

        .icon__pin,
        .icon__members {
            top: 2px;
        }

        .icon__mentions {
            top: 5px;
        }

        .icon__flag {
            top: 3px;
        }
    }

    .move--left & {
        .icon--hidden {
            display: none;
        }
    }

    &.alt {
        margin: 0;

        th {
            font-weight: normal;
            vertical-align: top;

            &.header-list__right {
                padding-right: 4px;
                white-space: nowrap;
            }
        }

        td {
            border: none;
        }
    }

    th {
        text-align: center;

        &:first-child {
            border-left: none;
            padding: 0 0 0 20px;
            text-align: left !important;
            width: 100%;
        }

        &:last-child {
            .channel-header__icon {
                margin-right: 17px;
            }
        }
    }

    td {
        font-size: 13px;
        padding: 5px 25px 5px !important;
        text-align: center !important;

        &:first-child {
            text-align: left !important;
        }
    }

    .heading {
        display: inline-block;
        font-size: 17px;
        font-weight: 400;
        margin: 0 4px 0 0;
        max-width: calc(100vw - 780px);
        overflow: hidden;
        text-overflow: ellipsis;
        vertical-align: top;
        white-space: nowrap;

        .move--left & {
            max-width: calc(100vw - 850px);

            .multi-teams & {
                max-width: calc(100vw - 905px);
            }
        }

        .multi-teams & {
            max-width: calc(100vw - 850px);
        }
    }

    .caret {
        margin-top: 3px;
    }

    .more {
        color: #81848b;
        display: inline-block;
        font-size: 13px;
        text-transform: capitalize;
        vertical-align: top;
    }

    .disabled {
        color: #999999;
    }
}

.row {
    &.header {
        position: relative;

        .channel__wrap & {
            display: none;
        }
    }
}

.header-dropdown__icon {
    color: inherit;
    font-size: 21px;
    margin-left: 1px;
    position: relative;
    top: 2px;
}

.channel-header__info {
    margin-top: 12px;

    .channel-header__title {
        .header-dropdown__icon {
            color: $dark-gray;
        }

        > a {
            display: inline-block;
            text-decoration: none;
        }

        .modal {
            white-space: normal;
        }
    }

    .channel-header__description {
        display: inline-block;
        height: 35px;
        margin-top: -10px;
        max-width: calc(100vw - 740px);
        overflow: hidden;
        padding: 3px 0 0;
        position: relative;
        text-overflow: ellipsis;
        top: 10px;
        white-space: pre;
        word-break: break-word;

        .markdown__heading {
            font-size: 1em;
            margin: 0;
        }

        .multi-teams & {
            max-width: calc(100vw - 810px);
        }

        &.light {
            @include opacity(.6);
            color: inherit;

            &:hover,
            &:focus {
                color: inherit;
            }
        }

        .move--left & {
            max-width: calc(100vw - 810px);

            .multi-teams & {
                max-width: calc(100vw - 860px);
            }
        }

        .markdown-inline-img {
            max-height: 45px;
        }
    }

    .status {
        width: 18px;

        svg {
            max-height: 20px;
            width: 16px;
        }
    }
}

.channel-intro {
    margin: 0 auto 10px;
    padding: 0 15px;

    &.channel-intro--centered {
        max-width: 1020px;
    }

    .intro-links {
        display: inline-block;
        margin: 0 1.5em 10px 0;

        .fa {
            margin-right: 5px;
        }
    }

    .channel-intro-profile {
        margin-top: 5px;

        .user-popover {
            max-width: calc(100% - 100px);
            overflow: hidden;
            text-overflow: ellipsis;
        }
    }

    .channel-intro-img {
        .status-wrapper {
            height: 50px;
            margin: 0 10px 10px 0;
        }

        img {
            @include border-radius(100px);
        }
    }

    .channel-intro__title {
        font-size: 20px;
        font-weight: 600;
        margin-bottom: 15px;
    }

    .channel-intro__content {
        @include border-radius(3px);
        background: $bg--gray;
        padding: 10px 15px;
    }
}

// Team Header in Sidebar
.sidebar--left,
.sidebar--menu,
.admin-sidebar {

    .divider {
        border-top: 1px solid transparent;
        margin: 0.5em 0;

        & + .divider {
            display: none;
        }
    }

    .team__header {
        @include legacy-pie-clearfix;
        @include display-flex();
        @include flex-direction(row-reverse);
        padding: 16px 40px 12px 12px;
        position: relative;

        &:before {
            @include single-transition(all, .05s, linear);
            background: none;
            content: '';
            height: 100%;
            left: 0;
            position: absolute;
            top: 0;
            width: 100%;
        }

        &:hover {
            &:before {
                @include alpha-property(background, $black, .1);
            }

            .user__name {
                color: $white;
            }

            .sidebar-header-dropdown {
                .sidebar-header-dropdown__toggle {
                    @include opacity(1);
                }
            }

            .navbar-right {
                .dropdown-toggle {
                    @include opacity(1);
                }
            }
        }

        a {
            text-decoration: none;
            @include flex-grow(1);
        }

        .sidebar-header-dropdown,
        .admin-navbar-dropdown {
            font-size: .85em;
            height: 100%;
            left: 0;
            margin-right: -22px;
            position: absolute;
            right: 22px;
            top: 0;

            li {
                width: 100%;
            }

            .sidebar-header-dropdown__toggle,
            .admin-navbar-dropdown__toggle {
                @include opacity(.8);
                @include single-transition(all, .1s, linear);
                background: none;
                color: $white;
                display: block;
                font-size: 1em;
                height: 100%;
                left: 0;
                line-height: 1.8;
                padding: 10px;
                width: 100%;
            }

            .dropdown-menu {
                margin-right: 10px;
                margin-top: 4px;
                width: 199px;

                a {
                    overflow: hidden;
                    padding: 3px 20px;
                    text-overflow: ellipsis;
                }
            }

            .sidebar-header-dropdown__icon,
            .admin-navbar-dropdown__icon {
                border-radius: 36px;
                fill: $white;
                float: right;
                height: 36px;
                line-height: 36px;
                position: relative;
                right: -3px;
                text-align: center;
                top: 7px;
                width: 36px;
            }
        }

        .user__picture {
            @include border-radius(36px);
            float: left;
            height: 36px;
            width: 36px;
        }

        .header__info {
            @include clearfix;
            @include flex-grow(1);
            color: $white;
            padding-left: 8px;
            position: relative;
        }

        .team__name,
        .user__name {
            display: block;
            font-size: 14px;
            font-weight: 600;
            max-width: 100%;
            overflow: hidden;
            text-decoration: none;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .team__name {
            line-height: 22px;
        }

        .user__name {
            @include single-transition(all, .1s, linear);
            @include alpha-property(color, $white, .8);
            font-size: 14px;
            font-weight: 400;
            line-height: 18px;
        }
    }

    .search__clear {
        display: none;
    }
}

#navbar {
    .navbar-default {
        .navbar-toggle {
            &.menu-toggle {
                padding: 0 1em;
            }
        }
    }
}

.channel-header__navbar {
    font-size: 16px;

    .heading {
        margin-right: 3px;
    }

    .header-dropdown__icon {
        top: 1px;
    }
}

.channel-header__favorites {
    @include opacity(.5);
    float: left;
    height: 20px;
    margin: 0 8px 0 0;
    padding-top: 3px;
    position: relative;
    z-index: 1;

    &.inactive {
        color: inherit;

        &:hover,
        &:active {
            color: inherit;
        }
    }

    &.active {
        @include opacity(1);
    }

    i {
        font-size: 17px;
    }
}

.app__body {

    .channel-header__links {
        display: inline-block;
        font-family: 'Open Sans', sans-serif;
        font-size: 22px;
        height: 30px;
        line-height: 26px;
        margin-right: 1px;
        text-align: center;
        width: 30px;

        th {
            &:last-child {
                div {
                    margin-right: 10px;
                }
            }
        }

        .channel__wrap.move--left &,
        .channel__wrap.webrtc--show & {
            position: absolute;
            right: -400px;
            top: 14px;
        }

        .icon__flag {
            svg {
                height: 19px;
                position: relative;
                top: 2px;
                width: 19px;
            }
        }

        > a {
            @include opacity(.6);
            @include single-transition(all, .1s, ease-in);
            color: inherit;
            text-decoration: none;

            &:hover {
                @include opacity(0.7);
            }

            &:focus {
                color: inherit;
            }

            &.active {
                color: $primary-color;
                @include opacity(1);

                .icon {
                    fill: $primary-color;
                }
            }
        }
    }

}
