@import "bootstrap/scss/functions";
@import "bootstrap/scss/variables";
@import "shared/styles/_variables.scss";
@import "plugins/chatview/styles/chatbox.scss";
@import "./muc-forms.scss";

.conversejs {
    converse-muc.chatroom {
        width: var(--chatroom-width);
        @media screen and (max-height: $mobile-landscape-height){
            width: var(--mobile-chat-width);
        }
        @media screen and (max-width: $mobile-portrait-length) {
            width: var(--mobile-chat-width);
        }

        converse-icon {
            svg {
                fill: var(--muc-color);
            }
        }

        converse-split-resize {
            background-color: var(--muc-color);
        }

        .chat-status--avatar {
            background: var(--background-color);
            border: 2px solid var(--background-color);
            font-size: 0.6rem;
            margin-bottom: -2em;
            margin-inline-start: -0.3em;
            margin-top: 0;
            padding: 0.1em;
            position: relative;

            svg {
                display: flex;
            }
        }

        .badge-groupchat {
            background-color: var(--muc-color);
        }

        .box-flyout {
            background-color: var(--background-color);
            overflow-y: hidden;
            width: var(--chatroom-width);

            @media screen and (max-height: $mobile-landscape-height) {
                height: var(--mobile-chat-height);
                width: var(--mobile-chat-width);
                height: var(--fullpage-chat-height);
            }
            @media screen and (max-width: $mobile-portrait-length) {
                height: var(--mobile-chat-height);
                width: var(--mobile-chat-width);
                height: var(--fullpage-chat-height);
            }

            .empty-history-feedback {
                position: relative;
                span {
                    width: 100%;
                    text-align: center;
                    position: absolute;
                    margin-top: 50%;
                }
            }

            .chatroom-body {
                flex-direction: row;
                flex-flow: nowrap;
                background-color: var(--background-color);
                border-top: 0;
                height: 100%;
                width: 100%;
                overflow: hidden;

                converse-muc-chatarea {
                    width: 100%;
                    display: flex;
                    flex-direction: row;
                    flex-flow: nowrap;
                }

                .row {
                    flex-direction: row;
                }
                .chat-topic {
                    font-weight: bold;
                    color: var(--background-color);
                }
                .chat-info {
                    color: var(--info-color);
                    line-height: normal;
                    margin-bottom: 0.3em;
                    &.badge {
                        color: var(--muc-color);
                    }
                    &.chat-msg--retracted {
                        color: var(--secondary-color);
                    }
                }
                .chat-area {
                    display: flex;
                    flex-direction: column;
                    flex: 1 1 100%;
                    justify-content: flex-end;
                    word-wrap: break-word;
                    .new-msgs-indicator {
                        background-color: var(--muc-color);
                    }
                    .chat-content {
                        height: 100%;
                    }
                    .chat-content__help {
                        converse-chat-help {
                            border-top: 1px solid var(--muc-color);
                        }
                        .close-chat-help {
                            svg {
                                fill: var(--muc-color);
                            }
                        }
                    }
                }

            }
        }

        .room-invite {
            .invited-contact {
                margin: -1px 0 0 -1px;
                width: 100%;
                border: 1px solid #999;
            }
        }
    }
}
