.bb-product-reviews {
  max-width: 1240px;
}

.bb-product-reviews .woocommerce-Reviews-title {
  display: none;
}

.bb-reviews-summary__heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 24px;
  margin-bottom: 18px;
}

.bb-reviews-summary__panel {
  display: grid;
  grid-template-columns: minmax(0, .7fr) minmax(0, 1.3fr);
  align-items: center;
  gap: clamp(14px, 4vw, 58px);
  padding: clamp(18px, 4vw, 48px);
  margin-bottom: clamp(18px, 4vw, 36px);
  border: 1px solid var(--line);
  border-top: 2px solid var(--accent);
  background: var(--bg-alt);
}

.bb-reviews-summary__score {
  display: grid;
  justify-items: center;
  gap: 8px;
}

.bb-reviews-summary__score:only-child {
  grid-column: 1 / -1;
}

.bb-reviews-summary__score p {
  margin: 0;
}

.bb-reviews-summary__average {
  font-family: var(--display);
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.15;
  color: var(--ink);
}

.bb-reviews-summary__average strong {
  font-size: clamp(34px, 5vw, 64px);
  font-weight: 500;
}

.bb-reviews-summary__count {
  color: var(--ink-2);
  font-size: 14px;
}

.bb-review-stars {
  position: relative;
  display: inline-block;
  color: var(--line-2);
  font-size: 16px;
  line-height: 1.35;
  letter-spacing: .08em;
  white-space: nowrap;
}

.bb-reviews-summary__score .bb-review-stars {
  font-size: 22px;
}

.bb-review-stars__fill {
  position: absolute;
  top: 0;
  left: 0;
  overflow: hidden;
  color: var(--accent);
}

.bb-reviews-summary__distribution {
  display: grid;
  gap: 2px;
  max-width: 500px;
  width: 100%;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

.bb-reviews-summary__row {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 28px;
  padding: 3px 7px;
  color: var(--ink-2);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

a.bb-reviews-summary__row:is(:hover, :focus-visible, [aria-current="true"]) {
  background: var(--surface);
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.bb-reviews-summary__meter {
  display: block;
  position: relative;
  height: 5px;
  overflow: hidden;
  border-radius: 2px;
  background: var(--line-2);
}

.bb-reviews-summary__meter > span {
  display: block;
  height: 100%;
  background: var(--accent);
}

.bb-reviews-summary__filter {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 12px;
}

.bb-reviews-summary__filter p {
  margin: 0;
}

.bb-product-reviews ol.commentlist {
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
}

.bb-product-review-item {
  border-top: 1px solid var(--line);
  min-width: 0;
}

.bb-product-review {
  display: grid;
  grid-template-columns: minmax(0, .55fr) minmax(0, 1.45fr);
  align-items: start;
  gap: 14px clamp(24px, 5vw, 68px);
  padding: clamp(20px, 3vw, 34px) clamp(14px, 2.5vw, 28px);
  overflow-wrap: anywhere;
  background: var(--surface);
}

.bb-product-review__byline {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  min-width: 0;
}

.bb-product-review__avatar {
  display: grid;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  background: var(--bg-alt);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}

.bb-product-review__byline .meta {
  display: grid;
  gap: 2px;
  margin: 0;
}

.bb-product-review__byline .woocommerce-review__dash {
  display: none;
}

.bb-product-review__byline .woocommerce-review__verified {
  width: fit-content;
  padding: 1px 7px;
  border: 1px solid var(--line-2);
  color: var(--ink-2);
  font-size: 11px;
  font-style: normal;
}

.bb-product-review__body {
  display: grid;
  justify-items: start;
  gap: 8px;
}

.bb-product-reviews .description p {
  font-size: 15px;
  line-height: 1.65;
}

.bb-product-reviews .description p + p {
  margin-top: 12px;
}

.bb-product-reviews .woocommerce-pagination {
  margin-top: 18px;
}

.bb-product-reviews #review_form_wrapper {
  max-width: 740px;
  padding: clamp(18px, 3vw, 28px);
  border: 1px solid var(--line);
  background: var(--bg-alt);
}

.bb-review-dialog {
  box-sizing: border-box;
  position: fixed;
  inset: 0;
  width: min(680px, calc(100% - 24px));
  max-height: calc(100vh - 24px);
  max-height: calc(100dvh - 24px);
  margin: auto;
  padding: clamp(12px, 3vw, 28px);
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--line-2);
  background: var(--surface);
  color: var(--ink);
}

.bb-review-dialog__close {
  position: sticky;
  z-index: 1;
  top: 0;
  display: grid;
  place-items: center;
  margin-inline-start: auto;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 24px;
  line-height: 1;
}

.bb-product-reviews .bb-review-dialog #review_form_wrapper {
  max-width: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.bb-product-reviews .comment-form-rating select,
.bb-product-reviews .comment-form-comment textarea {
  margin: 0;
}

.bb-product-reviews .comment-form-rating select {
  max-width: 280px;
}

.bb-product-reviews .comment-form input:is([type="text"], [type="email"]),
.bb-product-reviews .comment-form select,
.bb-product-reviews .comment-form textarea {
  width: 100%;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  background: var(--surface);
  color: var(--ink);
}

.bb-product-reviews .comment-form-cookies-consent label {
  display: inline;
}

.bb-review-rate {
  margin: 0 0 14px;
  padding: 0;
  border: 0;
}

.bb-review-rate legend {
  margin-bottom: 6px;
  color: var(--ink-2);
  font-size: 13px;
}

.bb-review-rate__choices {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.bb-product-reviews .bb-review-rate label {
  position: relative;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin: 0;
  border: 1px solid var(--line);
  color: var(--muted);
  cursor: pointer;
  font-size: 23px;
  line-height: 1;
}

.bb-review-rate label:is(:hover, :has(input:checked), :has(~ label input:checked)) {
  color: var(--accent);
  background: var(--surface);
}

.bb-review-rate label:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

@media (max-width: 650px) {
  .bb-reviews-summary__panel,
  .bb-product-review {
    grid-template-columns: minmax(0, 1fr);
  }
}
