/* =========================================================
   Shared Table Editor CSS Contract
   Applies to all Workbenches that use the .table-editor DOM contract.
   Policy Workbench visual values are the baseline for shared sizing.
   ========================================================= */

.table-editor-wrap,
.table-editor-wrap--spreadsheet {
  width: 100%;
  min-width: 0;
  margin-top: 4px;
}

.table-editor-scroll {
  display: block;
  width: 100%;
  max-width: 100%;
  max-height: 560px;
  overflow-x: auto;
  overflow-y: auto;
  scrollbar-gutter: stable;
  box-sizing: border-box;
  padding: 0;
  border: 1px solid rgba(148, 163, 184, 0.34);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.02);
}

.table-editor-scroll::-webkit-scrollbar {
  height: 11px;
  width: 11px;
}

.table-editor-scroll::-webkit-scrollbar-track {
  background: #eef2f7;
  border-radius: 999px;
}

.table-editor-scroll::-webkit-scrollbar-thumb {
  background: #b8c5d8;
  border-radius: 999px;
  border: 2px solid #eef2f7;
}

.table-editor-scroll::-webkit-scrollbar-thumb:hover {
  background: #aab8cb;
}

.table-editor,
.table-editor--spreadsheet {
  width: max-content;
  min-width: 100%;
  margin-right: 0;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;

  /*
   * Shared row sizing contract.
   * Change --table-editor-row-height to adjust normal body-row height.
   * Dependent controls derive their height from this value so row sizing
   * is not scattered across input, td, tr, and Actions column rules.
   */
  --table-editor-row-height: 34px;
  --table-editor-cell-padding-y: 0px;
  --table-editor-cell-padding-x: 0px;
  --table-editor-control-height: var(--table-editor-row-height);
  --table-editor-action-button-size: calc(var(--table-editor-row-height) - 4px);
  --table-editor-checkbox-size: 16px;
}

.table-editor thead th,
.table-editor--spreadsheet thead th {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 5px 8px 4px;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border-bottom: 1px solid #cfd8e3;
}

.table-editor thead th[data-col-key],
.table-editor--spreadsheet thead th[data-col-key] {
  position: sticky;
  padding-right: 16px;
}

.table-editor__resize-handle {
  position: absolute;
  top: 0;
  right: -4px;
  width: 10px;
  height: 100%;
  cursor: col-resize;
  z-index: 32;
  touch-action: none;
}

.table-editor__resize-handle::after {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 50%;
  width: 2px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: transparent;
  transition: background-color 120ms ease;
}

.table-editor thead th[data-col-key]:hover .table-editor__resize-handle::after,
.table-editor--spreadsheet thead th[data-col-key]:hover .table-editor__resize-handle::after,
.table-editor__resize-handle.is-resizing::after,
body.is-column-resizing .table-editor__resize-handle.is-resizing::after {
  background: rgba(37, 99, 235, 0.42);
}

.table-editor th,
.table-editor td,
.table-editor--spreadsheet th,
.table-editor--spreadsheet td {
  border-right: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  vertical-align: middle;
}

.table-editor th:last-child,
.table-editor td:last-child,
.table-editor--spreadsheet th:last-child,
.table-editor--spreadsheet td:last-child {
  border-right: 1px solid #e2e8f0;
}

.table-editor__rownum-head,
.table-editor__rownum {
  position: sticky;
  left: 0;
  z-index: 21;
  width: 48px;
  min-width: 48px;
  max-width: 48px;
  text-align: center;
  font-size: 0.73rem;
  font-weight: 700;
}

.table-editor__rownum-head {
  z-index: 25;
  color: #475569;
  background: linear-gradient(180deg, #eef2f7 0%, #e7edf5 100%);
}

.table-editor__rownum {
  color: #64748b;
  background: #f8fafc;
  cursor: grab;
  user-select: none;
}


.table-editor th:not(.table-editor__rownum-head):not(.table-editor__actions-col),
.table-editor td:not(.table-editor__rownum):not(.table-editor__actions),
.table-editor--spreadsheet th:not(.table-editor__rownum-head):not(.table-editor__actions-col),
.table-editor--spreadsheet td:not(.table-editor__rownum):not(.table-editor__actions) {
  min-width: 138px;
}


.table-editor__actions-col {
  color: #0f172a;
  font-size: 0.81rem;
  font-weight: 700;
  line-height: 1.25;
}

.table-editor__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 4px;
  background: #fcfdff;
  font-size: 0.83rem;
}

.table-editor__actions .btn,
.table-editor__actions .btn.btn--sm {
  min-width: 0;
  min-height: var(--table-editor-action-button-size);
  padding: 0;
  font-size: 0.83rem;
  line-height: 1.2;
}

.table-editor__action-icon-btn,
.table-editor__actions .table-editor__action-icon-btn.btn,
.table-editor__actions .table-editor__action-icon-btn.btn.btn--sm {
  width: var(--table-editor-action-button-size);
  min-width: var(--table-editor-action-button-size);
  height: var(--table-editor-action-button-size);
  min-height: var(--table-editor-action-button-size);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 10px;
}

.table-editor__action-icon {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.table-editor__action-icon svg {
  width: 16px;
  height: 16px;
  display: block;
}

.table-editor__th-main {
  font-size: 0.82rem;
  line-height: 1.15;
  font-weight: 700;
  color: #0f172a;
}

.table-editor__th-sub {
  margin-top: 1px;
  font-size: 0.64rem;
  line-height: 1.05;
  color: #8b9ab0;
}

.table-editor td,
.table-editor--spreadsheet td {
  height: var(--table-editor-row-height);
  padding: var(--table-editor-cell-padding-y) var(--table-editor-cell-padding-x);
  background: #ffffff;
  box-sizing: border-box;
}

.table-editor__input,
.table-editor select.table-editor__input,
.table-editor input.table-editor__input,
.table-editor--spreadsheet select.table-editor__input,
.table-editor--spreadsheet input.table-editor__input {
  display: block;
  width: 100%;
  min-width: 0;
  height: var(--table-editor-control-height);
  padding: 3px 8px;
  border: 1px solid transparent;
  border-radius: 0;
  background: transparent;
  color: #1f2937;
  font-size: 0.87rem;
  line-height: 1.2;
  box-shadow: none;
  outline: none;
  appearance: auto;
}

.table-editor__input::placeholder {
  color: #b9c1cd;
  font-style: italic;
  opacity: 0.72;
}

.table-editor__input[type="checkbox"],
.table-editor input[type="checkbox"].table-editor__input,
.table-editor--spreadsheet input[type="checkbox"].table-editor__input {
  width: var(--table-editor-checkbox-size);
  height: var(--table-editor-checkbox-size);
  min-width: var(--table-editor-checkbox-size);
  min-height: var(--table-editor-checkbox-size);
  margin: 0 auto;
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  border-radius: 2px;
  accent-color: #3b6fd8;
}

.table-editor td:focus-within,
.table-editor--spreadsheet td:focus-within {
  background: inherit;
}

.table-editor td.is-selected,
.table-editor td.is-range-selected,
.table-editor--spreadsheet td.is-selected,
.table-editor--spreadsheet td.is-range-selected,
.table-editor td[data-cell='data'].is-range-selected,
.table-editor--spreadsheet td[data-cell='data'].is-range-selected {
  background: #d7e9ff !important;
}

.table-editor td.is-active,
.table-editor td.is-active-cell,
.table-editor--spreadsheet td.is-active,
.table-editor--spreadsheet td.is-active-cell,
.table-editor td[data-cell='data'].is-active-cell,
.table-editor--spreadsheet td[data-cell='data'].is-active-cell {
  background: #c7e0ff !important;
  box-shadow: inset 0 0 0 2px rgba(37, 99, 235, 0.95) !important;
  z-index: 6;
}

.table-editor thead .table-editor__end-gutter-head,
.table-editor--spreadsheet thead .table-editor__end-gutter-head {
  position: sticky;
  top: 0;
  z-index: 20;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border-bottom: 1px solid #cfd8e3;
}

.table-editor td.table-editor__end-gutter,
.table-editor--spreadsheet td.table-editor__end-gutter {
  border-right: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
}

/* Policy baseline promoted to shared table contract. */
.table-editor__th-main {
  font-size: 0.90rem;
}

.table-editor__th-sub {
  margin-top: 1px;
  font-size: 0.90rem;
}

/* Normal body-row sizing enforcement.
   The values are intentionally variable-based; do not add independent
   hard-coded row/input/action heights in Workbench-specific CSS. */
.table-editor__input,
.table-editor select.table-editor__input,
.table-editor input.table-editor__input,
.table-editor--spreadsheet select.table-editor__input,
.table-editor--spreadsheet input.table-editor__input {
  height: var(--table-editor-control-height);
  min-height: var(--table-editor-control-height);
  max-height: var(--table-editor-control-height);
  box-sizing: border-box;
}

.table-editor tbody tr,
.table-editor--spreadsheet tbody tr,
.table-editor tbody td,
.table-editor--spreadsheet tbody td {
  height: var(--table-editor-row-height);
}

.table-editor__input[type="checkbox"],
.table-editor input[type="checkbox"].table-editor__input,
.table-editor--spreadsheet input[type="checkbox"].table-editor__input {
  width: var(--table-editor-checkbox-size);
  height: var(--table-editor-checkbox-size);
  min-width: var(--table-editor-checkbox-size);
  min-height: var(--table-editor-checkbox-size);
  max-width: var(--table-editor-checkbox-size);
  max-height: var(--table-editor-checkbox-size);
}

@media (max-width: 900px) {
  .table-editor-scroll {
    max-height: 420px;
  }

  .table-editor th:not(.table-editor__rownum-head):not(.table-editor__actions-col),
  .table-editor td:not(.table-editor__rownum):not(.table-editor__actions),
  .table-editor--spreadsheet th:not(.table-editor__rownum-head):not(.table-editor__actions-col),
  .table-editor--spreadsheet td:not(.table-editor__rownum):not(.table-editor__actions) {
    min-width: 126px;
  }
}

/* =========================================================
   Action column final override
   ========================================================= */

.workbench-panel--main .table-editor th.table-editor__actions-col {
  color: #0f172a !important;
  font-size: 0.81rem !important;
  font-weight: 700 !important;
  line-height: 1.25 !important;
  text-align: center !important;
  vertical-align: middle !important;
}

.workbench-panel--main .table-editor td.table-editor__actions {
  display: table-cell !important;
  text-align: center !important;
  vertical-align: middle !important;

  height: var(--table-editor-row-height) !important;
  padding: var(--table-editor-cell-padding-y) 3px !important;
  background: #fcfdff !important;
  font-size: 0.83rem !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
}

.workbench-panel--main .table-editor td.table-editor__actions .btn,
.workbench-panel--main .table-editor td.table-editor__actions .btn.btn--sm {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;

  min-width: 0 !important;
  width: var(--table-editor-action-button-size) !important;
  min-width: var(--table-editor-action-button-size) !important;
  height: var(--table-editor-action-button-size) !important;
  min-height: var(--table-editor-action-button-size) !important;
  max-height: var(--table-editor-action-button-size) !important;
  padding: 0 5px !important;

  font-size: 0.83rem !important;
  line-height: 1.2 !important;
  font-weight: 700 !important;
  vertical-align: middle !important;
}

.workbench-panel--main .table-editor td.table-editor__actions .btn + .btn {
  margin-left: 3px !important;
}

/* ===============================
   Table editor left border fix
================================ */

.table-editor th:first-child,
.table-editor td:first-child {
  border-left: 1px solid rgba(15, 23, 42, 0.08);
}

/* Workbench table scroll contract. */
.workbench-panel--main .table-editor-wrap--workbench-main {
  display: grid;
  gap: 0;
}

.workbench-panel--main .table-editor-scroll {
  position: relative;
  max-height: clamp(520px, calc(100vh - 250px), 760px);
  min-height: 520px;
  overflow-x: auto !important;
  overflow-y: auto !important;
  padding: 0 !important;
  box-sizing: border-box !important;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.95);
  overscroll-behavior: contain;
}

.workbench-panel--main .table-editor,
.workbench-panel--main .table-editor--spreadsheet {
  background: #ffffff;
  margin-right: 0 !important;
  border-right: 0;
}

.workbench-panel--main .table-editor thead th,
.workbench-panel--main .table-editor--spreadsheet thead th {
  top: 0;
  background: #f3f6fb;
  box-shadow: inset 0 -1px 0 rgba(203, 213, 225, 0.9);
}

.workbench-panel--main .table-editor__rownum-head,
.workbench-panel--main .table-editor__rownum {
  box-shadow: 1px 0 0 rgba(226, 232, 240, 0.88);
}

.workbench-panel--main .table-editor tbody tr:nth-child(even) td:not(.table-editor__rownum):not(.table-editor__actions):not(.table-editor__end-gutter),
.workbench-panel--main .table-editor--spreadsheet tbody tr:nth-child(even) td:not(.table-editor__rownum):not(.table-editor__actions):not(.table-editor__end-gutter) {
  background: rgba(248, 250, 252, 0.38);
}

.workbench-panel--main .table-editor tbody tr:hover td:not(.table-editor__rownum):not(.table-editor__actions):not(.table-editor__end-gutter),
.workbench-panel--main .table-editor--spreadsheet tbody tr:hover td:not(.table-editor__rownum):not(.table-editor__actions):not(.table-editor__end-gutter) {
  background: rgba(226, 232, 240, 0.78);
}

@media (max-width: 900px) {
  .workbench-panel--main .table-editor-scroll {
    min-height: 420px;
    max-height: clamp(420px, calc(100vh - 220px), 620px);
  }
}

/* Unified selection contract for shared Table Editor cells. */
.workbench-panel--main .table-editor td.is-cell-selected {
  --selection-outline-color: rgba(37, 99, 235, 0.82);
  --selection-top-shadow: inset 0 2px 0 transparent;
  --selection-right-shadow: inset -2px 0 0 transparent;
  --selection-bottom-shadow: inset 0 -2px 0 transparent;
  --selection-left-shadow: inset 2px 0 0 transparent;
  background: rgba(37, 99, 235, 0.08) !important;
  box-shadow:
    var(--selection-top-shadow),
    var(--selection-right-shadow),
    var(--selection-bottom-shadow),
    var(--selection-left-shadow) !important;
}

.workbench-panel--main .table-editor td.is-cell-selected.is-selection-top {
  --selection-top-shadow: inset 0 2px 0 var(--selection-outline-color);
}

.workbench-panel--main .table-editor td.is-cell-selected.is-selection-right {
  --selection-right-shadow: inset -2px 0 0 var(--selection-outline-color);
}

.workbench-panel--main .table-editor td.is-cell-selected.is-selection-bottom {
  --selection-bottom-shadow: inset 0 -2px 0 var(--selection-outline-color);
}

.workbench-panel--main .table-editor td.is-cell-selected.is-selection-left {
  --selection-left-shadow: inset 2px 0 0 var(--selection-outline-color);
}

.workbench-panel--main .table-editor td.is-cell-active,
.workbench-panel--main .table-editor td.is-active,
.workbench-panel--main .table-editor td.is-active-cell {
  background: rgba(219, 234, 254, 0.78) !important;
  box-shadow: inset 0 0 0 2px rgba(37, 99, 235, 0.62) !important;
  z-index: 6;
}

.workbench-panel--main .table-editor td.is-editing-cell {
  background: #ffffff !important;
  box-shadow: inset 0 0 0 2px rgba(37, 99, 235, 0.95) !important;
  z-index: 7;
}

.workbench-panel--main .table-editor td.is-cell-active:not(.is-editing-cell) .table-editor__input,
.workbench-panel--main .table-editor td.is-active-cell:not(.is-editing-cell) .table-editor__input {
  caret-color: transparent;
}

.workbench-panel--main .table-editor td.is-cell-active:not(.is-editing-cell) .table-editor__input::selection,
.workbench-panel--main .table-editor td.is-active-cell:not(.is-editing-cell) .table-editor__input::selection {
  background: transparent;
}

.workbench-panel--main .table-editor td.is-editing-cell .table-editor__input {
  cursor: text;
  caret-color: auto;
}

.workbench-panel--main .table-editor th[data-col-key],
.workbench-panel--main .table-editor td[data-grid-col-index] {
  min-width: 0 !important;
}

.workbench-panel--main .table-editor col[data-col-key] {
  min-width: 0 !important;
}

.workbench-panel--main .table-editor .table-editor__input {
  cursor: default;
}

.table-editor__rowheader-band-head,
.table-editor__rownum,
.table-editor__actions.table-editor__rowheader-band-cell {
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.98), rgba(241, 245, 249, 0.96));
}

.table-editor__rownum,
.table-editor__actions.table-editor__rowheader-band-cell {
  transition:
    background-color 160ms ease,
    box-shadow 160ms ease,
    color 160ms ease,
    border-color 160ms ease;
}

.table-editor__rowheader-inner {
  display: grid;
  grid-template-columns: 40% 60%;
  grid-template-rows: 1fr;
  align-items: stretch;
  justify-items: stretch;
  gap: 0;
  width: 100%;
  min-height: 100%;
  padding: 0;
}

.table-editor__rowheader-index {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 100%;
  height: 100%;
  font-size: 14px;
}

.table-editor__rowheader-grip {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 100%;
  height: 100%;
  font-size: 14px;
}

.table-editor__rowselect-trigger {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  min-width: 0;
  width: 100%;
  height: 100%;
  text-align: center;
  font: inherit;
  color: inherit;
  cursor: pointer;
  line-height: 1;
}

.table-editor__corner-select-trigger {
  cursor: pointer;
}

.table-editor__corner-select-trigger:hover {
  background: rgba(37, 99, 235, 0.08);
}

.table-editor__rowdrag-grip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 100%;
  border-radius: 0;
  position: relative;
  cursor: grab;
  opacity: 0.42;
  color: rgba(71, 85, 105, 0.82);
  font-size: 14px;
  flex: 1 1 auto;
  transition:
    opacity 160ms ease,
    color 160ms ease,
    transform 160ms ease,
    background-color 160ms ease;
}

.table-editor__rowdrag-grip::before {
  content: '';
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 -3px 0 currentColor, 0 3px 0 currentColor;
}

.table-editor__rownum:hover .table-editor__rowdrag-grip,
.table-editor__rownum.is-row-selected .table-editor__rowdrag-grip,
.table-editor__rownum.is-row-active .table-editor__rowdrag-grip,
.table-editor__rownum.is-row-dragging .table-editor__rowdrag-grip,
.table-editor__rowdrag-grip:focus,
.table-editor__rowdrag-grip:active {
  opacity: 0.82;
}

.table-editor__rownum.is-row-active .table-editor__rowdrag-grip,
.table-editor__rownum.is-row-selected .table-editor__rowdrag-grip {
  color: rgba(29, 78, 216, 0.88);
}

.table-editor__rownum.is-row-dragging .table-editor__rowdrag-grip {
  opacity: 1;
  color: rgba(29, 78, 216, 0.96);
  transform: scale(1.04);
}

.table-editor__rowdrag-grip:active {
  cursor: grabbing;
}

.table-editor__rownum.is-row-selected,
.table-editor__actions.is-row-selected {
  background: rgba(37, 99, 235, 0.08);
}

.table-editor__rownum.is-row-selected {
  box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.18);
}

.table-editor__actions.is-row-selected {
  background: rgba(37, 99, 235, 0.06);
}

.table-editor__rownum.is-row-active,
.table-editor__actions.is-row-active {
  background: rgba(37, 99, 235, 0.12);
}

.table-editor__actions.is-row-active {
  background: rgba(37, 99, 235, 0.09);
}

.table-editor__rownum.is-row-active {
  box-shadow: inset 0 0 0 2px rgba(37, 99, 235, 0.45);
}


.workbench-panel--main .table-editor tbody tr.is-review-anchor-row td:not(.table-editor__rownum):not(.table-editor__actions):not(.table-editor__end-gutter),
.workbench-panel--main .workbench-panel--main .table-editor tbody tr.is-review-anchor-row td:not(.table-editor__rownum):not(.table-editor__actions):not(.table-editor__end-gutter) {
  background: rgba(168, 85, 247, 0.06) !important;
}

.table-editor__rownum.is-row-review-anchor,
.table-editor__actions.is-row-review-anchor {
  background: rgba(168, 85, 247, 0.10);
}

.table-editor__actions.is-row-review-anchor {
  background: rgba(168, 85, 247, 0.07);
}

.table-editor__rownum.is-row-review-anchor {
  box-shadow: inset 3px 0 0 rgba(168, 85, 247, 0.72);
}

.table-editor__rownum.is-row-dragging,
.table-editor__actions.is-row-dragging {
  background: rgba(37, 99, 235, 0.18);
}

.table-editor__rownum.is-row-dragging {
  box-shadow: inset 0 0 0 2px rgba(29, 78, 216, 0.36);
}

.table-editor__rownum.is-row-drop-target,
.table-editor__actions.is-row-drop-target {
  background: rgba(191, 219, 254, 0.6);
}

.table-editor__rownum.is-row-drop-target {
  box-shadow: inset 0 3px 0 rgba(37, 99, 235, 0.72), inset 0 -1px 0 rgba(37, 99, 235, 0.16);
}

.table-editor__actions.is-row-drop-target {
  box-shadow: inset 0 3px 0 rgba(37, 99, 235, 0.5);
}

.table-editor__row-context-button[data-row-context-group="section"] .table-editor__row-context-icon {
  color: #7c3aed;
}

.table-editor__row-context-menu {
  position: fixed;
  left: 0;
  top: 0;
  display: none;
  min-width: 220px;
  padding: 8px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
  z-index: 1200;
  backdrop-filter: blur(8px);
}

.table-editor__row-context-separator {
  height: 1px;
  margin: 7px 4px;
  background: rgba(148, 163, 184, 0.3);
}

.table-editor__row-context-button {
  appearance: none;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  width: 100%;
  margin: 0;
  padding: 9px 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #0f172a;
  text-align: left;
  font: inherit;
  font-size: 0.92rem;
  line-height: 1.35;
  cursor: pointer;
  transition:
    background-color 140ms ease,
    color 140ms ease,
    box-shadow 140ms ease,
    transform 140ms ease;
}

.table-editor__row-context-button:hover,
.table-editor__row-context-button:focus-visible {
  background: rgba(59, 130, 246, 0.10);
  outline: none;
}

.table-editor__row-context-button:active {
  transform: translateY(1px);
}

.table-editor__row-context-button.is-disabled,
.table-editor__row-context-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.table-editor__row-context-button.is-disabled:hover,
.table-editor__row-context-button.is-disabled:focus-visible,
.table-editor__row-context-button:disabled:hover,
.table-editor__row-context-button:disabled:focus-visible {
  background: transparent;
}

.table-editor__row-context-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  color: #64748b;
  font-size: 0.94rem;
}

.table-editor__row-context-label {
  min-width: 0;
}

.table-editor__row-context-button[data-row-context-group="structure"] .table-editor__row-context-icon {
  color: #2563eb;
}

.table-editor__row-context-button[data-row-context-group="data"] .table-editor__row-context-icon {
  color: #475569;
}

.table-editor__row-context-button[data-row-context-group="danger"] {
  color: #b91c1c;
}

.table-editor__row-context-button[data-row-context-group="danger"] .table-editor__row-context-icon {
  color: #dc2626;
}

.table-editor__row-context-button[data-row-context-group="danger"]:hover,
.table-editor__row-context-button[data-row-context-group="danger"]:focus-visible {
  background: rgba(239, 68, 68, 0.10);
}



.table-editor__section-drag-grip {
  width: 18px;
  height: 22px;
  min-height: 22px;
  flex: 0 0 18px;
  border-radius: 6px;
}

.table-editor__section-row.is-row-dragging .table-editor__section-cell {
  box-shadow: inset 0 0 0 2px rgba(29, 78, 216, 0.28);
}

.table-editor__section-row.is-row-drop-target .table-editor__section-cell {
  background: rgba(191, 219, 254, 0.72);
  box-shadow: inset 0 3px 0 rgba(37, 99, 235, 0.72), inset 0 -1px 0 rgba(37, 99, 235, 0.16);
}

.table-editor__rownum.is-row-drop-target-after {
  box-shadow: inset 0 -3px 0 rgba(37, 99, 235, 0.72), inset 0 1px 0 rgba(37, 99, 235, 0.16);
}

.table-editor__actions.is-row-drop-target-after {
  box-shadow: inset 0 -3px 0 rgba(37, 99, 235, 0.5);
}

.table-editor__section-row.is-row-drop-target-after .table-editor__section-cell {
  box-shadow: inset 0 -3px 0 rgba(37, 99, 235, 0.72), inset 0 1px 0 rgba(37, 99, 235, 0.16);
}
