@charset 'UTF-8';

@media screen and (max-width: 960px) {
    .textarea-wrapper {
        .textbox-preview-link,
        .textbox-help-link {
            display: none;
        }
    }

    .channel-header {
        .search-bar__container {
            .search__form {
                width: 150px;
            }
        }

        .heading {
            max-width: 150px;
        }
    }

    .post-create__container {
        form {
            padding: .5em 0;
        }

        .post-create-footer {
            padding: 0 1em;

            .msg-typing {
                display: none;
            }

            .control-label {
                top: 0;

                &.post-error {
                    left: 32px;
                    position: relative;
                    top: 0;
                }
            }
        }

        .post-create-body {
            display: table;
            width: 100%;

            .post-body__cell {
                display: table-cell;
                padding-left: 45px;

                .sidebar--right & {
                    padding-left: 0;
                }
            }

            .app__content & {
                .btn-file {
                    bottom: -2px;
                    left: 0;
                    line-height: 36px;
                    padding: 0;
                    top: auto;
                    width: 45px;
                }
            }

            .send-button {
                display: table-cell;
            }
        }
    }

    .signup-team__container {
        &.branded {
            display: block;
            margin: 0 auto;
            max-width: 380px;

            .signup__markdown {
                display: none;
            }
        }
    }

    .sidebar--right {
        @include single-transition(all, .35s, ease);
        @include translateX(100%);

        &.move--left,
        &.webrtc--show {
            -webkit-transform: translateX(0) !important;
            -moz-transform: translateX(0) !important;
            -ms-transform: translateX(0) !important;
            -o-transform: translateX(0) !important;
            transform: translateX(0) !important;

            .search-bar__container {
                padding-right: 8px;
                z-index: 5;
            }
        }
    }

    .backstage-content {
        margin: 30px;
        max-width: 100%;
        padding: 0;
    }

    .backstage-sidebar {
        height: auto;
        padding: 30px 15px 0;
        position: relative;
        width: 100%;
    }

    .help__format-text {
        display: none;
    }

    .inner-wrap {
        &:not(.move--left) {
            margin-right: 0 !important;
        }

        &.move--left,
        &.webrtc--show {
            margin-right: 0 !important;

            .channel-header__links {
                position: relative;
                right: auto;
                top: auto;
            }
        }
    }
}

// Tablet and desktop
@media screen and (min-width: 768px) {
    .second-bar {
        display: none;
    }

    .sidebar--right {
        &.move--left,
        &.webrtc--show {
            @include translateX(0);
        }

        &.sidebar--right--expanded {
            width: calc(100% - 280px);

            .sidebar--right__bg {
                background-color: alpha-color($black, .4);
                visibility: visible;
            }

            .search-bar__container {
                padding-left: 10px;
            }

            .sidebar-right-container {
                position: relative;
                z-index: 5;
            }

            .sidebar--right__expand {
                .fa-expand {
                    display: none;
                }

                .fa-compress {
                    display: inline-block;
                }
            }
        }
    }

    .inner-wrap {
        &.move--left,
        &.webrtc--show {
            margin-right: 400px;
        }
    }

    .post {
        &.post--compact {

            .channel__wrap & {
                .post__time {
                    font-size: .85em;
                    left: -79px;
                    position: absolute;
                    text-align: right;
                    top: 6px;
                    width: 60px;
                }

                .star-icon__container {
                    left: -65px;
                    position: absolute;
                    text-align: right;
                    top: 6px;
                    width: 60px;
                }
            }

            &:not(.post--thread) {
                padding: 5px .5em 0 77px;

                .post__link {
                    margin: 4px 0 7px;
                    vertical-align: bottom;
                }

                span {
                    p {
                        &:last-child {
                            margin-bottom: .3em;
                        }
                    }
                }

                .post__header {
                    float: left;
                    height: 21px;
                    padding-top: 3px;

                    .col__name {
                        font-weight: bold;
                        margin-right: 2px;
                        padding-right: 5px;
                        position: relative;
                        z-index: 1;
                    }

                    .colon {
                        display: inline;
                    }

                    .col__reply {
                        top: -1px;
                    }
                }

                &.other--root {
                    .post__body {
                        > div {
                            &:first-child {
                                min-height: 21px;
                            }
                        }
                    }

                    .post__link + .post__body {
                        clear: both;
                    }

                    &.post--comment {
                        .post__header {
                            .col__reply {
                                top: -1px;
                            }
                        }
                    }
                }

                .post-code {
                    clear: both;
                }

                .post__body {
                    width: 100%;
                }

                .post__content {
                    padding-right: 45px;
                }
            }

            .flag-icon__container {
                left: -21px;
                position: absolute;
                top: 7px;
            }

            .sidebar--right & .flag-icon__container {
                left: auto;
                position: relative;
                top: 1px;
            }

            &.same--root {
                &.same--user {
                    padding-left: 77px;
                    padding-top: 0;

                    .flag-icon__container {
                        left: -19px;
                        position: absolute;
                        top: 7px;
                    }

                    .post__header {
                        .col__reply {
                            top: -1px;
                        }
                    }

                    .post__img {
                        img {
                            display: none;
                        }
                    }

                    &.post--root {
                        .post__img {
                            img {
                                display: block;
                            }
                        }

                        .post__time {
                            @include opacity(.6);
                        }
                    }
                }

                &.post--comment {
                    padding-top: 1px;

                    .post__img {
                        img {
                            display: inline-block;
                        }
                    }

                    &.same--user {
                        .post__img {
                            img {
                                display: none;
                            }
                        }
                    }

                    .post__header {
                        margin-left: 12px;
                    }
                }
            }
        }

        &.same--root {
            &.same--user {
                .post__time {
                    @include opacity(0);
                }

                .post__header {
                    .col__reply {
                        top: -21px;
                    }
                }

                &:not(.post--compact) {
                    .post__time {
                        display: inline-block;
                        font-size: 11px;
                        left: -14px;
                        line-height: 34px;
                        position: absolute;
                        text-align: right;
                        text-rendering: auto;
                        top: -2px;
                        width: 51px;

                    }
                }
            }
        }
    }
}
