.local-fgrai {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 1050;
}

/*
 * Botón principal de Fiscalito.
 */
    .local-fgrai-toggle {
    width: auto !important;
    min-width: 145px !important;
    height: 58px !important;

    padding: 7px 18px 7px 7px !important;

    display: inline-flex !important;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;

    border: 0;
    border-radius: 30px;

    background: #212529;
    color: #fff;

    font-weight: 700;
    font-size: 16px;
    line-height: 1;

    white-space: nowrap;
    cursor: pointer;

    box-shadow: 0 5px 16px rgba(0, 0, 0, 0.25);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.local-fgrai-toggle:hover {
    transform: translateY(-3px);

    box-shadow:
        0 8px 20px rgba(0, 0, 0, 0.28);
}

/*
 * Avatar temporal.
 *
 * Posteriormente esta zona contendrá
 * la mascota gráfica de Fiscalito.
 */
.local-fgrai-avatar {
    width: 44px;
    height: 44px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    border-radius: 50%;

    background: #fff;
    color: #212529;

    font-size: 20px;
    font-weight: 800;

    animation:
        local-fgrai-idle 4s ease-in-out infinite;
}

.local-fgrai-toggle-name {
    display: inline-block;
    flex: 0 0 auto;
    white-space: nowrap;
}

/*
 * Movimiento sutil de reposo.
 */
@keyframes local-fgrai-idle {
    0%,
    100% {
        transform: translateY(0) rotate(0);
    }

    50% {
        transform: translateY(-2px) rotate(2deg);
    }
}

/*
 * Panel.
 */
.local-fgrai-panel {
    position: absolute;

    right: 0;
    bottom: 72px;

    width: 360px;
    max-width: calc(100vw - 32px);

    background: #fff;

    border: 1px solid #dee2e6;
    border-radius: 14px;

    box-shadow:
        0 8px 28px rgba(0, 0, 0, 0.20);

    overflow: hidden;
}

/*
 * Cabecera.
 */
.local-fgrai-header {
    display: flex;
    align-items: center;
    gap: 10px;

    padding: 12px 14px;

    background: #212529;
    color: #fff;
}

.local-fgrai-header-avatar {
    width: 36px;
    height: 36px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    border-radius: 50%;

    background: #fff;
    color: #212529;

    font-weight: 800;
}

.local-fgrai-header-identity {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.local-fgrai-header-identity strong {
    font-size: 16px;
}

.local-fgrai-header-identity small {
    margin-top: 2px;

    font-size: 11px;
    font-weight: 400;

    opacity: 0.75;
}

/*
 * Mensajes.
 */
.local-fgrai-messages {
    min-height: 220px;
    max-height: 380px;

    overflow-y: auto;

    padding: 16px;
}

.local-fgrai-message {
    background: #f1f3f5;

    padding: 10px 12px;

    border-radius: 10px;
}

/*
 * Entrada.
 */
.local-fgrai-input {
    display: flex;
    gap: 8px;

    padding: 12px;

    border-top: 1px solid #dee2e6;
}

.local-fgrai-input input {
    flex: 1;
    min-width: 0;

    padding: 8px 10px;

    border: 1px solid #ced4da;
    border-radius: 6px;
}

.local-fgrai-input button {
    border: 0;
    border-radius: 6px;

    padding: 8px 14px;

    background: #212529;
    color: #fff;

    cursor: pointer;
}

/*
 * Pantallas pequeñas.
 */
@media (max-width: 480px) {

    .local-fgrai {
        right: 16px;
        bottom: 16px;
    }

    .local-fgrai-panel {
        right: 0;
        width: calc(100vw - 32px);
        max-width: none;
    }
}

/*
 * Respeta usuarios que prefieren
 * movimiento reducido.
 */
@media (prefers-reduced-motion: reduce) {

    .local-fgrai-avatar {
        animation: none;
    }

    .local-fgrai-toggle {
        transition: none;
    }
}
