.bw {
  margin-top: 20px;
  padding: 10px 15px;
  background: $white;
  border: 1px solid $gray;

  .stock {
    background: $white;

    &__result {
      &_hide {
        display: none;
      }
    }

    &__find {
      &_hide {
        display: none;
      }
    }

    &__head {
      font-size: 1rem;
      font-weight: 500;
      color: $blue;

      &.non-reg {
        margin: -15px;
        padding: 8px;
        border-radius: 3px;
        background: $green;
        color: $white;
        text-align: center;
        font-size: .875rem;
        font-weight: 500;
        line-height: 1.57143;
        cursor: pointer;
      }
    }

    &__tabs {
      display: flex;
      justify-content: center;
      margin-top: 20px;
      border-bottom: 1px solid $warm-grey;

      &_hide {
        display: none;
      }
    }

    &__tab {
      position: relative;
      bottom: -1px;
      width: 45%;
      min-width: 110px;
      margin: 0 5px;
      padding: 3px 0 0;
      border-radius: 5px 5px 0 0;
      border: 1px solid;
      border-color: $gray $gray $warm-grey;
      text-align: center;
      font-size: .9375rem;
      color: $blue;
      cursor: pointer;

      &.active {
        border: 1px solid;
        border-color: $warm-grey $warm-grey $white;
        color: $gray-dark;
        font-weight: 500;
        background: linear-gradient(180deg, $gray-gradient 0%, $white 100%);
      }
    }

    &__content {
      padding-top: 20px;
      padding-bottom: 5px;
    }

    &__accordion {
      &.non-reg {
        margin: -11px -16px;
        padding: 15px;
        background: $gray-bg;
      }
    }

    &__postcode {
      margin-bottom: 20px;

      &_label {
        display: flex;
      }

      &_invalid {
        border-radius: 3px;

        & input {
          border-color: $red;
        }

        & .stock__target {
          border-color: $red;
        }

        & .stock__postcode_invalid-msg {
          display: block;
        }
      }

      &_invalid-msg {
        display: none;
        color: $red;
        line-height: 1rem;
        font-size: .75rem;
      }
    }

    &__input {
      border-radius: 3px 0 0 3px;
    }

    &__target {
      height: 40px;
      width: 40px;
      padding: 0 10px;
      border-color: $gray;
      border-radius: 0 3px 3px 0;
      border-left: 0;
      font-size: 1.25rem;

      & .btn__text {
        vertical-align: middle;
      }
    }

    &__params,
    &__quest,
    &__cancel {
      display: none;
      margin-bottom: 20px;
    }

    &__close {
      display: none;
    }

    &__valid {
      display: none;

      &_show {
        display: block;
      }
    }
  }

  .store {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 17px 0 15px 10px;

    &__info {
      align-self: flex-start;
    }

    &__name {
      font-size: .9375rem;
      font-weight: 500;
      text-transform: uppercase;
      white-space: nowrap;
      text-overflow: ellipsis;
      overflow: hidden;
      max-width: 170px;
      padding-bottom: 3px;
    }

    &__stock {
      text-transform: uppercase;
      line-height: .875rem;
    }

    &__amount {
      &_out,
      &_low,
      &_enough,
      &_inStock,
      &_lowStock,
      &_outOfStock {
        display: inline-block;
        margin-right: 2px;
      }

      &_out,
      &_outOfStock {
        color: $red;
      }

      &_low,
      &_lowStock {
        color: $orange;
      }

      &_enough,
      &_inStock {
        color: $green;
      }
    }

    &__dist {
      width: 61px;
      margin-bottom: 3px;
      text-align: center;
      background: $gray-light;
      color: $gray-dim;

      &_val {
        font-weight: 500;
      }

      &_uom {
        font-size: .75rem;
      }
    }

  }

  .chosen {
    padding-bottom: 15px;
    margin-bottom: 10px;
    border-bottom: 1px solid $gray;

    &:not(.chosen_hide) + .stock {
      .stock__accordion {
        display: none;
      }
    }

    &_hide {
      display: none;
    }

    &__msg {
      display: none;
    }

    &__item {
      padding: 0;
      margin-bottom: 15px;

      .store {
        &__act,
        &__count {
          display: none;
        }
      }
    }

    &__notif {
      display: none;
      margin-bottom: 15px;
    }

    .default-store {
      border: 1px solid $gray;
      margin-top: 15px;
      padding: 5px;
      background: $gray-bg;

      &__inf {
        padding: 10px;
      }

      &__name {
        text-align: center;
      }

      &__make,
      &__det__current {
        text-decoration: underline;
        cursor: pointer;
      }

      &__default {
        display: none;
      }

      &__det {
        @include additional-text;
        padding: 10px;
        display: flex;
        justify-content: space-between;
        border-top: 1px dashed $gray;
      }
    }
  }

  .reserve {
    display: flex;
    align-items: center;
    margin-top: 15px;
    color: $gray-matt;

    &_ic {
      font-size: 1.75rem;
      line-height: 1;
    }

    &_msg {
      padding-left: 10px;
      font-size: .875rem;
      line-height: 19px;
    }

    &_bold {
      font-weight: 500;
    }
  }

  .store__tick {
    display: none;
  }
}

.s-details {
  transition: none;
  height: 100vh;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1051;
  overflow: hidden;
  outline: 0;
  border: 0;
  background: $white;
  padding: 15px 0 20px 15px;

  &::after {
    content: '';
    position: absolute;
    right: -4px;
    top: 0;
    width: 4px;
    height: 100%;
    background: $white;
    border-right: 2px solid $gray;
  }

  &_hide {
    visibility: hidden;
    right: 0;
    opacity: 0;
  }
}

@include media-breakpoint-up(md) {
  .bw {
    .stock {
      &__tab {
        width: 120px;
        min-width: auto;
      }
    }
  }

  .s-details {
    transition: .5s ease;
    position: absolute;
    z-index: 1;
    top: 0;
    right: calc(100% + 4px);
    left: auto;
    bottom: auto;
    opacity: 1;
    width: 100%;
    height: 100%;
    outline: 4px solid $warm-grey;
    padding: 15px 0 20px 15px;
    overflow: visible;

    &_hide {
      visibility: hidden;
      right: 0;
      opacity: 0;
    }
  }
}

@include media-breakpoint-down(sm) {
  .s-details {
    padding: 0;

    &__store {
      margin-right: 0;
      padding: 15px 15px 10px;
    }

    &__info {
      padding: 15px 15px 20px;

      .simplebar-scroll-content {
        text-align: left;
      }
    }
  }
}
