﻿
/* Contenedor del botón disparador */
.chatbot-floating-container {
    position: fixed;
    /* Se ubica arriba del botón de protesta (que suele estar a 20px-30px) */
    bottom: 100px;
    right: 30px;
    z-index: 1040;
}

/* Estilo del Botón Circular */
.btn-chatbot-float {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #242B57; /* Azul institucional */
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

    .btn-chatbot-float:hover {
        transform: scale(1.1);
        background-color: #313a75;
        box-shadow: 0 6px 20px rgba(0,0,0,0.4);
    }

/* VENTANA DEL CHAT (El Iframe) */
.chatbot-window {
    position: fixed;
    /* Ajuste clave: Elevamos la ventana para que NO tape el botón de protesta */
    bottom: 30px;
    right: 30px;
    width: 420px;
    height: 650px;
    max-height: 85vh; /* Evita desborde en pantallas pequeñas */
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 1060; /* Asegura estar sobre todo, incluso el botón de protesta */
    animation: chatbotAppear 0.4s ease-out;
}

/* Animación de entrada suave */
@keyframes chatbotAppear {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Cabecera de la ventana */
.chatbot-header {
    background: #242B57;
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'Public Sans', sans-serif;
    font-weight: 600;
}

.btn-close-chatbot {
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

    .btn-close-chatbot:hover {
        background: rgba(255,255,255,0.3);
    }

/* Cuerpo donde vive el Iframe */
.chatbot-body {
    flex-grow: 1;
    background: #fdfdfd;
    position: relative;
}

/* Estilos para el estado cargando (opcional) */
.chatbot-loader {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    color: #242B57;
}

/* RESPONSIVIDAD (Ajustes para celulares) */
@media (max-width: 576px) {
    .chatbot-window {
        width: 100%;
        height: 100%;
        bottom: 0;
        right: 0;
        border-radius: 0;
        max-height: 100vh;
    }

    .chatbot-floating-container {
        bottom: 90px;
        right: 20px;
    }
}
