mat-form-field {
  width: 100%;
}

$mat-menu-side-padding: 16px !default;
$clear-button-width: 20px;
$multiple-check-width: 33px;
$mat-option-height: 3em;
.sc-select-search-hidden {
  visibility: hidden;
}
.sc-select-search-inner {
  position: absolute;
  top: 0;
  width: 100%;
  border-bottom-width: 1px;
  border-bottom-style: solid;
  font-size: inherit;
  /*
    compensate effects of .mat-datepicker-content
    (see https://github.com/angular/material2/blob/master/src/lib/datepicker/datepicker-content.scss#L27)
    TODO: implement proper theming (https://github.com/bithost-gmbh/ngx-sc-select-search/issues/34)
  */
  box-shadow: none;
  border-radius: 4px 4px 0 0;

  /* Prevent iOS scroll issue (https://github.com/bithost-gmbh/ngx-sc-select-search/issues/70)*/
  -webkit-transform: translate3d(0,0,0);

  &.sc-select-search-inner-multiple {
    width: 100%;
    &.sc-select-search-inner-toggle-all {
      display: flex;
      align-items: center;
    }
  }

  .sc-input-element {
    flex-basis: auto;
    &:-ms-input-placeholder {
      // fix IE11 not able to focus programmatically with css style -ms-user-select: none
      // see https://github.com/angular/material2/issues/15093
      // needed for angular material ^7.0.0 < 8.0.0
      -ms-user-select: text;
    }
  }
}

.sc-select-search-panel {
  /* allow absolute positioning relative to outer options container */
  transform: none !important;
  overflow-x: hidden;
}

.sc-select-search-input {
  padding: 16px;
  padding-right: 16px + $clear-button-width;
  box-sizing: border-box;
}
.sc-select-search-no-entries-found {
  padding: 16px;
}
.sc-select-search-clear {
  position: absolute;
  right: 4px;
  top: 5px;
}

.sc-select-search-spinner {
  position: absolute;
  right: 16px;
  top: calc(50% - 8px);
}

.sc-select-search-input {
  padding-top: 0px !important;
  padding-bottom: 0px !important;
  padding-left: 10px !important;
  height: $mat-option-height;
  line-height: $mat-option-height;
  background-color: white !important;
}
.sc-select-search-clear {
  top: 3px;
}
/*
::ng-deep .cdk-overlay-pane-select-search {
  &.cdk-overlay-pane-select-search-with-offset{
    margin-top: -50px;
  }
}*/
.contains-sc-select-search {
  /* let move sc-select-search at the top of the dropdown. As option is disabled, there will be no-ripple hence safe. */
  position: sticky!important;
  padding: 0!important;
  top:0;
  z-index: 1;
  
  border-bottom: 1px solid !important;
  border-color: rgba(255, 255, 255, 0.12) !important;

  .mat-icon {
    margin-right: 0px;
  }
  .mat-option-pseudo-checkbox {
    display: none;
  }
  &.sc-select-search-no-entries-found {
    height: 2 * $mat-option-height;
  }
}

.sc-select-search-toggle-all-checkbox {
  padding-left: 16px;
  padding-bottom: 2px;
}

.sc-select-grid {
  &.mat-option {
    border-top: 1px solid;
    padding-top: 8px;
    padding-bottom: 8px;
  }

  &__item {
    margin: 0 -8px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  @for $i from 1 through 100 {
    &__item-#{$i} {
      margin: 0 -8px;
      display: grid;
      grid-template-columns: repeat($i, minmax(0, 1fr))//minmax(0, 1fr);
    }
  }

  &__sub-item {
    display: flex;
    flex-direction: column;
    padding: 0 8px;
  }

  &__label {
    padding: 4px 0;
  }

  &__line {
    font-size: 14px !important;
    line-height: 20px !important;

    &:last-child {
      padding-bottom: 4px;
    }
  }
}

.mat-select-panel{
  max-width: 80vw !important;

  @include media-breakpoint-up(md) {
    max-width: 50vw !important;
  }
}