


.chat-container {
    display: flex;
    border: 1px solid #ddd;
    border-radius: 12px;
    height: 100vh;
    background: white;
}

/* Sidebar */
.conversations-sidebar {
    width: 350px;
    border-right: 1px solid #e5e7eb;
    display: flex;
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
    flex-direction: column;
    background: white;
}

.sidebar-header {
    padding: 16px;
    border-bottom: 1px solid #e5e7eb;
}

.header-title {
    font-size: 20px;
    font-weight: 600;
    color: #111827;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.search-container {
    position: relative;
}

.search-input {
    width: 100%;
    padding: 10px 15px 10px 40px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    font-size: 14px;
    background-color: #f9fafb;
}

.search-input:focus {
    outline: none;
    border-color: var(--theme-color);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
}

.conversations-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

.conversation-item {
    display: flex;
    align-items: center;
    padding: 12px;
    border-radius: 10px;
    cursor: pointer;
    margin-bottom: 4px;
    border: 2px solid transparent;
    transition: all 0.2s;
}

.conversation-item:hover {
    background-color: #f9fafb;
}

.conversation-item.active {
    background-color: #f5f5f5;
    border-color: var(--theme-color);
}

.conversation-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 12px;
}

.conversation-info {
    flex: 1;
    min-width: 0;
}

.conversation-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
}

.conversation-name {
    font-weight: 600;
    font-size: 14px;
    color: #111827;
}

.conversation-time {
    font-size: 11px;
    color: #6b7280;
}

.conversation-preview {
    font-size: 13px;
    color: #6b7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.conversation-meta {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pin-btn {
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    opacity: 0;
    transition: all 0.2s;
}

.conversation-item:hover .pin-btn {
    opacity: 1;
}

.pin-btn:hover {
    color: #f59e0b;
    background-color: rgba(245, 158, 11, 0.1);
}

.pin-btn.pinned {
    opacity: 1;
    color: #f59e0b;
}

.unread-badge {
    background-color: var(--theme-color);
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

/* Chat Area */
.chat-area {
 height: 100vh;
    display: flex;
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;

    flex-direction: column;
    background: white;
    position: relative;
    flex: 1;
}

.chat-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    padding: 20px;
}

.chat-empty-icon {
    font-size: 64px;
    color: #d1d5db;
    margin-bottom: 20px;
}

.chat-empty-title 
{
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #111827;
}

.chat-empty-text {
    font-size: 14px;
    color: #6b7280;
    max-width: 300px;
    line-height: 1.5;
}

.chat-header {
    padding: 12px 16px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: white;
}

.chat-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-header-info h5 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.chat-header-info p {
    margin: 0;
    font-size: 12px;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 5px;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.status-online {
    background-color: #10b981;
}

.status-offline {
    background-color: #6b7280;
}

.chat-header-actions {
    display: flex;
    gap: 8px;
}

.header-action-btn {
    background: none;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s;
}

.header-action-btn:hover {
    background-color: #f9fafb;
    color: var(--theme-color);
}
.chat-messages-container {
flex: 1;               /* take remaining space */
overflow-y: auto;      /* scroll when content overflows */
padding: 20px;
min-height:80vh;
display: flex;
flex-direction: column;
gap: 12px;
scroll-behavior: smooth;
}

.message {
    display: flex;
    max-width: 70%;
}

.message.received {
    align-self: flex-start;
}

.message.sent {
    align-self: flex-end;
}

.message-content {
    padding: 10px 14px;
    border-radius: 18px;
    word-wrap: break-word;
    position: relative;
}

.message.received .message-content {
    background-color: white;
    color: #111827;
    border-top-left-radius: 4px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.message.sent .message-content {
    background-color: var(--theme-color);
    color: white;
    border-top-right-radius: 4px;
}

.message-time {
    font-size: 11px;
    margin-top: 4px;
    opacity: 0.7;
    text-align: right;
}

.message-actions {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.2s;
    background: white;
    border-radius: 20px;
    padding: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.message:hover .message-actions {
    opacity: 1;
}

.message.received .message-actions {
    right: -60px;
}

.message.sent .message-actions {
    left: -60px;
}

.message-action-btn {
    background: none;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #6b7280;
    transition: all 0.2s;
}

.message-action-btn:hover {
    background-color: #f9fafb;
    color: #111827;
}

.message-action-btn.delete:hover {
    background-color: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.chat-input-area {
    padding: 16px;
    border-top: 1px solid #e5e7eb;
    background: white;
}

.chat-input-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 24px;
    font-size: 14px;
    resize: none;
    max-height: 100px;
}

.chat-input:focus {
    outline: none;
    border-color: var(--theme-color);
}

.chat-input-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
}

.input-btn {
    background: none;
    border: none;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s;
}

.input-btn:hover {
    background-color: #f9fafb;
    color: var(--theme-color);
}

.send-btn {
    background-color: var(--theme-color);
    color: white;
}

.send-btn:hover {
    background-color: #0056b3;
}

.mobile-back-btn {
    display: none;
    background: none;
    border: none;
    color: #6b7280;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
}

/* Responsive */
@media (max-width: 992px) {
    .conversations-sidebar {
        position: fixed;
        width: 100%;
        height: 100%;
        z-index: 1000;
        left: -100%;
        transition: left 0.3s;
    }

    .conversations-sidebar.active {
        left: 0;
    }

    .mobile-back-btn {
        display: block;
    }

    .message {
        max-width: 85%;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}
