@import 'index';

@mixin ChatMessageStyle {
    padding-top: 10px;
    padding-left: 10px;
    padding-right: 10px;
    padding-bottom: 10px;

    border-radius: 10px;

    font-size: 13px;
    
    max-width: 190px;

    font-family: Ubuntu;
}

@mixin ChatWindowStyle {
    position: fixed;
    height: 400px;

    border-radius: 10px 10px 0px 0px;
    margin-left: 50px;
    margin-top: -50px;

    &:hover {
        border-radius: 10px 10px 0px 0px;
    }

    .chatMenuBar {
        width: 300px;
        height: 40px;
        padding-top: 10px;
        border-radius: 10px 10px 0px 0px;
        background-color: rgba(22,28,29,0.8);
        transition-duration: 0.2s;

        &:hover {
            color: rgba(22,28,29,1);
            background-color: rgba(117,82,29,1);
            transition-duration: 0.2s;
        }
    }
    .chatBody {
        width: 100%;
        height: 100%;

        .lobbyMessage {
            width: 100%;
            height: 50px;
            border-top: 1px dashed;

            input {
                width: 50%;
            }
            button {
                margin-left: 5%;
                width: 40%;
            }
        }

        .listMessage {
            width: 100%;
            height: 250px;
            border-top: 1px dashed;
            overflow-y: scroll;
            overflow-x: hidden;

            .rowMessage {
                width: 100%;
                min-height: 40px;
                padding-top: 10px;
                padding-bottom: 10px;
                display: flex;

                .chatAvatar {
                    width: 40px;
                    height: 40px;
                    margin-right: 20px;
                    margin-left: 20px;
                    border-radius: 50px;
                    background-color: rgba(117,82,29,1);
                }

                .userMessage {
                    @include ChatMessageStyle;
                    color: rgba(22,28,29,1);
                    background-color: rgba(117,82,29,1);
                }

                .otherMessage {
                    @include ChatMessageStyle;
                    border: 1px solid;
                }
            }
        }

        .textMessage {
            width: 100%;
            height: 50px;
            border-top: 1px dashed;

            input {
                width: 70%;
            }
            button {
                margin-left: 5%;
                width: 20%;
            }
        }
    }
}

.chatWindowHide {
    @include BigButtonStyle;
    @include ChatWindowStyle;
}

.chatWindowOpen {
    @include BigButtonStyle;
    @include ChatWindowStyle;
    
    margin-top: -400px;
}