/** @format */

.c-reviews__heading {
  text-align: center;
  margin: 0;
  padding: 0 2rem;

  font-size: var(--vdb-typeset-h2-mobile-size);
  font-weight: var(--vdb-typeset-h2-mobile-weight, 400);
  line-height: var(--vdb-typeset-h2-mobile-line-height);
  letter-spacing: var(--vdb-typeset-h2-mobile-letter-spacing);
  text-decoration: var(--vdb-typeset-h2-mobile-text-decoration, none);

  @media (min-width: 750px) {
    font-size: var(--vdb-typeset-h2-size);
    font-weight: var(--vdb-typeset-h2-weight, 400);
    line-height: var(--vdb-typeset-h2-line-height);
    letter-spacing: var(--vdb-typeset-h2-letter-spacing);
    text-decoration: var(--vdb-typeset-h2-text-decoration, none);
  }

  &:empty {
    display: none;
  }

  .c-reviews__inner.--with-custom-carousel:has(.c-reviews-item) & {
    margin-bottom: 0.8rem;
  }
}

.c-reviews__custom-carousel {
  .c-reviews__inner:not(:has(.c-reviews-item)) & {
    display: none;
  }
}

.c-reviews__container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: auto;
  max-width: 100vw;
  overflow: hidden;

  @media (min-width: 750px) {
    width: auto;
    max-width: 100rem;
    min-width: 45rem;
    padding: 0;
  }

  /* Fix cropping app blocks, that ignores parent's width. Mainly for Judgeme widget on RU product page. */
  .shopify-app-block {
    max-width: 100%;
  }

  .c-reviews__inner:has(.c-reviews-item) & {
    .jdgm-row-carousel {
      display: none;
    }

    .jdgm-rev-widg {
      padding-top: 0.8rem;
    }

    .jdgm-rev-widg__summary,
    .jdgm-histogram,
    .jdgm-row-readmore {
      display: none !important;
    }

    .jdgm-widget-actions-wrapper {
      border-left: none !important;
    }

    .jdgm-row-stars {
      border-top: none !important;
    }

    .jdgm-widget-actions-wrapper > .jdgm-write-rev-link {
      width: fit-content !important;
    }
  }

  .jdgm-review-widget--medium .jdgm-write-rev-link {
    max-width: 100% !important;
  }

  #judgeme_product_reviews .jdgm-rev-carousel-next.disabled,
  #judgeme_product_reviews .jdgm-rev-carousel-prev.disabled {
    opacity: 0;
  }

  .jdgm-medals-wrapper {
    display: none !important;
  }

  .jdgm-rev-widg__title {
    display: none;
  }
}
