/*
 * CN-09 Settings sub-nav — app/components/ui/settings_sub_nav_component.rb
 *
 * "One partial, two renderings" (same mechanism as DD-01 table.css): both
 * the 44px row list and the CN-08-style pill bar render server-side. Spec
 * §3.4 CN-09 line 524: "Below --bp-lg it becomes CN-08" — that --bp-lg
 * (1024px) is the VIEWPORT, not the component's own width (in real use
 * the sub-nav sits in a ~240px sidebar column, which never reaches 1024px
 * regardless of viewport, so a container query on the component's own
 * width would never switch to the list rendering — dead code). The switch
 * is a plain viewport media query; `.is-pills` is a forced class for the
 * styleguide's narrow-demo screenshot, which fakes the collapsed state
 * without pretending a narrow wrapper means a narrow viewport.
 */

.ui-settings-sub-nav__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  list-style: none;
  margin: 0;
  padding: 0;
}

.ui-settings-sub-nav__pills {
  display: none;
}

@media (max-width: 1023.98px) {
  .ui-settings-sub-nav__list {
    display: none;
  }

  .ui-settings-sub-nav__pills {
    display: block;
  }
}

.ui-settings-sub-nav.is-pills .ui-settings-sub-nav__list {
  display: none;
}

.ui-settings-sub-nav.is-pills .ui-settings-sub-nav__pills {
  display: block;
}

.ui-settings-sub-nav__item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  height: var(--control-h);
  padding: 0 var(--space-3);
  border-radius: var(--radius-lg);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--text-base--line-height);
  font-weight: 500;
  color: var(--color-ink-muted);
  text-decoration: none;
  transition: background var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out);
}

.ui-settings-sub-nav__item:hover {
  background: var(--color-surface-hover);
}

.ui-settings-sub-nav__item.is-active {
  background: var(--color-accent-100);
  color: var(--color-accent-pressed);
}

.ui-settings-sub-nav__label {
  flex: 1;
}

.ui-settings-sub-nav__attention {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-round);
  background: var(--color-danger);
  flex-shrink: 0;
}
