/* CHATBOT FLOTANTE */
.chatbot-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #64ffda, #0a192f);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(100, 255, 218, 0.4);
    z-index: 9999;
    transition: all 0.3s ease;
}

.chatbot-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(100, 255, 218, 0.6);
}

.chatbot-btn svg {
    color: #020c1b;
}

/* VENTANA DEL CHATBOT */
.chatbot-window {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 450px;
    max-height: 550px;
    background: rgba(10, 25, 47, 0.95);
    border: 2px solid #64ffda;
    border-radius: 20px;
    display: none;
    flex-direction: column;
    z-index: 9999;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.chatbot-window.active {
    display: flex;
}

.chatbot-header {
    background: linear-gradient(135deg, rgba(100, 255, 218, 0.2), rgba(10, 25, 47, 0.8));
    padding: 15px 20px;
    border-bottom: 2px solid rgba(100, 255, 218, 0.3);
    border-radius: 18px 18px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chatbot-header h3 {
    margin: 0;
    color: #64ffda;
    font-size: 1rem;
    font-weight: 700;
}

.close-chatbot {
    background: none;
    border: none;
    color: #64ffda;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-chatbot:hover {
    background: rgba(100, 255, 218, 0.2);
}

.chatbot-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    max-height: 350px;
}

.message {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
}

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

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

.message p {
    margin: 0;
    padding: 10px 15px;
    border-radius: 15px;
    max-width: 80%;
    word-wrap: break-word;
}

.message.user p {
    background: linear-gradient(135deg, #64ffda, #0a192f);
    color: #020c1b;
    border-bottom-right-radius: 5px;
}

.message.bot p {
    background: rgba(100, 255, 218, 0.1);
    color: #64ffda;
    border: 1px solid rgba(100, 255, 218, 0.3);
    border-bottom-left-radius: 5px;
}

.chatbot-input {
    padding: 15px;
    border-top: 2px solid rgba(100, 255, 218, 0.3);
    display: flex;
    gap: 10px;
    border-radius: 0 0 18px 18px;
}

.chatbot-input input {
    flex: 1;
    padding: 10px 15px;
    background: rgba(2, 12, 27, 0.8);
    border: 1px solid #64ffda;
    border-radius: 25px;
    color: #ccd6f6;
    outline: none;
    transition: all 0.3s ease;
}

.chatbot-input input:focus {
    box-shadow: 0 0 10px rgba(100, 255, 218, 0.3);
}

.chatbot-input input::placeholder {
    color: #8892b0;
}

.chatbot-input button {
    padding: 10px 20px;
    background: linear-gradient(135deg, #64ffda, #0a192f);
    color: #020c1b;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.3s ease;
}

.chatbot-input button:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(100, 255, 218, 0.4);
}

/* Scrollbar personalizado */
.chatbot-messages::-webkit-scrollbar {
    width: 6px;
}

.chatbot-messages::-webkit-scrollbar-track {
    background: rgba(2, 12, 27, 0.5);
    border-radius: 3px;
}

.chatbot-messages::-webkit-scrollbar-thumb {
    background: #64ffda;
    border-radius: 3px;
}

.chatbot-messages::-webkit-scrollbar-thumb:hover {
    background: #4fd1c5;
}

/* Animación de "Escribiendo..." */
.typing-indicator {
    display: inline-block;
    padding: 10px 15px;
    background: rgba(100, 255, 218, 0.1);
    border: 1px solid rgba(100, 255, 218, 0.3);
    border-radius: 15px;
    border-bottom-left-radius: 5px;
    color: #64ffda;
    font-size: 1.2rem;
    letter-spacing: 2px;
}

.typing-indicator span {
    animation: blink 1.4s infinite both;
    display: inline-block;
    height: 6px;
    width: 6px;
    background-color: #64ffda;
    border-radius: 50%;
    margin: 0 2px;
}

.typing-indicator span:nth-child(1) { animation-delay: 0s; }
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes blink {
    0% { opacity: 0.2; transform: scale(0.8); }
    20% { opacity: 1; transform: scale(1.2); }
    100% { opacity: 0.2; transform: scale(0.8); }
}
