/**
 * =====================================================
 * horomusume.net - ボトムナビゲーションバー
 * =====================================================
 *
 * 【概要】
 * モバイル専用（<768px）の固定ボトムナビゲーション。
 * 5タブ構成: ホーム / 陣法 / 情勢 / 英傑 / その他
 * 「その他」タブは window.Sidebar.toggle() を呼び出す。
 *
 * 【依存関係】
 * - design-tokens.css の CSS 変数を使用
 * - js/shared/bottom-nav.js により動的にマウントされる
 *
 * 【z-index 設計】
 * sidebar: 50, sidebar-overlay: 49, bottom-nav: 40, app-header: 30
 */


/* =====================================================
   ボトムナビバー本体
   ===================================================== */

#bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(60px + env(safe-area-inset-bottom));
  z-index: 40;
  display: flex;
  background: var(--c-bg-card);
  border-top: 1px solid var(--c-border);
  padding-bottom: env(safe-area-inset-bottom);
}

/* デスクトップ・タブレット (>=768px) では非表示 */
@media (min-width: 768px) {
  #bottom-nav {
    display: none;
  }
}


/* =====================================================
   タブアイテム（リンク・ボタン共通）
   ===================================================== */

.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  gap: 3px;
  font-size: 0.7rem;
  color: var(--c-text-sub);
  text-decoration: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  font-family: var(--font-family);
  transition: color 150ms ease, background-color 150ms ease;
  -webkit-tap-highlight-color: transparent;
}

.bottom-nav-item.active {
  color: var(--brand-primary);
  font-weight: 600;
}

.bottom-nav-item.active .bottom-nav-icon svg {
  transform: scale(1.1);
}

.bottom-nav-item:active {
  background: var(--c-bg-hover);
  transform: scale(0.93);
}

.bottom-nav-item:focus-visible {
  outline: 2px solid var(--c-focus-ring);
  outline-offset: -2px;
}


/* =====================================================
   アイコン
   ===================================================== */

.bottom-nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.bottom-nav-icon svg {
  width: 1.375rem;
  height: 1.375rem;
}


/* =====================================================
   ラベル
   ===================================================== */

.bottom-nav-label {
  line-height: 1.2;
  white-space: nowrap;
}


/* =====================================================
   アクセシビリティ: prefers-reduced-motion
   ===================================================== */

@media (prefers-reduced-motion: reduce) {
  .bottom-nav-item {
    transition-duration: 0.01ms;
  }
}
