:root {
  --hub-grid-blue: var(--blue-deep, #0879c7);
  --hub-grid-line: var(--line, #dce5e9);
  --hub-grid-ink: var(--ink, #10202a);
  --hub-grid-muted: var(--muted, #667985);
  --hub-grid-tooltip: #07151d;
  --hub-grid-action-color: #0879c7;
  --hub-grid-action-hover-color: #055b96;
  --hub-grid-action-border: #0879c7;
  --hub-grid-action-hover-bg: rgba(8, 121, 199, .10);
  --hub-grid-action-active-bg: rgba(8, 121, 199, .16);
  --hub-grid-action-focus-ring: rgba(8, 121, 199, .28);
}

.hub-grid-actions {
  display: inline-flex;
  width: max-content;
  align-items: center;
  justify-content: center;
  gap: 5.1px;
}

.hub-grid-actions-column {
  text-align: center;
}

.hub-grid-action {
  position: relative;
  display: grid;
  width: 32px;
  height: 32px;
  padding: 0;
  flex: 0 0 32px;
  place-items: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--hub-grid-action-color);
  box-shadow: none;
  cursor: pointer;
  transform: scale(.8);
  transition: transform 90ms ease, color 120ms ease;
}

.hub-grid-action:is(.is-timeline, .is-edit, .is-execute, .is-schedule, .is-delete, .is-detail, .is-permission, .is-link, .dimension-toggle-action, .activation-toggle) {
  color: var(--hub-grid-action-color);
}

.hub-grid-action:not(:is(.activation-toggle, .dimension-toggle-action)):hover {
  background: transparent;
  color: var(--hub-grid-action-hover-color);
}

.hub-grid-action:is(.activation-toggle, .dimension-toggle-action) {
  border: 1px solid var(--hub-grid-action-border);
  border-radius: 50%;
  box-shadow: 0 3px 8px rgba(8, 121, 199, .08);
  transition: transform 90ms ease, box-shadow 90ms ease, background-color 120ms ease;
}

.hub-grid-action:is(.activation-toggle, .dimension-toggle-action):hover,
.hub-grid-action:is(.activation-toggle, .dimension-toggle-action):focus-visible { background: var(--hub-grid-action-hover-bg); }

.hub-grid-action:focus-visible {
  outline: 2px solid var(--hub-grid-action-focus-ring);
  outline-offset: 2px;
}

.hub-grid-action:not(:is(.activation-toggle, .dimension-toggle-action)):active,
.hub-grid-action:not(:is(.activation-toggle, .dimension-toggle-action)).is-pressed {
  transform: translateY(.8px) scale(.784);
  background: transparent;
  box-shadow: none;
}

.hub-grid-action:is(.activation-toggle, .dimension-toggle-action):active,
.hub-grid-action:is(.activation-toggle, .dimension-toggle-action).is-pressed {
  transform: translateY(.8px) scale(.784);
  background: var(--hub-grid-action-active-bg);
  box-shadow: inset 0 1px 3px rgba(7, 21, 29, .16);
}

.hub-grid-action:disabled {
  opacity: .48;
  cursor: not-allowed;
}

.hub-grid-action::after {
  position: absolute;
  z-index: 80;
  top: calc(100% + 7px);
  left: 50%;
  width: max-content;
  max-width: 240px;
  padding: 6px 8px;
  border-radius: 8px;
  background: var(--hub-grid-tooltip);
  color: #fff;
  content: attr(data-tooltip);
  font-size: 9px;
  font-weight: 650;
  line-height: 1.35;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -2px);
  transition: opacity 100ms ease, transform 100ms ease;
  white-space: nowrap;
}

.hub-grid-action:not([data-tooltip])::after,
.hub-grid-action[data-tooltip=""]::after { display: none; }

.hub-grid-action:hover::after,
.hub-grid-action:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

.hub-grid-action svg {
  width: 15px;
  height: 15px;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hub-grid-action svg :is(path, rect, circle, line, polyline, polygon) {
  vector-effect: non-scaling-stroke;
}

.hub-grid-action:is(.is-timeline, .is-edit, .is-execute, .is-schedule, .is-delete, .is-permission) svg {
  width: 30px;
  height: 30px;
}

.hub-grid-action.is-detail svg { width: 28px; height: 28px; }
.hub-grid-action:is(.activation-toggle, .dimension-toggle-action) svg { width: 18px; height: 18px; stroke-width: 2.4; }
.hub-grid-action.is-execute svg { stroke-width: 2.7; }
.hub-grid-action.is-schedule svg { stroke-width: 2.3; transform: translateY(-1px) scale(1.15); }
.hub-grid-action.is-delete svg { stroke-width: 2.35; }
.hub-grid-action.is-detail svg { stroke-width: 2.7; }
.hub-grid-action.is-timeline svg { fill: currentColor; stroke-width: 2.2; }
.hub-grid-action.is-timeline svg :is(.timeline-arc, .timeline-hands) { fill: none; }

.hub-grid-action.activation-toggle.is-active {
  border-width: 2px;
  border-color: var(--hub-grid-action-border);
  background: var(--hub-grid-action-active-bg);
}

.hub-grid-action.activation-toggle.is-inactive {
  border-width: 2px;
  border-color: var(--hub-grid-action-border);
  background: transparent;
}

.hub-grid-action.activation-toggle:is(.is-active, .is-inactive) {
  border-color: var(--hub-grid-action-border);
  color: var(--hub-grid-action-color);
}

.hub-grid-action.dimension-toggle-action.is-enforceable {
  border-width: 2px;
  border-color: var(--hub-grid-action-border);
  background: var(--hub-grid-action-active-bg);
}

.hub-grid-action.dimension-toggle-action.is-not-enforceable {
  border-width: 2px;
  border-color: var(--hub-grid-action-border);
  background: transparent;
}

.hub-grid-action.dimension-toggle-action:is(.is-enforceable, .is-not-enforceable) {
  border-color: var(--hub-grid-action-border);
  color: var(--hub-grid-action-color);
}

.hub-grid-sort-heading {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  white-space: nowrap;
}

.hub-grid th:first-child .hub-grid-sort-heading,
.hub-grid .name-column .hub-grid-sort-heading { justify-content: flex-start; }

.hub-grid-sort-button {
  display: grid;
  width: 22px;
  height: 22px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--hub-grid-line);
  border-radius: 6px;
  background: #fff;
  color: #40535d;
}

.hub-grid-sort-button:hover,
.hub-grid-sort-button:focus-visible { border-color: var(--hub-grid-blue); color: var(--hub-grid-blue); }

.hub-grid-sort-button.is-active {
  border-color: var(--hub-grid-blue);
  background: var(--hub-grid-blue);
  color: #fff;
}

.hub-grid-sort-button svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hub-grid-sort-button circle { fill: var(--hub-grid-ink); stroke: none; }

@media (min-width: 901px) {
  :is(.table-wrap, .registry-table-wrap):has(> .hub-grid) {
    overflow-x: visible;
    scrollbar-width: none;
  }

  :is(.table-wrap, .registry-table-wrap):has(> .hub-grid)::-webkit-scrollbar {
    display: none;
  }

  :is(.table-wrap, .registry-table-wrap):has(> .hub-grid) > .hub-grid {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 900px) {
  :is(.table-wrap, .registry-table-wrap):has(> .hub-grid) {
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 720px) {
  .hub-grid-action { min-width: 44px; min-height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  .hub-grid-action { transition: none; }
}
