/* Command settings gear menu — see theme/adb-commands.js.
   NOTE mdbook sets html { font-size: 62.5% }, so 1rem = 10px here; body text is
   1.6rem. Components set their font-size in rem accordingly and space in em. */

.adb-gear { font-size: 1.8rem; line-height: 1; }

.adb-popup {
  position: fixed;
  top: 3.1rem;
  left: 0.6rem;
  z-index: 200;
  width: min(38rem, 92vw);
  padding: 0.75em 0.95em 0.85em;
  border: 1px solid var(--quote-border, #cfcfcf);
  border-radius: 8px;
  background: var(--bg, #fff);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.22);
  font-size: 1.4rem;
}

.adb-pop-title { font-weight: 600; margin-bottom: 0.5em; }

.adb-menu-preview {
  display: block;
  margin: 0 0 0.6em;
  padding: 0.35em 0.5em;
  border-radius: 5px;
  background: var(--quote-bg, rgba(120, 120, 120, 0.08));
  font-size: 0.88em;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.adb-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45em 0.9em;
  margin: 0.5em 0;
}
.adb-row.adb-sub { margin-left: 1.4em; opacity: 0.95; }
.adb-row-label { font-weight: 600; opacity: 0.85; }

.adb-seg {
  display: inline-flex;
  border: 1px solid var(--quote-border, #cfcfcf);
  border-radius: 6px;
  overflow: hidden;
}
.adb-seg input { display: none; }
.adb-seg label { padding: 0.2em 0.65em; cursor: pointer; user-select: none; }
.adb-seg input:checked + label { background: var(--links, #4183c4); color: #fff; }

.adb-check { cursor: pointer; user-select: none; white-space: nowrap; }
.adb-check input { margin-right: 0.2em; vertical-align: middle; }

.adb-pop-note { margin: 0.55em 0 0; font-size: 0.88em; opacity: 0.7; }

/* Palette-conditional prose (writing/): variants shown per the With tab.
   Default (no JS) is the plain/flakeless variant, matching the palette's
   nix-build default; adb-commands.js stamps html.adb-flakes on the flakes tab. */
.adb-when-flakes { display: none; }
html.adb-flakes .adb-when-flakes { display: block; }
html.adb-flakes .adb-when-flakeless { display: none; }
