@import "ui-variables";
@tab-radius: 3px;
@modified-icon-width: 8px;
@tab-skew: 30deg;
@tab-top-padding: 0;
@tab-bottom-border-height: 8px;
@tab-border: 1px solid @tab-border-color;
@tab-bar-bottom-border-color: #111;

.tab-bar {
  height: @tab-height + @tab-top-padding;
  background: @tool-panel-background-color;
  padding: 0 13px 0 10px;
  box-sizing: border-box;

  &:after {
    content: "";
    position: absolute;
    bottom: 0;
    height: @tab-bottom-border-height;
    left: 0px;
    width: 100%;
  }

  .tab {
    position: relative;
    top: @tab-top-padding;
    height: @tab-height;
    line-height: @tab-height;
    color: @text-color-subtle;
    padding-left: 0;
    margin-left: 15px;
    transition: color .1s ease-in;

    &:before {
      content: '';
      position: absolute;
      top: 0;
      left: -18px;
      height: @tab-height;
      width: 40px;
    }

    .close-icon {
      display: none;
      transition: color 0.1s;
      &:hover {
        color: @text-color-error !important;

      }
    }

    &.modified:not(:hover) .close-icon {
      display: block;
      top: @tab-height/2 - @modified-icon-width/2 + 1px;
      right: 14px;
      width: @modified-icon-width;
      height: @modified-icon-width;
      border-color: @text-color-info;
    }

    &:first-child {
      margin-left: 20px;
    }

    &:hover {
      .close-icon {
        display: block;
      }
    }
  }

  .tab.active {
    z-index: 10;
    line-height: @tab-height - 3px;
    color: @text-color-highlight;

    .title{
      position: relative;
      top: 1px;
    }

    .close-icon {
      line-height: @tab-height - 1px;
      display: block;
    }

    &, &:before {
      background-color: @editor-background-color;
      height: @tab-height;
    }

  }

  .tab:hover {
    color: @text-color-highlight;
  }

  .tab.active:hover .close-icon {
    color: @text-color-highlight;
  }

  .placeholder {
    height: @tab-height + @tab-top-padding + @tab-bottom-border-height;
    &:after {
      top: @tab-height + @tab-top-padding + @tab-bottom-border-height;
    }
  }
}
