/* Shared NURUI / N-Hub circle geometry. Load after each surface's styles.
 * A radius alone does not make a circle: row-specific width/height rules and
 * generic form min-heights previously produced 18x16 and 17x36 controls.
 * Only these shape invariants override context styles; pills and switches keep
 * their own layout. Labels retain their existing larger clickable areas. */
input:is([type=checkbox], [type=radio]):not([role=switch]) {
  --round-size: 18px;
  box-sizing: border-box;
  width: var(--round-size) !important;
  height: var(--round-size) !important;
  min-width: var(--round-size) !important;
  min-height: var(--round-size) !important;
  max-width: var(--round-size) !important;
  max-height: var(--round-size) !important;
  aspect-ratio: 1;
  flex: 0 0 var(--round-size);
  align-self: center;
  justify-self: start;
  padding: 0 !important;
  margin: 0;
  appearance: none;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--n-control-border);
  border-radius: 50%;
  background: var(--surface-alt, var(--panel2));
  color: var(--n-accent-text);
  vertical-align: middle;
  cursor: pointer;
}
input:is([type=checkbox], [type=radio]):not([role=switch]):checked {
  background: var(--accent);
  border-color: var(--accent);
}
/* CSS marks stay local and work independently of an icon or font download. */
input:is([type=checkbox], [type=radio]):not([role=switch])::after {
  content: none;
  box-sizing: border-box;
  padding: 0;
  margin: 0;
  mask: none;
  background: transparent;
}
input[type=checkbox]:not([role=switch]):checked::after {
  content: '';
  width: 5px;
  height: 9px;
  border: solid var(--n-accent-text);
  border-width: 0 2px 2px 0;
  border-radius: 0;
  transform: translateY(-1px) rotate(45deg);
}
input[type=radio]:not([role=switch]):checked::after {
  content: '';
  width: 6px;
  height: 6px;
  border: 0;
  border-radius: 50%;
  background: var(--n-accent-text);
}
input[type=checkbox]:not([role=switch]):indeterminate::after {
  content: '';
  width: 8px;
  height: 2px;
  border: 0;
  border-radius: 0;
  background: var(--text);
  transform: none;
}
input:is([type=checkbox], [type=radio]):not([role=switch]):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
input:is([type=checkbox], [type=radio]):not([role=switch]):disabled {
  opacity: .48;
  cursor: default;
}
.server-symbol {
  --round-size: 36px;
  box-sizing: border-box;
  width: var(--round-size) !important;
  height: var(--round-size) !important;
  min-width: var(--round-size) !important;
  min-height: var(--round-size) !important;
  max-width: var(--round-size) !important;
  max-height: var(--round-size) !important;
  flex: 0 0 var(--round-size) !important;
  aspect-ratio: 1;
  padding: 0;
  border-radius: 50%;
  align-self: center;
}
/* Only existing icon-only buttons; text actions keep their pill shape.
 * .row-action-trigger is a wrapper containing a popover, not an icon button. */
button:is(.utility-button, .theme-toggle, .notification-trigger, .more-actions),
.sidebar-heading > button,
.dialog-top > button,
button#appearance-toggle {
  --round-size: 36px;
  box-sizing: border-box;
  width: var(--round-size) !important;
  height: var(--round-size) !important;
  min-width: var(--round-size) !important;
  min-height: var(--round-size) !important;
  max-width: var(--round-size) !important;
  max-height: var(--round-size) !important;
  aspect-ratio: 1;
  padding: 0 !important;
  flex: 0 0 var(--round-size);
  align-self: center;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
@media (forced-colors: active) {
  input:is([type=checkbox], [type=radio]):not([role=switch]) {
    forced-color-adjust: none;
    border-color: ButtonText;
    background: Canvas;
  }
  input:is([type=checkbox], [type=radio]):not([role=switch]):checked { background: Highlight; border-color: Highlight; }
  input[type=checkbox]:not([role=switch]):checked::after { border-color: HighlightText; }
  input[type=radio]:not([role=switch]):checked::after { background: HighlightText; }
  input[type=checkbox]:not([role=switch]):indeterminate::after { background: ButtonText; }
}
