/* WhatsApp-style Message Status Indicators */

/* Minimal green background for sent messages */
.message.sent .message-bubble {
    background: #dcf8c6 !important; /* Light green like WhatsApp */
    color: #000 !important;
    position: relative;
    padding-right: 50px; /* Space for status indicator */
}

/* Message status positioning */
.message-status {
    position: absolute;
    bottom: 4px;
    right: 8px;
    font-size: 16px;
    line-height: 1;
    font-weight: bold;
}

/* Single tick - message sent to server */
.message-status.sent::after {
    content: '✓';
    color: #999; /* Gray single tick */
}

/* Double tick - message delivered to receiver */
.message-status.delivered::after {
    content: '✓✓';
    color: #999; /* Gray double tick */
}

/* Blue double tick - message read */
.message-status.read::after {
    content: '✓✓';
    color: #4fc3f7; /* Blue double tick */
}

/* Online indicator for chat items */
.online-indicator {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    background: #00C853;
    border: 2px solid white;
    border-radius: 50%;
}

/* Verified badge */
.verified-badge {
    color: #1DA1F2;
    font-size: 14px;
    margin-left: 4px;
}

/* Unread message badge */
.unread-badge {
    background: #00C853;
    color: white;
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 12px;
    font-weight: bold;
    min-width: 20px;
    text-align: center;
}

/* Chat item styling */
.chat-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

.chat-item:hover {
    background-color: #f8f9fa;
}

.chat-item.active {
    background-color: #e3f2fd;
}

.chat-item-avatar {
    position: relative;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #00C853;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 12px;
    flex-shrink: 0;
}

.chat-item-content {
    flex: 1;
    min-width: 0;
}

.chat-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.chat-item-name {
    font-weight: 600;
    font-size: 16px;
    margin: 0;
    color: #1f2937;
    display: flex;
    align-items: center;
}

.chat-item-time {
    font-size: 12px;
    color: #6b7280;
    flex-shrink: 0;
}

.chat-item-preview {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.last-message {
    color: #6b7280;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    margin-right: 8px;
}

/* Override any existing bright green backgrounds */
html body .message.sent,
html body .message.sent .message-bubble,
html body div.message.sent,
html body .chat-messages .message.sent {
    background: #dcf8c6 !important;
    background-color: #dcf8c6 !important;
    color: #000 !important;
}

/* Ensure received messages stay white/gray */
.message.received .message-bubble {
    background: #ffffff !important;
    color: #000 !important;
    border: 1px solid #e5e7eb;
}

/* Message time styling */
.message-time {
    font-size: 11px;
    color: #6b7280;
    margin-top: 4px;
    text-align: right;
}

/* Sent message time should be darker on light green background */
.message.sent .message-time {
    color: #4b5563;
}

/* Default chat header styling */
.chat-header-info .chat-avatar {
    background: #6B7280;
    color: white;
}

/* Welcome message styling */
.welcome-message {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
}

.welcome-message h3 {
    color: #374151;
    margin-bottom: 12px;
    font-size: 24px;
}

.welcome-message p {
    margin-bottom: 8px;
    line-height: 1.5;
}

/* Chat status when no conversation selected */
.chat-status {
    color: #9CA3AF;
    font-size: 14px;
}