/* Message-related styles */

.message-user-info-container, .message-user-info {
    display: flex;
    flex-direction: column;
}

#message-body-container {
    scroll-margin-top: 10rem;
}

#messages-body-container {
    clear: both;
}

.message-video {
    max-width: 300px;
    max-height: 400px
}

.message-info-dates {
    font-size: smaller;
}

.message-user-info-messages {
	font-size: 75%;
}

.message-content {
    width: 100%;
    overflow-wrap: break-word;
    /*border-top: 1px solid black;*/
}

.message-article {
    align-items: stretch;
    padding: 5px;
}

.attachment-limited-size {
    max-height: 175px !important;
    max-width: 175px !important;
}


.kk-vid:not(:hover) a {
    filter: opacity(0.2);
}

article.message-article {
    /*
    border-top: 1px solid black;
    border-left: 1px solid black;
    border-right: 1px solid black;
    */
    margin-bottom: 0;
    width: 100%;
    flex: 1;
    display: flex;
    align-self: baseline;
    align-items: stretch;

    --m-ava-w: 3rem;
    --m-ava-h: 2.8rem;


    & .message-meta {
        /* font-size: 13px; */
        font-size: 90%;
        border-right: 1px solid rgb(0,0,0, 0.2);
        min-width: 7vw;


        & .message-user-info-container, & .message-user-info {
            display: flex;
            flex-direction: column;
        }

        & .message-info-dates {
            font-size: 80%;
        }

        & img.message-meta-pic {
            width: var(--m-ava-w);
            height: var(--m-ava-h);
            max-height: var(--m-ava-h);
            max-width: var(--m-ava-w);
            /*
            max-width: 40px;
            max-height: 40px;
            */
            object-fit: scale-down;
        }
    }

    & .message-container {
        flex: 1;
        padding: 0;
        overflow-x: hidden;
        width: 100%;

        & .message-header {
            /* font-size: 14px; */
            display: block;
            color: black;

            & > * {
                color: black;
                /* line-height: 14px; */
                margin-right: 1px;
                margin-left: 2px;
                /*padding: 0.2rem;*/
                padding-left: 0;
            }

            & .spacer {
                margin-right: auto;
            }

            & .report-message, & .remove-message {
                float: right;
                margin-right: 5px;
            }
        }

        & .message-content {
            width: 100%;
            overflow-wrap: break-word;
            /*border-top: 1px solid black;*/

            & .message-text {
                /* font-size: 14px; */
                max-height: 750px;
                overflow-y: auto;
                word-break: break-word;

				& img {
					height: auto;
					width: auto;
				}

                &.was-previewed {
                    text-decoration: line-through !important;
                }
            }

            & .message-video {
                max-width: 300px;
                max-height: 400px;
            }
        }

        &.message-under-edition {
            filter: brightness(85%);

            & p {
                margin-top: 15px;
                border: 1px solid black;
                padding: 2px;
                word-break: break-all;
                white-space: pre-wrap;
            }
        }
    }


    &.on-preview {
        -webkit-box-shadow: 0 0 5px black;
        -moz-box-shadow: 0 0 5px black;
        box-shadow: 0 0 5px black;

        filter: brightness(105%);
    }
}


.message-user-info-name {
    line-height: 1;
}

#preview .message-text {
	min-width: 25vw;
    max-width: max(30vw, min(80vw, 600px));
}

#message-input {
    margin-top: 2px;
}

a#show-replies {
    text-decoration: underline;
}

.reply-read {
    text-decoration: overline;
}

.reply-unread {
    font-weight: bold;
}

.dismiss-reply {
    cursor: pointer;
}

.message-hidden {
    display: none !important;
}

#message-submit {
    text-decoration: underline;
}

#message-submit, #status-update-input {
    border-bottom: 2px solid black;
    -webkit-box-shadow: 0 0 5px black;
    -moz-box-shadow: 0 0 5px black;
    box-shadow: 0 0 5px black;

    background-color: whitesmoke;
}

div.message-reply * p.message-text {
    max-height: 20vh !important;
}

div#message-replies {
    max-height: 65vh;
    display: flex;
    flex-direction: column;
    overflow-y: scroll;
    padding: 15px;
}

div#message-replies * .message-text {
    max-width: 50vw !important;
}

.reply-checked {
    filter: opacity(60%);
}

div.reply-header > a {
    margin-left: 15px;
}


.privmsg-info {
    color: darkorange;
}

.attachment {
    cursor: pointer;
}

.attachment-link {
    white-space: nowrap;
    max-width: 25ch;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
    vertical-align: middle;
}


#thread-post-date {
    font-size: 85%;
}