@use "mixins" as *;

.sln-core-field-combobox {
  mat-select {
    border-radius: 10px;
    &:hover {
      border: 1.4px solid var(--INFO);
      box-shadow: none;
    }
    &:active {
      color: var(--DARK-GREY);
      border: 1.4px solid var(--PRIMARY);
    }
    &:focus {
      color: var(--DARK-GREY);
      border: 1.4px solid var(--PRIMARY);
    }
  }
}
.mat-mdc-select-disabled {
  color: var(--MIDLE-GRAY);
  border: 1.4px solid var(--SUCCESS) !important;
}
.mat-mdc-form-field {
  // input
  .mat-mdc-form-field-input-control.mat-mdc-form-field-input-control {
    @include input_default;
    &:hover {
      border: 1.4px solid var(--INFO);
      box-shadow: none;
      border-radius: 10px;
    }
    &:active {
      color: var(--DARK-GREY);
      border: 1.4px solid var(--PRIMARY);
      border-radius: 10px;
    }
    &:focus {
      color: var(--DARK-GREY);
      border: 1.4px solid var(--PRIMARY);
      border-radius: 10px;
    }
    &:disabled {
      color: var(--MIDLE-GRAY);
      border: 1.4px solid var(--SUCCESS);
      border-radius: 10px;
    }
  }
  textarea.mat-mdc-form-field-input-control.mat-mdc-form-field-input-control {
    padding: 10px;
  }
  label {
    mat-label {
      color: var(--DARK-GREY);
    }
  }
}
.mat-mdc-form-field
  .mat-mdc-form-field-input-control.mat-mdc-form-field-input-control {
  border-radius: 10px;
}
.mat-mdc-select-value {
  line-height: 2;
}
.mat-mdc-form-field {
  mat-hint {
    color: var(--GRAY);
  }
  .mat-mdc-form-field-input-control.sln-input-xs {
    min-height: calc(45px / 2);
    padding: 0 10px;
    font-size: 12px !important;
  }
  .mat-mdc-form-field-input-control.sln-input-s {
    min-height: calc(45px - 15px);
    padding: 0 10px;
    .mdc-floating-label {
      top: 16px;
      font-size: 14px;
    }
  }
}

// span вместо core-field, визуально как disabled input
span.sln-readonly-inputs,
.sln-readonly-inputs {
  display: flex;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
  min-height: 45px;
  padding: 10px 14px;
  border: var(--INPUT-DISABLED-BORDER-WIDTH) solid var(--INPUT-DISABLED-BORDER);
  border-radius: var(--INPUT-DISABLED-RADIUS);
  background: var(--INPUT-DISABLED-BG);
  color: var(--INPUT-DISABLED-COLOR);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.4;
  cursor: default;
  user-select: text;

  &:disabled,
  &[disabled],
  &[aria-disabled="true"] {
    cursor: not-allowed;
    opacity: var(--INPUT-DISABLED-OPACITY);
    pointer-events: none;
    user-select: none;
  }
}
