html {
    overflow: hidden;
}

body {
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: row;
}

aside {
    padding: 1em;
    width: 100vw;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    max-height: 100vh;
}

aside p {
    margin-bottom: 0px;
}

header {
    padding: 1em 5%;
}

main {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1;
    overflow-y: scroll;
}

#rooms {
    display: flex;
    flex-direction: column;
    gap: 3px;
    overflow-y: auto;
    overflow-x: hidden;
    height: calc(100vh - 10.5em);
}

.desktop-only {
    display: none !important;
}

@media screen and (min-width: 960px) {
    .mobile-only {
        display: none !important;
    }

    .desktop-only {
        display: flex !important;
    }

    aside {
        width: 300px;
    }
}

#rooms > button {
    --bs-btn-border-color: var(--bs-border-color);
    text-align: start;
}

aside .input-group {
    margin-bottom: 3px;
}

#messages {
    padding: 0px 5%;
    padding-top: 1em;
}

#input {
    height: 4.5em;
    width: 100%;
    padding: 1em 5%;
    gap: 0.5em;
}

#input > .dropdown-menu {
    display: inline-block;
    position: absolute;
    bottom: 4em;
    max-height: 300px;
    max-width: min(800px, 100vw - 2em);
    overflow-y: scroll;
    overflow-x: hidden;
}

.message {
    display: flex;
    gap: 0.5em;
    max-width: 75%;
    user-select: none;
    margin-bottom: 1em;
}

.message.incoming {
    flex-direction: row;
    margin-right: auto;
    text-align: start;
}

.message.outgoing {
    flex-direction: row-reverse;
    margin-left: auto;
    text-align: end;
}

.message > .side > span {
    display: block;
}

.message .avatar {
    width: 32px;
    height: 32px;
    border-radius: 16px;
}

.message p {
    padding: 0.25em 0.75em;
    border-radius: var(--bs-border-radius);
    text-align: start;
    display: inline-block;
    margin-bottom: 0px;
}

.message.incoming p {
    background-color: var(--bs-secondary-bg);
    border: 1px solid var(--bs-border-color);
}

.message.outgoing p {
    color: white;
    background-color: var(--bs-primary);
}