﻿/* ===== CHATBOT STYLES ===== */

/* Botón flotante del chatbot */
.chatbot-float-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 50%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 1050;
    cursor: pointer;
    transition: transform 0.3s ease;
}

    .chatbot-float-btn:hover {
        transform: scale(1.05);
    }

/* Animación de pulso para el botón */
.pulse-btn {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(102, 126, 234, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0);
    }
}

/* Modal del chatbot */
.chatbot-modal .modal-content {
    border-radius: 20px !important;
    border: none;
    overflow: hidden;
}

.chatbot-modal .modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    padding: 20px;
}

.chatbot-modal .modal-body {
    padding: 0;
}

/* Área de mensajes del chat */
.chat-messages {
    height: 400px;
    overflow-y: auto;
    background: #f8f9fa;
    padding: 20px;
}

    .chat-messages::-webkit-scrollbar {
        width: 6px;
    }

    .chat-messages::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 10px;
    }

    .chat-messages::-webkit-scrollbar-thumb {
        background: #c1c1c1;
        border-radius: 10px;
    }

        .chat-messages::-webkit-scrollbar-thumb:hover {
            background: #a8a8a8;
        }

/* Contenedor de mensajes */
.message-container {
    margin-bottom: 15px;
}

/* Avatar del bot */
.bot-avatar {
    width: 40px;
    height: 40px;
    background: #007bff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

/* Avatar del usuario */
.user-avatar {
    width: 40px;
    height: 40px;
    background: #6c757d;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

/* Burbujas de mensaje */
.message-bubble {
    max-width: 80%;
    padding: 15px;
    border-radius: 18px;
    word-wrap: break-word;
}

.bot-message {
    background: white;
    border: 1px solid #e9ecef;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.user-message {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    margin-left: auto;
}

/* Área de input */
.chat-input-area {
    background: white;
    border-top: 1px solid #e9ecef;
    padding: 20px;
}

.chat-input-group {
    margin-bottom: 15px;
}

.chat-input {
    border: none;
    background: #f8f9fa;
    border-radius: 25px;
    padding: 12px 20px;
}

    .chat-input:focus {
        box-shadow: none;
        border-color: #667eea;
        background: white;
    }

.chat-send-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 25px;
    padding: 12px 20px;
    color: white;
}

    .chat-send-btn:hover {
        background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    }

/* Sugerencias rápidas */
.suggestions-area {
    margin-top: 15px;
}

.suggestion-btn {
    margin: 3px;
    border-radius: 20px;
    font-size: 0.85rem;
    padding: 6px 12px;
    transition: all 0.2s ease;
}

    .suggestion-btn:hover {
        transform: translateY(-1px);
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }

/* Indicador de escritura */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 15px;
}

    .typing-indicator span {
        height: 8px;
        width: 8px;
        background-color: #007bff;
        border-radius: 50%;
        display: inline-block;
        animation: typing 1.4s infinite ease-in-out both;
    }

        .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);
        opacity: 0.5;
    }

    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Estados del indicador online */
.online-indicator {
    width: 8px;
    height: 8px;
    background: #28a745;
    border-radius: 50%;
    display: inline-block;
    margin-right: 5px;
}

/* Responsive */
@media (max-width: 768px) {
    .chatbot-float-btn {
        width: 60px;
        height: 60px;
        bottom: 15px;
        right: 15px;
    }

        .chatbot-float-btn i {
            font-size: 1.5rem !important;
        }

    .chat-messages {
        height: 300px;
    }

    .message-bubble {
        max-width: 90%;
    }

    .suggestion-btn {
        font-size: 0.8rem;
        padding: 5px 10px;
    }
}

@media (max-width: 576px) {
    .chatbot-modal .modal-dialog {
        margin: 10px;
    }

    .chat-messages {
        height: 250px;
        padding: 15px;
    }

    .chat-input-area {
        padding: 15px;
    }
}
