.table-selection-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 21;
}

.table-selection-mark {
  position: absolute;
  background: rgb(52 111 222 / 20%);
  box-shadow: inset 0 0 0 1px rgb(36 87 197 / 55%);
}

.table-selection-handle {
  position: fixed;
  z-index: 22;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--edge, #c5d0df);
  border-radius: 4px;
  background: var(--panel, #fff);
  color: var(--accent, #2457c5);
  box-shadow: 0 2px 6px rgb(22 40 67 / 12%);
  font-size: 1rem;
  line-height: 1;
}

.table-selection-handle:hover {
  border-color: var(--accent, #2457c5);
  background: color-mix(in srgb, var(--accent, #2457c5) 9%, var(--panel, #fff));
}

.table-selection-announcement {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.table-context-menu {
  position: fixed;
  z-index: 70;
  width: min(16.25rem, calc(100vw - 8px));
  max-height: calc(100vh - 8px);
  overflow-y: auto;
  padding: .25rem;
  border: 1px solid var(--border, #c3ccda);
  border-radius: 6px;
  background: var(--panel, #fff);
  color: var(--ink, #1f2731);
  box-shadow: 0 12px 32px rgb(22 40 67 / 24%);
}

.table-context-menu-group + .table-context-menu-group {
  margin-top: .225rem;
  padding-top: .225rem;
  border-top: 1px solid var(--border, #dbe1ea);
}

.table-context-menu button {
  width: 100%;
  padding: .35rem .55rem;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: inherit;
  text-align: start;
  font-size: .9rem;
}

.table-context-menu button:not(:disabled):is(:hover, :focus-visible) {
  background: color-mix(in srgb, var(--accent, #2457c5) 15%, var(--panel, #fff));
  outline: 1px solid var(--accent, #2457c5);
  outline-offset: -1px;
}

.table-context-menu button:disabled { opacity: .5; }

.table-selection-handle[hidden], .table-context-menu[hidden] { display: none; }

@media print {
  .table-selection-layer, .table-selection-handle, .table-context-menu, .table-selection-announcement {
    display: none !important;
  }
}
