@layer components {
  .footer-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    /* Above page content (e.g. card favorite stars at z-index 2),
       but below the note-edit toolbar layer (FAB 50, rail 70). */
    z-index: 40;
    background-color: var(--footer-background);
    color: white;
    padding: 5px 5px 15px 5px;
    display: none;
    gap: 2px;
    align-items: center;
    justify-content: center;
  }

  @media (max-width: 640px) {
    .footer-nav {
      display: flex;
    }
  }

  .footer-nav > a,
  .footer-nav > button,
  .footer-add-dropdown .dropdown-toggle {
    --icon-size: 2rem;
    padding: 3px 5px;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: none;
    border: none;
    color: inherit;
    font: inherit;
    cursor: pointer;
    &:hover {
      background-color: #6d6a6a;
      text-decoration: none;
    }
    &.selected {
      background-color: #6d6a6a;
    }
  }

  .footer-add-dropdown {
    --dropdown-menu-top: auto;
    --dropdown-menu-bottom: 100%;
  }

  .footer-add-dropdown .dropdown-menu {
    font-size: 1rem;
    color: var(--dropdown-menu-color);
    background-color: var(--dropdown-menu-background-color);
  }

  .footer-add-dropdown .dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 5px;
  }

  .footer-nav-text {
    font-size: 0.7em;
  }
}