/* Chat Widget Container */
.chat-widget-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    background-color: #f9f9f9;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
}

/* Header */
.chat-header {
    background-color: #2563eb; /* Royal Blue */
    color: white;
    padding: 15px 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-header h5 {
    margin: 0;
    font-size: 1rem;
}

/* Chat Body (Messages Area) */
.chat-body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background-color: #f4f6f8;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Message Bubbles */
.message-wrapper {
    display: flex;
    align-items: flex-end;
    margin-bottom: 10px;
}

.message-wrapper.received {
    justify-content: flex-start;
}

.message-wrapper.sent {
    justify-content: flex-end;
}

.avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background-color: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    overflow: hidden;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.message-bubble {
    max-width: 70%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 0.95rem;
    line-height: 1.4;
    position: relative;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.message-wrapper.received .message-bubble {
    background-color: white;
    color: #1e293b;
    border-bottom-left-radius: 4px;
}

.message-wrapper.sent .message-bubble {
    background-color: #2563eb;
    color: white;
    border-bottom-right-radius: 4px;
}

/* Footer (Input Area) */
.chat-footer {
    background-color: white;
    padding: 15px;
    border-top: 1px solid #e2e8f0;
}

.chat-input-group {
    display: flex;
    align-items: center;
    background-color: white;
    border: 1px solid #cbd5e1;
    border-radius: 25px;
    padding: 5px 15px;
    transition: border-color 0.2s;
}

.chat-input-group:focus-within {
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

.chat-input {
    flex: 1;
    border: none;
    outline: none;
    padding: 10px;
    font-size: 0.95rem;
    background: transparent;
}

.send-btn {
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 8px;
    transition: color 0.2s;
}

.send-btn:hover {
    color: #2563eb;
}

.send-btn:disabled {
    color: #cbd5e1;
    cursor: not-allowed;
}

/* Custom Scrollbar */
.chat-body::-webkit-scrollbar {
    width: 6px;
}

.chat-body::-webkit-scrollbar-track {
    background: transparent;
}

.chat-body::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 3px;
}

/* Offcanvas Customization to look like a widget */
#chatCanvas.offcanvas {
    width: 680px;
    max-width: 95vw;
    border-left: none;
    border-radius: 12px 0 0 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.chat-split {
    height: calc(100vh - 150px);
}

.conversation-list {
    width: 280px;
    min-width: 240px;
    background-color: #fff;
}

.conversation-item {
    padding: 12px 16px;
}

.conversation-item.active {
    background-color: #eaf2ff;
}

.list-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    background-color: #e2e8f0;
}

.list-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.chat-area {
    background-color: #f7f9fb;
}

