/* The Publisher's glossary (G1): each pack a large switch, its phrases as "said -> translated" pairs, state by shape. */
#publisher-settings .setting-glossary[hidden],
.setting-glossary [hidden] { display: none; }
.glossary-icon { display: inline-flex; flex: none; width: 20px; height: 20px; }
.glossary-icon svg { width: 100%; height: 100%; }
.glossary-packs { display: grid; gap: 10px; }
.glossary-pack {
  border: 2px solid var(--panel-border);
  border-radius: 14px;
  overflow: hidden;
}
.glossary-pack:has([aria-checked="true"]) {
  border-color: var(--vv-action);
  box-shadow: 0 0 0 2px var(--vv-action) inset;
}
body #publisher-settings .setting-glossary button.glossary-pack__switch {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 64px;
  margin: 0;
  padding: 10px 14px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  box-shadow: none;
  color: inherit;
  font: inherit;
  text-align: start;
  cursor: pointer;
}
.glossary-pack__switch > .glossary-icon { width: 28px; height: 28px; }
.glossary-pack__name { display: grid; flex: 1; min-width: 0; font-weight: 600; }
.glossary-pack__name small { font-weight: 400; color: var(--vv-muted); }
/* A switch: the knob's place and its tick say on or off, not the colour alone. */
.glossary-pack__knob {
  position: relative;
  flex: none;
  width: 52px;
  height: 30px;
  border: 2px solid var(--vv-control-border);
  border-radius: 999px;
}
.glossary-pack__knob::after {
  content: "";
  position: absolute;
  top: 3px;
  inset-inline-start: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--vv-control-border);
  transition: inset-inline-start .15s;
}
[aria-checked="true"] > .glossary-pack__knob { background: var(--vv-action); border-color: var(--vv-action); }
[aria-checked="true"] > .glossary-pack__knob::after {
  content: "✓";
  inset-inline-start: 25px;
  background: var(--vv-action-ink);
  color: var(--vv-action);
  font-size: 14px;
  font-weight: 700;
  line-height: 20px;
  text-align: center;
}
body #publisher-settings .setting-glossary details { margin: 0; padding: 0; border: 0; background: none; }
body #publisher-settings .setting-glossary .glossary-pack__peek summary { box-sizing: border-box; min-height: 44px; margin: 0; padding: 11px 14px; font-size: .875rem; color: var(--vv-muted); cursor: pointer; }
.glossary-pack__peek ul { display: grid; gap: 6px; margin: 0; padding: 4px 14px 12px; list-style: none; }
.glossary-pair { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 0; overflow-wrap: anywhere; }
.glossary-pair > .glossary-icon { width: 16px; height: 16px; color: var(--vv-muted); }
.glossary-said { color: var(--vv-muted); }
.glossary-as { font-weight: 700; }
.setting-glossary [aria-disabled="true"] { opacity: .6; }
.glossary-status { margin: 8px 0 0; font-size: .875rem; color: var(--vv-muted); }
.glossary-status:empty { display: none; }
.setting-glossary button:focus-visible,
.setting-glossary summary:focus-visible { outline: 3px solid var(--vv-action); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  .glossary-pack__knob::after { transition: none; }
}
