@import '../settings.mixins';

:host {
  @include section-wrapper;
}

.templates-wrapper {
  .template-description {
    font-size: 16px;
    line-height: 1;
  }

  .template-description h2 {
    font-size: 21px;
  }

  .add-button {
    position: absolute;
    right: 0;
  }

  .change-template {
    margin-left: 20px;
  }

  .buttons-wrapper {
    margin-top: 25px;
  }

  table {
    width: 100%;
    margin-bottom: 20px;
    border: 1px solid var(--color-gray-ddd);
    box-shadow: unset;

    td,
    th {
      font-size: 14px;
      color: var(--color-gray-222);
      text-align: left;
    }

    td.cdk-column-name {
      width: 15%;
    }

    td.cdk-column-type {
      width: 15%;
    }

    td.cdk-column-projects {
      width: 15%;
    }

    td.cdk-column-executors {
      width: 15%;
    }

    td.cdk-column-groupName {
      width: 15%;
    }

    td.cdk-column-menu {
      width: 15%;
    }

    td.cdk-column-actions {
      width: 10%;

      .actions-wrapper {
        display: flex;
        flex-direction: row;
        gap: 10px;

        app-cmf-icon {
          cursor: pointer;
        }
      }
    }

    td {
      .projects-select,
      .executors-select {
        display: flex;
        width: fit-content;

        ::ng-deep {
          .app-empty-str-field-value {
            color: var(--color-gray-222) !important;
          }
        }
      }

      span {
        word-break: break-word;
      }
    }

    .mat-sort-header-container {
      justify-content: center;
    }

    .table-text {
      white-space: pre-line;
    }

    .template-name {
      cursor: pointer;
    }
  }

  .mat-cell,
  .mat-header-cell {
    padding: 0 0.5em;
    text-align: center;
  }

  .search {
    display: flex;
    align-self: center;
    justify-content: space-between;

    width: 100%;
    margin: 20px 0;
  }
}

::ng-deep .templates-wrapper .mat-form-field-infix {
  min-height: 41px !important;
}

app-template-group {
  ::ng-deep {
    .field-wrap {
      .edit {
        display: block;
        width: 100%;
        word-break: break-word;
        white-space: initial;
      }
    }
  }
}
