/* path-private-message is for the new message page, path-private-messages for the current full thread */
.path-private-messages,
.path-private-message {

    .view-all-users {
        .field--name-user-picture {
            height: 50px;
            width: 50px;

            img {
                height: 100%;
                object-fit: cover;
                border-radius: 50%;
            }
        }
    }

    .ui-widget.ui-widget-content {
        background-color: blue;
        border: unset;

        .ui-dialog-titlebar {
            background-color: blue;
            color: white;
            border: unset;

            .ui-dialog-titlebar-close {
                background-color: red;
            }
        }

        form {
            color: white;

            .form-actions {
                margin-top: 20px;

                button {
                    color: #3800ff;
                }
            }
        }

        .ui-dialog-buttonpane {
            background-color: blue;
            border: unset;
        }
    }

    /* all users results */ 
    ul.ui-autocomplete {
        max-height: unset !important;
        padding: 12px;
        padding-top: 0px;
    }

    .user-feed-menu {
        display: none;
    }

    .main-menu-social, 
    .main-menu-links {
        display: none;
    }

    .navbar1-component {
        height: unset;
        min-height: unset;
    }

    h5 {
        color: white;
    }

    .left-member-box {
        .field--name-user-picture {
            width: 50px;

            img {
                object-fit: cover;
                /* height: 100%; */
                border-radius: 50%;
                height: 50px;
                width: 50px;
            }
        }
    }

    .avatar-group {
        .field--name-user-picture {
            width: 40px;
            height: 40px;

            img {
                object-fit: cover;
                height: 100%;
                border-radius: 50%;
            }
        }
    }

    #views-exposed-form-all-users-block-1 {
        .form-type-textfield,
        .form-type-entity-autocomplete {
            width: 100%;

            input {
                font-size: 13px;
            }
        }

        li {
            color: white;
        }
    }

    section.section {
        background-color: black;
    }

    /* The sending form would be in the bottom of the page, to avoid the sudden scroll to the top, since the top will be, withtou the footer, always unser our hands, no need to scroll it because it is always visible and achievable */
    .section-footer {
        display: none;
    }

    /* prevent the success sending alerts */
    .messages__wrapper,
    .alert-wrapper {
        display: none;
    }

    .block-private-message-inbox-block {
    
        .active-thread {
            border: unset;

            .inbox-thread-box {
                background-color: #7b062c;
            }
            
        }
        
        .inbox-thread-box {
            font-size: 12px;
            text-decoration: none;
            background-color: black;
            margin-top: 12px;
        }
    }

    .block-private-message-inbox-block .private-message-thread .private-message-inbox-thread-link {
        z-index: 1;
    }

    .private_message_thread_delete_link_wrapper,
    .private_message_thread_clear_history_link_wrapper,
    .private-message-recipients {

        float: left;

        a {
            color: #a6a6ff;
        }

    }

    .private-message-thread-inbox {

        .field--name-user-picture {
            width: 50px;
            height: 50px;
            
            img {
                object-fit: cover;
                width: 100%;
                height: 100%;
                border-radius: 50%;
            }
        }

        .message-core {

            img {
                width: 50px;
                height: 50px;
                object-fit: cover;
            }
        }

    }

    .private-message-add-form {
        position: relative;
        border: 1px solid gray;
        border-radius: 65px;
        padding: 12px;
        padding-bottom: 0px;

        [data-drupal-selector="edit-message-0-format"] {
            display: none;
        }

        .js-form-item-message-0-format,
        .form-type-textarea label {
            display: none;
        }

        .ck.ck-editor__main {
            width: 90%;
        }

        .ck.ck-editor__main > .ck-editor__editable {
            background-color: #111;
            color: white;
            border: none;
            border-radius: 83px;
            padding-left: 25px;
        }

        .form-actions {
            float: left;
            position: absolute;
            top: 15px;
            right: 15px;

            button {
                border-radius: 50%;
                width: 50px;
                height: 50px;
                background-color: blue;
                font-size: 7px;
            }
        }

        .ck-editor__top {
            float: left;
            margin-right: 20px;
            .ck-sticky-panel__content {
                border: none !important;

                .ck-toolbar_grouping {
                    background-color: transparent;

                    .ck-toolbar__items {
                        button {
                            display: none;
                        }

                        span {
                            display: none;
                        }

                        button.ck-file-dialog-button {
                            display: block;
                            border-radius: 50%;
                            background-color: green;
                            padding: 12px;
                        }
                    }

                }

            }
        }
    }


    #block-mycustom-theme-privatemessageinbox {
        width: 30%;
        float: left;
        height: auto;
        overflow-y: auto;
        /*height: 400px !important;*/
    }

    #block-mycustom-theme-views-block-all-users-block-1 {
        background-color: #1b1a3e;
        border: none;

        #edit-submit-all-users {
            background-color: blue;
        }
    }

    #block-mycustom-theme-page-title {
        display: none;
    }

    #content {
        padding-left: 0px;
        padding-right: 0px;
    }

    #block-mycustom-theme-content {
        width: 70%;
        float: left;

        .you-blocked,
        .blocked-you  {
            form {
                display: none;
            }
        }
    }
    .block-private-message-inbox-block .unread-thread {
        border-color: red;
    }
    #private-message-page .private-message-thread-full .field--name-private-messages {
        .field__label {
            display: none;
        }

        .private-message {
            border: none;

            .message-content img {
                width: 100px;
                height: 100px;
                object-fit: cover;
            }
        }
        #load-previous-messages-button-wrapper {
            border: none;

            a {
                color: white;
                font-size: 15px;
                text-decoration: none;
                font-weight: bold;
                background-color: #004cff;
                width: 200px;
                margin-left: auto;
                margin-right: auto;
                padding: 12px;
                border-radius: 12px;
            }
        }
        .field__items {
            height: 380px;           
            overflow: auto;
        }
    }

    .message .field--name-user-picture {
        margin: unset;
        height: 44px;
        width: 44px;

        img {
            object-fit: cover;
            border-radius: 50%;
            width: 100%;
            height: 100%;
        }
    }

    .message-inner.message-sent {
        max-width: 45%;
        color: rgb(167, 166, 168);
        margin-right: 15px;
        flex: 1;

        .message-content {
            display: flex;
            -webkit-box-orient: horizontal;
            -webkit-box-direction: reverse;
            -ms-flex-direction: row-reverse;
            flex-direction: row-reverse;
            -webkit-box-align: center;
            -ms-flex-align: center;
            align-items: center;

            .message-text {
                background: #2787f5;
                border-radius: .6rem;
                border-bottom-right-radius: 0.6rem;
                border-bottom-left-radius: 0.6rem;
                color: #fff;
                overflow: hidden;
                padding: 1rem 1.25rem;
            }
        }
    }

    .message-inner.message-received {
        max-width: 45%;
        margin-left: 15px;

        .message-body {
            background-color: rgb(26, 29, 33);
            padding: 12px;
            border-radius: 10px;

            .message-content {
                display: flex;
            }
        }
    }

    .ui-widget.ui-widget-content form.private-message-add-form {
        .field--name-members,
        .field--name-subject  {
            display: none;
        }

        .form-actions {
            margin-top: 0px;
        }
    }
    
}

/* to make the background of the message modal covering the laterals menus having a fixed position also */
.ui-widget-overlay {
    z-index: 1020;
}
/* Modal to contact a user */
#drupal-modal {
    form.private-message-add-form {
        background-color: #4c55cc;
        padding: 20px;
        color: white;
        float: left;
        height: 100%;
        width: 100%;

        .field--name-members {
            display: none;
        }
        /*
        this rule causes the modal not closing
        .field--name-subject {
            display: none;
        }*/
        
        .private_message_message_widget_default_wrapper {
            color: black;

            label {
                display: none;
            }
            .ck-editor__top {
                display: none;
            }
            .js-filter-wrapper {
                display: none;
            }
        }

        .form-submit {
            background: #3e046f;
            color: white;
            border: none;
            padding: 12px;
            width: 100px;
        }
    }
}

body.path-user {
    #drupal-modal {
        form.private-message-add-form {
            .js-form-wrapper {
                width: 100%;
                height: 100%;
                /* background-color: red; */
                padding: 7px;
                margin: 0px !important;
                background-color: #2f2e2e;
                /* float: left; */

                .js-form-submit {
                    background-color: #c4216d;
                }
            }
        }
    }
}