/*
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.
*/

/* add 20px to the height of the header when editing */
.mx_RoomHeader_editing {
    -webit-flex: 0 0 93px ! important;
    flex: 0 0 93px ! important;
}

.mx_RoomHeader_wrapper {
    max-width: 960px;
    margin: auto;
    height: 83px;
    border-bottom: 1px solid #eeeeee;

    -webkit-align-items: center;
    align-items: center;
    
    display: -webkit-box;
    display: -moz-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
}

.mx_RoomHeader_editing .mx_RoomHeader_wrapper {
    border-bottom: 1px solid transparent;
}

.mx_RoomHeader_leftRow {
    margin-left: -2px;

    -webkit-box-ordinal-group: 1;
    -moz-box-ordinal-group: 1;
    -ms-flex-order: 1;
    -webkit-order: 1;
    order: 1;

    -webkit-flex: 1;
    flex: 1;
}

.mx_RoomHeader_textButton {
    height: 36px;
    background-color: #76cfa6;
    border-radius: 36px;
    margin-right: 8px;
    color: #fff;
    line-height: 34px;
    margin-top: -2px;
    text-align: center;

    -webkit-box-ordinal-group: 2;
    -moz-box-ordinal-group: 2;
    -ms-flex-order: 2;
    -webkit-order: 2;
    order: 2;

    cursor: pointer;

/*  
    -webkit-flex: 0 0 90px;
    flex: 0 0 90px;
*/
    padding-left: 12px;
    padding-right: 12px;
}

.mx_RoomHeader_cancelButton {
    -webkit-box-ordinal-group: 2;
    -moz-box-ordinal-group: 2;
    -ms-flex-order: 2;
    -webkit-order: 2;
    order: 2;

    cursor: pointer;

    padding-left: 12px;
    padding-right: 12px;
}

.mx_RoomHeader_rightRow {
    margin-top: 4px;
    background-color: #fff;

    -webkit-box-ordinal-group: 3;
    -moz-box-ordinal-group: 3;
    -ms-flex-order: 3;
    -webkit-order: 3;
    order: 3;
}

.mx_RoomHeader_info {
    display: table-cell;
    width: 100%;
    vertical-align: middle;
}

.mx_RoomHeader_simpleHeader {
    line-height: 83px;
    color: #454545;
    font-size: 22px;
    font-weight: bold;
    overflow: hidden;
    margin-left: 63px;
    text-overflow: ellipsis;
    width: 100%;
}

.mx_RoomHeader_simpleHeaderCancel {
    float: right;
    margin-top: 8px;
    padding: 24px;
    cursor: pointer;
}

.mx_RoomHeader_name {
    vertical-align: middle;
    width: 100%;
    height: 31px;
    overflow: hidden;
    color: #454545;
    font-weight: bold;
    font-size: 22px;
    padding-left: 19px;
    padding-right: 16px;
    /* why isn't text-overflow working? */
    text-overflow: ellipsis;
    border-bottom: 1px solid transparent;
}

.mx_RoomHeader_nametext {
    display: inline-block;
}

.mx_RoomHeader_settingsHint {
    color: #a2a2a2 ! important;
}

.mx_RoomHeader_searchStatus {
    display: inline-block;
    font-weight: normal;
    opacity: 0.6;
}

.mx_RoomHeader_settingsButton {
    display: inline-block;
    visibility: hidden;
    position: relative;
    bottom: 10px;
    left: 4px;
}

.mx_RoomHeader_settingsButton object {
    pointer-events: none;
}

.mx_RoomHeader_name,
.mx_RoomHeader_avatar,
.mx_RoomHeader_avatarPicker,
.mx_RoomHeader_avatarPicker_edit {
    cursor: pointer;
}

.mx_RoomHeader_name:hover div:not(.mx_RoomHeader_editable) {
    color: #76cfa6;
}

.mx_RoomHeader_name:hover .mx_RoomHeader_settingsButton {
    visibility: visible;
}

.mx_RoomHeader_leaveButton {
    visibility: hidden;
    margin-top: -1px;
}

.mx_RoomHeader_wrapper:hover .mx_RoomHeader_leaveButton {
    visibility: visible;
}

.mx_RoomHeader_placeholder {
    color: #a2a2a2 ! important;
}

.mx_RoomHeader_editable {
    border-bottom: 1px solid #c7c7c7 ! important;
    min-width: 150px;
    cursor: text;
}

.mx_RoomHeader_editable:focus {
    border-bottom: 1px solid #76CFA6 ! important;
    outline: none;
    box-shadow: none;
}

.mx_RoomHeader_topic {
    vertical-align: bottom;
    float: left;
    max-height: 42px;
    color: #454545;
    font-weight: 300;  
    margin-left: 19px;
    margin-right: 16px;
    overflow: hidden;
    text-overflow: ellipsis;
    border-bottom: 1px solid transparent;    
}

.mx_RoomHeader_avatar {
    display: table-cell;
    width: 48px;
    height: 50px;
    vertical-align: middle;
}

.mx_RoomHeader_avatarPicker_edit {
    position: absolute;
    margin-left: 16px;
    margin-top: 4px;
}

.mx_RoomHeader_avatarPicker_edit > label {
    cursor: pointer;
}

.mx_RoomHeader_avatarPicker_edit > input {
    display: none;
}

.mx_RoomHeader_button {
    display: table-cell;
    vertical-align: top;
    padding-left: 8px;
    padding-right: 8px;
    cursor: pointer;
}

.mx_RoomHeader_button object {
    pointer-events: none;
}

.mx_RoomHeader_voipButton {
    display: table-cell;
}

.mx_RoomHeader_voipButtons {
    margin-top: 18px;
}
