/* Shared selection surfaces use rounded black fills on every client. */
html[data-ui-selection] :is(button, a):is([data-variant="ghost"], [data-variant="secondary"]),
html[data-ui-selection] [data-slot="sidebar-menu-button"],
html[data-ui-selection] :is([data-slot="tabs-list"], [data-slot="toggle-group"], [data-slot="tabs-trigger"]) {
  background-color: transparent;
  box-shadow: none;
}
html[data-ui-selection] :is(button, a)[data-variant="outline"] { background-color: var(--background); }
html[data-ui-selection] :is(button, a):is([data-variant="ghost"], [data-variant="secondary"]) {
  border-color: transparent;
}
html[data-ui-selection] :is(button, [role="button"]):is([class~="bg-muted"], [class~="bg-muted/50"], [class~="bg-secondary"], [class~="bg-accent"], [class~="bg-primary/5"], [class~="bg-primary/10"]),
html[data-ui-selection] [data-sort-layer][class~="bg-primary/5"],
html[data-ui-selection] [data-slot="field-label"]:has([data-checked], [data-state="checked"]),
html[data-ui-selection] :is([role="treeitem"][aria-selected="true"], [data-slot="table-row"][data-state="selected"], [data-slot="table-row"]:has([aria-expanded="true"])) {
  background-color: transparent;
}
html[data-ui-selection] :is([data-slot="toggle"], [data-slot="toggle-group-item"]):not([data-state="on"]):hover,
html[data-ui-selection] :is([data-slot="toggle"], [data-slot="toggle-group-item"])[class~="data-[state=on]:bg-muted"][data-state="on"],
html[data-ui-selection] :is([data-slot="toggle"], [data-slot="toggle-group-item"])[data-variant="outline"],
html[data-ui-selection] [data-slot="table-row"]:hover { background-color: transparent; }
html[data-ui-selection] :is([data-slot="toggle"], [data-slot="toggle-group-item"])[class~="data-[state=on]:bg-muted"][data-state="on"] { color: var(--foreground); }
html[data-ui-selection] [data-slot="tabs-trigger"]:is([data-state="active"], [data-active]),
html[data-ui-selection] :is([data-slot="toggle"], [data-slot="toggle-group-item"])[data-state="on"],
html[data-ui-selection] :is(button, a)[data-variant="secondary"],
html[data-ui-selection] :is(button, a)[aria-current="page"],
html[data-ui-selection] [data-slot="sidebar-menu-button"][data-active="true"],
html[data-ui-selection] :is(button, [role="button"]):is([class~="bg-muted"], [class~="bg-accent"], [class~="bg-primary/5"], [class~="bg-primary/10"]),
html[data-ui-selection] :is(button, [role="button"])[aria-pressed="true"]:is([class~="bg-muted/50"], [class~="bg-secondary"]) {
  text-decoration-line: none;
  font-weight: revert-layer;
  box-shadow: none;
}
html[data-ui-selection] [data-slot="tabs-trigger"]:is([data-state="active"], [data-active]) { background-color: transparent; border-color: transparent; color: var(--foreground); box-shadow: none; }
html[data-ui-selection] [data-slot="tabs-trigger"]::after { display: none; }
html[data-ui-selection] :is([data-slot="command-item"], [data-slot="select-item"], [data-slot="dropdown-menu-item"], [data-slot="dropdown-menu-sub-trigger"], [data-slot="dropdown-menu-checkbox-item"], [data-slot="dropdown-menu-radio-item"], [data-slot="context-menu-item"], [data-slot="context-menu-sub-trigger"], [data-slot="context-menu-checkbox-item"], [data-slot="context-menu-radio-item"]):not([data-variant="destructive"]):is(:hover, :focus, [data-highlighted], [data-selected="true"], [data-state="open"]) {
  background-color: transparent;
  text-decoration-line: none;
  font-weight: revert-layer;
}
html[data-ui-selection] [data-slot="table-row"][data-state="selected"] { box-shadow: none; }
html[data-ui-selection]:root [data-slot="tabs-trigger"]:is([data-state="active"], [data-active]),
html[data-ui-selection]:root :is([data-slot="toggle"], [data-slot="toggle-group-item"])[data-state="on"],
html[data-ui-selection]:root :is(button, a)[data-variant="secondary"],
html[data-ui-selection]:root :is(button, a)[aria-current="page"],
html[data-ui-selection]:root :is(button, [role="button"])[aria-pressed="true"]:not(:has([data-slot="card"], img)),
html[data-ui-selection]:root [data-slot="sidebar-menu-button"][data-active="true"],
html[data-ui-selection]:root :is(button, [role="button"]):is([class~="bg-muted"], [class~="bg-accent"], [class~="bg-primary/5"], [class~="bg-primary/10"]),
html[data-ui-selection]:root :is([role="option"], [role="treeitem"])[aria-selected="true"],
html[data-ui-selection]:root [role="menuitem"][aria-current="page"],
html[data-ui-selection]:root :is([data-slot="select-item"], [data-slot="dropdown-menu-checkbox-item"], [data-slot="dropdown-menu-radio-item"], [data-slot="context-menu-checkbox-item"], [data-slot="context-menu-radio-item"])[data-state="checked"]:not([data-variant="destructive"]) {
  background-color: var(--color-neutral-900, #171717);
  color: var(--color-white, #fff);
  border-color: transparent;
  border-radius: calc(var(--radius, .625rem) - 2px);
  background-image: none;
  text-decoration-line: none;
  box-shadow: none;
}
/* Summary cards own their fill; a pressed wrapper must not show through a translucent card. */
html[data-ui-selection]:root button[aria-pressed]:has(> [data-slot="card"]) {
  background-color: transparent;
  color: var(--foreground);
  background-image: none;
  border-color: transparent;
  border-radius: calc(var(--radius, .625rem) + 4px);
  text-decoration-line: none;
  box-shadow: none;
}
html[data-ui-selection]:root button[aria-pressed="true"] > [data-slot="card"] {
  background-color: var(--color-neutral-900, #171717);
  color: var(--color-white, #fff);
  border-color: var(--color-neutral-900, #171717);
  background-image: none;
  box-shadow: none;
}
html[data-ui-selection]:root button[aria-pressed="true"] > [data-slot="card"] :is([data-slot="card-content"], [data-slot="card-description"]):not([class~="text-current"]) {
  color: color-mix(in srgb, var(--color-white, #fff) 75%, transparent);
}
html[data-ui-selection]:root button[aria-pressed="true"]:has(img):not(:has([data-slot="card"])) {
  background-color: transparent;
  color: var(--foreground);
  background-image: none;
  text-decoration-line: none;
  outline: 1px solid var(--foreground);
  outline-offset: -1px;
}
html[data-ui-selection]:root [data-sort-layer][class~="bg-primary/5"],
html[data-ui-selection]:root [data-slot="field-label"]:has([data-checked], [data-state="checked"]),
html[data-ui-selection]:root [data-slot="table-row"][data-state="selected"] {
  background-color: transparent;
  color: var(--foreground);
  background-image: none;
  text-decoration-line: none;
  outline: 1px solid var(--foreground);
  outline-offset: -1px;
}
/* Radix can restore focus after pointer use; only actual keyboard navigation gets an indicator. */
html[data-ui-selection] [data-slot="input-group"]:has([data-slot="input-group-control"]:focus):not(:has([aria-invalid="true"])) {
  box-shadow: none;
}
html[data-ui-selection] :is(button, a[href], input, select, textarea, [role="tab"], [role="option"], [role="menuitem"], [role="combobox"], [role="checkbox"], [role="switch"], [role="slider"]):not([aria-invalid="true"]):focus {
  box-shadow: none;
  outline: none;
}
html[data-ui-selection][data-keyboard-navigation] :is(button, a[href], input, select, textarea, [role="tab"], [role="option"], [role="menuitem"], [role="combobox"], [role="checkbox"], [role="switch"], [role="slider"]):not([aria-invalid="true"]):focus-visible {
  outline: 2px solid var(--foreground);
  outline-offset: -2px;
}
html[data-ui-selection][data-keyboard-navigation] :is(button, a[href], [role="tab"], [role="option"], [role="menuitem"]):is([data-variant="secondary"], [aria-current="page"], [aria-selected="true"], [aria-pressed="true"], [data-active="true"], [data-state="on"], [data-state="checked"]):not([aria-invalid="true"]):focus-visible {
  outline-color: var(--color-white, #fff);
}
html[data-ui-selection][data-keyboard-navigation] button[aria-pressed]:has(> [data-slot="card"]):focus-visible {
  outline-color: var(--foreground);
  outline-offset: 2px;
}
