@import "variables";

body .tt_doc_filter_block,
body .tt_loc_filter_block {
  padding-bottom: 15px;
  position: relative;

  /*labels for IE*/
  label {
    margin: 0;
    font-weight: normal;
  }

  button {
    font-family: $brandon_bold;
    margin: 12px 7px 0 0;
    cursor: pointer;
    padding: 12px 20px;
    text-decoration: none;
    white-space: normal;
    width: auto;
    border-radius: 10px;
    outline: none !important;
    box-shadow: none;
    border: none;
    transition: all 0.5s;

    i {
      margin-left: 5px;
    }
  }

  label {
    font-size: 17px;
    font-family: $brandon_italic;
    display: block;
    padding: 5px 0 10px 0;
  }

  .tt_filter_content {
    padding-bottom: 25px;
  }

  .select2-container--default {
    .select2-results__option {
      font-family: $brandon_italic;
      padding-left: 15px;
      font-size: 16px;
    }

    .select2-selection--single,
    .select2-selection--multiple {
      border-radius: 0;
      border: 1px solid $thin-grey;
      background: none;
      box-shadow: inset 0 -10px 16px -10px $medium-grey;
      padding-left: 15px !important;
      line-height: normal;
      font-size: 0;
      min-height: 50px;

      &:before {
        cursor: pointer;
        color: $white;
        border-style: solid;
        border-width: 3px 3px 0 0;
        content: '';
        display: inline-block;
        height: 10px;
        position: absolute;
        top: 16px;
        right: 20px;
        transform: rotate(135deg);
        vertical-align: top;
        width: 10px;
        z-index: 1;
      }

      &:after {
        cursor: pointer;
        content: '';
        top: 0;
        right: 0;
        width: 50px;
        height: 50px;
        position: absolute;
      }
    }

    .select2-selection--single {
      .select2-selection__placeholder,
      .select2-selection__placeholder {
        font-family: $brandon_italic;
        font-style: normal;
        font-size: 16px;
      }
    }
  }

  input::-webkit-input-placeholder {
    font-family: $brandon_italic;
    font-style: normal;
    font-size: 16px;
  }

  .select2-selection__choice {
    font-size: 13px;

    &:before,
    &:after {
      content: none;
    }
  }

  .select2-search {
    &:before,
    &:after {
      content: none;
    }
  }

  .select2-container--open {
    .select2-selection--single::before,
    .select2-selection--multiple:before {
      transform: rotate(-45deg);
    }
  }

  .select2-container {
    margin: 15px 0 0;
    padding-right: 50px;

    .select2-search__field {
      width: 100% !important;
      line-height: normal;
      position: absolute;
      left: 15px;
      top: 0;
      bottom: 0;
      margin: auto;
      &:focus,
      &:hover {
        border: none !important;
      }
    }
  }

  .tt_zip_code_block {
    position: relative;
    width: 100%;

    .tt_zip_code {
      font-family: $brandon_italic;
      width: 100%;
      margin: 15px 0;
      padding: 0 5px;
      min-height: 50px;
      display: inline-block;
      max-height: 50px;
      border-radius: 0;
      border: 1px solid $thin-grey !important;
      background: none;
      box-shadow: inset 0 -10px 16px -10px $medium-grey;
      padding-left: 15px !important;
      line-height: normal;
      font-size: 0;

      &::-ms-clear {
        display: none;
      }
    }

    i {
      position: absolute;
      right: 20px;
      top: 0;
      bottom: 0;
      margin: auto !important;
      display: block;
      font-size: 22px;
      width: 23px;
      height: 23px;
      color: $cloudy-blue;
    }
  }

  .select2-container--default {
    width: 100% !important;

    .select2-selection--single .select2-selection__rendered {
      font-family: $brandon_italic;
      line-height: normal;
      font-style: normal;
      display: flex;
      min-height: 50px;
      align-items: center;
      width: 100%;
    }

    .select2-selection--multiple {
      .select2-selection__rendered {
        padding: 0;

        li {
          margin: 0;
          position: initial;
        }
      }

      .select2-selection__choice {
        font-family: $brandon_regular;
        margin-right: 2px !important;
        margin-top: 2px !important;
        position: relative !important;
        z-index: 3;
      }
    }
  }

  .select2-dropdown {
    border: 1px solid $deep-sky-blue !important;
  }
}

// doctors filter
body .tt_doc_filter_block {
  .select2-container--default .select2-selection--single .select2-selection__arrow b {
    display: none;
  }

  .tt_patient_ages {
    width: calc(50% - 15px);
    max-width: 50%;
    margin: 0;
    padding: 0 5px;
    min-height: 50px;
    display: inline-block;
  }

  #tt_min_age {
    margin-right: 15px;
  }

  #tt_max_age {
    margin-left: 15px;
  }

  .select2-container .select2-selection--single {
    margin-top: 0;
    min-height: 50px;
    max-height: 50px;
    width: 100% !important;
  }

  .checkbox {
    &:checked + .checkbox_label::before {
      border-color: $deep-sky-blue;
      background-color: $deep-sky-blue;
    }

    &:checked + .checkbox_label::after {
      border-color: $white;
    }
  }

  .checkbox_text{
    margin: 0;
    padding-left: 0.75rem;
    font-weight: normal;
  }

  .tt_checkbox_block {
    min-height: 40px;
    height: 100%;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    width: 100%;
    input.checkbox {
      display: none !important;
    }
  }

  .checkbox_label {
    font-family: $brandon_italic;
    font-size: 18px;
    position: relative;
    display: flex;
    align-items: center;
    -webkit-align-items: center;
    cursor: pointer;
    padding: 0;

    &:before {
      position: relative;
      top: 0;
      left: 0;
      display: block;
      box-sizing: border-box;
      width: 24px;
      min-width: 24px;
      height: 24px;
      min-height: 24px;
      content: '';
      cursor: pointer;
      user-select: none;
      transition: 0.3s ease;
      border: 1px solid $thin-grey;
      border-radius: 0.25rem;
      outline: 0;
      background-color: transparent;
      box-shadow: 0 1px 1px 0 rgba(0, 0, 0, .1);
    }

    &:after {
      position: absolute;
      top: 50%;
      left: 8px;
      width: 6px;
      height: 14px;
      content: '';
      transition: 0.3s ease;
      transform: rotate(45deg) translateY(-50%) translate3d(-1px, -1px, 0);
      transform-origin: top;
      border: solid transparent;
      border-width: 0 3px 3px 0;
    }
  }
}
#alphabet-menu {
  width: 100%;
  margin-bottom: 25px;
  text-align: center;
  list-style: none;
  padding: 0;
  margin-left: 0;
  @media (min-width: $md-breakpoint) {
    display: flex;
    flex-direction: row;
  }

  li {
    flex-grow: 1;
    background: $blue-grey;
    text-align: center;
    border-left: 2px solid $white;
    position: relative;
    height: 40px;
    width: 40px;
    display:inline-block;

    @media (min-width: $md-breakpoint) {
      flex-grow: 1;
    }
    &.active {
      background: $deep-sky-blue;
      label{
        cursor: pointer;
      }
    }

    label {
      color: $white;
      height: 100%;
      width: 100%;
      left: 0;
      position: absolute;
      top: 0;
      line-height: 40px;
      margin: 0;
      padding: 0;
    }

    label:after {
      border: 2px solid $white;
      border-top: none;
      border-right: none;
      content: "";
      height: 6px;
      left: 7px;
      opacity: 0;
      position: absolute;
      top: 8px;
      transform: rotate(-45deg);
      width: 12px;
    }

    input[type="radio"] {
      visibility: hidden;
    }

    input[type="radio"]:checked + label:after {
      opacity: 1;
    }
  }
}
// locations filter
body .tt_loc_filter_block .select2-selection__choice {
  font-size: 12px;
  border: 1px solid $bluish-grey !important;
  background-color: $pale-grey !important;
  margin: 2px 5px 0 0 !important;
  padding: 0 5px !important;
}

@media (max-width: $sm1-breakpoint) {
  body .tt_doc_filter_block button,
  body .tt_loc_filter_block button {
    margin: 20px auto;
    display: block;
    width: 100%;
  }
}