/* The Settings page (core/settings-page.js, design/v5/V5Settings.dc.html): a readable column of
   sections, each a small heading over a grouped card of rows; its own sidebar holds the way back and
   the sections. Also the switch, which Settings is the first to use. */

.set-page { flex: 1; min-height: 0; overflow: auto; }
.set-col { max-width: 600px; margin: 0 auto; padding: 56px 48px; }
.set-h1 { margin: 0; color: var(--fg-strong); font-size: 22px; font-weight: 600; letter-spacing: -.01em; line-height: 1.25; }

.set-sec { margin-top: 24px; }
.set-head { display: flex; align-items: baseline; justify-content: space-between; margin: 0 0 8px; padding: 0 4px; }
.set-head h2 { margin: 0; color: var(--fg); font-size: 13px; font-weight: 600; }
.set-head span { color: var(--muted); font-size: 12px; }
.set-card { padding: 0 16px; border-radius: 14px; background: var(--card); }
.set-row { display: flex; align-items: center; gap: 16px; min-height: 48px; padding: 8px 0; border-top: 1px solid var(--sep); }
.set-row:first-child { border-top-color: transparent; }
.set-words { flex: 1; min-width: 0; }
.set-title { margin: 0; color: var(--fg); font-size: 13px; }
.set-sub { margin: 2px 0 0; color: var(--muted); font-size: 12px; line-height: 1.4; }
.set-value { flex: none; color: var(--muted); font-size: 12px; white-space: nowrap; }
.set-value.late { color: var(--drift-text); }
.set-btns { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.set-btn {
  display: inline-flex;
  flex: none;
  align-items: center;
  height: 28px;
  padding: 0 12px;
  border: 0;
  border-radius: 14px;
  color: var(--fg);
  font: 500 12px var(--font-ui);
  text-decoration: none;
  white-space: nowrap;
}

/* the segmented control in a row: 96 per item, 30 tall */
.set-seg { flex: none; width: 192px; height: 30px; padding: 3px; border-radius: 999px; background: var(--fill); }
.set-seg > .pill { top: 3px; bottom: 3px; }
.set-seg > button { height: 100%; padding: 0 8px; border: 0; border-radius: 999px; color: var(--muted); font: 500 12px var(--font-ui); white-space: nowrap; }
.set-seg > button[aria-selected="true"] { color: var(--fg-strong); font-weight: 600; }

/* the switch */
.switch {
  position: relative;
  flex: none;
  width: 38px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 11px;
  background: var(--switch-off);
  transition: background-color 200ms var(--ease);
}
.switch[aria-checked="true"] { background: var(--accent); }
.switch i { position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 9px; background: var(--knob); box-shadow: var(--knob-drop); transition: transform 200ms var(--sp-smooth); }
.switch[aria-checked="true"] i { transform: translateX(16px); }
.switch:disabled { opacity: .35; }

/* its sidebar */
.set-side { display: flex; flex: 1; flex-direction: column; min-height: 0; }
.set-side .tb-fill { flex: 1; }
.set-side-head { display: flex; align-items: center; gap: 4px; height: 32px; margin: 0 0 8px; padding: 0 4px; }
.set-side-head h2 { margin: 0; color: var(--fg-strong); font-size: 15px; font-weight: 600; }
.set-back { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 14px; color: var(--fg); }
.set-nav { display: flex; flex-direction: column; }
.set-cat {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  height: 28px;
  padding: 0 10px;
  border: 0;
  border-radius: 10px;
  color: var(--fg);
  font: 400 13px var(--font-ui);
  text-align: left;
  white-space: nowrap;
}
.set-cat[aria-current="page"] { color: var(--fg-strong); }
.set-ic { display: inline-flex; color: var(--muted); }
.set-cat[aria-current="page"] .set-ic { color: var(--accent-text); }
/* Ava's mark stays her own blue */
.set-ic.ava,
.set-cat[aria-current="page"] .set-ic.ava { color: var(--ava); }
.set-foot { margin: 0; padding: 8px 10px 4px; color: var(--muted); font-size: 11px; }

@media (max-width: 700px) {
  .set-col { padding: 56px 16px; }
  .set-row { flex-wrap: wrap; }
}

/* a narrow window: the sections open over the page from the sidebar's capsule, so the page clears it */
@media (max-width: 700px) {
  .app[data-chrome="none"] .app-main { padding-top: 56px; }
}

/* Settings › Shortcuts (core/settings-keys.js): a shortcut's keys as a button, and Reset beside it */
.set-keys { display: flex; flex: none; align-items: center; gap: 8px; }
.set-key {
  min-width: 72px;
  height: 28px;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  color: var(--fg-strong);
  font: 500 12px var(--font-ui);
  white-space: nowrap;
}
.set-key.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.set-key.none { color: var(--muted); }
/* listening for keys: the focus ring's accent, as the one place keys go */
.set-key.rec { box-shadow: inset 0 0 0 2px var(--accent); color: var(--fg); }
.set-reset { height: 28px; padding: 0 8px; border: 0; border-radius: 10px; color: var(--muted); font: 500 12px var(--font-ui); }
.set-reset:disabled { opacity: .35; }
.set-err { margin: 4px 0 0; color: var(--task-text); font-size: 12px; line-height: 1.4; }
