﻿* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body, html {
    height: 100%;
    font-family: Arial, sans-serif;
}

.chat-container {
    display: flex;
    height: 100vh;
}

/* LEFT PANEL - USER LIST */
.user-list {
    width: 20%;
    background-color: #f5f5f5;
    border-right: 1px solid #ccc;
    overflow-y: auto;
    padding: 10px;
}

.user {
    padding: 10px;
    border-bottom: 1px solid #ddd;
    cursor: pointer;
}

    .user:hover {
        background-color: #e0e0e0;
    }

/* CENTER PANEL - CHAT AREA */
.chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: #fff;
}

/* CHAT FILTER SECTION */
.chat-filters {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px 15px;
    border-bottom: 1px solid #ddd;
    background-color: #f7f7f7;
}

    .chat-filters label {
        display: flex;
        flex-direction: column;
        font-size: 12px;
    }

    .chat-filters input,
    .chat-filters select {
        padding: 6px 10px;
        border: 1px solid #ccc;
        border-radius: 4px;
        font-size: 14px;
        margin-top: 4px;
    }

.filter-btn {
    padding: 8px 16px;
    background-color: #28a745;
    border: none;
    color: white;
    border-radius: 4px;
    cursor: pointer;
}

    .filter-btn:hover {
        background-color: #218838;
    }


.logout-btn {
    padding: 8px 16px;
    background-color: #e33c3c;
    border: none;
    color: white;
    border-radius: 4px;
    cursor: pointer;
}

    .logout-btn:hover {
        background-color: #c12828;
    }

/* MESSAGE LIST */
.messages {
    flex: 1;
    padding: 15px;
    overflow-y: scroll;
    background-color: #f0f0f0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.message {
    max-width: 95%;
    padding: 10px 15px;
    border-radius: 18px;
    line-height: 1.4;
    font-size: 14px;
    position: relative;
    word-wrap: break-word;
}

.sent {
    align-self: flex-end;
    background-color: #dcf8c6;
    border-bottom-right-radius: 0;
}

.received {
    align-self: flex-start;
    background-color: #ffffff;
    border: 1px solid #ddd;
    border-bottom-left-radius: 0;
}

.chatNotification {
    color: #444;
    padding: 18px 20px;
    line-height: 26px;
    font-size: 16px;
    border-radius: 7px;
    display: flex; /* Use flexbox */
    justify-content: center; /* Align horizontally */
    align-items: center; /* Align vertically */
    text-align: center; /* Center text horizontally within the flex container */
    background-color: rgb(210, 210, 210); /* Set the background color (light gray in this case) */
}

.timestamp {
    font-size: 10px;
    color: #888;
    margin-bottom: 5px;
    display: block;
    text-align: left;
}



/* MESSAGE INPUT SECTION */
.message-input {
    display: flex;
    padding: 10px;
    border-top: 1px solid #ccc;
    background-color: #f9f9f9;
    align-items: center;
    gap: 10px;
}

    .message-input input[type="text"] {
        flex: 1;
        padding: 10px;
        border: 1px solid #ccc;
        border-radius: 20px;
    }

    .message-input input[type="file"] {
        flex-shrink: 0;
    }

    .message-input button {
        padding: 10px 20px;
        background-color: #007bff;
        color: white;
        border: none;
        border-radius: 20px;
        cursor: pointer;
    }

        .message-input button:hover {
            background-color: #0056b3;
        }

/* RIGHT PANEL - QUICK RESPONSES */
.quick-responses {
    width: 20%;
    background-color: #f5f5f5;
    border-left: 1px solid #ccc;
    overflow-y: auto;
    padding: 10px;
}

.quick-response {
    padding: 10px;
    background-color: #e9e9e9;
    border-radius: 4px;
    margin-bottom: 8px;
    cursor: pointer;
}

    .quick-response:hover {
        background-color: #dcdcdc;
    }

.btnChatMessageUnread {
    background: #84d084;
}

.btnChatMessageRead {
    background: #57a7fd;
}

.btnChatMessageClosed {
    background: gray;
}

.scroll-container {
    height: 55vh; /* Set the height */
    overflow-y: scroll; /* Enable vertical scrolling */
    border: 0px solid #ccc; /* Optional: for visibility */
}

.scroll-containerFriendList {
    height: 60vh; /* Set the height */
    overflow-y: scroll; /* Enable vertical scrolling */
    border: 0px solid #ccc; /* Optional: for visibility */
}


.chat-area {
    position: relative; /* Important */
    display: flex;
    flex-direction: column;
    flex: 1;
}

#scrollToBottomBtn {
    position: absolute;
    bottom: 80px; /* Above input box */
    right: 20px;
    z-index: 10;
    display: none;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 50%;
    padding: 10px 14px;
    font-size: 16px;
    cursor: pointer;
}

    #scrollToBottomBtn:hover {
        background-color: #0056b3;
    }
