/* messages.css - macOS Style Messages App */
.messages-window {
    background: rgba(30, 30, 35, 0.95) !important;
    backdrop-filter: blur(30px);
}

.messages-container {
    display: flex;
    height: 100%;
    background: rgba(20, 20, 25, 0.8);
    color: white;
}

/* Sidebar */
.messages-sidebar {
    width: 260px;
    background: rgba(25, 25, 30, 0.9);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
}

.messages-search {
    padding: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.messages-search input {
    width: 100%;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: white;
    font-size: 13px;
}

.messages-search input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.conversations-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

.conversation-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 10px;
    margin-bottom: 4px;
    cursor: pointer;
    transition: background 0.2s;
    position: relative;
}

.conversation-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.conversation-item.active {
    background: rgba(10, 132, 255, 0.2);
}

.conversation-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff6b6b, #4ecdc4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
    color: white;
    position: relative;
}

.online-indicator {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    background: #30d158;
    border-radius: 50%;
    border: 2px solid #1e1e24;
}

.conversation-info {
    flex: 1;
}

.conversation-name {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
    display: flex;
    justify-content: space-between;
}

.conversation-time {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
}

.conversation-lastmsg {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}

.unread-badge {
    background: #0a84ff;
    color: white;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 12px;
    margin-left: 8px;
}

/* Main Chat Area */
.messages-chat {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: rgba(18, 18, 22, 0.8);
}

.chat-header {
    padding: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-header-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4ecdc4, #ff6b6b);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.chat-header-info h3 {
    font-size: 16px;
    margin-bottom: 4px;
}

.chat-header-status {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.message {
    display: flex;
    gap: 8px;
    max-width: 70%;
    animation: messageAppear 0.3s ease;
}

@keyframes messageAppear {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message.incoming {
    align-self: flex-start;
}

.message.outgoing {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4ecdc4, #ff6b6b);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    flex-shrink: 0;
}

.message-bubble {
    background: rgba(40, 40, 45, 0.9);
    padding: 10px 14px;
    border-radius: 18px;
    position: relative;
    word-wrap: break-word;
}

.message.incoming .message-bubble {
    border-top-left-radius: 4px;
    background: rgba(50, 50, 55, 0.9);
}

.message.outgoing .message-bubble {
    border-top-right-radius: 4px;
    background: #0a84ff;
}

.message-text {
    font-size: 14px;
    line-height: 1.4;
}

.message-time {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 4px;
    text-align: right;
}

/* Typing indicator */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    background: rgba(40, 40, 45, 0.9);
    border-radius: 20px;
    align-self: flex-start;
    margin-top: 8px;
}

.typing-dot {
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    animation: typingBounce 1.4s infinite;
}

.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-10px); background: #0a84ff; }
}

/* Message input */
.chat-input-area {
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 12px;
    align-items: center;
}

.chat-input {
    flex: 1;
    padding: 10px 16px;
    background: rgba(30, 30, 35, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    color: white;
    font-size: 14px;
    outline: none;
}

.chat-input:focus {
    border-color: #0a84ff;
}

.chat-send-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #0a84ff;
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.chat-send-btn:hover {
    transform: scale(1.1);
}

.chat-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Demo mode banner */
.demo-banner {
    background: rgba(255, 215, 0, 0.15);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 8px;
    padding: 8px 12px;
    margin: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #ffd700;
}

.demo-banner i {
    font-size: 14px;
}

/* Empty state */
.no-conversation {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.3);
    gap: 16px;
}

.no-conversation i {
    font-size: 64px;
} 