#chat-host ul {
    margin: 0;
    padding: 0;
}

#chat-host ul li {
    list-style-type: none;
}

#chat-host input, #chat-host textarea, #chat-host button {
    font-family: inherit;
    font-size: inherit;
    border: none;
}

#chat-host input, #chat-host textarea {
    background-color: #ffffff;
}

#chat-host button {
    cursor: pointer;
}



#chat-host {
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;

    padding: 1em;
}

#chat-host .login {
    align-self: center;
    display: flex;
    flex-direction: column;
}

#chat-host .login .loginError {
    margin-bottom: 2em;

    font-weight: bold;
    color: #ad2424;
}

#chat-host .login #chat-login-form {
    display: flex;
    flex-direction: column;
}

#chat-host .login #chat-login-form .inputWrapper {
    display: flex;
    margin: 0.5em;
}

#chat-host .login #chat-login-form .inputWrapper label {
    flex-grow: 1;
    
    width: 10em;
    margin-right: 1em;
}

#chat-host .login #chat-login-form button {
    margin-top: 2em;
}

#chat-host .main {
    flex-grow: 1;
    display: flex;
    overflow: hidden;
}

#chat-host s, #chat-host .userlistWrapper {
    padding: 0.3em;
    flex-grow: 1;
}

#chat-host .messages {
    flex-basis: 80%;
    overflow-x: auto;
    overflow-y: scroll;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

#chat-host .messages .systemMsg {
    color: #666666;
    font-size: 85%;
    font-style: italic;
}

#chat-host .messages .userMsg {
    display: inline-flex;
    align-items: baseline;
    flex-wrap: wrap;
    
    min-width: 25%;
    max-width: 85%;

    padding: 0.5em;
    margin: 1em 0.5em;
}

#chat-host .messages .userMsg.self {
    align-self: flex-end;
    justify-content: flex-end;
    text-align: right;
}

#chat-host .messages .userMsg .avatar {
    cursor: pointer;
}

#chat-host .messages .userMsg .user {
    order: -1;
    margin-right: 0.3em;
    font-weight: bold;
    cursor: pointer;
}

#chat-host .messages .userMsg .time {
    margin-right: 0.3em;
    font-size: 85%;
    font-style: italic;
}

#chat-host .messages .userMsg .message {
    white-space: pre-wrap;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

#chat-host .messages .userMsg .message img {
    max-width: 10em;
    max-height: 10em;
}

#chat-host .messages .userMsg .message img.favicon {
    max-width: 1.2em;
    max-height: 1.2em;
    position: relative;
    top: 0.25em;
    margin-right: 0.3em;
    line-height: 2em;
}

#chat-host .userlistWrapper {
    text-align: right;
    flex-basis: 20%;
    min-width: 8em;
}

#chat-host .userlistWrapper span {
    font-weight: bold;
    cursor: pointer;
}

#chat-host .userlistWrapper button {
    width: 2em;
    height: 2em;
    padding: 0.3em;
    margin-left: 0.5em;
    border-radius: 50%;
}

#chat-host .messageForm {
    display: flex;
    margin-top: 1em;
}

#chat-host .messageForm textarea {
    flex-grow: 1;
    margin-right: 1em;
    resize: none;
}