.chat-container {
    display: flex;
    height: calc(100vh - 100px);
}

/* Left Panel (Chat List) */
.chat-list {
    width: 30%;
    background: #f0f0f0;
    border-right: 1px solid #ddd;
    overflow-y: auto;
}

.chat-list h2 {
    background: #ffffff;
    padding: 15px;
    text-align: center;
    border-bottom: 1px solid #ddd;
}

.chat-search input {
    width: 90%;
    padding: 8px;
    margin: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.chat-list ul {
    list-style: none;
    padding: 0;
}

.chat-user {
    display: flex;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid #ddd;
    cursor: pointer;
}

.chat-user img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 10px;
}

.user-name {
    font-weight: bold;
}

.user-status {
    font-size: 12px;
    color: gray;
}

/* Right Panel (Chat Window) */
.chat-window {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #f0f0f0; /* Off-white background */
}

/* Chat Header - Updated */
.chat-header {
    background: #f0f0f0; /* Off-white background */
    padding: 15px;
    font-size: 18px;
    color: #ff4d6d; /* Blue text */
    font-weight: bold;
    text-align: center;
    border-bottom: 1px solid #ddd;
}


.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    background: #f0f0f0; /* Matches left panel */
}

.chat-input {
    display: flex;
    padding: 10px;
    background: white;
    border-top: 1px solid #ddd;
}

.chat-input input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 20px;
}

.chat-input button {
    background: #ff4d6d;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 20px;
    margin-left: 10px;
    cursor: pointer;
}

/* Footer Fix */
footer {
    position: relative;
    bottom: 0;
    width: 100%;
    background: #fff;
    text-align: center;
    padding: 10px;
    font-size: 14px;
    border-top: 1px solid #ddd;
}

/* Chat Container Fix - Prevent Stretching */
.chat-container {
    display: flex;
    width: 100%;
    max-width: 1300px; /* Prevents exceeding screen size */
    margin: 0 auto;
    height: 80vh;
    border-radius: 10px;
    overflow: hidden;
}

/* Chat Sidebar */
.chat-sidebar {
    width: 30%;
    min-width: 280px;
    background: #ffffff; /* Off-white */
    padding: 10px;
    border-right: 1px solid #ddd;
    overflow-y: auto;
}

/* Chat Messages Panel */
.chat-panel {
    width: 70%;
    background: #f0f0f0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}


.chat-container {
    display: flex;
    height: calc(100vh - 100px);
}

/* Left Panel (Chat List) */
.chat-list {
    width: 30%;
    background: #f0f0f0;
    border-right: 1px solid #ddd;
    overflow-y: auto;
}

.chat-list h2 {
    background: #ffffff;
    padding: 15px;
    text-align: center;
    border-bottom: 1px solid #ddd;
}

.chat-user {
    display: flex;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid #ddd;
    cursor: pointer;
    position: relative;
}

.unread-badge {
    background: red;
    color: white;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 50%;
    position: absolute;
    right: 10px;
    top: 10px;
    display: none;
}

/* Right Panel (Chat Window) */
.chat-window {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #f0f0f0; /* Off-white background */
}


.sent {
    background: #dcf8c6;
    align-self: flex-end;
}

.received {
    background: #fff;
    align-self: flex-start;
}

/* Chat Input */
.chat-input {
    display: flex;
    padding: 10px;
    background: white;
    border-top: 1px solid #ddd;
}

.chat-input input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 20px;
}

.chat-input button {
    background: #ff4d6d;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 20px;
    margin-left: 10px;
    cursor: pointer;
}


.chat-container {
    display: flex;
    height: calc(100vh - 100px);
}

/* Left Panel (Chat List) */
.chat-list {
    width: 30%;
    background: #f0f0f0;
    border-right: 1px solid #ddd;
    overflow-y: auto;
}

.chat-list h2 {
    background: #ffffff;
    padding: 15px;
    text-align: center;
    border-bottom: 1px solid #ddd;
}

.chat-user {
    display: flex;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid #ddd;
    cursor: pointer;
    position: relative;
}

.unread-badge {
    background: red;
    color: white;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 50%;
    position: absolute;
    right: 10px;
    top: 10px;
    display: none;
}

/* Right Panel (Chat Window) */
.chat-window {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #f0f0f0; /* Off-white background */
}


.sent {
    background: #dcf8c6;
    align-self: flex-end;
    text-align: right;
}

.received {
    background: #fff;
    align-self: flex-start;
    text-align: left;
}

/* Chat Input */
.chat-input {
    display: flex;
    padding: 10px;
    background: white;
    border-top: 1px solid #ddd;
}

.chat-input input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 20px;
}

.chat-input button {
    background: #ff4d6d;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 20px;
    margin-left: 10px;
    cursor: pointer;
}

.chat-container {
    display: flex;
    height: calc(100vh - 100px);
}

/* Left Panel (Chat List) */
.chat-list {
    width: 30%;
    background: #f0f0f0;
    border-right: 1px solid #ddd;
    overflow-y: auto;
}

.chat-list h2 {
    background: #ffffff;
    padding: 15px;
    text-align: center;
    border-bottom: 1px solid #ddd;
}

.chat-user {
    display: flex;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid #ddd;
    cursor: pointer;
    position: relative;
}

.unread-badge {
    background: red;
    color: white;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 50%;
    position: absolute;
    right: 10px;
    top: 10px;
    display: none;
}

/* Right Panel (Chat Window) */
.chat-window {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #f0f0f0; /* Off-white background */
}



/* Chat Input */
.chat-input {
    display: flex;
    padding: 10px;
    background: white;
    border-top: 1px solid #ddd;
}

.chat-input input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 20px;
}

.chat-input button {
    background: #ff4d6d;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 20px;
    margin-left: 10px;
    cursor: pointer;
}
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    background: #f0f0f0;
}

/* ✅ Align Sent Messages to Right */
.chat-message.sent {
    text-align: right;
    background: #ff8090;
    color: black;
    padding: 10px;
    border-radius: 10px;
    margin: 5px 0;
    max-width: 75%;
    align-self: flex-end;
    font-size: 14px;
}

/* ✅ Align Received Messages to Left */
.chat-message.received {
    text-align: left;
    background: white;
    color: black;
    padding: 10px;
    border-radius: 10px;
    margin: 5px 0;
    max-width: 75%;
    align-self: flex-start;
    font-size: 14px;
}

/* ✅ Time Stamp for Messages */
.msg-time {
    display: block;
    font-size: 9px;
    color: grey;
    text-align: right;
    margin-top: 5px;
}

/* ✅ Unread message badge */
.new-message-badge {
    font-size: 14px;
    color: red;
    font-weight: bold;
    margin-left: 10px;
}
.msg-badge {
    font-size: 14px;
    color: red;
    font-weight: bold;
    margin-left: 8px;
    visibility: hidden; /* Initially hidden */
}

/* ✅ Make Badge Visible When It Has Content */
.msg-badge:not(:empty) {
    visibility: visible;
}
#start-video-call {
    display: none !important; /* ✅ Force hiding the button */
}

.user-name-link, .chat-profile-link {
    color: #ff4d6d; /*  Website theme color */
    font-weight: bold;
    text-decoration: none;
}

.user-name-link:hover, .chat-profile-link:hover {
    text-decoration: underline;
}

