

/* chat.css */
.conversation-item {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.2s;
}

.conversation-item:hover {
    background: var(--bg-light);
}

.conversation-item.active {
    background: var(--blue-light);
    border-left: 4px solid var(--accent);
}

.conversation-item.unread {
    background: #eff6ff;
}

.conversation-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.conversation-preview {
    font-size: 0.85rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.conversation-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.unread-badge {
    background: var(--accent);
    color: white;
    border-radius: 10px;
    padding: 0.1rem 0.5rem;
    font-size: 0.7rem;
    font-weight: 700;
}

.chat-message {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
}

.chat-message.sent {
    align-items: flex-end;
}

.chat-message.received {
    align-items: flex-start;
}

.message-bubble {
    max-width: 70%;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    position: relative;
}

.chat-message.sent .message-bubble {
    background: var(--accent);
    color: white;
    border-bottom-right-radius: 4px;
}

.chat-message.received .message-bubble {
    background: var(--bg-light);
    color: var(--text-dark);
    border-bottom-left-radius: 4px;
}

.message-sender {
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--text-muted);
}

.message-text {
    line-height: 1.5;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.message-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.chat-message.sent .message-time {
    color: rgba(255, 255, 255, 0.8);
}

.chat-header-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.chat-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.chat-header-details {
    flex: 1;
}

.chat-header-name {
    font-weight: 600;
    font-size: 1rem;
}

.chat-header-status {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.new-conversation-btn {
    width: 100%;
    padding: 1rem;
    background: var(--accent);
    color: white;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 2px solid var(--border);
}

.new-conversation-btn:hover {
    background: var(--accent-light);
}

/* Message button in header */
.btn-messages-header {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    padding: 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-messages-header:hover {
    background: rgba(255,255,255,0.2);
}

.messages-badge-header {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--danger);
    color: white;
    border-radius: 10px;
    padding: 0.1rem 0.4rem;
    font-size: 0.7rem;
    font-weight: 700;
}