/*
Copyright 2017 Vector Creations 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_MyGroups {
    display: flex;
    flex-direction: column;
}

.mx_MyGroups .mx_RoomHeader_simpleHeader {
    margin-left: 0px;
}

.mx_MyGroups_header {
    /* Keep mid-point of create button aligned with icon in page header */
    margin-left: 2px;
    display: flex;
    flex-wrap: wrap;
}

.mx_MyGroups > :not(.mx_RoomHeader) {
    max-width: 960px;
    margin: 40px;
}

.mx_MyGroups_headerCard {
    flex: 1 0 50%;
    margin-bottom: 30px;
    min-width: 400px;
    display: flex;
    align-items: center;
}

.mx_MyGroups_headerCard .mx_MyGroups_headerCard_button {
    flex: 0 0 auto;
    margin-right: 13px;
    height: 40px;
    width: 40px;
    border-radius: 20px;
    background-color: $roomheader-addroom-bg-color;
    position: relative;

    &::before {
        background-color: $roomheader-addroom-fg-color;
        mask: url('$(res)/img/icons-create-room.svg');
        mask-repeat: no-repeat;
        mask-position: center;
        mask-size: 80%;
        content: '';
        position: absolute;
        top: 0;
        bottom: 0;
        left: 0;
        right: 0;
    }
}

.mx_MyGroups_headerCard_header {
    font-weight: bold;
    margin-bottom: 10px;
}

.mx_MyGroups_headerCard_content {
    padding-right: 15px;
}

/* Until the button is wired up */
.mx_MyGroups_joinBox {
    visibility: hidden;

    /* When joinBox wraps onto its own row, it should take up zero height so
       that there isn't an awkward gap between MyGroups_createBox and
       MyGroups_content.
    */
    height: 0px;
    margin: 0px;
}

.mx_MyGroups_content {
    margin-left: 2px;

    flex: 1 0 0;

    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.mx_MyGroups_scrollable {
    overflow-y: inherit;
}

.mx_MyGroups_placeholder {
    background-color: $info-plinth-bg-color;
    color: $info-plinth-fg-color;
    line-height: $font-400px;
    border-radius: 10px;
    text-align: center;
}

.mx_MyGroups_joinedGroups {
    border-top: 1px solid $primary-hairline-color;
    overflow-x: hidden;

    display: flex;
    flex-flow: row wrap;
    align-content: flex-start;
}

.mx_MyGroups_joinedGroups .mx_GroupTile {
    min-width: 300px;
    max-width: 33%;
    flex: 1 0 300px;
    height: 75px;
    margin: 10px 0px;
    display: flex;
    align-items: flex-start;
    cursor: pointer;
}

.mx_GroupTile_avatar {
    cursor: grab, -webkit-grab;
}

.mx_GroupTile_profile {
    margin-left: 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.mx_GroupTile_profile .mx_GroupTile_name,
.mx_GroupTile_profile .mx_GroupTile_groupId,
.mx_GroupTile_profile .mx_GroupTile_desc {
    padding-right: 10px;
}

.mx_GroupTile_profile .mx_GroupTile_name {
    margin: 0px;
    font-size: $font-15px;
}

.mx_GroupTile_profile .mx_GroupTile_groupId {
    font-size: $font-13px;
    opacity: 0.7;
}

.mx_GroupTile_profile .mx_GroupTile_desc {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-size: $font-13px;
    max-height: 36px;
    overflow: hidden;
}