.messages-message {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px;
}
.messages-message-snippet {
    cursor: pointer;
    font-size: .9em;
    line-height: 1.5em;
    color: #888;
    gap: 5px;
    opacity: .8;
    transition: opacity .1s;
}
.messages-message-snippet:hover,
.messages-message-snippet:focus,
.messages-message-snippet:focus-within {
    opacity: 1;
}
.messages-message-draft {
    border-top: 2px solid var(--accent-colour) !important;
    border-left: 2px solid var(--accent-colour) !important;
    border-right: 2px solid var(--accent-colour);
    border-bottom: 2px solid var(--accent-colour);
}
.messages-message-deleted {
    border-top: 2px solid red;
    border-left: 2px solid red;
    border-right: 2px solid red !important;
    border-bottom: 2px solid red !important;
}

.messages-message-overflow {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
}

.messages-message-header {
    display: flex;
    gap: 10px;
    border-bottom: 1px #444 solid;
    padding-bottom: 10px;
    align-items: center;
}

.messages-message-sender-avatar {
    flex-shrink: 0;
    flex-grow: 0;
    width: 40px;
    height: 40px;
}
.messages-message-sender-avatar img {
    object-fit: cover;
}

.messages-message-details {
    display: flex;
    flex-direction: column;
    flex-shrink: 1;
    flex-grow: 1;
    overflow: hidden;
    gap: 2px;
}
.messages-message-details-spacing {
    flex-grow: 1;
    flex-shrink: 1;
}

.messages-message-header-columns {
    display: flex;
    gap: 2px;
}
.messages-message-sender-name {
    flex-grow: 0;
    flex-shrink: 1;
    overflow: hidden;
    white-space: nowrap;
}
.messages-message-sender-name a {
    color: inherit;
    text-decoration: none;
    font-weight: 700;
    border-bottom: 2px solid var(--user-colour, currentColor);
}
.messages-message-datetime {
    flex-shrink: 0;
    flex-grow: 0;
    align-self: flex-end;
    padding-bottom: 2px;
}

.messages-message-addressee {
    display: flex;
    gap: 4px;
}
.messages-message-addressee-to {
    flex-shrink: 0;
    flex-grow: 0;
}
.messages-message-addressee-user {
    flex-shrink: 1;
    flex-grow: 0;
    overflow: hidden;
    white-space: nowrap;
}
.messages-message-addressee-user a {
    color: inherit;
    text-decoration: none;
    font-weight: 700;
    border-bottom: 2px solid var(--user-colour, currentColor);
}

.messages-message-subject {
    line-height: 2em;
}

.messages-message-body {
    line-height: 1.4em;
}
.messages-message-body p:first-child {
    margin-top: 0 !important;
}
.messages-message-body p:last-child {
    margin-bottom: 0 !important;
}

.messages-message-snippet-body {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4em;
}
