/* Mobile navbar behavior to match proof-of-concept (hamburger + dropdown). */

:root {
  --nav-h: 64px; /* matches h-16 */
}

/* Hide desktop tabs on mobile; show on md+ */
.nav-tabs-desktop {
  display: none;
}

.nav-mobile-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  color: rgb(55 65 81); /* gray-700 */
  transition: background-color .15s;
}
.nav-mobile-toggle:hover { background: rgb(243 244 246); } /* gray-100 */

.nav-mobile-icon { display: inline-flex; }
.nav-mobile-icon-close { display: none; }
body.nav-mobile-open .nav-mobile-icon-menu { display: none; }
body.nav-mobile-open .nav-mobile-icon-close { display: inline-flex; }

@media (min-width: 768px) {
  .nav-tabs-desktop { display: flex; }
  .nav-mobile-toggle { display: none; }
  .nav-mobile { display: none !important; }
}

/* Mobile menu root is rendered inside the <nav>, so use fixed positioning. */
.nav-mobile {
  position: fixed;
  inset: 0;
  z-index: 60;
}

.nav-mobile-backdrop {
  position: fixed;
  inset: 0;
  top: calc(var(--nav-h) + env(safe-area-inset-top, 0px));
  background: rgba(0, 0, 0, 0.30);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.nav-mobile-menu {
  position: fixed;
  left: 0;
  right: 0;
  top: calc(var(--nav-h) + env(safe-area-inset-top, 0px));
  background: white;
  border-top: 1px solid rgb(243 244 246); /* gray-100 */
  box-shadow: 0 20px 25px -5px rgba(0,0,0,.1), 0 8px 10px -6px rgba(0,0,0,.1);
}

.nav-mobile-menu-inner {
  padding: 8px 12px 12px;
}

.nav-mobile-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 900;
  color: rgb(75 85 99); /* gray-600 */
  text-decoration: none;
  transition: background-color .15s, color .15s;
}

.nav-mobile-item-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgb(243 244 246); /* gray-100 */
  color: rgb(156 163 175); /* gray-400 */
  flex-shrink: 0;
}

.nav-mobile-item.active {
  /* Fallback for older iOS: simple neutral highlight + accent icon. */
  background: rgba(17, 24, 39, 0.04);
  color: rgb(17 24 39); /* gray-900 */
}
.nav-mobile-item.active .nav-mobile-item-icon {
  background: var(--nav-accent);
  color: white;
}

/* Prefer accent-tinted active backgrounds when supported. */
@supports (color: color-mix(in srgb, white 50%, black)) {
  .nav-mobile-item.active {
    background: color-mix(in srgb, var(--nav-accent) 14%, white);
    color: color-mix(in srgb, var(--nav-accent) 70%, black);
  }
}

.nav-mobile-item-label { line-height: 1; }

.nav-mobile-item-dot {
  margin-left: auto;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--nav-accent);
}

/* Lock background scroll like the proof-of-concept does. */
body.nav-mobile-open {
  overflow: hidden;
  touch-action: none;
}

/* iOS: allow scrolling inside the menu if it grows too tall. */
.nav-mobile-menu-inner {
  max-height: calc(100vh - var(--nav-h) - env(safe-area-inset-top, 0px) - 12px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

