@import '../helpers/helpers';

.card-store {
  border: 1px solid $gray;
  display: block;

  .store-locator-details & {
    width: 100%;
    border: 0;
  }

  &__title-main {
    @include heading-5;
    text-transform: capitalize;
    font-weight: bold;
    padding-top: 10px;

    .store-locator-details & {
      @include heading-3;
    }
  }

  &__info {
    @include make-col(12);
    display: flex;
    min-height: auto;
    line-height: 2;
    padding: 0;
    border-bottom: 1px solid $gray;

    &-block {
      @include make-col(6);
      padding: 0 0 30px;

      &-address {
        line-height: $line-height-base;
      }
    }

    .store-locator-details & {
      padding-top: 0;
    }
  }

  &__title {
    padding-top: 38px;
    padding-bottom: 20px;
    font-size: 1.25rem;
    font-weight: 500;
    line-height: 1.125rem;

    .card-store__schedule & {
      padding: 0;
      font-weight: bold;
    }

    .card-store__features & {
      padding: 0;
      font-weight: bold;
    }

    .store-locator-details & {
      line-height: 1.25rem;
    }
  }

  &__message {
    background: $blue;
    color: $white;
    text-align: center;
    padding: 5px;
  }

  &__feature {
    font-weight: 500;
    margin-bottom: 10px;

    .svg-inline--fa {
      display: inline-block;
      vertical-align: top;
      color: $blue;
      width: 30px;
      height: 25px;
      margin-right: 15px;
    }
  }

  &__distance {
    font-weight: 500;
  }

  &__address {

    padding: 0;

    .store-locator-details & {
      padding-bottom: 0;
    }

    .btn {
      width: 100%;
      margin-top: 0;
    }
  }

  &__schedule {
    line-height: 30px;
    padding: 0;

    .store-locator-details & {
      padding: 0;
    }
  }

  &__contacts {
    @include primary-text;
    padding: 0;

    .store-locator-details & {
      padding: 0;
    }
  }

  &__tel {
    padding-top: 10px;
    border-top: 0;
    display: block;
    white-space: nowrap;

    .store-locator-details & {
      padding-top: 20px;
    }

    .fa-phone {
      color: $blue;
      width: 25px;
      height: 25px;
      margin-right: 15px;
    }
  }

  &__fax {
    display: block;
    padding-bottom: 20px;
    border-bottom: 0;

    .fa-fax {
      width: 25px;
      height: 25px;
      margin-right: 15px;
      color: $warm-grey;
    }
  }

  &__actions {
    text-align: center;
    padding: 10px 0 20px;

    a {
      font-weight: 500;
    }
  }

  &__features {
    padding: 0;
  }

  &__navigation {
    padding: 0 0 20px;

    .btn {
      width: 100%;
    }
  }

  &__seo {
    border-bottom: 1px solid $gray;
    padding: 25px 0 30px;
  }
}

.schedule-item {
  display: flex;

  &__day,
  &__time {
    width: 50%;

    .store-locator-details & {
      text-align: right;
      padding-right: 15px;
    }
  }

  &__day {
    padding-left: 15px;

    .store-locator-details & {
      text-align: left;
    }
  }

  &:nth-child(odd) {
    background: $gray-bg;
  }

  &:nth-child(even) {
    background: $white;
  }

  .store-locator-details & {
    .schedule-item {
      &:nth-child(odd) {
        background: $gray-light;
      }

      &:nth-child(even) {
        background: $white;
      }
    }
  }
}

@include media-breakpoint-up(md) {
  .card-store {
    &__info {
      &-block {
        &:nth-child(odd) {
          padding-right: 15px;
        }

        &:nth-child(even) {
          padding-left: 15px;
        }
      }
    }
  }
}

@include media-breakpoint-down(md) {
  .card-store {
    &__title {
      padding-top: 30px;
      padding-bottom: 15px;
    }
  }
}

@include media-breakpoint-down(sm) {
  .card-store {
    &__title-main {
      margin-bottom: 0;
      padding-top: 5px;
    }

    &__info {
      flex-direction: column;
      border-bottom: 0;

      &-block {
        @include make-col(12);
        display: flex;
        flex-direction: column;
        border-bottom: 1px solid $gray;

        .card-store__special-time {
          order: -1;
        }
      }
    }

    &__title {
      padding-top: 20px;
      padding-bottom: 15px;
    }
  }

  .schedule-item {
    &__time {
      .store-locator-details & {
        text-align: center;
      }
    }
  }
}
