$font-family: 'ABC Monument Grotesk Unlicensed Trial', sans-serif;
$font-family-second: 'ABC Monument Grotesk Mono Unlicensed Trial', sans-serif;
$c-brown: #56443a;
$c-white: #ffffff;

.rich-text-2__heading {
  font-family: $font-family;
  font-weight: 400;
  font-size: 32px;

  @media (min-width: 1024px) {
    font-size: 48px;
  }
}

.rich-text-2__content-heading {
  font-weight: 300;
  font-size: 20px;
  line-height: 32px;
  font-family: $font-family-second;

  @media (min-width: 1024px) {
    font-size: 32px;
    line-height: 42px;
  }
}

.rich-text-2 {
  font-family: $font-family;
  z-index: 1;
  overflow: hidden;
}

.rich-text-2__wrapper {
  width: 100%;
  padding: 0 16px;

  @media (min-width: 768px) {
    width: 100%;
  }

  @media (min-width: 950px) {
    display: flex;
    justify-content: center;
    align-items: center;
  }
}

.rich-text-2__wrapper.rich-text-2__wrapper--layout-row {
  @media (min-width: 950px) {
    display: block;
  }

  .rich-text-2__blocks {
    @media (min-width: 950px) {
      max-width: 776px;
    }
    &.left {
      max-width: 100%;
    }
  }

  .rich-text-2__contents {
    display: flex;
    justify-content: center;
    align-items: start;
    column-gap: 32px;

    @media (min-width: 1024px) {
      flex-wrap: wrap;
      max-width: 776px;
      // margin-top: 12px;
    }

    &.left {
      justify-content: flex-start;
      max-width: 100%;
    }
    &.center {
      justify-content: center;
    }
  }

  .rich-text-2__content {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    margin-top: 0;
  }

  .rich-text-2__content-heading {
    @media (min-width: 950px) {
      margin-right: 0;
    }
  }
}

.rich-text-2__wrapper.rich-text-2__wrapper--layout-column {
  @media (min-width: 950px) {
    display: flex;
  }
}

.rich-text-2:not(.rich-text-2--full-width) .rich-text-2__wrapper {
  margin: auto;
  width: calc(100% - 8rem / var(--font-body-scale));
}

.rich-text-2__blocks {
  width: 100%;
  text-align: center;

  // @media (min-width: 768px) {
  //   max-width: 400px;
  //   margin: 0 auto;
  // }

  // @media (min-width: 1024px) {
  //   max-width: 672px;
  // }

  &.left {
    text-align: left;
  }

  &.center {
    text-align: center;
  }
}

.rich-text-2__contents {
  width: 100%;
  margin-top: 14px;

  @media (min-width: 768px) {
    max-width: 320px;
    margin: 32px auto 0;
  }

  @media (min-width: 1024px) {
    max-width: 435px;
    margin: 0 auto;
  }
}

.rich-text-2__content {
  display: block;
  margin-top: 16px;

  &:first-child {
    margin-top: 0;
  }
}

.rich-text-2__content-heading {
  margin-top: 0;
  margin-bottom: 0;
  text-align: center;
  word-break: unset;

  @media (min-width: 768px) {
    font-family: $font-family-second;
    font-weight: 300;
    margin-right: 24px;
    text-align: left;
  }
}

.rich-text-2__content-text {
  margin-top: 8px;
  text-align: center;

  @media (min-width: 950px) {
    margin-top: 0;
    text-align: left;
  }
}

@media (min-width: 950px) {
  .rich-text-2__content-text {
    text-align: left;
  }
}

.rich-text-2__blocks * {
  overflow-wrap: break-word;
}

.rich-text-2__blocks > * {
  margin-top: 0;
  margin-bottom: 0;
}

.rich-text-2__blocks > * + * {
  margin-top: 16px;
}

.rich-text-2__blocks > * + a {
  margin-top: 3rem;
}

.rich-text-2__buttons {
  display: inline-flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  width: 100%;
  max-width: 45rem;
  word-break: break-word;
}

.rich-text-2__buttons--multiple > * {
  flex-grow: 1;
  min-width: 22rem;
}

.rich-text-2__buttons + .rich-text-2__buttons {
  margin-top: 1rem;
}

.rich-text-2__blocks.left .rich-text-2__buttons {
  justify-content: flex-start;
}

.rich-text-2__blocks.right .rich-text-2__buttons {
  justify-content: flex-end;
}

// Custom in component styles
.rich-text-2__wrapper--layout-column {
  .rich-text-2__contents {
    margin-top: 32px;
  }
}

@media (min-width: 1024px) {
  .rich-text-2__wrapper--layout-row {
    padding: 0 32px;
    .rich-text-2__blocks.center {
      margin: 0 auto;
    }
  }

  .rich-text-2__wrapper--layout-column {
    padding: 0 32px;
    column-gap: 269px;
    justify-content: space-between;

    .rich-text-2__contents {
      margin-top: 32px;
    }

    .rich-text-2__blocks.left {
      margin: 0;
    }

    .rich-text-2__contents {
      margin: 0;
    }
  }
}

// Custom section on PDP
.template-product {
  .rich-text-2__wrapper {
    width: 100%;
    padding: 0 16px;

    .rich-text-2__heading {
      line-height: 137%;
    }
  }

  .rich-text-2__blocks > * + * {
    margin-top: 15px;
  }

  .rich-text-2 .rich-text-2__text {
    line-height: 157%;
  }

  .rich-text-2__content-heading {
    font-family: $font-family-second;
    font-weight: 300;
  }

  .rich-text-2 .rich-text-2__contents {
    margin-top: 32px;
  }

  .rich-text-2 .rich-text-2__content-text {
    margin-top: 8px;
  }

  .rich-text-2 .rich-text-2__content-text {
    line-height: 158%;
  }
}

.rich-text-2 .rich-text-2__wrapper .rich-text-2__heading {
  margin: 0;
}

@media (min-width: 768px) {
  .template-product {
    .rich-text-2__wrapper {
      padding: 0 32px;
    }
  }
}

@media (min-width: 1024px) {
  .template-product {
    .rich-text-2__blocks {
      margin: 0;
    }

    .rich-text-2__wrapper .rich-text-2__heading {
      line-height: 58px;
    }

    .rich-text-2 .rich-text-2__text {
      line-height: 24px;
    }

    .rich-text-2 .rich-text-2__contents {
      margin-top: 0;
    }

    .rich-text-2 .rich-text-2__content {
      margin-top: 32px;

      &:first-child {
        margin-top: 0;
      }
    }

    .rich-text-2 .rich-text-2__content-text {
      margin-top: 0;
    }

    .rich-text-2 .rich-text-2__content-text {
      line-height: 130%;
    }
  }

  .rich-text-2__content {
    display: flex;
    display: -webkit-flex;
    justify-content: flex-start;
    -webkit-justify-content: flex-start;
    align-items: center;
    -webkit-align-items: center;
    margin-top: 32px;
    flex-direction: row;
  }

  .rich-text-2__content:first-of-type {
    margin-top: 0;
  }
}
