/* Estilos para el chatbot usando Bootstrap Modal */

/* Contenedor del iframe dentro del modal */
.chatbot-iframe-container {
    position: relative;
    width: 100%;
    height: 500px;
}

/* Iframe del chatbot */
#chatbot-iframe-bs {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 10px;
}

/* Modal en escritorio - posición fija abajo derecha */
@media (min-width: 769px) {
    #chatbotModal .modal-dialog {
        position: fixed;
        bottom: 20px;
        right: 20px;
        margin: 0;
        max-width: 400px;
        width: 400px;
    }
    
    #chatbotModal .modal-content {
        border-radius: 10px;
        box-shadow: 0 5px 40px rgba(0, 0, 0, 0.3);
    }
    
    .chatbot-iframe-container {
        height: 500px;
    }
    
    /* Ocultar el backdrop en escritorio para que no moleste */
    #chatbotModal.modal {
        background-color: transparent;
    }
    
    #chatbotModal .modal-backdrop {
        display: none;
    }
}

/* Modal en móvil - pantalla completa */
@media (max-width: 768px) {
    #chatbotModal .modal-dialog {
        margin: 0;
        max-width: 100%;
        width: 100%;
        height: 100%;
    }
    
    #chatbotModal .modal-content {
        height: 100%;
        border-radius: 0;
    }
    
    .chatbot-iframe-container {
        height: calc(100vh - 60px); /* Restar altura del header */
    }
}

/* Botón flotante */
#chatbot-trigger-bs {
    position: fixed;
    z-index: 1040;
    background-color: #0071C1;
    color: white;
    padding: 12px 20px;
    border-radius: 50px;
    box-shadow: 0 4px 20px rgba(0, 113, 193, 0.4);
    cursor: pointer;
    border: none;
    display: none;
    align-items: center;
    gap: 10px;
    animation: pulse-bs 2s infinite;
}

#chatbot-trigger-bs:hover {
    background-color: #005a9c;
    box-shadow: 0 6px 25px rgba(0, 113, 193, 0.6);
}

#chatbot-trigger-bs.show {
    display: flex;
}

/* Posición del botón flotante */
@media (min-width: 769px) {
    #chatbot-trigger-bs {
        bottom: 20px;
        right: 20px;
    }
}

@media (max-width: 768px) {
    #chatbot-trigger-bs {
        bottom: 20px;
        left: 20px;
    }
}

#chatbot-trigger-icon-bs {
    font-size: 24px;
    animation: bounce-bs 1s infinite;
}

#chatbot-trigger-text-bs {
    font-weight: 600;
    font-size: 14px;
}

/* Animaciones */
@keyframes pulse-bs {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes bounce-bs {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

/* Botón de cerrar personalizado */
#chatbotModal .btn-close {
    background-color: #0071C1;
    border-radius: 50%;
    opacity: 1;
        width: 20px;
    height: 20px;
    position: absolute;
    right: 5px;
    top: 3px;
    z-index: 999;
}

#chatbotModal .btn-close:hover {
    background-color: #005a9c;
    transform: scale(1.1);
}