.editor-tabs {
  display: flex;
  background: #252526;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.8125em;
  overflow-x: auto;           /* scroll sideways when tabs don't fit */
  overflow-y: hidden;
  scrollbar-width: none;      /* hide scrollbar (Firefox) */
  user-select: none;
}

.editor-tabs::-webkit-scrollbar {
  display: none;              /* hide scrollbar (Chrome/Safari/Edge) */
}

/* ----- Single tab ----- */
.editor-tab {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  background: #2d2d2d;
  border-right: thin solid #252526;
  border-top: 0.1em solid transparent;
}

.editor-tab--active {
  background: #1e1e1e;        /* same as the editor, so the tab "joins" it */
  color: #ffffff;
  border-top-color: #007acc;
}

.editor-tab__link {
  display: flex;
  align-items: center;
  gap: 0.4em;
  height: 100%;
  padding: 0 0.25em 0 0.9em;
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
}

/* Icon placeholder, same sizing as the side bar */
.editor-tab__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 1.6em;
  height: 1.6em;
}

.editor-tab__icon i {
  font-size: 1.25em;
}

/* ----- Dragging (classes added by editor-tabs.js) ----- */
.editor-tab {
  position: relative;
}

.editor-tabs--dragging,
.editor-tabs--dragging .editor-tab__link {
  cursor: grabbing;
}

/* The tab under the pointer: lifted above the others */
.editor-tab--dragging {
  z-index: 1;
  opacity: 0.85;
  box-shadow: 0 0.25em 0.75em rgba(0, 0, 0, 0.5);
}

/* Accent line where the tab will be dropped */
.editor-tab--drop-before {
  box-shadow: inset 0.15em 0 0 var(--accent);
}

.editor-tab--drop-after {
  box-shadow: inset -0.15em 0 0 var(--accent);
}

/* ----- Close button ----- */
.editor-tab__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 0.4em;
  padding: 0.15em;
  color: inherit;
  background: none;
  border: none;
  border-radius: 0.3em;
  cursor: pointer;
  opacity: 0;                 /* hidden on inactive tabs until hovered */
}

/* Codicons ship with a fixed 16px size; override with em */
.editor-tab__close .codicon {
  font-size: 1.1em;
}

.editor-tab--active .editor-tab__close,
.editor-tab:hover .editor-tab__close,
.editor-tab__close:focus-visible {
  opacity: 1;
}

.editor-tab__close:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Touch screens have no hover, so always show the close button */
@media (hover: none) {
  .editor-tab__close {
    opacity: 1;
  }
}

/* ----- Small screens ----- */
@media (max-width: 40em) {
  .editor-tab__link {
    padding-left: 0.6em;
  }
}