/**
Angular Material fix.

Solves problems originated from using Bootstrap and Angular Material simultaneously
 */

/**
 *    Mat Card Adjustments
 * --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --
 */

mat-card {
  &.colorized {
    padding: 0px;

    mat-card-content {
      padding: 24px;
    }

    mat-card-header {
      padding-top: 19px;
      padding-left: 19px;
      height: 70px;
    }
  }
}


/**
 *    Button Fixes (for Bootstrap)
 * --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --
 */
.mat-button, .mat-fab, .mat-icon-button, .mat-mini-fab, .mat-raised-button {
  line-height: unset !important;
  min-width: unset !important;
}

.btn-mat-fab {
  background-color: $theme-color-primary !important;
  position: fixed !important;
  bottom: 25px !important;
  right: 25px !important;
  z-index: 1020;

  &[disabled] {
    opacity: 0.5;
  }
}


/**
 *    Material Overrides
 * --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --
 */
.mat-card-title {
  font-size: 19px !important;
}

.gui-icon > svg {
  top: 10px;
  left: 10px;
  position: inherit;
}


.no-shadow {
  box-shadow: unset !important;
}

.mat-card-header-text {
  margin: 0px !important;
}

/**
 *    Form Fixes (for Bootstrap)
 * --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --
 */

div.mat-form-field {
  //margin-top: 30px;
}

mat-form-field, div.mat-form-field  {
  width: 100%;
  height: 56px;
  display: block !important;

  &.mat-inline {
    display: inline-block !important;
    margin-right: 10px;
  }

  &.mat-xs {
    width: 100px;
  }

  &.mat-sm {
    width: 160px;
  }

  &.mat-md {
    width: 290px;
  }

  &.mat-lg {
    width: 400px;
  }

  &.mat-max {
    width: 100%;
  }
}


.cdk-overlay-container {
  z-index: 1500 !important;
}

.mat-form-field-appearance-legacy .mat-form-field-underline {
  background-color: rgba(0, 0, 0, 0.14);
}

/**
 *    Form => Inputs
 * --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --
 */

input.mat-input-element {
  padding-top: 23px;
}


.mat-input-placeholder, .mat-form-field-label {
  font-size: 18px !important;
  margin-top: 17px;

  &.mat-form-field-empty {
    font-size: 15px !important;
    margin-top: 13px;
  }

  // Hide Required marker
  .mat-form-field-required-marker {
    display: none;
  }
}

.mat-focused .mat-input-placeholder, .mat-focused .mat-form-field-label {
  font-size: 18px !important;
  margin-top: 17px;
  color: $theme-color-primary !important;
}

.mat-form-field-type-mat-input {
  margin-top: 5px;
}

mat-checkbox {
  font-size: 14px;
}


.mat-form-field-appearance-fill {
  margin-top: -5px !important;
  .mat-form-field-flex {
    height: 40px;
  }

  .mat-form-field-wrapper {
    height: 60px;
  }

  .mat-form-field-infix {
    margin-top: -40px;
  }
}



/**
 *    Form => Selects
 * --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --
 */
.mat-form-field-type-mat-select {
  margin-top: 28px;
  margin-bottom: -20px;

  &.mat-focused {
    .mat-form-field-label-wrapper {

    }
  }
}

.mat-select-trigger {
  margin-top: 2px;
}

.mat-form-field-type-mat-select {
  .mat-form-field-wrapper {
    padding-bottom: 1.10em !important;
  }
  .mat-form-field-label-wrapper {
    font-size: 15px !important;
    margin-top: -18px !important;
  }

  .mat-form-field-label-wrapper > label.mat-empty {
    font-size: 15px !important;
    margin-top: 6px !important;
  }
}

/**
 *    Form => Textarea
 * --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --
 */
.mat-form-field-type-mat-input {
  textarea {
    margin-top: 20px !important;
  }
}


/**
 *    Form => Checkbox
 * --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --
 */
mat-checkbox {
  font-size: 14px;
}
