/* AI Chat Panel Styles */
.ai-chat-panel {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 400px;
    max-height: 600px;
    background: var(--rz-base-background-color, #ffffff);
    border: 1px solid var(--rz-base-300, #e0e0e0);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    z-index: 1000;
    transition: all 0.3s ease-in-out;
    transform: translateY(calc(100% - 60px));
    overflow: hidden;
}

.ai-chat-panel.open {
    transform: translateY(0);
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: linear-gradient(135deg, var(--rz-primary, #1976d2), var(--rz-secondary, #dc004e));
    color: white;
    cursor: pointer;
    min-height: 60px;
    box-sizing: border-box;
}

.header-content {
    display: flex;
    align-items: center;
    flex: 1;
}

.header-title {
    font-weight: 600;
    font-size: 16px;
    display: block;
}

.header-subtitle {
    font-size: 12px;
    opacity: 0.9;
    margin-left: 8px;
}

.header-actions {
    display: flex;
    align-items: center;
}

.chat-content {
    display: flex;
    flex-direction: column;
    height: 540px;
    max-height: 540px;
}

.messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    scrollbar-width: thin;
    scrollbar-color: var(--rz-base-300, #e0e0e0) transparent;
}

.messages-container::-webkit-scrollbar {
    width: 6px;
}

.messages-container::-webkit-scrollbar-track {
    background: transparent;
}

.messages-container::-webkit-scrollbar-thumb {
    background: var(--rz-base-300, #e0e0e0);
    border-radius: 3px;
}

.welcome-message {
    text-align: center;
    padding: 40px 20px;
    color: var(--rz-text-color, #333);
}

.welcome-message h4 {
    margin: 0 0 8px 0;
    color: var(--rz-primary, #1976d2);
}

.welcome-message p {
    margin: 0 0 24px 0;
    color: var(--rz-text-secondary-color, #666);
    font-size: 14px;
}

.suggested-questions h5 {
    margin: 0 0 12px 0;
    font-size: 13px;
    color: var(--rz-text-secondary-color, #666);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.suggestion-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.message {
    display: flex;
    margin-bottom: 16px;
    align-items: flex-start;
}

.user-message {
    flex-direction: row-reverse;
}

.message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
    margin: 0 8px;
}

.user-message .message-avatar {
    background: var(--rz-primary, #1976d2);
    color: white;
}

.ai-message .message-avatar {
    background: var(--rz-secondary, #dc004e);
    color: white;
}

.message-content {
    max-width: 70%;
    display: flex;
    flex-direction: column;
}

.user-message .message-content {
    align-items: flex-end;
}

.ai-message .message-content {
    align-items: flex-start;
}

.message-bubble {
    padding: 12px 16px;
    border-radius: 18px;
    word-wrap: break-word;
    line-height: 1.4;
}

.user-message .message-bubble {
    background: var(--rz-primary, #1976d2);
    color: white;
    border-bottom-right-radius: 4px;
}

.ai-message .message-bubble {
    background: var(--rz-base-100, #f5f5f5);
    color: var(--rz-text-color, #333);
    border-bottom-left-radius: 4px;
    border: 1px solid var(--rz-base-200, #e5e5e5);
}

.message-text {
    font-size: 14px;
}

.message-text strong {
    font-weight: 600;
    color: var(--rz-primary, #1976d2);
}

.ai-message .message-text strong {
    color: var(--rz-secondary, #dc004e);
}

.message-text em {
    font-style: normal;
    background: rgba(25, 118, 210, 0.1);
    padding: 2px 4px;
    border-radius: 4px;
    font-weight: 500;
}

.message-time {
    font-size: 11px;
    color: var(--rz-text-secondary-color, #666);
    margin-top: 4px;
    opacity: 0.7;
}

.thinking-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--rz-text-secondary-color, #666);
    font-style: italic;
    font-size: 13px;
}

.input-container {
    padding: 16px;
    border-top: 1px solid var(--rz-base-200, #e5e5e5);
    background: var(--rz-base-50, #fafafa);
}

.input-group {
    display: flex;
    gap: 8px;
    align-items: flex-end;
}

.processing-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
    font-size: 12px;
    color: var(--rz-text-secondary-color, #666);
}

/* Responsividade */
@media (max-width: 768px) {
    .ai-chat-panel {
        right: 10px;
        bottom: 10px;
        width: calc(100vw - 20px);
        max-width: 400px;
    }
    
    .message-content {
        max-width: 85%;
    }
}

@media (max-width: 480px) {
    .ai-chat-panel {
        width: calc(100vw - 20px);
        max-height: calc(100vh - 100px);
    }
    
    .chat-content {
        height: calc(100vh - 160px);
        max-height: calc(100vh - 160px);
    }
    
    .header-subtitle {
        display: none;
    }
}

/* Animações */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message {
    animation: fadeIn 0.3s ease-out;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .ai-chat-panel {
        background: var(--rz-base-background-color, #1a1a1a);
        border-color: var(--rz-base-600, #404040);
    }
    
    .ai-message .message-bubble {
        background: var(--rz-base-800, #2a2a2a);
        border-color: var(--rz-base-600, #404040);
        color: var(--rz-text-color, #ffffff);
    }
    
    .input-container {
        background: var(--rz-base-900, #121212);
        border-color: var(--rz-base-600, #404040);
    }
} 