.chat {
    margin: 1rem 0;
    border: 1px solid #DDDDDD;
    border-radius: 1px;
}

.chat .chat-header {
    background-color: #096AC9;
    padding: 0.5rem 1rem;
    color: white;
}

.chat .chat-header .grid {
    margin: 0;
}

.chat .chat-header .column > button.primary,
button#send.primary,
.chat .chat-header .column > .button.primary,
.chat .chat-footer .message-form > .button.primary {
    background-color: white;
    color: #096AC9 !important;
    border: 1px solid transparent;
}

.chat .chat-header .column > button.subtle,
button#send.subtle,
.chat .chat-header .column > .button.subtle,
.chat .chat-footer .message-form > .button.subtle {
    border-color: #d1e8ff;
    color: white !important;
}

.chat .chat-header .column > button:hover,
button#send:hover,
.chat .chat-header .column > .button:hover,
.chat .chat-footer .message-form > .button:hover {
    background-color: #d1e8ff !important;
    color: #096AC9 !important;
}

.chat .chat-header .column > button:disabled,
button#send:disabled,
.chat .chat-header .column > .button:disabled,
.chat .chat-footer .message-form > .button:disabled,
.chat .chat-header .column > button:disabled:hover,
button#send:disabled:hover,
.chat .chat-header .column > .button:disabled:hover,
.chat .chat-footer .message-form > .button:disabled:hover {
    background-color: #DDDDDD !important;
    color: #888 !important;
    cursor: default;
}

.chat .chat-header span {
    margin-left: 0.8rem;
    font-size: 0.9rem;
}

.chat .chat-header #refresh-date {
    margin: 0;
}

.chat .chat-messages {
    height: 400px;
    min-height: 200px;
    overflow-y: auto;
    resize: vertical;
}

.chat .chat-message {
    border-bottom: 1px solid #DDDDDD;
    background-color: white;
    padding: 0.3rem;
    font-size: 0.9rem;
}

.chat .chat-message:last-of-type {
    border-bottom: none;
}

.chat .chat-message:nth-child(even) {
    background-color: #F8F8F8;
}

.chat .chat-message .chat-sidebar {
    float: left;
    width: 3rem;
    margin-right: 0.3rem;
}

.chat .chat-message .chat-sidebar .avatar {
    max-width: 2rem;
}

.chat .chat-message .chat-sidebar .avatar.large {
    transform: scale(1.75) rotate(5deg);
}

.chat .chat-message .chat-topbar {
    margin-bottom: 0.3rem;
    font-size: 0.8rem;
    color: #888888;
}

.chat .chat-message .chat-topbar .username {
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9rem;
}

.chat .chat-message .chat-topbar .delete {
    float: right;
}

.chat .chat-message .chat-message-content {
    padding-left: 3.3rem;
}

.chat .chat-message .chat-message-content img {
    max-width: 100%;
    max-height: 250px;
}

.chat .chat-message .chat-message-content iframe {
    width: 240px;
    height: 160px;
}

.chat .chat-message .chat-message-content ul.bbcode-list li,
.chat-bar .chat-message .chat-message-content ul.bbcode-list li {
    font-size: 0.9rem;
}

.chat .chat-footer {
    background-color: #096AC9;
    padding: 1rem;
}

.chat .chat-footer .message-form {
    margin: 0;
}

button#send {
    display: inline-block;
    margin-top: 1rem;
    vertical-align: top;
    height: 2.2rem;
    padding: 0.4rem 1rem;
}

.chat .chat-footer textarea {
    display: inline-block;
    width: 50rem;
    max-width: 80rem;
    height: 2.2rem;
    font-size: 0.9rem;
}

#message-content-wrapper {
    display: inline-block;
}

.chat-archive {
    margin-bottom: 0;
}

.chat-archive .chat-messages {
    height: auto;
    min-height: unset;
    max-height: none;
    resize: none;
}

.chat-bar {
    position: static;
    background-color: #DFF0FF;
}

.chat-bar .chat-message-container {
    display: flex;
}

.chat-bar::after {
    display: block;
    content: '';
    box-shadow: 0 -0.5rem 0.5rem 0.5rem black;
    position: relative;
    z-index: -1;
}

.chat-bar .chat-message {
    display: inline-block;
    min-width: 14rem;
    margin: auto;
    padding: 0.3rem;
    font-size: 0.9rem;
}

.chat-bar .chat-message .chat-sidebar {
    float: left;
    width: 3rem;
    margin-right: 0.3rem;
}

.chat-bar .chat-message .chat-sidebar .avatar {
    max-width: 2rem;
}

.chat-bar .chat-message .chat-topbar {
    font-size: 0.8rem;
    color: #888888;
    white-space: nowrap;
}

.chat-bar .chat-message .chat-topbar .username {
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9rem;
}

.chat-bar .chat-message .chat-message-content {
    padding-left: 3.3rem;
}

.chat-bar .chat-message .chat-message-content img {
    max-height: 50px;
}

.chat-bar .chat-message .chat-message-content iframe {
    display: none;
}

.chat-message.tiny {
    height: 1.7rem;
    overflow-y: hidden;
    line-height: 1rem;
}

.chat-message.tiny .avatar {
    height: 1rem;
    margin-top: 0;
}

.chat-message.tiny .chat-topbar {
    float: left;
}

.chat-message.tiny .username {
    font-size: 0.8rem !important;
}

.chat-message.tiny .chat-message-content {
    float: left;
    padding-left: 0.5rem;
    font-size: 0.8rem;
}

