/* TlbxDocTabs strip. Colours come from --sl-* tokens (set them on :root in the app); the fallbacks are plain values.
 * The host element gets .sl-doctabs; the strip scrolls nothing, the overflow button opens the full list instead. */
/* The host spans every column of an app laid out as a grid (Documents has an outline column; without this the tabs sat in it,
   232 px wide, and on a phone squeezed to the + button). Ignored where the page is not a grid. */
.doctabs-host { grid-column: 1 / -1; min-width: 0; }
.sl-doctabs {
  --sl-tab-bg: var(--sl-background, #f4f1ea);
  --sl-tab-active: var(--sl-surface, #ffffff);
  --sl-tab-text: var(--sl-text, #f1ede4);
  --sl-tab-muted: color-mix(in srgb, var(--sl-text, #141414) 68%, transparent);
  --sl-tab-accent: var(--sl-accent, #e7efff);
  --sl-tab-line: var(--sl-border, #3a3a35);
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 4px;
  min-width: 0;
  background: var(--sl-tab-bg);
  color: var(--sl-tab-text);
  font: 13px/1.2 system-ui, sans-serif;
}
.sl-doctabs-strip {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  gap: 2px;
}
.sl-doctab {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 1 180px;
  min-width: 90px;
  max-width: 220px;
  padding: 4px 4px 4px 10px;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--sl-tab-muted);
  cursor: pointer;
  user-select: none;
}
.sl-doctab:hover { color: var(--sl-tab-text); }
.sl-doctab.active {
  background: var(--sl-tab-active);
  color: var(--sl-tab-text);
  border-bottom-color: var(--sl-tab-accent);
}
.sl-doctab:focus-visible { outline: 2px solid var(--sl-tab-accent); outline-offset: -2px; }
.sl-doctab-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sl-doctab-edit {
  flex: 1 1 auto; min-width: 0; width: 100%; font: inherit; color: var(--sl-text, inherit);
  background: var(--sl-surface, #fff); border: 1px solid var(--sl-accent, #36c); border-radius: 3px; padding: 0 3px;
}
.sl-doctab-dot {
  flex: 0 0 auto;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--sl-tab-accent);
}
.sl-doctab-x,
.sl-doctabs-new,
.sl-doctabs-more {
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  border-radius: 4px;
}
.sl-doctab-x { position: relative; width: 24px; height: 24px; line-height: 1; opacity: 0.6; }
/* 24 px is the smallest target (WCAG 2.5.8); a finger gets 44 px round it, without changing the strip's height */
@media (pointer: coarse) { .sl-doctab-x::after { content: ''; position: absolute; inset: -10px; } }
.sl-doctab-x:hover, .sl-doctab-x:focus-visible { opacity: 1; background: var(--sl-tab-line); }
.sl-doctabs-new, .sl-doctabs-more { width: 30px; align-self: center; height: 26px; font-size: 16px; }
.sl-doctabs-new:hover, .sl-doctabs-more:hover, .sl-doctabs-new:focus-visible, .sl-doctabs-more:focus-visible { background: var(--sl-tab-line); }
.sl-doctabs-menu {
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  min-width: 220px;
  max-height: 60vh;
  overflow: auto;
  padding: 4px;
  background: var(--sl-tab-active);
  border: 1px solid var(--sl-tab-line);
  border-radius: 6px;
  box-shadow: var(--sl-shadow, 0 8px 24px rgb(0 0 0 / 0.35));
}
.sl-doctabs-menu[hidden] { display: none; }
.sl-doctabs-item {
  padding: 6px 10px;
  border: 0;
  background: transparent;
  color: var(--sl-tab-text);
  font: inherit;
  text-align: left;
  border-radius: 4px;
  cursor: pointer;
}
.sl-doctabs-item:hover, .sl-doctabs-item:focus-visible { background: var(--sl-tab-line); }
.sl-doctabs-item.active { color: var(--sl-tab-accent); }
.sl-doctabs-more[hidden], .sl-doctabs-menu[hidden] { display: none; }
@media (max-width: 600px) {
  .sl-doctab { flex-basis: 120px; min-width: 72px; }
}
