/**
 * editor.css — Markdown editor layer (CodeMirror).
 * Second layer in primary-area that overlays the cards grid.
 */

:root {
	--h1-font-family: var(--neue-haas);
	--h1-font-size: 50px;
	--h1-font-weight: 900;
	--h1-line-height: 50px;
	--h1-letter-spacing: -0.02em;
	--h1-border-bottom: 3px solid var(--color-level-10);
	--h1-border-radius: 3px;
	
	--h2-font-family: var(--neue-haas);
	--h2-font-size: 30px;
	--h2-font-weight: 700;
	--h2-line-height: 40px;
	--h2-letter-spacing: -0.02em;
	--h2-margin-top: 40px;
	--h2-margin-bottom: 0.4em;
	--h2-padding-bottom: 0px; 

	--h3-font-family: var(--neue-haas);
	--h3-font-size: 20px;
	--h3-font-weight: 700;

	--p-font-family: var(--neue-haas);
	--table-font-family: var(--iosevka);
}
/* ===== Editor Layer ===== */
.layer.layer-editor {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--color-surface);
}

/* ===== Editor Toolbar ===== */
.editor-toolbar {
  display: flex;
  gap: 1px;
  padding: 6px 12px;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface);
  flex-shrink: 0;
  flex-wrap: wrap;
  align-items: center;
}

.editor-toolbar-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 4px;
  background: none;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--color-text);
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

.editor-toolbar-icon {
  display: block;
  width: 15px;
  height: 15px;
}

.editor-toolbar-icon-suffix {
  font-size: 0.62rem;
  font-weight: 600;
  line-height: 1;
}

.editor-toolbar-btn:hover {
  background: var(--color-bg);
  border-color: var(--color-border);
}

.editor-toolbar-btn.active {
  background: var(--color-border);
  border-color: var(--color-border-2);
}

.editor-toolbar-sep {
  width: 1px;
  height: 20px;
  background: var(--color-border);
  margin: 0 6px;
}

.editor-toolbar-btn.save-btn {
  margin-left: auto;
  background: var(--color-primary);
  color: var(--color-surface-2);
  border-color: var(--color-primary);
}

.editor-toolbar-btn.save-btn:hover {
  background: var(--color-primary-hover);
}

.editor-toolbar-btn.save-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ===== Editor Toolbar Groups ===== */
.editor-toolbar {
  align-items: center;
  gap: 8px;
}

.editor-toolbar.is-hidden {
  display: none !important;
}

.editor-toolbar-group {
  display: flex;
  align-items: center;
  gap: 1px;
  flex-wrap: wrap;
}

.editor-toolbar-group + .editor-toolbar-group {
  border-left: 1px solid var(--color-border);
  padding-left: 8px;
}

.editor-toolbar-utility {
  display: flex;
  align-items: center;
  gap: 1px;
  flex-wrap: wrap;
  margin-left: auto;
}

.editor-toolbar-mode {
  margin-left: 0;
}

.editor-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 1px;
}

.editor-toolbar-mode {
  gap: 2px;
}

.editor-toolbar-mode-btn {
  padding: 3px 4px;
}

.editor-header-btn img {
  width: 16px;
  height: 16px;
  display: block;
}

/* ===== CodeMirror Container ===== */
.editor-content {
  flex: 1;
  min-height: 0;
  overflow: auto;
  position: relative;
}

.editor-content .cm-editor {
  height: 100%;
  font-family: var(--p-font-family);
  font-size: var(--fontsize-editor-default);
  line-height: 1.6;
}

.ͼo.cm-draftly .cm-content {
  caret-color: var(--color-text);
  font-size: var(--fontsize-editor-default);
  font-family: var(--p-font-family);
}

.cm-draftly-h1 {
  font-size: var(--h1-font-size) !important;
  font-weight: var(--h1-font-weight) !important;
  font-family: var(--h1-font-family) !important;
  line-height: var(--h1-line-height) !important; 
  letter-spacing: var(--h1-letter-spacing) !important;
}

.cm-draftly-h2 {
  font-size: var(--h2-font-size) !important;
  font-weight: var(--h2-font-weight) !important;
  font-family: var(--h2-font-family) !important;
  line-height: var(--h2-line-height) !important; 
  letter-spacing: var(--h2-letter-spacing) !important;
  margin-bottom: var(--h2-margin-bottom) !important;
	
}

.cm-draftly-h3 {
  font-weight: var(--h3-font-weight) !important;
  font-size: var(--h3-font-size) !important;
  font-family: var(--h3-font-family) !important;
}
.cm-draftly-h4 {
  font-weight: 600 !important;
  font-family: var(--neue-haas) !important;
}

.ͼ14 .cm-draftly-hr-line {
display: block;
    align-items: normal;
    padding: 0;
    padding-bottom: 0;
    border: none;
    background: var(--color-border, #d0d7de);
    height: 1px;
}


/* CodeMirror paper-like theme overrides */
.editor-content .cm-editor .cm-scroller {
  /* padding: 24px 32px; */
  /* max-width: 800px;   */
  /* margin: 0 auto;     */
  /* margin: 10px; */
  /* The paper background lives on the scroller, not .cm-content: the drawn
   * selection layer is a negative z-index child of the scroller, so any
   * background on .cm-content paints over it and hides the selection. */
  background-color: var(--color-surface-2);
  box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 3px 0px, rgba(0, 0, 0, 0.06) 0px 1px 2px 0px;
}

.editor-content .cm-editor .cm-content {
  caret-color: var(--color-text);
  padding: 0px 25px;
  margin: 8px;
}

.editor-content .cm-editor .cm-selectionBackground {
  background: rgba(107, 91, 78, 0.15) !important;
}

.editor-content .cm-editor.cm-focused .cm-selectionBackground {
  background: rgba(107, 91, 78, 0.2) !important;
}

.editor-content .cm-editor .cm-gutters {
  background: var(--color-surface-2);
  border-right: 1px solid var(--color-border);
  color: var(--color-text-muted);
}

.editor-content .cm-editor .cm-activeLineGutter {
  background: var(--color-bg);
}

.editor-content .cm-editor .cm-activeLine {
  background: rgba(245, 240, 232, 0.5);
}

/* Heading styles in the editor */
.editor-content .cm-editor .cm-header-1 { font-size: 1.6em; font-weight: 700; font-family: var(--font-serif); }
.editor-content .cm-editor .cm-header-2 { font-size: 1.35em; font-weight: 600; font-family: var(--font-serif); }
.editor-content .cm-editor .cm-header-3 { font-size: 1.15em; font-weight: 600; font-family: var(--font-serif); }

/* ===== Autocomplete Tooltip ===== */
.editor-content .cm-tooltip.cm-tooltip-nowt {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md, 8px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.14);
  overflow: hidden;
  font-family: var(--iosevka);
}

.editor-content .cm-tooltip-nowt.cm-tooltip-autocomplete > ul {
  font-family: inherit;
  max-height: 280px;
}

.editor-content .cm-tooltip-nowt .cm-completionList {
  font-size: 0.9rem;
}

.editor-content .cm-tooltip-nowt .cm-completionLabel {
  color: var(--color-text);
}

.editor-content .cm-tooltip-nowt .cm-completionDetail {
  color: var(--color-text-muted);
  font-style: italic;
}

.editor-content .cm-tooltip-nowt .cm-completionMatchedText {
  text-decoration: underline;
}

.editor-content .cm-tooltip-nowt li[aria-selected] .cm-completionLabel,
.editor-content .cm-tooltip-nowt .cm-tooltip.cm-tooltip-nowt li[aria-selected] {
  color: var(--color-text);
}

.editor-content .cm-tooltip-nowt li {
  border-radius: 4px;
}

.editor-content .cm-tooltip-nowt li[aria-selected] {
  background: rgba(107, 91, 78, 0.18);
}

.editor-content .cm-tooltip-nowt .cm-completion-section {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
}

.editor-content .cm-tooltip-nowt .cm-completionInfo {
  border-top: 1px solid var(--color-border);
  background: var(--color-surface-2);
  padding: 8px;
}

/* Color picker panel inside the completion tooltip. The panel now hosts the
   shared Radix swatch grid; the native input + opacity slider are the custom
   row at the bottom. */
.editor-content .cm-tooltip-nowt .cm-color-picker {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  padding: 6px 8px;
}

.editor-content .cm-tooltip-nowt .cm-color-picker-custom {
  display: flex;
  align-items: center;
  gap: 8px;
}

.editor-content .cm-tooltip-nowt .cm-color-picker input[type="color"] {
  appearance: none;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: none;
  cursor: pointer;
}

.editor-content .cm-tooltip-nowt .cm-color-picker input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

.editor-content .cm-tooltip-nowt .cm-color-picker input[type="color"]::-webkit-color-swatch {
  border: none;
  border-radius: 5px;
}

.editor-content .cm-tooltip-nowt .cm-color-picker input[type="range"] {
  width: 60px;
  accent-color: var(--color-primary, #6b7280);
  cursor: pointer;
}

.editor-content .cm-tooltip-nowt .cm-color-picker-hex {
  font-size: 0.8rem;
  color: var(--color-text);
  font-family: var(--font-mono, monospace);
  min-width: 66px;
  text-align: right;
}

.editor-content .cm-tooltip-nowt .cm-color-picker-insert {
  background: var(--color-primary, #6b7280);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.8rem;
  cursor: pointer;
}

.editor-content .cm-tooltip-nowt .cm-color-picker-insert:hover {
  background: var(--color-primary-hover, #565e68);
}

/* ===== Radix swatch grid (shared: block popover + completion tooltip) =====
   Tops the `.cm-fence-popover` (gear) and `.cm-color-picker` (autocomplete)
   panels. Level 1 is a wrap of step-8 hue swatches; level 2 is the selected
   hue's 12 shades and 12 alpha variants. Inline `--cm-swatch` holds each
   swatch's hex. */

.cm-radix-picker {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cm-radix-hues {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  max-width: 320px;
}

.cm-radix-hue,
.cm-radix-swatch {
  appearance: none;
  box-sizing: border-box;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 1px solid rgba(0, 0, 0, 0.18);
  border-radius: 4px;
  cursor: pointer;
  /* The opaque colour on top, a faint checker underneath so translucent
   * alpha swatches read as translucent. */
  background-image: linear-gradient(var(--cm-swatch), var(--cm-swatch)),
    linear-gradient(45deg, rgba(0, 0, 0, 0.12) 25%, transparent 25%, transparent 75%, rgba(0, 0, 0, 0.12) 75%),
    linear-gradient(45deg, rgba(0, 0, 0, 0.12) 25%, transparent 25%, transparent 75%, rgba(0, 0, 0, 0.12) 75%);
  background-size: 100% 100%, 10px 10px, 10px 10px;
  background-position: 0 0, 0 0, 5px 5px;
}

.cm-radix-hue.is-active,
.cm-radix-swatch.is-active {
  outline: 2px solid var(--color-accent, #606c76);
  outline-offset: 1px;
}

.cm-radix-hue:focus-visible,
.cm-radix-swatch:focus-visible {
  outline: 2px solid var(--color-accent, #606c76);
  outline-offset: 1px;
}

.cm-radix-hue:disabled,
.cm-radix-swatch:disabled,
.cm-radix-picker.is-disabled .cm-radix-hue,
.cm-radix-picker.is-disabled .cm-radix-swatch {
  cursor: not-allowed;
  opacity: 0.7;
}

.cm-radix-fine {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cm-radix-fine[hidden] {
  display: none;
}

.cm-radix-fine-title {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted, #6a737d);
}

.cm-radix-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.cm-radix-custom {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-top: 6px;
  border-top: 1px dashed var(--color-border, #d0d7de);
}

/* ===== Editor Status Bar ===== */
.editor-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 16px;
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
  font-size: 0.75rem;
  color: var(--color-text-muted);
  flex-shrink: 0;
}

/* Anchor for the presence popover */
.editor-status--anchor {
  position: relative;
}

/* Hover popover listing active users */
.editor-presence-pop {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  right: 12px;
  z-index: 60;
  min-width: 200px;
  max-width: 260px;
  max-height: 40vh;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
  font-size: 0.78rem;
}

.editor-presence-pop.is-visible {
  display: block;
}

.editor-presence-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  border-radius: 6px;
}

.editor-presence-row:hover {
  background: var(--color-surface-hover, color-mix(in srgb, var(--color-surface), var(--color-text) 6%));
}

.editor-presence-name {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.editor-presence-you {
  padding: 1px 6px;
  border-radius: 8px;
  background: var(--color-accent, rgba(96, 108, 118, 0.25));
  color: var(--color-text-muted);
  font-size: 0.68rem;
  flex-shrink: 0;
}

/* ===== Block Settings Gear + Color Popover =====
   A `⚙` on hover for blocks that carry a colour (::segment, ::casing). It
   opens a popover holding the swatch and opacity slider — the only place either
   is rendered, so nothing colour-related shows in the block until asked for.

   These live in a stylesheet rather than a CodeMirror theme because the popover
   is mounted on `document.body`: the block's own `overflow: hidden` would clip
   an absolutely-positioned child of its line, and a theme's selectors only ever
   match inside `.cm-editor`. The popover therefore restyles the swatch from
   scratch instead of relying on `SWATCH_STYLES` from the plugin themes. */

.cm-fence-gear {
  display: inline-flex;
  position: absolute;
  top: -16px;
  left: -16px;
  align-items: center;
  vertical-align: middle;
  margin-right: 4px;
  /* In flow whether revealed or not, so hovering never reflows the text beside
     it; only opacity and hit-testing change. */
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease;
}

/* Revealed by hovering the block the gear sits in, by keyboard focus, and while
   its popover is open — clicking the colour input moves focus out of the editor,
   so focus alone is not enough to keep it on screen. */
.cm-seg-line:hover .cm-fence-gear,
.cm-case:hover .cm-fence-gear,
.cm-comp-line:hover .cm-fence-gear,
.cm-fence-gear:focus-within,
.cm-fence-gear.is-open {
  opacity: 1;
  pointer-events: auto;
}

.cm-fence-gear-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border: none;
  border-radius: 4px;
  background: none;
  color: inherit;
  font-size: 18px;
  line-height: 1;
  opacity: 0.65;
  cursor: pointer;
}

.cm-fence-gear-btn:hover {
  opacity: 1;
  background: var(--color-surface-hover, rgba(0, 0, 0, 0.06));
}

.cm-fence-gear-btn:focus-visible {
  opacity: 1;
  outline: 2px solid var(--color-accent, #606c76);
  outline-offset: 1px;
}

.cm-fence-popover {
  position: fixed;
  z-index: 5000;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border: 1px solid var(--color-border, #d0d7de);
  border-radius: 6px;
  background: var(--color-surface, #fff);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
  color: var(--color-text, #1a1a1a);
  font-size: 0.75rem;
  white-space: nowrap;
}

/* The grid-picking variant: stack the Radix palette above the custom row. */
.cm-fence-popover--grid {
  flex-direction: column;
  align-items: stretch;
  white-space: normal;
}

.cm-fence-popover-label {
  color: var(--color-text-muted, #6a737d);
  display: none;
}

/* A popover has room, so the chip is larger than the 16px inline one. */
.cm-fence-popover .cm-fence-swatch {
  display: inline-flex;
  align-items: center;
  margin-right: 0;
}

.cm-fence-popover .cm-fence-swatch input[type="color"] {
  appearance: none;
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0px solid currentColor;
  border-radius: 0px;
  background: none;
  cursor: pointer;
}

.cm-fence-popover .cm-fence-swatch input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

.cm-fence-popover .cm-fence-swatch input[type="color"]::-webkit-color-swatch {
  border: none;
  border-radius: 3px;
}

.cm-fence-popover .cm-fence-alpha {
  width: 60px;
  height: 2px;
  margin: 5px;
  cursor: pointer;
  /* The panel is chrome, not the block's text, so `currentColor` is the plain
     surface color rather than the gray `textColorFor` picked for the chip. */
  accent-color: currentColor;
}

/* ===== Fence popover footer =====
   The one thing a settings popover cannot offer by editing a value: a way
   out. The Remove button deletes the block it belongs to — fences and content
   alike — after asking. Its colours are the link preview's, so the two
   popovers' Remove buttons read as the same control. */

.cm-fence-popover-footer {
  display: flex;
  justify-content: flex-end;
  padding-top: 6px;
  border-top: 1px solid var(--color-border, #d0d7de);
}

.cm-fence-popover-remove {
  padding: 4px 8px;
  border: 1px solid var(--color-danger-border, #d73a49);
  border-radius: var(--radius-sm, 6px);
  background: transparent;
  color: var(--color-danger, #b31d28);
  font: inherit;
  font-size: 0.78rem;
  line-height: 1.3;
  cursor: pointer;
}

.cm-fence-popover-remove:hover {
  background: var(--color-danger-soft, rgba(215, 58, 73, 0.1));
}

.cm-fence-popover-remove:focus-visible {
  outline: 2px solid var(--color-accent, #606c76);
  outline-offset: 1px;
}

/* ===== Compaction default-state control =====
   The second row of the fence popover, for the compaction only: it sets the
   block's `state=` default — folded or unfolded — which every reader starts
   from. It lives in the popover rather than in the block because the block's
   own summary line has no room for a second control. */

.cm-comp-foldstate {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 6px;
  border-top: 1px solid var(--color-border, #d0d7de);
}

.cm-comp-foldstate-label {
  color: var(--color-text-muted, #6a737d);
  font-size: 0.7rem;
}

.cm-comp-foldstate-opts {
  display: flex;
  gap: 4px;
}

.cm-comp-foldstate-btn {
  flex: 1;
  padding: 3px 7px;
  border: 1px solid var(--color-border, #d0d7de);
  border-radius: 4px;
  background: var(--color-background, #fff);
  color: var(--color-text, #1a1a1a);
  font: inherit;
  font-size: 0.7rem;
  cursor: pointer;
}

.cm-comp-foldstate-btn:hover:not(:disabled) {
  background: var(--color-surface-hover, rgba(0, 0, 0, 0.06));
}

.cm-comp-foldstate-btn.is-active {
  border-color: var(--color-accent, #606c76);
  background: var(--color-accent, #606c76);
  color: #fff;
}

.cm-comp-foldstate-btn:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

/* ===== Table Toolbar Popover =====
   Opened by the width/height/style buttons in the table hover toolbar. Mounted
   on `document.body` (like the fence popover) so the editor's overflow cannot
   clip it; position is set inline from the anchor's bounding rect. */

.cm-ntb-popover {
  position: fixed;
  z-index: 5000;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 168px;
  padding: 8px;
  border: 1px solid var(--color-border, #d0d7de);
  border-radius: 6px;
  background: var(--color-surface, #fff);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
  color: var(--color-text, #1a1a1a);
  font-size: 0.75rem;
}

.cm-ntb-popover-title {
  font-weight: 600;
  color: var(--color-text-muted, #6a737d);
}

.cm-ntb-popover-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.cm-ntb-popover-btn {
  padding: 3px 7px;
  border: 1px solid var(--color-border, #d0d7de);
  border-radius: 4px;
  background: var(--color-background, #fff);
  color: var(--color-text, #1a1a1a);
  font: inherit;
  font-size: 0.7rem;
  cursor: pointer;
}

.cm-ntb-popover-btn:hover:not(:disabled) {
  background: rgba(27, 31, 35, 0.06);
}

.cm-ntb-popover-btn.is-active {
  border-color: var(--color-accent, #2f81f7);
  background: rgba(47, 129, 247, 0.12);
}

.cm-ntb-popover-btn:disabled {
  opacity: 0.55;
  cursor: default;
}

.cm-ntb-popover-input {
  width: 64px;
  padding: 3px 6px;
  border: 1px solid var(--color-border, #d0d7de);
  border-radius: 4px;
  background: var(--color-background, #fff);
  color: var(--color-text, #1a1a1a);
  font: inherit;
}

.cm-ntb-popover-hint {
  color: var(--color-text-muted, #6a737d);
  font-size: 0.7rem;
}

/* ===== Editor upload progress =====
 * Floating bar shown while a drop/paste/toolbar upload runs. Fixed so it works
 * for both the binder editor and the floating paste windows, which have no
 * shared positioned ancestor. */
.editor-upload-progress {
  position: fixed;
  left: 50%;
  bottom: 56px;
  transform: translateX(-50%);
  z-index: 1200;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 220px;
  max-width: 420px;
  padding: 8px 12px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.14);
}

.editor-upload-progress[hidden] {
  display: none;
}

.editor-upload-track {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: var(--color-border);
  overflow: hidden;
}

.editor-upload-fill {
  width: 0;
  height: 100%;
  border-radius: 3px;
  background: var(--color-primary);
  transition: width 0.15s ease;
}

.editor-upload-text {
  color: var(--color-text-muted);
  font-size: 0.78rem;
  white-space: nowrap;
}

/* ===== Tabs Header ===== */
.tabs-header {
  display: flex;
  align-items: center;
  gap: 8px;
/*   padding: 4px 8px; */
  padding: 0px;
/*   border-bottom: 1px solid var(--color-border); */
  background: var(--color-surface);
  flex-shrink: 0;
/*   min-height: 36px; */
}

.tabs-list {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  padding: 0px 1px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: thin;
}

.editor-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  background: none;
  border: 1px solid transparent;
/*   border-radius: var(--radius-sm); */
  cursor: pointer;
  color: var(--color-text-muted);
  max-width: 200px;
  min-width: 80px;
  flex-shrink: 0;
/*   box-shadow: rgba(0, 0, 0, 0.12) 0px 1px 3px, rgba(0, 0, 0, 0.24) 0px 1px 2px; */
}

.editor-tab:hover {
  background: var(--color-bg);
  color: var(--color-text);
}

.editor-tab.active {
/*   background: var(--color-bg); */
  color: var(--color-text);
  border-color: var(--color-level-3);
  background: var(--color-level-3);
  box-shadow: rgba(0, 0, 0, 0.16) 0px 3px 6px, rgba(0, 0, 0, 0.23) 0px 3px 6px;
}

.editor-tab-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.8rem;
}

.editor-tab-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text-muted);
  padding: 2px 4px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
}

.editor-tab-close:hover {
  background: var(--color-border);
  color: var(--color-text);
}

.tabs-header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.tabs-close-all {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text-muted);
  padding: 4px 6px;
  border-radius: var(--radius-sm);
}

.tabs-close-all:hover {
  background: var(--color-border);
  color: var(--color-text);
}

.editor-panes {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.editor-tab-pane {
  flex: 1;
  min-height: 0;
}

.editor-tab-pane.hidden {
  display: none !important;
}

.editor-empty-pane {
  flex: 1;
  min-height: 0;
}
