/*
Copyright 2015, 2016 OpenMarket Ltd

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

.mx_MatrixChat_splash {
    position: relative;
    height: 100%;
}

.mx_MatrixChat_splashButtons {
    text-align: center;
    width: 100%;
    position: absolute;
    bottom: 30px;
}

.mx_MatrixChat_wrapper {
    display: flex;

    flex-direction: column;

    width: 100%;
    height: 100%;
}

.mx_MatrixToolbar {
    order: 1;

    height: 40px;
}

.mx_GuestWarningBar {
    order: 1;

    height: 40px;
}

.mx_MatrixChat_toolbarShowing {
    height: auto;
}

.mx_MatrixChat {
    width: 100%;
    height: 100%;

    display: flex;

    order: 2;

    flex: 1;
}

.mx_MatrixChat .mx_LeftPanel {
    order: 1;

    background-color: $secondary-accent-color;

    flex: 0 0 235px;
}

.mx_MatrixChat .mx_LeftPanel.collapsed {
    flex: 0 0 60px;
}

.mx_MatrixChat .mx_MatrixChat_middlePanel {
    order: 2;

    padding-left: 20px;
    padding-right: 22px;
    background-color: $primary-bg-color;

    flex: 1;

    /* Experimental fix for https://github.com/vector-im/vector-web/issues/947
       and https://github.com/vector-im/vector-web/issues/946.
       Empirically this stops the MessagePanel's width exploding outwards when
       gemini is in 'prevented' mode
       */
    overflow-x: auto;

    /* XXX: Hack: apparently if you try to nest a flex-box
     * within a non-flex-box within a flex-box, the height
     * of the innermost element gets miscalculated if the
     * parents are both auto.  Height has to be auto here
     * for RoomView to correctly fit when the Toolbar is shown.
     * Ideally we'd launch straight into the RoomView at this
     * point, but instead we fudge it and make the middlePanel
     * flex itself.
     */
    display: flex;
}

.mx_MatrixChat .mx_RightPanel {
    order: 3;

    flex: 0 0 235px;
}

.mx_MatrixChat .mx_RightPanel.collapsed {
    flex: 0 0 122px;
}
