/*
 * Floating action button: the one main action on a list page, floating
 * over the bottom corner, at the height of the bottom navigation's top so
 * it sits in the same place whether or not the page has the navigation.
 * Icon-only, so give it an aria-label.
 *
 *   <a class="fab" href="…" aria-label="Add note"><svg class="icon" aria-hidden="true">…</svg></a>
 */
@layer components {
  .fab {
    --icon-size: var(--text-xl);

    position: fixed;
    inset-block-end: calc(var(--nav-height) + var(--space-6));
    inset-inline-end: var(--space-6);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    inline-size: 3.5rem;
    block-size: 3.5rem;
    background: var(--color-accent);
    color: var(--color-on-accent);
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-overlay);
    transition: scale var(--duration-fast);

    &:hover { scale: 1.1; }
  }
}
