/* Angela Chat Component CSS */

.angela-chat-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 120px);
    max-height: 700px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    overflow: hidden;
}

.chat-header {
    background: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%);
    color: white;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.angela-status {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.angela-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    object-fit: cover;
}

.status-info h3 {
    font-size: 1.125rem;
    margin-bottom: 2px;
    font-weight: 600;
}

.status-indicator {
    font-size: 0.875rem;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 6px;
}

.status-indicator::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #27ae60;
    animation: pulse 2s infinite;
}

.status-indicator.offline::before {
    background-color: #e74c3c;
    animation: none;
}

/* Chat Messages */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    background: #F8F9FA;
    scroll-behavior: smooth;
}

.message {
    margin-bottom: 1.5rem;
    animation: slideInMessage 0.3s ease;
}

.message-content {
    max-width: 85%;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    font-size: 1rem;
    line-height: 1.5;
    word-wrap: break-word;
}

.angela-message .message-content {
    background: white;
    color: #2C3E50;
    border-bottom-left-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.user-message {
    display: flex;
    justify-content: flex-end;
}

.user-message .message-content {
    background: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%);
    color: white;
    border-bottom-right-radius: 6px;
}

.message-time {
    font-size: 0.75rem;
    color: #BDC3C7;
    margin-top: 4px;
    text-align: right;
}

.angela-message .message-time {
    text-align: left;
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    color: #7F8C8D;
    font-style: italic;
}

.typing-dots {
    display: flex;
    gap: 4px;
}

.typing-dots span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #BDC3C7;
    animation: typingDots 1.4s infinite ease-in-out;
}

.typing-dots span:nth-child(1) { animation-delay: -0.32s; }
.typing-dots span:nth-child(2) { animation-delay: -0.16s; }

/* Chat Suggestions */
.chat-suggestions {
    padding: 1.5rem;
    background: white;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.chat-suggestions::-webkit-scrollbar {
    display: none;
}

.suggestion-chip {
    background: #F8F9FA;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 50px;
    padding: 0.5rem 1.5rem;
    font-size: 0.875rem;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.15s ease;
    color: #2C3E50;
}

.suggestion-chip:hover {
    background: #FF6B35;
    color: white;
    border-color: #FF6B35;
    transform: translateY(-1px);
}

/* Chat Input */
.chat-input-container {
    background: white;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.chat-input-box {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    gap: 1rem;
}

#chat-input {
    flex: 1;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 50px;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.15s ease;
    background: #F8F9FA;
}

#chat-input:focus {
    border-color: #FF6B35;
    background: white;
}

#chat-input::placeholder {
    color: #BDC3C7;
}

.voice-btn, .send-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    color: white;
}

.voice-btn {
    background: linear-gradient(135deg, #4ECDC4 0%, #44A08D 100%);
}

.voice-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.voice-btn.recording {
    background: #e74c3c;
    animation: pulseRecord 1s infinite;
}

.send-btn {
    background: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%);
}

.send-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.send-btn:disabled {
    background: #BDC3C7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Location Messages */
.location-message {
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    overflow: hidden;
    margin-top: 1rem;
    max-width: 250px;
}

.location-preview {
    height: 150px;
    background: #F8F9FA;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #7F8C8D;
    position: relative;
}

.location-info {
    padding: 1rem;
    background: white;
}

.location-info h4 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
    color: #2C3E50;
}

.location-info p {
    color: #7F8C8D;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.location-actions {
    display: flex;
    gap: 0.5rem;
}

.location-btn {
    background: #FF6B35;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.location-btn:hover {
    background: #E55A2B;
}

/* Error States */
.error-message {
    background: #fee;
    border: 1px solid #fcc;
    color: #e74c3c;
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.retry-btn {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 4px 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    margin-left: auto;
}

/* Responsive Design */
@media (max-width: 768px) {
    .angela-chat-container {
        height: calc(100vh - 100px);
        border-radius: 0;
        margin: 0 -1rem;
    }
    
    .chat-header {
        padding: 1rem;
    }
    
    .angela-avatar {
        width: 40px;
        height: 40px;
    }
    
    .status-info h3 {
        font-size: 1rem;
    }
    
    .chat-messages {
        padding: 1rem;
    }
    
    .message-content {
        max-width: 90%;
        padding: 0.875rem 1.25rem;
    }
    
    .chat-suggestions {
        padding: 1rem;
    }
    
    .chat-input-box {
        padding: 1rem;
    }
    
    .voice-btn, .send-btn {
        width: 44px;
        height: 44px;
    }
    
    #chat-input {
        padding: 0.875rem 1.25rem;
    }
}

@media (max-width: 480px) {
    .suggestion-chip {
        padding: 6px 1rem;
        font-size: 0.75rem;
    }
    
    .voice-btn, .send-btn {
        width: 40px;
        height: 40px;
    }
    
    #chat-input {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
}

/* Animations */
@keyframes slideInMessage {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes typingDots {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes pulseRecord {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .angela-chat-container {
        background: #2c3e50;
    }
    
    .chat-messages {
        background: #34495e;
    }
    
    .angela-message .message-content {
        background: #3498db;
        color: white;
        border-color: transparent;
    }
    
    #chat-input {
        background: #34495e;
        border-color: #4a5f7a;
        color: white;
    }
    
    #chat-input::placeholder {
        color: #7f8c8d;
    }
    
    .suggestion-chip {
        background: #34495e;
        border-color: #4a5f7a;
        color: white;
    }
    
    .location-info {
        background: #34495e;
    }
    
    .location-info h4 {
        color: white;
    }
}
