// Form field
.mat-form-field {
  font-size: 16px;
  width: 100%;

  .sd-suffix-icon {
    color: #dadada;

    &:hover {
      color: #616161;
    }
  }

  .mat-form-field-prefix,
  .mat-form-field-suffix {
    display: inline-flex;
    align-items: center;
  }

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

    .mat-form-field-infix {

      mat-select.mat-select,
      mat-date-range-input.mat-date-range-input,
      input.mat-input-element {
        font-size: 14px;
        margin-top: 6px;
      }
    }

    .mat-form-field-suffix {
      top: 3.5px;
    }
  }

  &.sd-md {
    &.mat-form-field-appearance-outline {
      .mat-form-field-flex {
        padding: 0 12px 0 10px;
      }

      .mat-form-field-infix {
        padding: 0 0 8px 0 !important;
        border-top-width: 11.5px;
        height: 43.5px;
        width: auto;
      }

      .mat-form-field-label-wrapper {
        font-size: 14px;
        padding-top: 12px;
        top: -18px;
      }

      .mat-form-field-suffix {
        .sd-suffix-icon {
          height: 24px;
          width: 24px;
          font-size: 20px;
          text-align: center;
        }
      }

      &.mat-form-field-can-float {
        &.mat-form-field-should-float {
          .mat-form-field-label {
            transform: translateY(-18px) scale(0.75);
            width: 133.33333%;
          }
        }
      }
    }
  }

  // Small
  &.sd-sm {
    &.mat-form-field-appearance-outline {
      .mat-form-field-flex {
        padding: 0 12px 0 10px;
      }

      .mat-form-field-infix {
        padding: 0 0 4px 0 !important;
        border-top-width: 7.5px;
        height: 35.5px;
        width: auto;

        mat-select.mat-select,
        mat-date-range-input.mat-date-range-input,
        input.mat-input-element {
          margin-top: 4px; // Giảm margin
        }
      }

      .mat-form-field-label-wrapper {
        font-size: 14px;
        padding-top: 12px;
        top: -18px;
      }

      .mat-form-field-suffix {
        .sd-suffix-icon {
          height: 24px;
          width: 24px;
          font-size: 20px;
          text-align: center;
        }
      }

      &.mat-form-field-can-float {
        .mat-form-field-label {
          top: 26px;
        }

        &.mat-form-field-should-float {
          .mat-form-field-label {
            transform: translateY(-12px) scale(0.75);
            width: 133.33333%;
          }
        }
      }
    }
  }
}

// Fix lỗi scss label của bootstrap có margin bottom
mat-checkbox {
  label.mat-checkbox-layout {
    margin-bottom: 0;
  }
}