/* Milanote-style freeform table card. Kept separate from the numeric Table. */
body.hn-themed .card.simple-table-card,
.card.simple-table-card {
  min-width: 0;
  min-height: 0;
  background: #fff !important;
  color: #343b4a;
  box-shadow: 0 3px 7px rgba(31, 39, 48, .14);
}
.card.simple-table-card:not(.image-card):not(.frame-card):not(.timeline-card):not(.board-card):not(.heading-card) {
  border-color: transparent !important;
  border-radius: 0 !important;
}
.card.simple-table-card.selected:not(.board-card),
.card.simple-table-card:focus-within {
  outline: none !important;
}
body:not(.hn-dark) .card.simple-table-card.selected:not(.frame-card):not(.image-card):not(.timeline-card):not(.board-card) {
  outline: none !important;
  box-shadow: 0 3px 7px rgba(31, 39, 48, .14) !important;
}
body.hn-dark .card.simple-table-card.selected:not(.board-card):not(.heading-card):not(.image-card):not(.frame-card):not(.timeline-card) {
  outline: none !important;
  box-shadow: 0 7px 22px rgba(5, 9, 13, .48) !important;
}
.simple-table-card > .drag-handle {
  display: none;
}
.simple-table-card > .card-body { padding: 0 !important; overflow: visible; }
.simple-table-shell { position: relative; min-width: 0; color: #343b4a; }
.card .simple-table-title {
  display: block;
  width: 100%;
  height: 66px;
  padding: 13px 18px 10px;
  border: 0;
  border-bottom: 1px solid #e8e9ea;
  outline: 0;
  border-radius: 0;
  background: #fff !important;
  color: #343b4a !important;
  font: 700 23px/1.2 Georgia, 'Times New Roman', serif;
  text-align: center;
  text-overflow: ellipsis;
}
.card .simple-table-title:placeholder-shown {
  position: absolute;
  z-index: 11;
  top: -66px;
  left: 0;
  height: 36px;
  padding: 7px 14px;
  border: 1px solid #e8e9ea;
  opacity: 0;
  pointer-events: none;
  font: 500 13px/1.5 system-ui, sans-serif;
}
.card .simple-table-title.simple-table-title-editing:placeholder-shown {
  opacity: 1;
  pointer-events: auto;
}
.simple-table-title::placeholder { color: #9a9ea6; }
.simple-table-editor { position: relative; width: max-content; min-width: 0; direction: ltr; }
.simple-table-scroll { width: max-content; max-width: none; overflow: visible; direction: ltr; }
.simple-table-grid { width: max-content; table-layout: fixed; border-collapse: separate; border-spacing: 0; direction: ltr; user-select: none; font: 400 14px/20px system-ui, sans-serif; }
.simple-table-grid th, .simple-table-grid td { box-sizing: border-box; padding: 0; }
.simple-table-column-rail { position: absolute; z-index: 9; top: -24px; left: 0; display: none; height: 22px; white-space: nowrap; direction: ltr; }
.simple-table-row-rail { position: absolute; z-index: 9; top: 0; left: -26px; display: none; width: 25px; flex-direction: column; }
.simple-table-column-position { position: relative; flex: none; height: 22px; }
.simple-table-card.selected .simple-table-column-rail,
.simple-table-card.selected .simple-table-row-rail,
.simple-table-shell.simple-table-active .simple-table-column-rail,
.simple-table-shell.simple-table-active .simple-table-row-rail { display: flex; }
.simple-table-handle {
  display: block;
  width: 100%;
  height: 21px;
  padding: 0;
  border: 1px solid #e7e8e9;
  border-radius: 4px;
  background: #f9f9fa;
  color: #6d7179;
  font: 600 10px/1 system-ui, sans-serif;
  text-align: center;
  opacity: 1;
  cursor: grab;
}
.simple-table-handle:hover, .simple-table-handle:focus-visible { background: #42434b; color: #fff; }
.simple-table-handle.simple-table-rail-selected { background: #b6b8bc; color: #343b4a; }
.simple-table-row-rail .simple-table-handle { flex: none; height: 30px; border-radius: 3px; }
.simple-table-column-resize { position: absolute; inset-block: 0; inset-inline-end: -4px; z-index: 5; width: 9px; cursor: col-resize; touch-action: none; }
.simple-table-column-resize:hover { background: rgba(37, 142, 228, .3); }
.simple-table-cell { height: 30px; border-block-start: 1px solid #e8e9ea; border-inline-start: 1px solid #e8e9ea; background: #fff; cursor: grab; }
.simple-table-cell:active:not(.simple-table-cell-editing) { cursor: grabbing; }
.simple-table-cell:focus { outline: none; }
.simple-table-cell:last-of-type { border-inline-end: 1px solid #e8e9ea; }
.simple-table-grid tbody tr:last-child .simple-table-cell { border-block-end: 1px solid #e8e9ea; }
.simple-table-header-row .simple-table-cell { background: #cacbce; }
.simple-table-cell.simple-table-cell-selected { position: relative; z-index: 1; background: #ececed; box-shadow: inset 0 0 0 1px #44464a; }
.simple-table-grid.simple-table-reference-mode .simple-table-cell:not(.simple-table-cell-editing),
.simple-table-grid.simple-table-reference-mode .simple-table-cell:not(.simple-table-cell-editing) .simple-table-input { cursor: crosshair; touch-action: none; }
.simple-table-cell.simple-table-cell-reference-pick { position: relative; z-index: 2; background: #dceefb !important; box-shadow: inset 0 0 0 1px #278bd1; }
.simple-table-cell.table-cell-colored:not(.simple-table-cell-selected) { background: var(--table-cell-color, #fff); }
.simple-table-cell.table-cell-colored.simple-table-cell-selected { background: var(--table-cell-color, #fff); }
.simple-table-cell .simple-table-input {
  width: 100%;
  height: 100%;
  min-height: 29px;
  padding: 4px 6px;
  border: 0 !important;
  border-radius: 0;
  outline: 0;
  background: transparent !important;
  color: #343b4a !important;
  font: inherit;
  text-align: start;
  pointer-events: none;
  cursor: grab;
}
.simple-table-cell.simple-table-cell-editing { cursor: text; }
.simple-table-cell.simple-table-cell-editing .simple-table-input,
.simple-table-cell .simple-table-input[type=checkbox] { pointer-events: auto; cursor: text; }
.simple-table-cell.simple-table-cell-editing .simple-table-input { user-select: text; }
.simple-table-header-row .simple-table-input { font-weight: 700; }
.simple-table-cell[data-align=center] .simple-table-input { text-align: center; }
.simple-table-cell[data-align=end] .simple-table-input { text-align: end; }
.simple-table-cell.simple-table-bold .simple-table-input { font-weight: 700; }
.simple-table-cell.simple-table-italic .simple-table-input { font-style: italic; }
.simple-table-cell.simple-table-underline .simple-table-input { text-decoration: underline; }
.simple-table-cell .simple-table-input[type=checkbox] { display: block; width: 18px; min-height: 18px; height: 18px; margin: 0 auto; accent-color: #62666a; cursor: pointer; }
.simple-table-cell.table-cell-colored .simple-table-input { color: var(--content-ink, #343b4a) !important; }
.simple-table-cell.simple-table-cell-selected:not(.table-cell-colored) .simple-table-input { color: #343b4a !important; }
.simple-table-footer { position: absolute; z-index: 9; top: calc(100% + 5px); right: 0; display: none; gap: 7px; justify-content: flex-end; padding: 3px; border: 1px solid #e1e2e4; border-radius: 5px; background: #fff; box-shadow: 0 3px 10px rgba(31,39,48,.12); }
.simple-table-card.selected .simple-table-footer,
.simple-table-shell.simple-table-active .simple-table-footer { display: flex; }
.simple-table-footer button { min-height: 25px; padding: 2px 7px; border: 1px solid #e1e2e4; border-radius: 4px; background: #fff; color: #646b78; font: 600 11px system-ui, sans-serif; cursor: pointer; }
.simple-table-footer button:hover { background: #eef6fb; color: #266c9e; }
.simple-table-editor > .simple-table-expand {
  position: absolute;
  z-index: 19;
  right: -11px;
  bottom: -11px;
  display: none;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: transparent;
  font-size: 0;
  cursor: nwse-resize;
  touch-action: none;
}
.simple-table-editor > .simple-table-expand::before {
  content: none;
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 13px;
  height: 13px;
  background: #668397;
  clip-path: polygon(100% 0, 100% 100%, 0 100%);
}
.simple-table-editor > .simple-table-expand:hover::before,
.simple-table-editor > .simple-table-expand:focus-visible::before { background: #316f9c; }
.simple-table-card.selected .simple-table-editor > .simple-table-expand,
.simple-table-shell.simple-table-active .simple-table-editor > .simple-table-expand { display: block; }
.simple-table-resize-preview {
  position: absolute;
  z-index: 8;
  top: 0;
  left: 0;
  box-sizing: border-box;
  border: 2px dashed #377fac;
  background: rgba(55, 127, 172, .09);
  pointer-events: none;
}
.simple-table-resize-preview[hidden] { display: none; }
.simple-table-toolbar { position: absolute; z-index: 20; top: 2px; right: calc(100% + 36px); display: none; flex-wrap: wrap; gap: 4px; width: 145px; padding: 6px; border: 1px solid #d8dce0; border-radius: 7px; background: #fff; box-shadow: 0 5px 20px rgba(23, 31, 39, .2); direction: ltr; }
.simple-table-toolbar.simple-table-toolbar-right { right: auto; left: calc(100% + 10px); }
.simple-table-toolbar.simple-table-toolbar-inside { right: auto; left: 4px; top: 4px; }
.simple-table-shell.simple-table-active .simple-table-toolbar { display: flex; }
.simple-table-cell-reference { flex: 1 1 100%; padding: 0 3px 3px; color: #59616a; font: 600 11px/16px system-ui, sans-serif; text-align: start; }
.simple-table-toolbar :is(button, select, input[type=search]) { min-width: 28px; height: 29px; border: 1px solid #e1e4e7; border-radius: 4px; background: #fff; color: #344152; font: 600 11px system-ui, sans-serif; cursor: pointer; }
.simple-table-toolbar :is(select, input[type=search]) { flex: 1 1 100%; min-width: 0; }
.simple-table-toolbar button[aria-pressed=true] { background: #e7e8e9; color: #343b4a; border-color: #b9bcc0; }
.simple-table-toolbar .simple-table-color { width: 29px; height: 29px; padding: 2px; border: 1px solid #e1e4e7; border-radius: 4px; background: #fff; cursor: pointer; }
.simple-table-context { position: absolute; z-index: 30; display: grid; min-width: 180px; padding: 5px; border: 1px solid #d8dce0; border-radius: 7px; background: #fff; box-shadow: 0 8px 26px rgba(23,31,39,.22); }
.simple-table-context button { padding: 7px 10px; border: 0; border-radius: 4px; background: transparent; color: #344152; font: 12px system-ui, sans-serif; text-align: start; cursor: pointer; }
.simple-table-context button:hover { background: #edf5fa; }
.simple-table-context button.danger { color: #aa4242; }
.simple-table-insertion-line { position: absolute; z-index: 16; pointer-events: none; background: #303237; box-shadow: 0 0 0 1px #fff; }
.simple-table-insertion-line[hidden] { display: none; }
.simple-table-insertion-line.is-column { width: 3px; transform: translateX(-50%); }
.simple-table-insertion-line.is-row { height: 3px; transform: translateY(-50%); }
body.hn-dark .card.simple-table-card { border-color: var(--theme-border, #758189); background: var(--theme-surface, #505b62) !important; color: var(--theme-ink, #f2f5f6); }
body.hn-dark .simple-table-shell { color: var(--theme-ink, #f2f5f6); }
body.hn-dark .card .simple-table-title { border-color: var(--theme-border, #758189); background: var(--theme-surface, #505b62) !important; color: var(--theme-ink, #f2f5f6) !important; }
body.hn-dark .simple-table-cell:not(.table-cell-colored) { border-color: var(--theme-border, #758189); background: var(--theme-surface, #505b62); }
body.hn-dark .simple-table-header-row .simple-table-cell:not(.table-cell-colored) { background: var(--theme-hover, #657179); }
body.hn-dark .simple-table-cell.simple-table-cell-selected { background: #737f85; box-shadow: inset 0 0 0 1px #f0f2f3; }
body.hn-dark .simple-table-cell.simple-table-cell-reference-pick { background: #285572 !important; box-shadow: inset 0 0 0 1px #86cbf4; }
body.hn-dark .simple-table-cell.simple-table-cell-reference-pick .simple-table-input { color: #f2f5f6 !important; }
body.hn-dark .simple-table-cell:not(.table-cell-colored) .simple-table-input { color: var(--theme-ink, #f2f5f6) !important; }
body.hn-dark .simple-table-cell.table-cell-colored.simple-table-cell-selected { background: var(--table-cell-color, #fff); }
body.hn-dark .simple-table-cell.simple-table-cell-selected:not(.table-cell-colored) .simple-table-input { color: #f2f5f6 !important; }
body.hn-dark .simple-table-toolbar, body.hn-dark .simple-table-footer, body.hn-dark .simple-table-context { border-color: var(--theme-border, #758189); background: var(--theme-raised, #5b676e); color: var(--theme-ink, #f2f5f6); }
body.hn-dark .simple-table-handle, body.hn-dark .simple-table-toolbar :is(button,select,input[type=search]), body.hn-dark .simple-table-toolbar .simple-table-color, body.hn-dark .simple-table-footer button, body.hn-dark .simple-table-context button { border-color: var(--theme-border, #758189); background: var(--theme-surface, #505b62); color: var(--theme-ink, #f2f5f6); }
body.hn-dark .simple-table-handle:hover, body.hn-dark .simple-table-context button:hover { background: var(--theme-hover, #657179); }
body.hn-dark .simple-table-handle.simple-table-rail-selected { background: #8c979c; color: #192126; }
body.hn-dark .simple-table-cell-reference { color: var(--theme-muted, #b9c2c6); }
body.hn-dark .simple-table-insertion-line { background: #f0f2f3; box-shadow: 0 0 0 1px #283137; }
body.hn-dark .simple-table-editor > .simple-table-expand::before { background: #b4cedd; }
body.hn-dark .simple-table-editor > .simple-table-expand:hover::before,
body.hn-dark .simple-table-editor > .simple-table-expand:focus-visible::before { background: #e1f2fa; }
body.hn-dark .simple-table-resize-preview { border-color: #9bd1ee; background: rgba(155, 209, 238, .13); }
body.hn-dark .simple-table-card > .drag-handle { border-color: var(--theme-border, #758189); background: var(--theme-raised, #5b676e); }
@media (max-width: 700px) {
  body.hn-mobile.hn-mobile-editing #world > .simple-table-card.hn-editing-card { min-width: 0 !important; height: calc(100dvh - 56px) !important; }
  body.hn-mobile.hn-mobile-editing #world > .simple-table-card.hn-editing-card > .card-body { box-sizing: border-box; height: 100%; padding: 30px 7px 16px 30px !important; overflow-y: auto !important; }
  body.hn-mobile.hn-mobile-editing #world > .simple-table-card.hn-editing-card .simple-table-editor { width: 100%; }
  body.hn-mobile.hn-mobile-editing #world > .simple-table-card.hn-editing-card .simple-table-scroll { width: 100%; max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; touch-action: pan-x pan-y; }
  body.hn-mobile.hn-mobile-editing .simple-table-toolbar { position: static; width: 100%; max-height: 220px; margin-top: 8px; overflow-y: auto; }
  body.hn-mobile.hn-mobile-editing .simple-table-title.simple-table-title-editing:placeholder-shown { position: static; }
  body.hn-mobile.hn-mobile-editing .simple-table-cell { height: 42px; }
  body.hn-mobile.hn-mobile-editing .simple-table-row-rail .simple-table-handle { height: 42px; }
  body.hn-mobile.hn-mobile-editing .simple-table-cell .simple-table-input { min-height: 41px; }
  body.hn-mobile.hn-mobile-editing .simple-table-footer { position: static; margin-top: 6px; }
  body.hn-mobile.hn-mobile-editing .simple-table-footer button,
  body.hn-mobile.hn-mobile-editing .simple-table-toolbar :is(button,select,input[type=search]) { min-height: 42px; }
}
