/*-----------------------------------------------------------------------------
| Variables
|----------------------------------------------------------------------------*/

:root {
  /* These need to be root because tabs get attached to the body during dragging. */
  --theia-private-horizontal-tab-height: 35px;
  --theia-horizontal-toolbar-height: var(--theia-private-horizontal-tab-height);
  --theia-private-horizontal-tab-scrollbar-rail-height: 7px;
  --theia-private-horizontal-tab-scrollbar-height: 5px;
  --theia-tabbar-toolbar-z-index: 1001;
  --theia-toolbar-active-transform-scale: 1.272019649;
  --theia-dragover-tab-border-width: 2px;
}

/*-----------------------------------------------------------------------------
| General tab bar style
|----------------------------------------------------------------------------*/

.lm-TabBar {
  font-size: var(--theia-ui-font-size1);
}

.lm-TabBar[data-orientation="horizontal"] {
  min-height: var(--theia-horizontal-toolbar-height);
}

.lm-TabBar .lm-TabBar-content {
  cursor: pointer;
}

.lm-TabBar[data-orientation="horizontal"] .lm-TabBar-tab {
  flex: none;
  height: var(--theia-horizontal-toolbar-height);
  line-height: var(--theia-horizontal-toolbar-height);
  min-width: 35px;
  padding: 0px 8px;
  align-items: center;
  overflow: hidden;
}

.lm-TabBar[data-orientation="vertical"] .lm-TabBar-tab {
  border-top: var(--theia-dragover-tab-border-width) solid transparent !important;
  border-bottom: var(--theia-dragover-tab-border-width) solid transparent !important;
}

.lm-TabBar[data-orientation="vertical"] .lm-TabBar-tab.drop-target-top {
  border-top-color: var(--theia-activityBar-activeBorder) !important;
}

.lm-TabBar[data-orientation="vertical"] .lm-TabBar-tab.drop-target-bottom {
  border-bottom-color: var(--theia-activityBar-activeBorder) !important;
}

.lm-TabBar[data-orientation="horizontal"] .lm-TabBar-tab .theia-tab-icon-label,
.lm-TabBar-tab.lm-mod-drag-image .theia-tab-icon-label {
  display: flex;
  line-height: var(--theia-content-line-height);
  align-items: center;
}

/*-----------------------------------------------------------------------------
| Tabs in the center area (main and bottom)
|----------------------------------------------------------------------------*/

#theia-main-content-panel,
#theia-main-content-panel .lm-Widget.lm-DockPanel-widget {
  background: var(--theia-editor-background);
}

#theia-main-content-panel .lm-DockPanel-handle[data-orientation="horizontal"] {
  border-left: var(--theia-border-width) solid var(--theia-editorGroup-border);
}

#theia-main-content-panel .lm-DockPanel-handle[data-orientation="vertical"]+.lm-TabBar {
  border-top: var(--theia-border-width) solid var(--theia-editorGroup-border);
}

#theia-main-content-panel .lm-TabBar .lm-TabBar-tab {
  border-right: 1px solid var(--theia-tab-border);
  border-top: 1px solid transparent;
  border-bottom: 1px solid transparent;
  background: var(--theia-tab-inactiveBackground);
  color: var(--theia-tab-inactiveForeground);
}

#theia-main-content-panel .lm-TabBar:not(.theia-tabBar-active) .lm-TabBar-tab {
  color: var(--theia-tab-unfocusedInactiveForeground);
}

.lm-TabBar.theia-app-centers {
  background: var(--theia-editorGroupHeader-tabsBackground);
}

.lm-TabBar.theia-app-centers::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  pointer-events: none;
  background-color: var(--theia-editorGroupHeader-tabsBorder);
  width: 100%;
  height: 1px;
}

.lm-TabBar.theia-app-centers .lm-TabBar-tabIcon,
.lm-TabBar.theia-app-centers .lm-TabBar-tabLabel,
.lm-TabBar.theia-app-centers .lm-TabBar-tabLabelDetails,
.lm-TabBar.theia-app-centers .lm-TabBar-tabCloseIcon {
  display: inline-block;
}

.lm-TabBar.theia-app-centers .lm-TabBar-tabLabelDetails {
  margin-left: 5px;
  color: var(--theia-descriptionForeground);
  flex: 1 1 auto;
  overflow: hidden;
  white-space: pre;
}

.lm-TabBar-tail {
  padding-left: 5px;
  text-align: center;
  justify-content: center;
}

.lm-TabBar.theia-app-centers .lm-TabBar-tabLabelWrapper {
  display: flex;
}

.lm-TabBar-tab-secondary-label {
  color: var(--theia-settings-headerForeground);
  cursor: pointer;
  font-size: var(--theia-ui-font-size0);
  margin-left: 5px;
  text-decoration-line: underline;

  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: linear-gradient(45deg,
      transparent 50%,
      var(--theia-icon-foreground) 50%),
    linear-gradient(135deg, var(--theia-icon-foreground) 50%, transparent 50%);
  background-position: calc(100% - 6px) 8px, calc(100% - 2px) 8px, 100% 0;
  background-size: 4px 5px;
  background-repeat: no-repeat;
  padding: 2px 14px 0 0;
}

.lm-TabBar .lm-TabBar-tabIcon,
.lm-TabBar-tab.lm-mod-drag-image .lm-TabBar-tabIcon {
  width: 15px;
  line-height: 1.7;
  font-size: 12px;
  text-align: center;
  background-repeat: no-repeat;
}

/* common icons */
.lm-TabBar.theia-app-centers .lm-TabBar-tabIcon,
.lm-TabBar-tab.lm-mod-drag-image .lm-TabBar-tabIcon {
  min-height: 14px;
  background-size: 13px;
  background-position-y: 3px;
  background: var(--theia-icon-foreground);
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: auto 13px;
  mask-repeat: no-repeat;
  mask-size: auto 13px;
  padding-right: 8px;
}

.lm-TabBar.theia-app-centers .lm-TabBar-tabIcon[class*="plugin-icon-"],
.lm-TabBar-tab.lm-mod-drag-image .lm-TabBar-tabIcon[class*="plugin-icon-"] {
  background: none;
  height: var(--theia-icon-size);
}

.lm-TabBar.theia-app-centers .lm-TabBar-tabIcon[class*="plugin-icon-"]::before,
.lm-TabBar-tab.lm-mod-drag-image .lm-TabBar-tabIcon[class*="plugin-icon-"]::before {
  display: inline-block;
}

/* codicons */
.lm-TabBar.theia-app-centers .lm-TabBar-tabIcon.codicon,
.lm-TabBar-tab.lm-mod-drag-image .lm-TabBar-tabIcon.codicon {
  background: none;
}

.lm-TabBar-tabLock:after {
  content: "\ebe7";
  opacity: 0.75;
  margin-left: 4px;
  color: inherit;
  font-family: codicon;
  font-size: 16px;
  font-weight: normal;
  display: inline-block;
  vertical-align: top;
}

/* file icons */
.lm-TabBar[data-orientation="horizontal"] .lm-TabBar-tabIcon.file-icon,
.lm-TabBar-tab.lm-mod-drag-image .lm-TabBar-tabIcon.file-icon {
  background: none;
  padding-bottom: 0px;
  min-height: 20px;
}

.lm-TabBar[data-orientation="horizontal"] .lm-TabBar-tabIcon.fa,
.lm-TabBar-tab.lm-mod-drag-image .lm-TabBar-tabIcon.fa {
  background: none;
  min-height: 0;
  height: inherit;
}

.lm-TabBar[data-orientation="vertical"] .lm-TabBar-tab.lm-mod-invisible {
  visibility: hidden;
}

.lm-TabBar.theia-app-centers .lm-TabBar-tab.lm-mod-closable>.lm-TabBar-tabCloseIcon,
.lm-TabBar.theia-app-centers .lm-TabBar-tab.theia-mod-pinned>.lm-TabBar-tabCloseIcon {
  padding: 2px;
  margin-left: 4px;
  height: var(--theia-icon-size);
  width: var(--theia-icon-size);
  font: normal normal normal 16px/1 codicon;
  display: inline-block;
  text-decoration: none;
  text-rendering: auto;
  text-align: center;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
}

.lm-TabBar.theia-app-centers .lm-TabBar-tab.lm-mod-closable.closeIcon-start > .lm-TabBar-tabCloseIcon,
.lm-TabBar.theia-app-centers .lm-TabBar-tab.theia-mod-pinned.closeIcon-start > .lm-TabBar-tabCloseIcon {
  margin-left: inherit;
  margin-right: 4px;
}

.lm-TabBar.theia-app-centers.dynamic-tabs .lm-TabBar-tab.lm-mod-closable>.lm-TabBar-tabCloseIcon,
.lm-TabBar.theia-app-centers.dynamic-tabs .lm-TabBar-tab.theia-mod-pinned>.lm-TabBar-tabCloseIcon {
  /* hide close icon for dynamic tabs strategy*/
  display: none;
}

.lm-TabBar.theia-app-centers .lm-TabBar-tab.lm-mod-current>.lm-TabBar-tabCloseIcon,
.lm-TabBar.theia-app-centers .lm-TabBar-tab:hover.lm-mod-closable>.lm-TabBar-tabCloseIcon,
.lm-TabBar.theia-app-centers .lm-TabBar-tab:hover.theia-mod-pinned>.lm-TabBar-tabCloseIcon {
  display: inline-block;
}

.lm-TabBar.theia-app-centers .lm-TabBar-tab.lm-mod-closable>.lm-TabBar-tabCloseIcon:hover {
  border-radius: 5px;
  background-color: rgba(50%, 50%, 50%, 0.2);
}

.lm-TabBar.theia-app-centers .lm-TabBar-tab.lm-mod-closable:not(.closeIcon-start),
.lm-TabBar.theia-app-centers .lm-TabBar-tab.theia-mod-pinned:not(.closeIcon-start) {
  padding-right: 4px;
}

.lm-TabBar.theia-app-centers .lm-TabBar-tab.lm-mod-closable.closeIcon-start,
.lm-TabBar.theia-app-centers .lm-TabBar-tab.theia-mod-pinned.closeIcon-start {
  padding-left: 4px;
}

.lm-TabBar.theia-app-centers .lm-TabBar-tab.lm-mod-closable:not(.theia-mod-dirty):hover>.lm-TabBar-tabCloseIcon:before,
.lm-TabBar.theia-app-centers .lm-TabBar-tab.lm-mod-closable:not(.theia-mod-dirty).lm-TabBar-tab.lm-mod-current>.lm-TabBar-tabCloseIcon:before,
.lm-TabBar.theia-app-centers .lm-TabBar-tab.lm-mod-closable.theia-mod-dirty>.lm-TabBar-tabCloseIcon:hover:before {
  content: "\ea76";
}

.lm-TabBar.theia-app-centers .lm-TabBar-tab.lm-mod-closable.theia-mod-dirty>.lm-TabBar-tabCloseIcon:before {
  content: "\ea71";
}

.lm-TabBar.theia-app-centers .lm-TabBar-tab.theia-mod-pinned>.lm-TabBar-tabCloseIcon:before {
  content: "\eba0";
}

.lm-TabBar.theia-app-centers .lm-TabBar-tab.theia-mod-pinned.theia-mod-dirty>.lm-TabBar-tabCloseIcon:before {
  content: "\ebb2";
}

.lm-TabBar-tabIcon.no-icon {
  display: none !important;
}

.theia-badge-decorator-sidebar {
  background-color: var(--theia-activityBarBadge-background);
  border-radius: 20px;
  color: var(--theia-activityBarBadge-foreground);
  font-size: calc(var(--theia-ui-font-size0) * 0.85);
  font-weight: 600;
  height: var(--theia-notification-count-height);
  width: var(--theia-notification-count-width);
  padding: calc(var(--theia-ui-padding) / 6);
  line-height: calc(var(--theia-content-line-height) * 0.7);
  position: absolute;
  top: calc(var(--theia-ui-padding) * 4);
  right: calc(var(--theia-ui-padding) * 1.33);
  text-align: center;
}

.lm-TabBar .theia-badge-decorator-horizontal {
  background-color: var(--theia-badge-background);
  border-radius: 20px;
  box-sizing: border-box;
  color: var(--theia-activityBarBadge-foreground);
  font-size: calc(var(--theia-ui-font-size0) * 0.8);
  font-weight: 400;
  height: var(--theia-notification-count-height);
  width: var(--theia-notification-count-width);
  padding: calc(var(--theia-ui-padding) / 6);
  line-height: calc(var(--theia-content-line-height) * 0.61);
  margin-left: var(--theia-ui-padding);
  text-align: center;
}

/*-----------------------------------------------------------------------------
| Perfect scrollbar
|----------------------------------------------------------------------------*/

.lm-TabBar[data-orientation="horizontal"] .lm-TabBar-content-container>.ps__rail-x {
  height: var(--theia-private-horizontal-tab-scrollbar-rail-height) !important;
  background: transparent !important;
  z-index: 1000;
}

.lm-TabBar[data-orientation="horizontal"] .lm-TabBar-content-container>.ps__rail-x>.ps__thumb-x {
  height: var(--theia-private-horizontal-tab-scrollbar-height) !important;
  bottom: calc((var(--theia-private-horizontal-tab-scrollbar-rail-height) - var(--theia-private-horizontal-tab-scrollbar-height)) / 2);
}

.lm-TabBar[data-orientation="horizontal"] .lm-TabBar-content-container>.ps__rail-x:hover,
.lm-TabBar[data-orientation="horizontal"] .lm-TabBar-content-container>.ps__rail-x:focus {
  height: var(--theia-private-horizontal-tab-scrollbar-rail-height) !important;
}

.lm-TabBar[data-orientation="vertical"] .lm-TabBar-content-container>.ps__rail-y {
  width: var(--theia-private-horizontal-tab-scrollbar-rail-height);
  z-index: 1000;
}

.lm-TabBar[data-orientation="vertical"] .lm-TabBar-content-container>.ps__rail-y>.ps__thumb-y {
  width: var(--theia-private-horizontal-tab-scrollbar-height) !important;
  right: calc((var(--theia-private-horizontal-tab-scrollbar-rail-height) - var(--theia-private-horizontal-tab-scrollbar-height)) / 2);
}

.lm-TabBar[data-orientation="vertical"] .lm-TabBar-content-container {
  display: block;
}

/*-----------------------------------------------------------------------------
| Dragged tabs
|----------------------------------------------------------------------------*/

.lm-TabBar-tab.lm-mod-drag-image {
  transform: translateX(-40%) translateY(-58%);
  opacity: 0.8;
  line-height: var(--theia-private-horizontal-tab-height);
  height: var(--theia-private-horizontal-tab-height);
  min-height: var(--theia-private-horizontal-tab-height);
  padding: 0px 10px;
  font-size: var(--theia-ui-font-size1);
  background: var(--theia-editorGroupHeader-tabsBackground);
  border: var(--theia-border-width) solid var(--theia-contrastBorder);
  box-shadow: 1px 1px 2px var(--theia-widget-shadow);
  display: flex;
  align-items: center;
}

/*-----------------------------------------------------------------------------
| Tab-bar toolbar
|----------------------------------------------------------------------------*/

.lm-TabBar-toolbar {
  z-index: var(--theia-tabbar-toolbar-z-index);
  /* Due to the scrollbar (`z-index: 1000;`) it has a greater `z-index`. */
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  justify-content: center;
  padding-inline: var(--theia-ui-padding);
  gap: 2px;
}

.lm-TabBar-content-container {
  display: flex;
  flex: 1;
  position: relative;
  /* This is necessary for perfect-scrollbar */
}

.lm-TabBar-toolbar .item {
  opacity: var(--theia-mod-disabled-opacity);
  cursor: default;
  display: flex;
  flex-direction: row;
  column-gap: 0px;
  align-items: center;
}

.lm-TabBar-toolbar .item>div {
  height: 100%;
}

.lm-TabBar-toolbar .item.enabled {
  opacity: 1;
  cursor: pointer;
}

.lm-TabBar-toolbar > :not(.item.enabled) > .action-label {
  background: transparent;
  cursor: default;
}

.lm-TabBar-toolbar .item.toggled {
  border: var(--theia-border-width) var(--theia-inputOption-activeBorder) solid;
  background-color: var(--theia-inputOption-activeBackground);
}

.lm-TabBar-toolbar .item>div {
  min-width: var(--theia-icon-size);
  height: var(--theia-icon-size);
  line-height: var(--theia-icon-size);
  background-repeat: no-repeat;
}

.lm-TabBar-toolbar .item>div.no-icon {
  /* Make room for a text label instead of an icon. */
  width: 100%;
}

.lm-TabBar-toolbar .item .collapse-all {
  background: var(--theia-icon-collapse-all) no-repeat;
}

.lm-TabBar-toolbar .item .close {
  background: var(--theia-icon-collapse-all) no-repeat;
}

.lm-TabBar-toolbar .item .clear-all {
  background: var(--theia-icon-clear) no-repeat;
}

.lm-TabBar-toolbar .item .refresh {
  background: var(--theia-icon-refresh) no-repeat;
}

.lm-TabBar-toolbar .item .cancel {
  background: var(--theia-icon-close) no-repeat;
}

/**
 * The chevron for the pop-up menu indication is shrunk and
 * stuffed in the bottom-right corner.
 */
.lm-TabBar-toolbar .item.menu .chevron {
  font-size: 8px;
  vertical-align: bottom;
}

#theia-main-content-panel .lm-TabBar:not(.theia-tabBar-active) .lm-TabBar-toolbar {
  display: none;
}

.theia-tabBar-breadcrumb-row {
  width: 100%;
}

.lm-TabBar.theia-tabBar-multirow[data-orientation="horizontal"] {
  min-height: calc(var(--theia-breadcrumbs-height) + var(--theia-horizontal-toolbar-height));
  flex-direction: column;
}

.lm-TabBar[data-orientation="horizontal"] .theia-tabBar-tab-row {
  display: flex;
  flex-flow: row nowrap;
  width: 100%;
}

.lm-TabBar[data-orientation="vertical"] .theia-tabBar-tab-row {
  display: flex;
  flex-flow: column nowrap;
  height: 100%;
}

.lm-TabBar[data-orientation="horizontal"] .lm-TabBar-content {
  flex-direction: row;
  min-height: var(--theia-horizontal-toolbar-height);
}

.lm-TabBar[data-orientation="vertical"] .lm-TabBar-content {
  flex-direction: column;
}

.lm-TabBar.theia-app-centers[data-orientation="horizontal"].dynamic-tabs .lm-TabBar-tabLabel {
  /* fade out text with dynamic tabs strategy */
  mask-image: linear-gradient(to left,
      rgba(0, 0, 0, 0.3),
      rgba(0, 0, 0, 1) 15px);
  -webkit-mask-image: linear-gradient(to left,
      rgba(0, 0, 0, 0.3),
      rgba(0, 0, 0, 1) 15px);
  flex: 1;
}

.lm-TabBar[data-orientation="horizontal"] .lm-TabBar-tab .theia-tab-icon-label {
  flex: 1;
  overflow: hidden;
}

.theia-horizontal-tabBar-hover-div {
  margin: 0px 4px;
}

.enhanced-preview-container {
  margin: 4px 4px;
  pointer-events: none;
  background: var(--theia-editor-background);
  position: relative;
  overflow: hidden;
}

.enhanced-preview {
  transform-origin: top left;
}

.theia-horizontal-tabBar-hover-title {
  font-weight: bolder;
  max-width: var(--theia-hover-preview-width);
  word-wrap: break-word;
  white-space: pre-wrap !important;
  font-size: medium;
  margin: 0px 0px;
}

.theia-horizontal-tabBar-hover-caption {
  font-size: small;
  max-width: var(--theia-hover-preview-width);
  word-wrap: break-word;
  white-space: pre-wrap !important;
  margin: 0px 0px;
  margin-top: 4px;
}

/*-----------------------------------------------------------------------------
| Open tabs dropdown
|----------------------------------------------------------------------------*/
.theia-tabBar-open-tabs>.theia-select-component .theia-select-component-label {
  display: none;
}

.theia-tabBar-open-tabs>.theia-select-component {
  min-width: auto;
  height: 100%;
}

.theia-tabBar-open-tabs {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
}

.theia-tabBar-open-tabs.lm-mod-hidden {
  display: none;
}
