@import "variables";

body .mat-form-field-outline-gap {
  display: none;
}



body mat-form-field.mat-form-field-appearance-outline {
   .mat-form-field-prefix, .mat-form-field-suffix {
    top: .5em;
  }

  .mat-form-field-outline-thick {
    background: white;
    color: #99a5cc;
    .mat-form-field-outline-start,
    .mat-form-field-outline-end,
    .mat-form-field-outline-gap {
      border-width: 1px;
    }
  }
  .mat-form-field-label-wrapper .mat-form-field-label {
    top: 30px;
    color: $blue-400;
  }
  &.mat-focused:not(.mat-form-field-invalid) .mat-form-field-label{
    color: $blue-400;
  }
  .mat-form-field-subscript-wrapper {
    padding: 0;
  }
  .mat-form-field-outline {
    background: white;
    top: 24px;
    border-radius: 4px;
  }

  .mat-form-field-wrapper {
    padding-bottom: 0;
    margin: 1em 0;

    .mat-form-field-flex {
      margin-top: -28px;
    }
  }

  &.mat-form-field-has-label .mat-form-field-flex {
    margin-top: -0.25em;
  }

  .mat-form-field-infix {
    top: 7px;
    padding: 1.2em 0;
  }

  .mat-form-field-subscript-wrapper {
    margin-top: 22px;
    padding: 0;
  }

}

body .dark.mat-form-field-appearance-outline:not(.data-text) .mat-form-field-outline {
  background-color: #1a1e2c;
}


body .data-text.mat-form-field-appearance-outline .mat-form-field-outline {
  .mat-form-field-outline-end, .mat-form-field-outline-start {
    border: none;
  }
}

body .mat-form-field-infix {
  padding-bottom: 8px;
}

body .mat-form-field-label-wrapper {

  .mat-form-field-empty {
    top: 27px;
  }
}

body .mat-form-field.mat-form-field-should-float .mat-form-field-label-wrapper {
  margin-left: -10px;
  top: -7px;
  overflow: visible;

  .mat-form-field-label {
    top: 24px;
    height: 14px;
    margin-bottom: unset;
  }
}

body .mat-form-field-subscript-wrapper {
  margin-top: 3px;
}

body .mat-select-arrow-wrapper {
  transform: translateY(0%) !important;
}


body .mat-form-field-infix .mat-input-element {
  height: 16px;
}

body .mat-checkbox-checked.mat-accent .mat-checkbox-background, .mat-checkbox-indeterminate.mat-accent .mat-checkbox-background {
  background-color: $purple;
}

body .mat-form-field-appearance-outline.mat-focused .mat-form-field-outline-thick {
  color: $blue-400;
}

body .mat-checkbox:not(.mat-checkbox-disabled).mat-accent .mat-checkbox-ripple .mat-ripple-element {
  background-color: initial;
}

mat-option.mat-option.dark {
  color: white;
}

body .mat-primary .mat-option.mat-selected:not(.mat-option-disabled) {
  color: white;
}

/// THIN MAT_FORM_FIELD

body mat-form-field.mat-form-field-appearance-outline.dark {

  &.black {
    .mat-form-field-outline {
      background-color: #000 !important;
    }
  }

  .mat-form-field-outline {
    background-color: $blue-800 !important;
    border-radius: 4px;
  }

  .mat-form-field-wrapper {
    padding-bottom: 0;
  }

  .mat-form-field-infix {
    top: 6px;
    padding: 1.2em 0;
  }

  .mat-form-field-outline-end, .mat-form-field-outline-start {
    border: none;
  }

  mat-select.mat-select-empty .mat-select-value {
    color: rgba(255, 255, 255, 0.5);
  }

  .mat-form-field-label-wrapper .mat-form-field-label {
    color: #b9bdd4;
  }

  .mat-form-field-subscript-wrapper {

    .mat-error.dark {
      color: #ff6f81;
    }
  }
}

body mat-form-field.mat-form-field-appearance-outline.dark-outline {

  .mat-form-field-outline {
    background-color: transparent !important;
  }

  .mat-form-field-wrapper {
    padding-bottom: 0;
  }

  .mat-form-field-infix {
    top: 6px;
    padding: 1.2em 0;
  }

  .mat-form-field-outline-start {
    border: 1px solid $grey-purple;
    border-right-style: none;
  }

  .mat-form-field-outline-end {
    border: 1px solid $grey-purple;
    border-left-style: none;
  }

  .mat-form-field-subscript-wrapper {

    .mat-error.dark {
      color: #ff6f81;
    }
  }
}

body.dark-theme .mat-select-panel.dark-outline {
  background-color: #000;
  border: 1px solid $grey-purple;

  .mat-option:hover:not(.mat-option-disabled), .mat-option:focus:not(.mat-option-disabled) {
    background: $blue-700;
  }

  .mat-option {
    color: $blue-200;

    &.mat-selected:not(.mat-option-multiple), &.mat-active {
      background: $blue-800;
    }
  }

  .mat-pseudo-checkbox {
    color: $blue-200;
  }

  &.mat-primary .mat-option.mat-selected:not(.mat-option-disabled) {
    color: $blue-200;
  }
}



body mat-form-field.mat-form-field-appearance-outline.no-padding {
  .mat-form-field-flex {
    padding: 0;
  }
}

mat-form-field.readonly {
  .mat-select-arrow-wrapper {
    visibility: hidden;
  }

  .mat-form-field-outline-start, .mat-form-field-outline-gap, .mat-form-field-outline-end {
    border: none;
  }

  .mat-select-value-text {
    color: $blue-400;
  }
}

body .mat-autocomplete-panel {
  .mat-option {
    line-height: 36px;
    height: 36px;
    font-size: 14px;
  }
}

body.dark-theme .mat-select-panel.light-theme,
body.dark-theme .mat-autocomplete-panel.light-theme,
{
  background: #fff;

  .mat-option:hover:not(.mat-option-disabled), .mat-option:focus:not(.mat-option-disabled) {
    background: rgba(0, 0, 0, .04);
  }

  .mat-option {
    color: rgba(0, 0, 0, .87);

    &.mat-selected:not(.mat-option-multiple), &.mat-active {
      background: rgba(0, 0, 0, .07);
    }
    &.mat-primary .mat-option.mat-selected:not(.mat-option-disabled) {
      color: rgba(0, 0, 0, .87);
    }
  }

}


// select menu dark
//body.dark-theme .mat-select-panel,
//body.dark-theme .mat-autocomplete-panel,
//{
//  background: $blue-800;
//
//  .mat-option:hover:not(.mat-option-disabled), .mat-option:focus:not(.mat-option-disabled) {
//    background: lighten($blue-800, 5);
//  }
//
//  .mat-option {
//    color: rgba($white, .87);
//
//    &.mat-active {
//      background: lighten($blue-800, 1);
//    }
//
//    &.mat-selected:not(.mat-option-multiple)  {
//      background: lighten($blue-800, 8);
//      &:not(.mat-active):not(:hover):not(.mat-option-disabled) {
//        color: rgba($white, .87);
//      }
//    }
//  }
//
//  .mat-pseudo-checkbox {
//    color: rgba($white, .87);
//  }
//
//  &.mat-primary .mat-option.mat-selected:not(.mat-option-disabled) {
//    color: rgba($white, .87);
//  }
//
//  &.mat-primary .mat-pseudo-checkbox-checked, .mat-primary .mat-pseudo-checkbox-indeterminate {
//    background: $purple;
//  }
//}

body .mat-autocomplete-panel.annotator-autocomplete {
  border: 1px solid $grey-purple;
  border-radius: 4px;
  overflow: hidden;
  margin-top: 4px;
  background: #000000;
}

.mat-select-value-text {
  line-height: 16px;
}

.dark-theme .mat-slide-toggle-thumb {
  background-color: $blue-400;
}

.mat-slider-track-background {
  background-color: $cloudy-blue-two;
}

.mat-slider-track-fill {
  background-color: $blue-500 !important;
}

.mat-slider-thumb {
  background-color: $blue-250 !important;

  &:hover {
    background-color: $blue-250 !important;
  }
}


// date picker
.mat-datepicker-container {
  .mat-icon-button {
    height: 20px;
    width: 20px;
  }

  .mat-datepicker-toggle {
    color: $light-grey-blue;
  }
}
