@import '~@angular/material/theming';

@mixin ai-mat-core($config) {
  // The unit-less line-height from the font config.
  $line-height: mat-line-height($config, input);
  // The amount of space between the top of the line and the top of the actual text
  // (as a fraction of the font-size).
  $line-spacing: ($line-height - 1) / 2;
  // The padding on the infix. Mocks show half of the text size, but seem to measure from the edge
  // of the text itself, not the edge of the line; therefore we subtract off the line spacing.
  $infix-padding: 0.5em - $line-spacing;
  .mat-form-field:not(.ai-clear) {

    .mat-form-field-prefix {
      padding-left: $infix-padding;
    }

    .mat-form-field-suffix {
      padding-right: $infix-padding;
    }

    .mat-form-field-flex {
      align-items: center;
    }

    .mat-form-field-infix {
      border: none;
      padding: $infix-padding;
    }

    .mat-form-field-label {
      padding-left: $infix-padding;
    }
  }
}

// Добавляет специальные цвета Aitarget
@function ai-extra-theme($theme) {
  $ai-theme: (
    black: #000000,
    white: #ffffff
  );
  $extra-theme: map-merge($theme, $ai-theme);
  @return $extra-theme ;
}
