/* Chatbot Widget Styles */
.chatbot-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.chatbot-toggle {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #7c6cf4 0%, #a6b7ff 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(124, 108, 244, 0.3);
    transition: all 0.3s ease;
    position: relative;
    color: white;
}

.chatbot-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 35px rgba(124, 108, 244, 0.4);
}

.chatbot-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ef4444;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    animation: pulse 2s infinite;
}

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

.chatbot-container {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 380px;
    height: 500px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.3s ease;
    z-index: 9998;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.chatbot-container.hidden {
    display: none;
}

.chatbot-header {
    background: linear-gradient(135deg, #7c6cf4 0%, #a6b7ff 100%);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
}

.chatbot-avatar {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chatbot-info {
    flex: 1;
}

.chatbot-info h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.chatbot-status {
    font-size: 12px;
    opacity: 0.8;
}

.chatbot-close {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background 0.2s ease;
}

.chatbot-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

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

.message {
    display: flex;
    gap: 12px;
    animation: messageSlide 0.3s ease;
}

@keyframes messageSlide {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.bot-message {
    align-items: flex-start;
}

.user-message {
    flex-direction: row-reverse;
    align-items: flex-start;
}

.message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.bot-message .message-avatar {
    background: linear-gradient(135deg, #7c6cf4 0%, #a6b7ff 100%);
    color: white;
}

.user-message .message-avatar {
    background: #f3f4f6;
    color: #6b7280;
}

.message-content {
    max-width: 80%;
    background: #f8fafc;
    padding: 12px 16px;
    border-radius: 18px;
    position: relative;
}

.user-message .message-content {
    background: linear-gradient(135deg, #7c6cf4 0%, #a6b7ff 100%);
    color: white;
}

.message-content p {
    margin: 0;
    font-size: 14px;
    line-height: 1.4;
}

.message-time {
    font-size: 11px;
    opacity: 0.6;
    margin-top: 4px;
}

.chatbot-suggestions {
    padding: 0 20px 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.suggestion-btn {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 8px 12px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #475569;
}

.suggestion-btn:hover {
    background: #7c6cf4;
    color: white;
    border-color: #7c6cf4;
    transform: translateY(-1px);
}

.chatbot-input-container {
    padding: 20px;
    border-top: 1px solid #e2e8f0;
}

.chatbot-input-wrapper {
    display: flex;
    gap: 12px;
    align-items: center;
}

#chatbot-input {
    flex: 1;
    border: 1px solid #e2e8f0;
    border-radius: 25px;
    padding: 12px 16px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s ease;
}

#chatbot-input:focus {
    border-color: #7c6cf4;
}

.chatbot-send {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #7c6cf4 0%, #a6b7ff 100%);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.chatbot-send:hover {
    transform: scale(1.05);
}

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

.chatbot-typing {
    display: none;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    font-size: 12px;
    color: #6b7280;
}

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

.typing-indicator span {
    width: 6px;
    height: 6px;
    background: #7c6cf4;
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out;
}

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

@keyframes typing {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .chatbot-widget {
        bottom: 15px;
        right: 15px;
        left: auto;
        position: fixed !important;
    }
    
    .chatbot-container {
        position: fixed !important;
        width: calc(100vw - 20px);
        height: calc(100vh - 80px);
        bottom: 70px;
        right: 10px;
        left: 10px;
        max-width: none;
        transform: none !important;
    }
    
    .chatbot-toggle {
        width: 55px;
        height: 55px;
    }
    
    .chatbot-messages {
        padding: 15px;
    }
    
    .chatbot-input-container {
        padding: 15px;
    }
    
    .chatbot-suggestions {
        padding: 0 15px 10px;
    }
    
    .suggestion-btn {
        font-size: 11px;
        padding: 6px 10px;
    }
}

@media (max-width: 480px) {
    .chatbot-widget {
        bottom: 10px;
        right: 10px;
        left: auto;
        position: fixed !important;
    }
    
    .chatbot-container {
        position: fixed !important;
        width: calc(100vw - 16px);
        height: calc(100vh - 70px);
        bottom: 60px;
        right: 8px;
        left: 8px;
        transform: none !important;
    }
    
    .chatbot-toggle {
        width: 50px;
        height: 50px;
    }
    
    .chatbot-header {
        padding: 15px;
    }
    
    .chatbot-info h3 {
        font-size: 14px;
    }
    
    .chatbot-status {
        font-size: 11px;
    }
    
    .message-content {
        max-width: 85%;
        padding: 10px 14px;
    }
    
    .message-content p {
        font-size: 13px;
    }
    
    #chatbot-input {
        font-size: 13px;
        padding: 10px 14px;
    }
    
    .chatbot-send {
        width: 40px;
        height: 40px;
    }
}

/* Correção específica para mobile */
@media (max-width: 600px) {
    .chatbot-container {
        position: fixed !important;
        top: 10px !important;
        left: 10px !important;
        right: 10px !important;
        bottom: 70px !important;
        width: auto !important;
        height: auto !important;
        max-height: calc(100vh - 80px);
        transform: none !important;
    }
    
    .chatbot-widget {
        position: fixed !important;
        bottom: 10px !important;
        right: 10px !important;
        left: auto !important;
    }
}

/* Scrollbar Styling */
.chatbot-messages::-webkit-scrollbar {
    width: 4px;
}

.chatbot-messages::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.chatbot-messages::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 2px;
}

.chatbot-messages::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Estilo para nome da assistente */
.assistant-name {
    color: #7c6cf4;
    font-weight: 700;
}
