/* ===== CHATBOT STYLES ===== */
.chatbot-page {
    margin: 0;
    padding: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    font-family: var(--font-body, 'Open Sans', sans-serif);
    overflow: hidden;
}

/* ===== CHAT HEADER ===== */
.chat-header {
    background: linear-gradient(135deg, var(--primary-color, #2e6fdf), var(--secondary-color, #00c2a8));
    color: white;
    padding: 1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 100;
}

.chat-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 100%;
}

.chat-header-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.assistant-avatar {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    backdrop-filter: blur(10px);
}

.assistant-details h1 {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
    font-family: var(--font-heading, 'Poppins', sans-serif);
}

.status {
    font-size: 0.85rem;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status.online::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

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

.chat-action-btn {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.chat-action-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

/* ===== CHAT CONTAINER ===== */
.chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

/* ===== CHAT MESSAGES ===== */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    scroll-behavior: smooth;
}

.message {
    display: flex;
    gap: 0.75rem;
    max-width: 85%;
    animation: messageSlideIn 0.3s ease-out;
}

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

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

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

.message-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: white;
    flex-shrink: 0;
}

.bot-message .message-avatar {
    background: linear-gradient(135deg, var(--primary-color, #2e6fdf), var(--secondary-color, #00c2a8));
}

.user-message .message-avatar {
    background: linear-gradient(135deg, var(--accent-color, #ffb703), #f59e0b);
}

.user-message .message-avatar i {
    font-size: 0.8rem;
}

.message-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.user-message .message-content {
    align-items: flex-end;
}

.message-bubble {
    background: white;
    padding: 0.75rem 1rem;
    border-radius: 1rem;
    position: relative;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    word-wrap: break-word;
}

.bot-message .message-bubble {
    border-bottom-left-radius: 0.25rem;
}

.user-message .message-bubble {
    background: linear-gradient(135deg, var(--primary-color, #2e6fdf), var(--secondary-color, #00c2a8));
    color: white;
    border-bottom-right-radius: 0.25rem;
}

.message-bubble p {
    margin: 0 0 0.5rem 0;
    line-height: 1.5;
}

.message-bubble p:last-child {
    margin-bottom: 0;
}

.message-bubble ul {
    margin: 0.5rem 0;
    padding-left: 1.25rem;
}

.message-bubble li {
    margin-bottom: 0.25rem;
    line-height: 1.4;
}

.message-time {
    font-size: 0.75rem;
    color: #6b7280;
    opacity: 0.7;
    margin-top: 0.25rem;
}

.user-message .message-time {
    text-align: right;
}

/* ===== QUICK ACTIONS ===== */
.quick-actions {
    background: white;
    margin: 0 1rem 1rem;
    padding: 1rem;
    border-radius: 1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.quick-actions h3 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark, #1f2937);
    margin: 0 0 0.75rem 0;
    font-family: var(--font-heading, 'Poppins', sans-serif);
}

.quick-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.5rem;
}

.quick-btn {
    background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    padding: 0.75rem;
    font-size: 0.85rem;
    color: var(--text-dark, #1f2937);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-align: left;
    font-family: inherit;
}

.quick-btn:hover {
    background: linear-gradient(135deg, var(--primary-color, #2e6fdf), var(--secondary-color, #00c2a8));
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(46, 111, 223, 0.3);
}

.quick-btn i {
    font-size: 0.9rem;
    flex-shrink: 0;
}

/* ===== CHAT INPUT ===== */
.chat-input-container {
    background: white;
    padding: 1rem;
    border-top: 1px solid #e5e7eb;
    position: relative;
}

.chat-input-form {
    position: relative;
}

.input-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 1.5rem;
    padding: 0.5rem;
    transition: all 0.3s ease;
}

.input-wrapper:focus-within {
    border-color: var(--primary-color, #2e6fdf);
    box-shadow: 0 0 0 3px rgba(46, 111, 223, 0.1);
}

#messageInput {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    font-family: inherit;
    color: var(--text-dark, #1f2937);
    outline: none;
}

#messageInput::placeholder {
    color: #9ca3af;
}

.send-btn {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-color, #2e6fdf), var(--secondary-color, #00c2a8));
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.send-btn:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(46, 111, 223, 0.3);
}

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

/* ===== TYPING INDICATOR ===== */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    color: #6b7280;
    font-size: 0.85rem;
}

.typing-dots {
    display: flex;
    gap: 0.2rem;
}

.typing-dots span {
    width: 6px;
    height: 6px;
    background: #6b7280;
    border-radius: 50%;
    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; }

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

/* ===== CHAT FOOTER ===== */
.chat-footer {
    background: white;
    padding: 0.75rem 1rem;
    border-top: 1px solid #e5e7eb;
    text-align: center;
    font-size: 0.8rem;
    color: #6b7280;
}

.chat-footer strong {
    color: var(--primary-color, #2e6fdf);
}

/* ===== SCROLLBAR ===== */
.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

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

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

/* ===== RESPONSIVIDADE ===== */
@media (max-width: 768px) {
    .chat-header {
        padding: 0.75rem;
    }
    
    .assistant-avatar {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .assistant-details h1 {
        font-size: 1rem;
    }
    
    .chat-messages {
        padding: 0.75rem;
    }
    
    .message {
        max-width: 95%;
    }
    
    .quick-buttons {
        grid-template-columns: 1fr;
    }
    
    .quick-btn {
        padding: 1rem;
        font-size: 0.9rem;
    }
    
    .chat-input-container {
        padding: 0.75rem;
    }
}

@media (max-width: 480px) {
    .chatbot-page {
        font-size: 14px;
    }
    
    .chat-header-content {
        gap: 0.5rem;
    }
    
    .chat-header-info {
        gap: 0.75rem;
    }
    
    .message-bubble {
        padding: 0.6rem 0.8rem;
        font-size: 0.9rem;
    }
    
    .quick-actions {
        margin: 0 0.5rem 0.5rem;
        padding: 0.75rem;
    }
    
    .chat-input-container {
        padding: 0.5rem;
    }
}

/* ===== DARK MODE SUPPORT ===== */
@media (prefers-color-scheme: dark) {
    .chatbot-page {
        background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    }
    
    .quick-actions {
        background: #334155;
        border: 1px solid #475569;
    }
    
    .quick-actions h3 {
        color: #e2e8f0;
    }
    
    .message-bubble {
        background: #334155;
        color: #e2e8f0;
        border: 1px solid #475569;
    }
    
    .user-message .message-bubble {
        background: linear-gradient(135deg, var(--primary-color, #2e6fdf), var(--secondary-color, #00c2a8));
        color: white;
        border: none;
    }
    
    .chat-input-container,
    .chat-footer {
        background: #334155;
        border-color: #475569;
        color: #e2e8f0;
    }
    
    .input-wrapper {
        background: #1e293b;
        border-color: #475569;
    }
    
    #messageInput {
        color: #e2e8f0;
    }
    
    #messageInput::placeholder {
        color: #64748b;
    }
}
