.file-editor {
  .nav-links {
    border-top: 1px solid $border-color;
    border-right: 1px solid $border-color;
    border-left: 1px solid $border-color;
    border-bottom: 0;
    border-radius: $border-radius-small $border-radius-small 0 0;
    background: $gray-normal;
  }

  #editor {
    border: 0;
    border-radius: 0;
    height: 500px;
    margin: 0;
    padding: 0;
    position: relative;
    width: 100%;
  }

  .ace_gutter-cell {
    background-color: $gray-light;
  }

  .cancel-btn {
    color: $red-600;

    &:hover {
      color: $red-600;
    }
  }

  .file-title {
    @extend .monospace;
    line-height: 35px;
    padding-top: 7px;
    padding-bottom: 7px;
    display: flex;
  }

  .editor-ref {
    background: $gray-light;
    padding-right: $gl-padding;
    border-right: 1px solid $border-color;
    display: block;
    float: left;
    margin-right: 10px;
    max-width: 250px;
  }

  .new-file-name,
  .new-file-path {
    display: inline-block;
    max-width: 250px;
    float: left;

    @media(max-width: map-get($grid-breakpoints, lg)-1) {
      width: 180px;
    }

    @media (max-width: 1360px) {
      width: auto;
    }
  }

  .file-buttons {
    display: flex;
    flex: 1;
    justify-content: flex-end;
  }

  .select2 {
    float: right;
  }

  .encoding-selector,
  .soft-wrap-toggle {
    display: inline-block;
    vertical-align: top;
    font-family: $regular-font;
  }

  .soft-wrap-toggle {
    margin: 0 $btn-side-margin;

    .soft-wrap {
      display: block;
    }

    .no-wrap {
      display: none;
    }

    &.soft-wrap-active {
      .soft-wrap {
        display: none;
      }

      .no-wrap {
        display: block;
      }
    }
  }
}


@include media-breakpoint-down(md) {
  .file-editor {
    .file-title {
      display: block;
    }

    .new-file-name,
    .new-file-path {
      max-width: none;
      width: 100%;
      margin-bottom: 3px;
    }

    .file-buttons {
      display: block;
      width: 100%;
      margin-bottom: 10px;

      .soft-wrap-toggle {
        width: 100%;
        margin: 3px 0;
      }

      .encoding-selector {
        display: block;
        margin: 3px 0;

        button {
          width: 100%;
        }
      }

      @media(max-width: map-get($grid-breakpoints, md)-1) {
        clear: both;
      }
    }
  }
}

.blob-new-page-title,
.blob-edit-page-title {
  margin: 19px 0 21px;
  vertical-align: top;
  display: inline-block;

  @media(max-width: map-get($grid-breakpoints, lg)-1) {
    display: block;
    margin: 19px 0 12px;
  }
}

.template-selectors-menu {
  display: flex;
  vertical-align: top;

  @media(max-width: map-get($grid-breakpoints, lg)-1) {
    display: block;
    width: 100%;
    margin: 5px 0;
    padding: 0;
    border-left: 0;
  }
}

.template-selector-dropdowns-wrap {
  display: flex;
  vertical-align: top;

  @media(max-width: map-get($grid-breakpoints, lg)-1) {
    display: block;
    width: 100%;
    margin: 0 0 16px;
  }

  .license-selector,
  .gitignore-selector,
  .gitlab-ci-yml-selector,
  .dockerfile-selector,
  .template-type-selector {
    display: inline-block;
    vertical-align: top;
    font-family: $regular_font;
    margin: 0 8px 0 0;

    @media(max-width: map-get($grid-breakpoints, lg)-1) {
      display: block;
      width: 100%;
      margin: 5px 0;
    }

    .dropdown {
      line-height: 21px;
    }

    .dropdown-menu-toggle {
      width: 200px;
      vertical-align: top;

      @media (max-width: map-get($grid-breakpoints, xl)-1) {
        width: auto;
      }

      @media(max-width: map-get($grid-breakpoints, lg)-1) {
        display: block;
        width: 100%;
        margin: 5px 0;
      }
    }
  }
}

.editor-title-row {
  margin-bottom: 20px;
}

.popover.suggest-gitlab-ci-yml {
  z-index: $header-zindex - 1;
}
