[data-cats-reviews] {
  min-width: 0;
}

.cats-reviews-control {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.cats-reviews-control:not(.cats-reviews-control--service-cats) {
  max-width: 100%;
}

.cats-reviews-control--service-cats {
  box-sizing: border-box;
  width: 100%;
  column-gap: 26px;
}

.cats-reviews-control:has(> :nth-child(2):empty) {
  display: none;
}

.cats-reviews-control > .bp-rv-grid,
.cats-reviews-control > :nth-child(2) {
  --cats-reviews-visible: 5;
  --cats-reviews-gap: 20px;
  display: grid;
  grid-template-columns: none;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - (var(--cats-reviews-visible) - 1) * var(--cats-reviews-gap)) / var(--cats-reviews-visible));
  align-items: stretch;
  gap: var(--cats-reviews-gap);
  min-width: 0;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.cats-reviews-control--service-cats > :nth-child(2) {
  grid-auto-columns: var(--cats-reviews-track, 100%);
}

.cats-reviews-control--service-cats + .cats-reviews-control__summary {
  margin-top: 28px;
  text-align: center;
}

.cats-reviews-control > :nth-child(2)::-webkit-scrollbar {
  display: none;
}

.cats-reviews-control > .cats-reviews-control__arrow {
  box-sizing: border-box;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin: 0;
  padding: 0;
  border: 1px solid currentColor;
  border-radius: 50%;
  background: transparent;
  color: #1f1f1f;
  cursor: pointer;
}

.cats-reviews-control > .cats-reviews-control__arrow:disabled {
  color: #a0a0a0;
  cursor: default;
}

.cats-review {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  padding: 24px;
  background: #fff;
  border: 1px solid #e6e1da;
  border-radius: 4px;
  font-family: system-ui, sans-serif;
  text-align: left;
  overflow-wrap: anywhere;
  scroll-snap-align: start;
}

.cats-review .cats-review__rating {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cats-review .cats-review__stars {
  display: flex;
  gap: 3px;
  min-width: 0;
}

.cats-review .cats-review__star {
  width: 16px;
  height: 16px;
  min-width: 0;
}

.cats-review .cats-review__verified {
  flex: none;
  width: 12px;
  height: 12px;
}

.cats-review .cats-review__text {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  margin: 0;
  font-size: 16px;
  line-height: 1.55;
  color: #3a3a3a;
  white-space: pre-wrap;
}

.cats-reviews-control--service-cats .cats-review {
  padding: 15px;
}

.cats-reviews-control--service-cats .cats-review .cats-review__text {
  display: block;
  -webkit-line-clamp: unset;
  overflow: visible;
}

.cats-reviews-control--service-cats .cats-review .cats-review__title {
  margin: 0;
  font-weight: 700;
  white-space: pre-wrap;
}

.cats-review .cats-review__meta {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: auto;
  font-size: 13px;
  color: #6b6b6b;
}

.cats-review .cats-review__link {
  color: #5b4b8a;
  text-decoration: underline;
}

.cats-reviews-control--service-cats .cats-review .cats-review__link:link,
.cats-reviews-control--service-cats .cats-review .cats-review__link:visited,
.cats-reviews-control--service-cats + .cats-reviews-control__summary a:link,
.cats-reviews-control--service-cats + .cats-reviews-control__summary a:visited {
  color: #1979c3;
  text-decoration: none;
}

.cats-reviews-control--service-cats .cats-review .cats-review__link:hover,
.cats-reviews-control--service-cats .cats-review .cats-review__link:active,
.cats-reviews-control--service-cats + .cats-reviews-control__summary a:hover,
.cats-reviews-control--service-cats + .cats-reviews-control__summary a:active {
  color: #006bb4;
  text-decoration: underline;
}

.cats-reviews-control--service-cats .cats-review .cats-review__link:active,
.cats-reviews-control--service-cats + .cats-reviews-control__summary a:active {
  color: #ff5501;
}

@media (max-width: 900px) {
  .cats-reviews-control:not(.cats-reviews-control--service-cats) > :nth-child(2) {
    --cats-reviews-visible: 3;
  }
}

@media (max-width: 600px) {
  .cats-reviews-control:not(.cats-reviews-control--service-cats) > :nth-child(2) {
    --cats-reviews-visible: 1;
  }
}
