/* MENU */

.messenger-sidebar {
    color: var(--white-color);
    width: 100px;
    display: flex;
    flex-flow: column;
    align-items: center;
    padding-top: 20px;
}

.messenger-sidebar .logo img {
    width: 40px;
    margin: 0px auto;
}

.messenger-sidebar ul {
    list-style: none;
    padding: 0px;
    margin: 0px;
    margin-top: 50px;
}

.messenger-sidebar ul li {
    display: flex;
    flex-flow: column;
    align-items: center;
}


/* Inbox Search */

.chat-section .users-section {
    padding: 25px 20px;
    width: 400px;
    height: 100vh;
}

.chat-section .search-box {
    background: var(--chat-fifth-color);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 12px;
    border-radius: 10px;
}

.chat-section .search-box input {
    background: transparent;
    border: none;
    outline: none;
    width: 100%;
    height: 100%;
    font-size: 15px;
}


/* Inbox Names */

.chat-section .users-section .users {
    list-style: none;
    -ms-overflow-style: none;
    scrollbar-width: none;
    margin: 12px 0px;
    padding: 0px;
}

.users-section .users::-webkit-scrollbar {
    display: none;
}

.users-section .users .user {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 8px;
    border-radius: 12px;
    gap: 6px;
    margin: 8px 0px;
    cursor: pointer;
}

.users-section .users .user:hover,
.users-section .users .user:active {
    background-color: var(--chat-sixth-color);
}

.users-section .users .user.active {
    background-color: var(--chat-sixth-color);
}

.users-section .users .user .first-part {
    gap: 10px;
}

.users-section .users .user .user-image {
    width: 50px;
    height: 50px;
    border-radius: 12px;
}

.users-section .users .user .user_name {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.users-section .users .user .last-message {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-gray-color);
}

.users-section .users .user .message-info {
    display: flex;
    flex-flow: column;
}

.users-section .users .user .message-info .last-message-time {
    color: var(--text-gray-color);
}

.users-section .users .user .message-info .unread-message {
    background-color: var(--chat-third-color);
    color: var(--white-color);
    border-radius: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 26px;
    height: 26px;
}

.in-two {
    display: flex;
    justify-content: space-between;
}

.in-two h4 {
    font-size: 0.7rem;
}

.ellip {
    width: 150px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.in-title p {
    font-size: 0.7rem;
    margin-top: 5px;
}

.pe-inbox:hover {
    background: var(--secondaryColor);
    border-radius: 12px;
}


/* Chatbox */

.chat-section {
    background-color: var(--chat-fourth-color);
    display: flex;
    width: 100%;
    border-radius: 30px;
}

.chat-box-body {
    display: flex;
    flex-flow: column;
    justify-content: space-between;
    width: 100%;
    height: 100vh;
    border-radius: 20px;
    overflow: hidden;
}

.chat-box-body.none-active {
    display: none;
}

.chat-box-body .top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-box-body .top-bar .inner-icons button {
    padding: 8px 10px;
    border-radius: 6px;
    border: none;
    outline: none;
    margin: 0px 8px;
    background: transparent;
}

.inner-title h3 {
    font-size: 1.2rem;
}

.inner-title p {
    font-size: 0.9rem;
    margin-top: 5px;
}

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

.chat-box::-webkit-scrollbar {
    width: 8px;
}

.chat-box::-webkit-scrollbar-track {
    background-color: #f8f8ff;
    border-radius: 100px;
}

.chat-box::-webkit-scrollbar-thumb {
    background-color: #4f5d71;
    border-radius: 100px;
}

.chat-incoming img {
    width: 45px;
    height: 45px;
    border-radius: 10px;
}

.chat-box .chat-outgoing {
    display: flex;
}

.chat-image {
    width: 300px;
    height: 280px;
    border-radius: 10px;
}

.chat-outgoing .chat-de {
    max-width: 60%;
    margin-left: auto;
    padding: 5px;
}

.chat-outgoing .chat-de .text-message,
.chat-outgoing .chat-de .file-message {
    background: var(--chat-secondary-color);
    color: var(--white-color);
    padding: 8px 16px;
    border-radius: 15px 15px 0 15px;
    word-wrap: break-word;
}

.chat-box .chat-incoming {
    display: flex;
    align-items: flex-end;
}

.chat-incoming .chat-de {
    margin-left: 10px;
    margin-right: auto;
    max-width: 60%;
    padding: 5px;
}

.chat-incoming .chat-de .ai-response {
    background: var(--chat-sixth-color);
    color: var(--white);
    border-radius: 15px 15px 15px 0;
    padding: 8px 16px;
    word-wrap: break-word;
}

.chat-incoming .chat-de .ai-response ol,
.chat-incoming .chat-de .ai-response ul {
    list-style: auto;
    padding: 12px;
}

.chat-incoming .chat-de .ai-response h2 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.chat-incoming .chat-de .ai-response pre {
    background: black;
    color: white;
    padding: 8px 12px;
    margin: 8px 0px;
    border-radius: 8px;
    white-space: pre-wrap;
    max-width: 100%;
    overflow: auto;
}

.chat-incoming .chat-de .text-message,
.chat-incoming .chat-de .file-message {
    background: var(--chat-sixth-color);
    color: var(--white);
    border-radius: 15px 15px 15px 0;
    padding: 8px 16px;
    word-wrap: break-word;
}

.chat-box .default-chat {
    margin: 15px 0;
}


/* :is(.chat-details, .chat-box)::-webkit-scrollbar {
    width: 0;
} */


/* Massage send */


/* Seleted File */

#selected_files {
    margin-bottom: 10px;
}

#selected_files .selectd-file {
    padding: 8px 12px;
    background: #eeeef8;
    border-radius: 10px;
}

#selected_files .selected-image {
    gap: 10px;
}

#selected_files .selectd-file .clear-file-btn {
    height: 40px;
    width: 40px;
    border: none;
    outline: none;
    background: transparent;
    cursor: pointer;
}

.send-inner {
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--chat-sixth-color);
    border-radius: 14px;
}

.send-inner .file-button {
    position: relative;
}

.send-inner .file-button .select_file {
    position: absolute;
    top: 0px;
    left: 0px;
    width: 40px;
    height: 40px;
    opacity: 0;
}

.send-inner button {
    padding: 8px 10px;
    border: none;
    outline: none;
    background-color: transparent;
    cursor: pointer;
}

.send-inner button svg {
    display: block;
    width: 30px;
    height: 30px;
}

.send-inner .message {
    width: 100%;
    max-height: 250px;
    border: none;
    outline: none;
    background: transparent;
    font-size: 16px;
    resize: none;
}

.send-inner .message::-webkit-scrollbar {
    width: 8px;
}

.send-inner .message::-webkit-scrollbar-track {
    background-color: #f8f8ff;
    border-radius: 100px;
}

.send-inner .message::-webkit-scrollbar-thumb {
    background-color: #4f5d71;
    border-radius: 100px;
}


/* Chat Details Section */

.chat-details {
    width: 400px;
    height: 100%;
    background: var(--white-color);
    border-radius: 30px;
    overflow-y: auto;
    overflow-x: hidden;
    transition: width .3s cubic-bezier(0.4, 0, 0.2, 1);
}

.chat-details.collapsed {
    width: 0px;
    transition: width .3s cubic-bezier(0.4, 0, 0.2, 1);
}


/* .chat-details.active {} */

.chat-details .chat-details-header {
    display: flex;
    justify-content: space-between;
    margin: 16px;
}

.chat-details .chat-details-header h3 {
    font-size: 18px;
    font-weight: 600;
}

.chat-details .chat-details-header button {
    background: none;
    border: none;
    outline: none;
    cursor: pointer;
}

.empty-chat-body {
    max-width: 600px;
    margin: auto auto;
    text-align: center;
}

.empty-chat-body img {
    width: 300px;
    max-width: 80%;
}

.empty-chat-body p {
    font-size: 15px;
    color: var(--text-gray-color);
}

@media screen and (max-width:1024px) {
    .chat-details {
        position: fixed;
        top: 0px;
        right: 0px;
        border-radius: 12px 0px 0px 12px;
        box-shadow: rgba(100, 100, 111, 0.2) 0px 7px 29px 0px;
        transform: translateX(100%);
        transition: all 0.3s ease-in;
    }
    .chat-details.active,
    .chat-details.collapsed {
        width: 400px;
        transform: translateX(0%);
        transition: all 0.3s ease-in;
    }
}

@media screen and (max-width:768px) {
    .chat-section .users-section {
        padding: 12px 20px;
    }
    .messenger-sidebar ul {
        display: none;
    }
    .chat-section .users-section.mobile-size {
        position: fixed;
        top: 0;
        left: 0;
        width: 400px;
        background: white;
        z-index: 1;
        border-radius: 0px 12px 12px 0px;
        box-shadow: rgba(100, 100, 111, 0.2) 0px 7px 29px 0px;
        transform: translateX(-100%);
        transition: all 0.3s ease-in;
    }
    .chat-section .users-section.mobile-size.active {
        transform: translateX(0%);
        transition: all 0.3s ease-in;
    }
    .chat-box-body {
        height: 98vh;
    }
}

@media screen and (max-width:640px) {
    .chat-box-body {
        height: 95vh;
    }
    .chat-section .users-section.mobile-size {
        border-radius: 0px;
        width: 100%;
    }
    .chat-section .users-section {
        border-radius: 0px;
        width: 100%;
    }
    .inner-title h3 {
        font-size: 18px;
    }
    .inner-title p {
        font-size: 14px;
        margin-top: 0px;
    }
    .chat-box-body .top-bar .inner-icons button {
        margin: 0px 0px;
    }
    /* Chat box */
    .chat-outgoing .chat-de {
        max-width: 80%;
    }
    .chat-incoming .chat-de {
        max-width: 80%;
    }
}