.monaco-loader {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: $black-transparent;
}

.project-refs-form,
.project-refs-target-form {
  display: inline-block;
}

.fade-enter,
.fade-leave-to {
  opacity: 0;
}

.commit-message {
  @include str-truncated(250px);
}

.editable-mode {
  display: inline-block;
}

@media (min-width: $screen-md-min) {
  .blob-viewer[data-type="rich"] {
    margin: 20px;
  }
}

.repository-view {
  border: 1px solid $border-color;
  border-radius: $border-radius-default;
  color: $almost-black;

  .code.white pre .hll {
    background-color: $well-light-border !important;
  }

  .tree-content-holder {
    display: flex;
    min-height: 300px;
  }

  .tree-content-holder-mini {
    height: 100vh;
  }

  .panel-right {
    display: flex;
    flex-direction: column;
    width: 80%;
    height: 100%;

    .monaco-editor.vs {
      .current-line {
        border: none;
        background: $well-light-border;
      }

      .line-numbers {
        cursor: pointer;

        &:hover {
          text-decoration: underline;
        }
      }

      .cursor {
        display: none !important;
      }
    }

    .blob-no-preview {
      .vertical-center {
        justify-content: center;
        width: 100%;
      }
    }

    &.edit-mode {
      .blob-viewer-container {
        overflow: hidden;
      }

      .monaco-editor.vs {
        .cursor {
          background: $black;
          border-color: $black;
          display: block !important;
        }
      }
    }

    .blob-viewer-container {
      flex: 1;
      overflow: auto;

      > div,
      .file-content:not(.wiki) {
        display: flex;
      }

      > div,
      .file-content,
      .blob-viewer,
      .line-number,
      .blob-content,
      .code {
        min-height: 100%;
        width: 100%;
      }

      .line-numbers {
        min-width: 44px;
      }

      .blob-content {
        flex: 1;
        overflow-x: auto;
      }
    }

    #tabs {
      flex-shrink: 0;
      display: flex;
      width: 100%;
      padding-left: 0;
      margin-bottom: 0;
      white-space: nowrap;
      overflow-y: hidden;
      overflow-x: auto;

      li {
        position: relative;
        background: $gray-normal;
        padding: #{$gl-padding / 2} $gl-padding;
        border-right: 1px solid $white-dark;
        border-bottom: 1px solid $white-dark;
        cursor: pointer;

        &.active {
          background: $white-light;
          border-bottom: none;
        }

        a {
          @include str-truncated(100px);
          color: $gl-text-color;
          vertical-align: middle;
          text-decoration: none;
          margin-right: 12px;
        }

        .close-btn {
          position: absolute;
          right: 8px;
          top: 50%;
          padding: 0;
          background: none;
          border: 0;
          font-size: $gl-font-size;
          transform: translateY(-50%);
        }

        .close-icon:hover {
          color: $hint-color;
        }

        .close-icon,
        .unsaved-icon {
          color: $gray-darkest;
        }

        .unsaved-icon {
          color: $brand-success;
        }

        &.tabs-divider {
          width: 100%;
          background-color: $white-light;
          border-right: none;
          border-top-right-radius: 2px;
        }
      }
    }

    .repo-file-buttons {
      background-color: $white-light;
      padding: 5px 10px;
      border-top: 1px solid $white-normal;
    }

    #binary-viewer {
      height: 80vh;
      overflow: auto;
      margin: 0;

      .blob-viewer {
        padding-top: 20px;
        padding-left: 20px;
      }

      .binary-unknown {
        text-align: center;
        padding-top: 100px;
        background: $gray-light;
        height: 100%;
        font-size: 17px;

        span {
          display: block;
        }
      }
    }
  }

  #commit-area {
    background: $gray-light;
    padding: 20px;

    .help-block {
      padding-top: 7px;
      margin-top: 0;
    }
  }

  #view-toggler {
    height: 41px;
    position: relative;
    display: block;
    border-bottom: 1px solid $white-normal;
    background: $white-light;
    margin-top: -5px;
  }

  #binary-viewer {
    img {
      max-width: 100%;
    }
  }

  #sidebar {
    flex: 1;
    height: 100%;

    &.sidebar-mini {
      width: 20%;
      border-right: 1px solid $white-normal;
      overflow: auto;
    }

    .table {
      margin-bottom: 0;
    }

    tr {
      .repo-file-options {
        padding: 2px 16px;
        width: 100%;
      }

      .title {
        font-size: 10px;
        text-transform: uppercase;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        vertical-align: middle;
      }

      .file-icon {
        margin-right: 5px;
      }

      td {
        white-space: nowrap;
      }
    }

    .file {
      cursor: pointer;
    }

    a {
      @include str-truncated(250px);
      color: $almost-black;
    }
  }
}

.render-error {
  min-height: calc(100vh - 62px);

  p {
    width: 100%;
  }
}

@keyframes swipeRightAppear {
  0% {
    transform: scaleX(0.00);
  }

  100% {
    transform: scaleX(1.00);
  }
}

@keyframes swipeRightDissapear {
  0% {
    transform: scaleX(1.00);
  }

  100% {
    transform: scaleX(0.00);
  }
}
