/* Nav components split from theme.css */

/* Mobile bottom navigation (public) — modern glassmorphism, 5 items */
.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(var(--bottom-nav-height) + 12px);
  padding: 0 12px 12px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
  z-index: 1030;
  pointer-events: none;
}

.bottom-nav-inner {
  display: flex;
  align-items: stretch;
  justify-content: space-around;
  height: var(--bottom-nav-height);
  max-width: 420px;
  margin: 0 auto;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 28px;
  box-shadow:
    0 0 0 1px rgba(15, 23, 42, 0.04),
    0 -2px 8px rgba(15, 23, 42, 0.02),
    0 12px 40px rgba(15, 23, 42, 0.12);
  pointer-events: auto;
}

.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 10px 6px;
  color: rgba(15, 23, 42, 0.5);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: color 0.25s ease, transform 0.2s ease;
  min-width: 0;
  position: relative;
  overflow: visible;
}

.bottom-nav-item .bi {
  font-size: 1.4rem;
  line-height: 1;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.bottom-nav-item span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.bottom-nav-item:hover {
  color: rgba(15, 23, 42, 0.8);
}

.bottom-nav-item:hover .bi {
  transform: scale(1.06);
}

.bottom-nav-item.active {
  color: var(--brand-primary);
  font-weight: 600;
}

.bottom-nav-item.active .bi {
  color: var(--brand-primary);
}

.pb-bottom-nav {
  padding-bottom: calc(var(--bottom-nav-total, 88px) + env(safe-area-inset-bottom));
}

/* Dashboard mobile bottom navigation */
.dash-bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--bottom-nav-height);
  padding-bottom: env(safe-area-inset-bottom);
  background: transparent;
  z-index: 1030;
}

.dash-bottom-nav::before {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  top: 8px;
  bottom: calc(8px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 15px;
  box-shadow: 0 18px 45px rgba(11, 18, 32, 0.18);
  backdrop-filter: saturate(160%) blur(12px);
}

.dash-bottom-nav .container {
  position: relative;
  z-index: 1;
}

.dash-bottom-nav .row {
  padding-left: 10px;
  padding-right: 10px;
}

.dash-bottom-nav .nav-link {
  color: var(--text-2);
  font-size: 0.72rem;
  padding: 0.8rem 0.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  white-space: nowrap;
}

.dash-bottom-nav .nav-link .bi {
  font-size: 1.2rem;
  line-height: 1;
}

.dash-bottom-nav .nav-link.active {
  color: var(--brand-primary);
  font-weight: 800;
}

.pb-dash-bottom-nav {
  padding-bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom));
}

/* Ensure content never hides behind bottom nav */
.pb-dash-bottom-nav .dashboard-content main {
  padding-bottom: calc(var(--bottom-nav-height) + 24px) !important;
}

.pb-bottom-nav main {
  padding-bottom: calc(var(--bottom-nav-total, 88px) + 24px) !important;
}

/* Bottom-sheet modal (dashboard menu) */
.bottom-sheet.modal {
  --bs-modal-bg: transparent;
}

.bottom-sheet .modal-dialog {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  max-width: none;
  pointer-events: none;
}

.bottom-sheet .modal-content {
  pointer-events: auto;
  border: 0;
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(150%) blur(12px);
  box-shadow: 0 -12px 32px rgba(15, 23, 42, 0.18);
  overflow: hidden;
}

.bottom-sheet .modal-header {
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  padding: 14px 16px 12px;
}

.bottom-sheet .modal-title {
  font-weight: 900;
  letter-spacing: -0.02em;
}

.sheet-handle {
  width: 38px;
  height: 4px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.16);
  margin: 8px auto 0;
}

.bottom-sheet .modal-body {
  padding: 10px 10px calc(12px + env(safe-area-inset-bottom));
  max-height: min(65vh, 520px);
  overflow: auto;
}

.sheet-menu {
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

.sheet-menu .sheet-col {
  padding: 8px;
}

.sheet-menu .sheet-col + .sheet-col {
  border-left: 1px solid rgba(15, 23, 42, 0.05);
}

.sheet-cat {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.05);
  background: #f8f9fb;
  color: rgba(15, 23, 42, 0.9);
  box-shadow: none;
}

.sheet-cat .left {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
}

.sheet-cat.active {
  background: #f2f6ff;
  border-color: #d8e3ff;
  color: #0b1220;
}

.sheet-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sheet-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  color: rgba(15, 23, 42, 0.88);
  text-decoration: none;
  border: 1px solid rgba(15, 23, 42, 0.05);
  background: #ffffff;
  box-shadow: none;
}

.sheet-link:hover {
  background: rgba(255, 255, 255, 0.9);
}

.sheet-link .label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 800;
}

.sheet-link .arrow,
.sheet-cat .arrow {
  font-weight: 800;
  color: rgba(15, 23, 42, 0.35);
}

/* Classic variant */
.sheet-menu--classic {
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: #fdfdfd;
  box-shadow: none;
}
.sheet-menu--classic .sheet-col {
  padding: 6px 8px;
}
.sheet-menu--classic .sheet-col + .sheet-col {
  border-left: 1px solid rgba(15, 23, 42, 0.08);
}
.sheet-menu--classic .sheet-cat,
.sheet-menu--classic .sheet-link {
  border-radius: 10px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #ffffff;
  box-shadow: none;
  color: rgba(15, 23, 42, 0.92);
  padding: 10px 12px;
}
.sheet-menu--classic .sheet-cat.active {
  background: #eef3ff;
  border-color: #cddcff;
}
.sheet-menu--classic .sheet-links {
  gap: 6px;
}
.sheet-menu--classic .sheet-link:hover {
  background: #f7f9ff;
}
.sheet-menu--classic .arrow {
  color: rgba(15, 23, 42, 0.45);
}

.sheet-panel {
  display: none;
}

.sheet-panel.active {
  display: block;
}

.bottom-sheet .btn-close {
  opacity: 0.75;
}

@media (prefers-reduced-motion: no-preference) {
  .bottom-sheet.fade .modal-dialog {
    transform: translateY(12px);
    transition: transform 200ms ease;
  }
  .bottom-sheet.show .modal-dialog {
    transform: translateY(0);
  }
}

