/* FinTracker — css/nav.css
 * Bottom nav, toast, bottom sheet, responsive scaling.
 * Part of the styles.css split — see CLAUDE.md "Module map". Loaded via multiple
 * <link> tags in the same cascade order as the original single file. */

/* ============ Bottom nav ============ */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-width: 480px;
  margin: 0 auto;
  height: var(--nav-h);
  padding-bottom: var(--safe-bottom);
  background: #fff;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  justify-content: space-around;
  padding-top: 8px;
  box-shadow: 0 -8px 24px rgba(30,42,69,0.05);
  z-index: 40;
}
.nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 0.7rem;
  font-weight: 500;
  color: #a2a9b8;
  flex: 1;
  padding: 4px 0 2px;
}
.nav-btn__icon {
  width: 34px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.nav-btn__label { transition: color 0.15s ease, font-weight 0.15s ease; }
.nav-btn.is-active { color: var(--green); }
.nav-btn.is-active .nav-btn__icon { background: var(--green-light); }
.nav-btn.is-active .nav-btn__label { font-weight: 700; }
.nav-btn--add {
  margin-top: -28px;
  color: var(--navy-soft);
}
.nav-btn__fab {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(155deg, var(--green) 0%, var(--green-dark) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 3px;
  transition: transform 0.12s ease, background 0.15s ease;
}
.nav-btn--add:active .nav-btn__fab { transform: scale(0.92); }

@media (hover: hover) and (pointer: fine) {
  .nav-btn:hover:not(.nav-btn--add) .nav-btn__icon { background: rgba(30,42,69,0.05); }
  .nav-btn.is-active:hover .nav-btn__icon { background: var(--green-light); }
  .nav-btn--add:hover .nav-btn__fab { background: linear-gradient(155deg, var(--green-dark) 0%, var(--green) 100%); }
}

/* ============ Toast ============ */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--nav-h) + var(--safe-bottom) + 16px);
  transform: translate(-50%, 20px);
  background: var(--navy);
  color: #fff;
  padding: 12px 20px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 100;
  max-width: 90%;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}
.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ============ Bottom sheet ============ */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15,20,30,0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 60;
}
.sheet-backdrop.is-visible { opacity: 1; pointer-events: auto; }

.sheet {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translate(-50%, 100%);
  width: 100%;
  max-width: 480px;
  background: #fff;
  border-radius: 24px 24px 0 0;
  padding: 10px 20px calc(24px + var(--safe-bottom));
  z-index: 61;
  transition: transform 0.28s cubic-bezier(.32,.72,0,1);
  max-height: 70vh;
  display: flex;
  flex-direction: column;
}
.sheet.is-open { transform: translate(-50%, 0); }
.sheet__handle {
  width: 40px;
  height: 4px;
  background: #dfe4ea;
  border-radius: 3px;
  margin: 4px auto 14px;
}
.sheet__title {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 600;
}
.sheet__list {
  overflow-y: auto;
  flex: 1;
}
.sheet__list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
}
.sheet__list li:last-child { border-bottom: none; }
.sheet__list .empty {
  text-align: center;
  color: var(--navy-soft);
  padding: 30px 0;
}
.sheet__close {
  margin-top: 14px;
  width: 100%;
  padding: 14px;
  border-radius: var(--radius-md);
  background: var(--green-light);
  color: var(--green-dark);
  font-weight: 600;
  font-size: 0.94rem;
  transition: background-color 0.15s ease;
}

@media (hover: hover) and (pointer: fine) {
  .sheet__close:hover { background: var(--green-pale); }
}

/* ============ Responsive scaling ============ */
@media (min-width: 480px) {
  html { font-size: 16.5px; }
}
@media (max-width: 340px) {
  .amount-card__value { font-size: 2.6rem; }
  .amount-card__symbol { font-size: 1.7rem; }
}

