/* public/css/chatbot.css */
/* ============================================
   ESTILOS DEL CHATBOT IA WIDGET
   ============================================ */

.chatbot-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 350px;
    max-width: calc(100vw - 40px);
    z-index: 9999;
    font-family: 'Inter', sans-serif;
}

/* Header del chatbot */
.chatbot-header {
    background: linear-gradient(135deg, #FFD700, #DAA520);
    border-radius: 20px;
    padding: 12px 18px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #0a0a0a;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.chatbot-header:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.chatbot-header-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

.chatbot-icon {
    font-size: 1.5rem;
}

.chatbot-title {
    font-weight: bold;
}

.chatbot-status {
    font-size: 0.7rem;
    background: rgba(0, 0, 0, 0.1);
    padding: 2px 6px;
    border-radius: 20px;
}

.chatbot-toggle {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

/* Cuerpo del chatbot */
.chatbot-body {
    background: var(--bg-card);
    border-radius: 16px;
    margin-top: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    max-height: 500px;
}

/* Área de mensajes */
.chatbot-messages {
    height: 350px;
    overflow-y: auto;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Estilos de mensajes */
.message {
    display: flex;
    gap: 10px;
    animation: fadeIn 0.3s ease;
}

.message.bot {
    justify-content: flex-start;
}

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

.message-avatar {
    width: 32px;
    height: 32px;
    background: var(--gold-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.message.user .message-text {
    background: var(--gold-primary);
    color: #0a0a0a;
    border-radius: 18px 18px 4px 18px;
}

.message.bot .message-text {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-radius: 18px 18px 18px 4px;
}

.message-text {
    max-width: 70%;
    padding: 10px 14px;
    font-size: 0.85rem;
    line-height: 1.4;
    word-wrap: break-word;
}

/* Indicador de escritura */
#typing-indicator .message-text {
    background: var(--bg-secondary);
    color: var(--text-muted);
}

.dots::after {
    content: '...';
    animation: dots 1.5s steps(4, end) infinite;
    display: inline-block;
    width: 20px;
    text-align: left;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/* Área de input */
.chatbot-input-area {
    display: flex;
    padding: 12px;
    border-top: 1px solid var(--border-color);
    gap: 8px;
    background: var(--bg-card);
}

#chatbot-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: 25px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.85rem;
    outline: none;
    transition: all 0.3s ease;
}

#chatbot-input:focus {
    outline: none;
    border-color: var(--gold-primary);
    box-shadow: 0 0 5px rgba(255, 215, 0, 0.3);
}

#chatbot-send {
    background: var(--gold-primary);
    border: none;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

#chatbot-send:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
}

/* Footer del chatbot */
.chatbot-footer {
    padding: 8px 12px;
    text-align: center;
    border-top: 1px solid var(--border-color);
    font-size: 0.65rem;
    color: var(--text-muted);
    background: var(--bg-card);
}

/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .chatbot-widget {
        bottom: 10px;
        right: 10px;
        width: calc(100vw - 20px);
        max-width: none;
    }
    
    .chatbot-messages {
        height: 300px;
    }
    
    .message-text {
        max-width: 80%;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .chatbot-header {
        padding: 10px 15px;
    }
    
    .chatbot-icon {
        font-size: 1.2rem;
    }
    
    .chatbot-title {
        font-size: 0.9rem;
    }
    
    .chatbot-status {
        font-size: 0.6rem;
    }
}