/* Shared top navigation (inner pages). Homepage also defines these in style.css. */

.nav-left-group {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
}

.nav-text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.42rem 0.7rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm, 6px);
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.825rem;
  font-weight: 600;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.nav-text-link:hover {
  color: var(--text-primary);
  background: var(--bg-subtle);
  border-color: var(--border-light);
}

.nav-text-link.active,
.nav-text-link[aria-current="page"] {
  color: var(--accent-green, var(--green, #10b981));
}

.nav-saved-count {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm, 6px);
  color: var(--text-secondary);
  font-size: 0.725rem;
  font-weight: 600;
  padding: 0.12rem 0.45rem;
  line-height: 1;
  min-width: 1.25rem;
  text-align: center;
}

.nav-text-link.active .nav-saved-count,
.nav-text-link:hover .nav-saved-count {
  border-color: rgba(16, 185, 129, 0.35);
  color: var(--accent-green, var(--green, #10b981));
}

.nav-overflow-wrap {
  position: relative;
}

.nav-overflow-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm, 6px);
  background: var(--bg-surface);
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.nav-overflow-btn:hover,
.nav-overflow-wrap.open .nav-overflow-btn {
  color: var(--accent-green, var(--green, #10b981));
  background: var(--bg-subtle);
  border-color: var(--border-focus, rgba(16, 185, 129, 0.4));
}

.nav-overflow-icon-mobile {
  display: none;
}

.nav-overflow-menu {
  left: auto;
  right: 0;
  min-width: 260px;
  padding: 0.5rem;
  display: none;
  flex-direction: column;
  gap: 0.2rem;
}

.nav-overflow-wrap.open .nav-overflow-menu {
  display: flex;
}

.nav-mobile-only {
  display: none;
}

@media (max-width: 768px) {
  .nav-desktop-only {
    display: none !important;
  }

  .nav-mobile-only {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
  }

  .nav-overflow-icon-desktop {
    display: none;
  }

  .nav-overflow-icon-mobile {
    display: block;
  }

  .logo-tag {
    display: none;
  }
}

.user-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.5rem 0.65rem;
  border-radius: var(--radius-sm, 6px);
  text-decoration: none;
  color: var(--text-primary);
  border: 1px solid transparent;
  background: transparent;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.825rem;
  font-weight: 500;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.user-dropdown-item:hover {
  background: var(--bg-subtle);
  border-color: var(--border-light);
}

.user-item-icon {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-green, var(--green, #10b981));
  flex-shrink: 0;
}

.user-item-label {
  flex: 1;
  font-weight: 600;
  font-size: 0.825rem;
  color: var(--text-primary);
}

.user-saved-badge {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm, 6px);
  color: var(--text-secondary);
  font-size: 0.725rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  line-height: 1;
}

.user-menu-divider {
  height: 1px;
  background: var(--border-light);
  margin: 0.45rem 0.2rem;
}

.user-menu-section {
  padding: 0.25rem 0.35rem 0.15rem;
}

.user-menu-section-title {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.theme-segmented-group {
  display: flex;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm, 6px);
  padding: 3px;
  gap: 3px;
}

.theme-segment-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.38rem 0.25rem;
  border: 1px solid transparent;
  border-radius: calc(var(--radius-sm, 6px) - 2px);
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: transparent;
  cursor: pointer;
  font-family: inherit;
}

.theme-segment-btn.active,
.theme-segment-btn[aria-checked="true"] {
  background: var(--bg-surface);
  color: var(--accent-green, var(--green, #10b981));
  border-color: var(--border-light);
}

.footer-disclaimer {
  max-width: 40rem;
  margin: 0.75rem auto 0;
  font-size: 0.75rem;
  line-height: 1.6;
  color: var(--text-muted);
}

@media (max-width: 520px) {
  .logo-text {
    display: none;
  }

  .nav-left-group {
    gap: 0.55rem;
  }
}
