/*
 * "Müşterilerimiz Ne Diyor?" (hediyesahibi/testimonials, D-128). Loaded only on pages
 * with the block.
 *
 * Left the score card (the product page's review score, in small): the average, stars,
 * the count and a bar per star. Right the review cards in a row that swipes; the arrows
 * are the shelf's script (product-shelf.js: hidden when everything fits, disabled at the
 * ends). Three cards fill the row from 1280 px, two below; phones show one with the next
 * peeking in.
 *
 * Concentric corners (DESIGN §4.5): cards R 24; the score card's bar panel and a review's
 * product strip sit 10 px inside their card's edges → R 14; the strip's picture 6 px inside
 * it → R 8; all grow with the corner scale.
 */
.hs-voices {
  --hs-voices-ink: var(--hs-ink, #1f2547);
  --hs-voices-muted: var(--hs-muted, #5b6180);
  --hs-voices-line: var(--hs-line, #e6e9f0);
  --hs-voices-gap: 20px;
  --hs-voices-visible: 2;
  --hs-voices-card-r: calc(24px * var(--hs-corner-scale, 1));
  --hs-voices-inset: 10px;
  --hs-voices-strip-r: calc((24px - var(--hs-voices-inset)) * var(--hs-corner-scale, 1));
  --hs-voices-thumb-r: calc((24px - var(--hs-voices-inset) - 6px) * var(--hs-corner-scale, 1));

  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
  color: var(--hs-voices-ink);
  font-family: var(--hs-font, system-ui, sans-serif);
}

.hs-voices *,
.hs-voices *::before,
.hs-voices *::after {
  box-sizing: border-box;
}

/* ─── Head ───────────────────────────────────────────────────────────────── */

.hs-voices .hs-voices__title {
  margin: 0;
  padding: 0;
  color: var(--hs-voices-ink);
  font-family: inherit;
  font-size: clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem);
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.hs-voices .hs-voices__lead {
  margin: 2px 0 0;
  color: var(--hs-voices-muted);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
}

/* ─── Body: score card and the row of reviews ────────────────────────────── */

.hs-voices__body {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  gap: var(--hs-voices-gap);
  align-items: stretch;
}

.hs-voices__score {
  --hs-voices-score-p: 24px;

  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 26px var(--hs-voices-score-p) var(--hs-voices-score-p);
  overflow: hidden;
  background:
    radial-gradient(70% 70% at 100% 0%, rgb(255 205 226 / 65%), transparent 70%),
    radial-gradient(60% 60% at 100% 100%, rgb(201 225 255 / 70%), transparent 70%), var(--hs-surface, #fff);
  border-radius: var(--hs-voices-card-r);
  corner-shape: var(--hs-corner-shape, round);
  box-shadow:
    0 0 0 1px var(--hs-voices-line),
    0 18px 40px -28px rgb(31 37 71 / 25%);
}

.hs-voices .hs-voices__value {
  margin: 0;
  color: var(--hs-voices-ink);
  font-size: 56px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.03em;
}

.hs-voices__out-of {
  margin-left: 4px;
  color: var(--hs-voices-muted);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0;
}

/* The product page's star strip (product.css is not on this page). */
.hs-voices .hs-stars {
  --hs-stars-size: 18px;

  display: inline-block;
  flex: none;
  width: calc(var(--hs-stars-size) * 26 / 24 * 5);
  height: var(--hs-stars-size);
  background: linear-gradient(90deg, var(--hs-orange, #f09820) var(--hs-stars, 0%), #e1e4ec var(--hs-stars, 0%));
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 24'%3E%3Cpath d='M12 1.9a1.1 1.1 0 0 1 1 .62l2.6 5.28 5.83.85a1.1 1.1 0 0 1 .61 1.88l-4.22 4.1 1 5.8a1.1 1.1 0 0 1-1.6 1.16L12 18.85l-5.22 2.74a1.1 1.1 0 0 1-1.6-1.16l1-5.8-4.22-4.1a1.1 1.1 0 0 1 .61-1.88l5.83-.85L11 2.52a1.1 1.1 0 0 1 1-.62Z'/%3E%3C/svg%3E")
    0 0 / calc(var(--hs-stars-size) * 26 / 24) var(--hs-stars-size) repeat-x;
}

.hs-voices__score > .hs-stars {
  --hs-stars-size: 26px;

  margin-top: 10px;
}

.hs-voices .hs-voices__count {
  margin: 8px 0 18px;
  color: var(--hs-voices-muted);
  font-size: 15px;
  font-weight: 600;
}

/*
 * The bars: a panel at the card's foot, 10 px inside its sides and bottom (the card's
 * padding less 10 px pulled back), so its corners follow the card's (R 24 − 10 = 14).
 * Three classes: Kadence's `.single-content ul` would otherwise indent the list by 2em
 * and its `.single-content ul:last-child` drop the bottom margin.
 */
.hs-voices .hs-voices__score > .hs-voices__bars {
  display: grid;
  align-content: center;
  gap: 6px;
  margin: auto calc(var(--hs-voices-inset) - var(--hs-voices-score-p))
    calc(var(--hs-voices-inset) - var(--hs-voices-score-p));
  padding: 12px calc(var(--hs-voices-score-p) - var(--hs-voices-inset));
  list-style: none;
  background: rgb(255 255 255 / 72%);
  border-radius: var(--hs-voices-strip-r);
  corner-shape: var(--hs-corner-shape, round);
  box-shadow: inset 0 0 0 1px rgb(31 37 71 / 6%);
}

.hs-voices__bar {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 42px;
  gap: 10px;
  align-items: center;
  margin: 0;
  color: var(--hs-voices-muted);
  font-size: 14px;
  font-weight: 700;
}

.hs-voices__bar-stars {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.hs-voices__bar-star {
  width: 13px;
  height: 13px;
  background: var(--hs-orange, #f09820);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 1.9a1.1 1.1 0 0 1 1 .62l2.6 5.28 5.83.85a1.1 1.1 0 0 1 .61 1.88l-4.22 4.1 1 5.8a1.1 1.1 0 0 1-1.6 1.16L12 18.85l-5.22 2.74a1.1 1.1 0 0 1-1.6-1.16l1-5.8-4.22-4.1a1.1 1.1 0 0 1 .61-1.88l5.83-.85L11 2.52a1.1 1.1 0 0 1 1-.62Z'/%3E%3C/svg%3E")
    center / contain no-repeat;
}

.hs-voices__track {
  height: 8px;
  overflow: hidden;
  background: #eceff5;
  border-radius: var(--hs-r-pill, 999px);
}

.hs-voices__track > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--hs-orange, #f09820), var(--hs-orange-600, #e06c00));
  border-radius: inherit;
}

.hs-voices__bar-share {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* ─── The row of reviews ─────────────────────────────────────────────────── */

.hs-voices__rail {
  position: relative;
  min-width: 0;
}

.hs-voices .hs-voices__list {
  display: grid;
  grid-auto-columns: calc((100% - (var(--hs-voices-visible) - 1) * var(--hs-voices-gap)) / var(--hs-voices-visible));
  grid-auto-flow: column;
  gap: var(--hs-voices-gap);
  height: 100%;
  margin: 0;

  /* Room for the cards' shadow; the row scrolls sideways with snap points. */
  padding: 1px 1px 16px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  list-style: none;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.hs-voices .hs-voices__list::-webkit-scrollbar {
  display: none;
}

.hs-voices .hs-voices__item {
  display: flex;
  min-width: 0;
  margin: 0;
  padding: 0;
  scroll-snap-align: start;
}

.hs-voice {
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  margin: 0;
  padding: 22px 22px 10px;
  background: var(--hs-surface, #fff);
  border-radius: var(--hs-voices-card-r);
  corner-shape: var(--hs-corner-shape, round);
  box-shadow:
    0 0 0 1px var(--hs-voices-line),
    0 14px 32px -24px rgb(31 37 71 / 30%);
}

/* A large closing quote in the corner (decoration: no text for screen readers). */
.hs-voice::after {
  content: '\201D' / '';
  position: absolute;
  top: 6px;
  right: 18px;
  color: #ffe1c2;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 72px;
  font-weight: 700;
  line-height: 1;
  pointer-events: none;
}

.hs-voice__top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-right: 34px;
}

.hs-voices .hs-voice__date {
  color: var(--hs-voices-muted);
  font-size: 13px;
  font-weight: 600;
}

.hs-voices .hs-voice__quote {
  margin: 0;
  padding: 0;
  border: 0;
  quotes: none;
}

.hs-voices .hs-voice__quote::before,
.hs-voices .hs-voice__quote::after {
  content: none;
}

.hs-voices .hs-voice__quote p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--hs-voices-ink);
  font-size: 17px;
  font-style: normal;
  font-weight: 600;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 6;
  line-clamp: 6;
}

.hs-voice__by {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.hs-voice__avatar {
  display: grid;
  flex: none;
  place-items: center;
  width: 42px;
  height: 42px;
  color: var(--hs-blue-700, #185c9f);
  font-size: 17px;
  font-weight: 800;
  background: #e6f0ff;
  border-radius: 50%;
}

.hs-voice__avatar--2 {
  color: #be123c;
  background: #ffe8ee;
}

.hs-voice__avatar--3 {
  color: #6d28d9;
  background: #f1e9ff;
}

.hs-voice__avatar--4 {
  color: var(--hs-orange-700, #c2410c);
  background: #fff1e6;
}

.hs-voice__avatar--5 {
  color: #1f7a3d;
  background: #e8f6ec;
}

.hs-voice__avatar--6 {
  color: #0e7490;
  background: #e2f6fa;
}

.hs-voice__who {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.hs-voice__name {
  overflow: hidden;
  color: var(--hs-voices-ink);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hs-voice__verified {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #15803d;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.2;
}

/* The product: a strip at the card's foot, inset 10 px from its edges (concentric R 14). */
.hs-voices .hs-voice__product {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  margin: auto -12px 0;
  padding: 6px 12px 6px 6px;
  color: var(--hs-voices-ink);
  text-decoration: none;
  background: var(--hs-surface-2, #f5f7fb);
  border-radius: var(--hs-voices-strip-r);
  corner-shape: var(--hs-corner-shape, round);
  transition:
    background-color 0.15s ease,
    color 0.15s ease;
}

.hs-voice__thumb {
  flex: none;
  width: 44px;
  height: 44px;
  overflow: hidden;
  background: var(--hs-surface, #fff);
  border-radius: var(--hs-voices-thumb-r);
  corner-shape: var(--hs-corner-shape, round);
}

.hs-voice__thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hs-voice__product-name {
  display: -webkit-box;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.3;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.hs-voice__arrow {
  flex: none;
  color: var(--hs-voices-muted);
  transition: transform 0.2s ease;
}

@media (hover: hover) {
  .hs-voices .hs-voice__product:hover {
    color: var(--hs-orange-700, #c2410c);
    background: #fff1e6;
  }

  .hs-voices .hs-voice__product:hover .hs-voice__arrow {
    color: currentColor;
    transform: translateX(3px);
  }
}

.hs-voices .hs-voice__product:focus-visible {
  outline: 3px solid var(--hs-focus, #1f2547);
  outline-offset: 2px;
}

/* ─── Arrows (product-shelf.js) ──────────────────────────────────────────── */

.hs-voices .hs-voices__arrow {
  position: absolute;
  top: calc(50% - 30px);
  z-index: 5;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  color: var(--hs-voices-ink);
  background: var(--hs-surface, #fff);
  border: 0;
  border-radius: 50%;
  box-shadow:
    0 10px 24px -10px rgb(31 37 71 / 40%),
    0 1px 3px rgb(31 37 71 / 10%);
  cursor: pointer;
  transition:
    opacity 0.2s ease,
    transform 0.15s ease,
    color 0.15s ease;
}

.hs-voices .hs-voices__arrow--prev {
  left: -18px;
}

.hs-voices .hs-voices__arrow--next {
  right: -18px;
}

.hs-voices .hs-voices__arrow[hidden] {
  display: none;
}

.hs-voices .hs-voices__arrow:disabled {
  visibility: hidden;
  opacity: 0;
}

.hs-voices .hs-voices__arrow:hover {
  color: var(--hs-orange-700, #c2410c);
  background: var(--hs-surface, #fff);
  transform: scale(1.06);
}

.hs-voices .hs-voices__arrow:focus-visible {
  outline: 3px solid var(--hs-focus, #1f2547);
  outline-offset: 2px;
}

/* ─── Wider and narrower screens ─────────────────────────────────────────── */

/* Wide screens: three cards beside the score. */
@media (min-width: 1280px) {
  .hs-voices {
    --hs-voices-visible: 3;
  }
}

/* Tablets: the score card on top, its bars beside the number. */
@media (max-width: 1023px) {
  .hs-voices__body {
    grid-template-columns: minmax(0, 1fr);
  }

  .hs-voices__score {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-rows: auto auto 1fr;
    column-gap: 32px;
    padding: var(--hs-voices-score-p);
  }

  .hs-voices__score > :not(.hs-voices__bars) {
    grid-column: 1;
  }

  .hs-voices .hs-voices__score > .hs-voices__bars {
    grid-row: 1 / -1;
    grid-column: 2;
    align-self: stretch;
    margin: calc(var(--hs-voices-inset) - var(--hs-voices-score-p));
    margin-left: 0;
  }

  .hs-voices .hs-voices__count {
    margin-bottom: 0;
  }
}

/* Phones: everything stacked, one card with the next peeking in; swipe, no arrows. */
@media (max-width: 767px) {
  .hs-voices__score {
    --hs-voices-score-p: 20px;

    display: flex;
    padding: 22px var(--hs-voices-score-p) var(--hs-voices-score-p);
  }

  .hs-voices .hs-voices__value {
    font-size: 48px;
  }

  .hs-voices .hs-voices__count {
    margin-bottom: 16px;
  }

  .hs-voices .hs-voices__score > .hs-voices__bars {
    align-self: stretch;
    margin: 0 calc(var(--hs-voices-inset) - var(--hs-voices-score-p))
      calc(var(--hs-voices-inset) - var(--hs-voices-score-p));
  }

  .hs-voices .hs-voices__list {
    grid-auto-columns: min(84vw, 360px);
  }

  .hs-voices .hs-voices__arrow {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hs-voices .hs-voice__product,
  .hs-voice__arrow,
  .hs-voices .hs-voices__arrow {
    transition: none;
  }
}
