.card-store {
  border: 1px solid $gray;
  display: flex;
  flex-direction: column;
  height: 100%;

  &__schedule {
    .schedule-title {
      &.card-store__title {
        font-weight: $btn-font-weight;
        padding: 15px 15px 13px;
      }
    }
  }

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

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

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

  &__body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
  }

  &__info {
    padding: 15px 14px 0;

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

  &__title {
    padding-top: 10px;
    font-weight: $headings-font-weight;
    line-height: 1.125rem;

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

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

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

  &__distance {
    font-weight: $headings-font-weight;
    margin-top: 4px;
  }

  &__address {
    padding: 8px 0 0;

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

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

  &__navigation {
    padding: 16px 15px 4px;
    margin-top: auto;

    .btn {
      margin-top: 0;
      width: 100%;
      display: flex;
      justify-content: center;
    }
  }

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

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

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

  &__tel {
    padding-top: 8px;
    border-top: 1px solid $gray;
    display: block;
    white-space: nowrap;

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

  &__fax {
    display: block;
    padding-bottom: 20px;
    border-bottom: 1px solid $gray;
  }

  &__actions {
    padding: 8px 15px 15px;

    a {
      font-weight: $font-weight-bold;
      font-size: 0.875rem;
      line-height: 1.25rem;
      text-decoration: underline;
    }
  }

  &__features {
    padding: 0 15px;
  }
}

.card-store__schedule {
  .opening-times-accordion {
    padding: 0;
    border-top: 0;
    border-bottom: 0;

    &__icon {
      left: auto;
      right: -2px;
      top: 9px;
      font-size: 1.25rem;
    }

    &__header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      cursor: pointer;
      padding: 10px 0 12px;
      margin: 0;
    }

    &__title {
      font-size: 0.875rem;
      font-weight: $headings-font-weight;
      line-height: 22px;
      color: $gray-dark;
    }

    &__icon {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      transition: transform 0.2s ease;
    }

    &__content {
      padding: 0 0 12px;
      margin-left: -15px;
      margin-right: -15px;
    }

    &__close {
      width: 100%;
      display: flex;
      justify-content: center;
      align-items: center;
      padding: 12px 0 4px;
      border: 0;
      background: transparent;
      cursor: pointer;

      &:focus:not(:focus-visible) {
        outline: none;
      }
    }

    &__close-icon {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      font-weight: $headings-font-weight;
      color: $blue;
      cursor: pointer;
      box-sizing: border-box;
      height: 24px;
      line-height: 24px;
      width: 24px;
      text-align: center;
      font-size: 1.25rem;
    }

    &.accordion_collapsed {
      .opening-times-accordion__icon {
        transform: rotate(360deg);
      }
    }
  }
}

.schedule-item {
  display: flex;

  &__day,
  &__time {
    display: flex;
    justify-content: flex-end;
    width: 56%;
    min-width: 145px;
    padding-right: 15px;

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

  &__time {
    gap: 3px;
  }

  &__day {
    align-items: center;
    justify-content: flex-start;
    min-width: auto;
    width: 44%;
    padding-left: 15px;
    padding-right: 0;
    line-height: 20px;

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

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

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

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

@include media-breakpoint-down(sm) {
  .card-store {
    &__schedule {
      display: block;
      padding: 0 15px;
    }

    &__navigation {
      padding-top: 12px;
    }

    &__actions {
      padding-bottom: 12px;
    }
  }

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

@include media-breakpoint-up(md) {
  .card-store {
    .store-locator-details & {
      width: 55%;
    }
  }
}

@include media-breakpoint-up(lg) {
  .card-store {
    .store-locator-details & {
      width: 75%;
    }
  }
}
