/* ===== SLOTH — Bottom Action Navigation ===== */

/* ── Bottom Bar ─────────────────────────────────────────── */
.action-menu {
  width: 100vw;
  height: var(--footer-height);
  background-color: var(--bg-nav);
  border-top: 1px solid var(--border);
  box-shadow: var(--shadow-nav-bottom);
  display: flex;
  align-items: center;
  padding: 0 var(--space-2);
  box-sizing: border-box;
  text-align: center;
  font-size: var(--text-xs);
  position: fixed;
  bottom: 0;
  left: 0;
  z-index: 50;
  transition: background-color var(--ease-base), border-color var(--ease-base);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.action-menu.is-hidden {
  display: none;
}

/* ── Nav Item ───────────────────────────────────────────── */
.action-menu-icon-text-wrapper {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  text-decoration: none;
  color: var(--text-secondary);
  padding: var(--space-1) var(--space-1);
  border-radius: var(--radius-sm);
  transition: color var(--ease-fast);
  position: relative;
}

.action-menu-icon-text-wrapper:hover,
.action-menu-icon-text-wrapper.active {
  color: var(--clr-green);
}

/* ── Icon: inline SVG uses currentColor ─────────────────── */
.action-menu-icon {
  width: 1.375rem;
  height: 1.375rem;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: transform var(--ease-fast);
}

.action-menu-icon svg {
  width: 1.375rem;
  height: 1.375rem;
}

/* Outline/filled icon swap */
.fn-icon-outline,
.fn-icon-filled {
  display: flex;
  align-items: center;
  justify-content: center;
}

.fn-icon-filled { display: none; }

.action-menu-icon-text-wrapper.active .fn-icon-outline { display: none; }
.action-menu-icon-text-wrapper.active .fn-icon-filled  { display: flex; }

.action-menu-icon-text-wrapper.active .action-menu-icon {
  transform: translateY(-1px);
}

.action-menu-text {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: 500;
  white-space: nowrap;
  letter-spacing: 0.01em;
}

/* ── Floating Add Button ────────────────────────────────── */
.floating-action-button {
  position: fixed;
  bottom: max(calc(var(--footer-height) + var(--space-4)), calc(var(--keyboard-inset) + var(--space-4)));
  right: var(--space-4);
  display: inline-flex;
  min-height: var(--control-height-lg);
  align-items: center;
  justify-content: center;
  gap: var(--control-gap-md);
  padding: 0 var(--control-padding-x-lg);
  background-color: var(--clr-green);
  color: var(--text-inverse);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 600;
  border-radius: var(--radius-control);
  text-decoration: none;
  white-space: nowrap;
  box-shadow: var(--shadow-green-glow);
  z-index: 20;
  transition: filter var(--ease-fast), transform var(--ease-fast), box-shadow var(--ease-fast);
}

.floating-action-button:hover {
  filter: brightness(1.07);
  box-shadow: var(--shadow-green-glow-hover);
}

.floating-action-button:active {
  transform: scale(0.97);
  filter: brightness(0.95);
  box-shadow: none;
}

/* Was a typed "+" sized as text; it holds a Clarity icon now, so it only has to
   keep the glyph centred on the row. */
.fab-plus {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  line-height: 1;
}

.fab-label {
  font-size: var(--text-sm);
  font-weight: 600;
}

/* ── Desktop: hide bottom bar, reposition FAB ────────────── */
@media (min-width: 1024px) {
  .action-menu {
    display: none;
  }
  .floating-action-button {
    bottom: calc(var(--space-8) + var(--keyboard-inset));
    right: var(--space-8);
    transition: right var(--ease-slow), filter var(--ease-fast), transform var(--ease-fast), box-shadow var(--ease-fast);
  }
}
