/* Chatbot */
/* --- Botón flotante --- */
#chatbot-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #B3FF00;
    /* azul fichabit */
    color: white;
    border-radius: 50%;
    width: 55px;
    height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    transition: background 0.3s;
}

#chatbot-toggle:hover {
    background: #2563eb;
}

/* --- Ventana del chatbot --- */
#chatbot-container {
    position: fixed;
    bottom: 85px;
    right: 20px;
    width: 500px;
    height: 400px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 10000;
    font-family: 'Inter', Arial, sans-serif;
}

.chatbot-header {
    background: #B3FF00;
    color: black;
    padding: 12px;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#chatbot-close {
    cursor: pointer;
}

#chatbot-messages {
    flex: 1;
    padding: 10px;
    overflow-y: auto;
    font-size: 14px;
}

.chat-msg {
    margin-bottom: 8px;
    padding: 8px 10px;
    border-radius: 10px;
    max-width: 80%;
    line-height: 1.4;
}

.chat-user {
    background: #e5e7eb;
    align-self: flex-end;
}

.chat-bot {
    background: #dbeafe;
    color: #1e3a8a;
}

.chatbot-input {
    display: flex;
    border-top: 1px solid #ddd;
}

.chatbot-input input {
    flex: 1;
    border: none;
    padding: 10px;
    font-size: 14px;
    outline: none;
}

.chatbot-input button {
    background: #B3FF00;
    border: none;
    color: black;
    padding: 0 15px;
    cursor: pointer;
    transition: background 0.3s;
}

.chatbot-input button:hover {
    background: #2563eb;
}

/* Indicador "IA escribiendo..." */
/* Contenedor del indicador */
/* Contenedor */
.typing {
    display: flex;
    align-items: center;
    font-size: 13px;
    color: #374151;
    font-style: italic;
}

/* Texto "Escribiendo" */
.typing-text {
    margin-right: 6px;
    color: #3b82f6;
    /* azul fichabit */
    font-weight: 500;
}

/* Contenedor de los puntos */
.typing-dots {
    display: flex;
    gap: 4px;
}

/* Puntos animados */
.typing-dots span {
    width: 6px;
    height: 6px;
    background: #3b82f6;
    border-radius: 50%;
    display: inline-block;
    animation: blink 1.4s infinite both;
}

.typing-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes blink {
    0% {
        opacity: 0.2;
        transform: translateY(0px);
    }

    20% {
        opacity: 1;
        transform: translateY(-3px);
    }

    100% {
        opacity: 0.2;
        transform: translateY(0px);
    }
}


/* fin chatbot */

/* Para ocultar la capa de resultados del autocomplete */
.ui-helper-hidden-accessible {
    display: none;
}

.link-white {
    color: white;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.header {
    position: fixed;
    width: 100%;
    z-index: 1000;
}

.navbar .container-fluid {
    padding-top: 0;
    padding-bottom: 0;
}

.navbar-buttons .btn {
    width: 150px;
}

.bg-gray-dark {
    background-color: #666666;
}

.text-dark-gray {
    color: #292929ff;
}

.text-dark-gray:hover {
    color: #000000ff;
}

#extra {
    display: flex;
    flex-direction: row;
    align-items: center;
}


.divider {
    width: 2px;
    height: 2.5rem;
    background-color: var(<?= !empty($_SESSION) ? '--bs-body-bg' : '--bs-body-bg-no-login' ?>);
    margin: 0 25px 0 15px;
}

@media (max-width: 991px) {
    .navbar-buttons .btn {
        width: 100%;
        margin-bottom: 10px;
    }

    #navbarNav>.navbar-nav {
        margin: 15px 0;
    }

    #extra {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }

    .extras {
        margin-right: 0;
        margin-bottom: 10px;
    }

    .margin-botom {
        margin-bottom: 1rem !important;
    }

    #navbarNav .divider {
        width: 100% !important;
        height: 1px !important;
        margin: 15px 0 !important;
    }
}