@import '../mixins';

#add-repository {
  width: 350px;

  .content {
    margin: var(--spacing-double);
  }
}

dialog.clone-repository {
  .clone-github-repo {
    height: calc(100vh - 400px);
    max-height: 250px;
  }
}

.clone-github-repo {
  &.filter-list {
    max-width: 100%;

    .filter-field-row {
      margin: var(--spacing-double);
      margin-bottom: var(--spacing);
      margin-top: 0;
    }
  }

  .clone-repository-list {
    &-group-header {
      font-weight: var(--font-weight-semibold);
      padding: var(--spacing) var(--spacing-double);
    }

    &-item {
      padding: 0 var(--spacing-double);

      .name {
        @include ellipsis;
      }
    }

    &-item {
      display: flex;
      flex-direction: row;
      min-width: 0;
      flex-grow: 1;
      align-items: center;

      .icon {
        fill: var(--text-secondary-color);
        margin-right: var(--spacing-half);
        width: 16px; // Force a consistent width
        flex-shrink: 0;
      }
    }
  }
}

.dialog-content {
  &.clone-github-repository-content {
    padding: 0;
    padding-top: var(--spacing-double);

    .account-picker-row {
      margin: 0 var(--spacing-double);
      padding-bottom: var(--spacing);

      .popover-dropdown-component {
        width: 100%;
      }
    }
  }

  &.clone-generic-repository-content {
    padding: var(--spacing-double);

    .clone-url-textbox-label p {
      margin: 0;
    }
  }
}

.clone-repository {
  width: 500px;

  .select-component.accounts {
    padding: 0 var(--spacing-double);
    margin-bottom: var(--spacing);
  }

  .local-path-field {
    border-top: var(--base-border);
    padding: var(--spacing-double);
  }

  .dialog-content {
    > .row-component:not(:last-child) {
      margin-bottom: 0;
    }
  }
}
