/* Five top-level destinations and the sub-tabs of the open one (nav_groups.js). */

/* The per-section list stays in the page for display preferences and family view; people see the groups. */
.sidebar .nav-menu,
.sidebar .nav-aux,
.sidebar .nav-group-label { display: none; }

.nav-groups { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.nav-group {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 10px 12px;
  cursor: pointer;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-sub);
  transition: background 0.15s, color 0.15s;
  outline: none;
  user-select: none;
}
.nav-group[hidden] { display: none; }
.nav-group:hover { background: var(--surface-hover); color: var(--text); }
.nav-group:focus-visible { box-shadow: var(--focus-ring); }
.nav-group.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }

.subnav {
  display: flex;
  gap: 4px;
  margin: 0 0 20px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg2);
  width: fit-content;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}
.subnav[hidden] { display: none; }
.subnav::-webkit-scrollbar { display: none; }
.subnav-tab {
  flex: none;
  min-height: 40px;
  padding: 8px 16px;
  border: none;
  border-radius: 9px;
  background: none;
  color: var(--text-sub);
  font: inherit;
  font-size: 14.5px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.subnav-tab:hover { color: var(--text); }
.subnav-tab:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.subnav-tab.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }

.tab-btn[hidden] { display: none; }

@media (max-width: 900px) {
  .subnav {
    position: sticky;
    top: 0;
    z-index: 40;
    width: auto;
    margin: -6px -16px 16px;
    padding: 6px 12px;
    border: none;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    background: color-mix(in srgb, var(--bg) 92%, transparent);
    backdrop-filter: saturate(160%) blur(12px);
    -webkit-backdrop-filter: saturate(160%) blur(12px);
  }
  .subnav-tab { min-height: 44px; }
  .tab-btn { min-height: 48px; justify-content: center; }
}

/* Settings: three blocks (settings_groups.js) */
.settings-group { margin-bottom: 32px; }
.settings-group[hidden] { display: none; }
.settings-group-head { font-size: 18px; font-weight: 650; color: var(--text); margin: 0 0 4px; }
.settings-group-sub { font-size: 13.5px; color: var(--text-sub); margin: 0 0 14px; }
details.settings-owner > summary.settings-group-head {
  display: flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; list-style: none;
}
details.settings-owner > summary::-webkit-details-marker { display: none; }
details.settings-owner > summary::before {
  content: ""; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(-45deg); transition: transform 0.15s; opacity: 0.7;
}
details.settings-owner[open] > summary::before { transform: rotate(45deg); }
details.settings-owner > summary:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: 8px; }

/* Raw rule signals on the Insights page are the owner's diagnostics. */
body:not(.is-owner) .owner-tech { display: none; }

/* A tile showing the last value received rather than today's (today_fallback.js). */
.metric-tile.is-stale .card-value { opacity: 0.6; }

/* Touch screens: every control is at least 44 px tall and easy to hit. */
@media (pointer: coarse), (max-width: 900px) {
  .btn, .btn-sm, .btn-icon, .tab-chip, .seg-btn, .range-btn, .preset-btn, .legend-item, .quick-chip,
  .theme-toggle, select, input[type="text"], input[type="email"], input[type="password"], input[type="number"],
  input[type="date"], input[type="time"], input[type="search"], details > summary {
    min-height: 44px;
  }
  .btn-icon { min-width: 44px; }
  .chip-btn, .btn-period { min-height: 40px; }
  .display-grip, .arrange-grip { min-width: 40px; min-height: 40px; }
  .card-header .card-link, .card-arrow { min-width: 44px; min-height: 44px; }
  input[type="checkbox"], input[type="radio"] { min-width: 22px; min-height: 22px; }
}

/* The connection status cards repeat the Connections tab; the Data tab keeps sync, report, export and principles. */
#privacy-providers-row { display: none; }
