/*
  Component — Bottom Navigation Bar
  ────────────────────────────────────
  Reference: Nav Bar.png
  5 tabs: 首頁 (active/fill) | 自選 | 交易 (elevated) | 行情 | 服務
*/

/* ── Layout override: allow trade icon to protrude ── */
.app-bottom-nav {
  overflow: visible;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 400;
  transition: transform 0.24s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
}

.app.is-lists-editing .app-bottom-nav {
  transform: translateY(100%);
  pointer-events: none;
}

/* ── Nav strip ───────────────────────────────────── */
.bottom-nav {
  display: flex;
  align-items: stretch;
  height: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom, 0px));
  width: 100%;
}

/* ── Tab item ────────────────────────────────────── */
.bottom-nav__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 4px 6px;
  position: relative;
  transition: opacity 0.12s;
}

.bottom-nav__item:active { opacity: 0.65; }

/* Active top-line indicator */
.bottom-nav__item.is-active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 22px;
  height: 2.5px;
  background: var(--color-brand-blue);
  border-radius: 0 0 3px 3px;
}

/* ── Icon ────────────────────────────────────────── */
.bottom-nav__icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bottom-nav__icon img {
  width: 24px;
  height: 24px;
  /* Inactive: neutral gray */
  filter: grayscale(1) brightness(0.68);
}

/* Active icon → brand blue */
.bottom-nav__item.is-active .bottom-nav__icon img {
  filter: brightness(0) saturate(100%)
          invert(35%) sepia(97%) saturate(1059%)
          hue-rotate(185deg) brightness(96%);
}

/* ── Label ───────────────────────────────────────── */
.bottom-nav__label {
  font-size: 10px;
  font-weight: var(--font-weight-medium);
  color: var(--color-text-tertiary);
  line-height: 1;
  white-space: nowrap;
}

.bottom-nav__item.is-active .bottom-nav__label {
  color: var(--color-brand-blue);
  font-weight: var(--font-weight-bold);
}

/* ── Trade (center) — elevated ───────────────────── */
.bottom-nav__item--trade {
  justify-content: flex-end;
  padding-bottom: 8px;
  overflow: visible;
}

/* No top-line indicator for trade */
.bottom-nav__item--trade::before { display: none; }

.bottom-nav__trade-icon {
  position: absolute;
  width: 52px;
  height: 52px;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  filter: drop-shadow(0 3px 10px rgba(9, 109, 190, 0.35)) !important;
}
