html, body, #body {
    height: 100%;
    overflow: hidden;
}


.chat-main {
    /* Base colors */
    --color-background: #ffffff;
    --color-text: #4a4a4a;

    /* Message colors */
    --message-background: #f5f5f5;
    --message-hover-background: #e8e8e8;

}

[data-theme="dark"] .chat-main {
    --color-background: #2c2c2c;
    --color-text: #ffffff;

    --message-background: #363636;
    --message-hover-background: #404040;

}

.chat-container {
    height: 100%;
    overflow-y: auto;
}

.chat-main {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.columns.is-gapless.chat-container {
    flex-wrap: nowrap;
}

.author {
    font-weight: bold;
}
#messages {
    flex-grow: 1;
    overflow-y: auto;
    padding: 1rem;
}

#left_panel a {
    background-color: inherit;
}

.chat-input {
    border-top: 1px solid #dbdbdb;
    padding: 1rem;
}

.chat-input button, .chat-input input, .chat-input select {
    height: auto;
    min-height: 3rem;
}

#message_input_area, #message_input_area_rich {
    height: 100%;
    min-height: 3rem;
}

div.ql-editor {
    margin: 0 2px;
    min-height: 3rem;
    border: 1px lightgray solid;
    padding: 11px;
}

.media.chat-message {
    max-width: 95%;
    border: none;
    margin: 0;
}

.message-core {
    margin-bottom: 1rem;
    padding: 0.75rem;
    border-radius: 0.5rem;
    overflow-wrap: anywhere;
    background-color: #f5f5f5;
    transition: background-color 0.2s, border-left 0.2s;
    list-style-position: inside;
}
.message-core:hover, .message-core.has-popup-focus {
    background-color: #e8e8e8;
    border-left: 4px solid #3273dc;
}

.message-actions {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.message-core:hover .message-actions,
.message-core.has-popup-focus .message-actions
{
    opacity: 1;
}

.attachments {
    overflow-x: auto;
    white-space: nowrap;
}

.message-core:hover, .message-core.has-popup-focus {
    background-color: #f5f5f5;
    box-shadow: 0 8px 16px 0 rgba(0,0,0,0.2);
}

.message-body {
    white-space: pre-wrap;
    overflow-wrap: break-word;
}

.message-attachment {
    max-width: 20rem;
}
.status-icons {
    display: inline;
}

.action-button {
    box-sizing: border-box;
    margin: 0 0.2rem;
    user-select: none;
    cursor: pointer;
    z-index: 10;
}

.action-button:hover {
    box-shadow: 0 0 0 10px rgba(0,0,0,0.1);
    border-radius: 50%;
    transition: box-shadow 0.3s ease;
}

/* Attachments */

.attachments {
    opacity: 1;
    max-height: 1000px;
    transition: opacity 0.5s ease-in-out, max-height 0.5s ease-in-out, padding 0.5s ease-in-out, margin 0.5s ease-in-out;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 1.25rem 0;
    margin: 0;
}

.attachments.is-contracted {
    opacity: 0;
    max-height: 0;
    padding: 0;
}

.attachment-preview {
    position: relative;
    border: 1px solid #dbdbdb;
    padding: 0.3rem 0.5rem;
    border-radius: 4px;
    background-color: #f5f5f5;
    width: 9rem;
    height: 6rem;
}


/* Reply to indicator */
#reply-to {
    background-color: var(--message-background);
    border-left: 4px solid #3273dc;
    padding: 0.5rem;
    margin-bottom: 1rem;
    border-radius: 0.25rem;
}

/* Sub Messages Panel */

div.panel-block {
    overflow-y: auto;
}

#sub-messages {
    overflow-y: auto;
}
