/*
 * Static review grid for reviews.html.
 * Presents customer reviews in a three-column masonry layout (three-column masonry of
 * bordered cards) using local content. Values preserve
 * the widget overrides that already live at the bottom of reviews.html:
 * card border #483721, 12px radius, body copy #2f2f2f, metadata #6a6a6a.
 */

.rev-widget {
  --rev-ink: #2f2f2f;
  --rev-muted: #6a6a6a;
  --rev-line: #483721;
  --rev-star: #f5a623;
  --rev-star-off: #d4d4d4;

  font-family: Inter, "Nj Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, Helvetica, Arial, sans-serif;
  color: var(--rev-ink);
}

.rev-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.u-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* --- Masonry columns ---------------------------------------------------- */

/*
 * No-JS baseline: a plain flowed grid holding all 45 cards.
 * With scripting on, the script hides this and deals the cards into the real
 * columns below - column-count re-balances on every content change, which moved
 * cards that were already on screen.
 */
.rev-grid {
  column-count: 3;
  column-gap: 24px;
}

.rev-grid--pool {
  display: none;
}

.rev-cols {
  display: flex;
  align-items: flex-start;
  gap: 24px;
}

.rev-col {
  flex: 1 1 0;
  min-width: 0;
}

/* --- Card --------------------------------------------------------------- */

.rev-card {
  position: relative;
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  margin-bottom: 24px;
  padding: 20px 22px 34px;
  border: 1px solid var(--rev-line);
  border-radius: 12px;
  background-color: #fff;
}

.rev-card:focus {
  outline: 2px solid var(--rev-line);
  outline-offset: 3px;
}

.rev-card__head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.rev-avatar {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--rev-line);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 40px;
  text-align: center;
}

.rev-card__id {
  min-width: 0;
}

.rev-author {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--rev-ink);
}

.rev-date {
  display: block;
  font-size: 13px;
  line-height: 1.4;
  color: var(--rev-muted);
}

/* --- Rating row --------------------------------------------------------- */

.rev-rating {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.rev-stars {
  font-size: 15px;
  letter-spacing: 2px;
  line-height: 1;
  color: var(--rev-star);
}

.rev-star--off {
  color: var(--rev-star-off);
}

.rev-source {
  display: inline-flex;
  align-items: center;
}

.rev-source__icon {
  width: 16px;
  height: 16px;
  display: block;
}

/* --- Body --------------------------------------------------------------- */

.rev-text {
  margin: 14px 0 0;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.55;
  color: var(--rev-ink);
}

.rev-more {
  font-weight: 800;
  color: var(--rev-ink);
  white-space: nowrap;
}

.rev-more:hover,
.rev-more:focus-visible {
  text-decoration: underline;
}

/* Collapsed by script; without JS the tail is visible and the toggle stays hidden. */
.rev-toggle {
  margin: 0 0 0 4px;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-weight: 800;
  color: var(--rev-ink);
  cursor: pointer;
  white-space: nowrap;
}

.rev-toggle:hover,
.rev-toggle:focus-visible {
  text-decoration: underline;
}

/* --- View more ---------------------------------------------------------- */

.rev-loadmore-wrap {
  display: flex;
  justify-content: center;
  margin: 8px 0 28px;
}

/* Plain text link, but kept a <button> because it acts rather than navigates. */
.rev-loadmore {
  padding: 4px 2px;
  border: 0;
  background: none;
  font: inherit;
  font-size: 15px;
  line-height: 1.5;
  color: var(--rev-muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  transition: color 160ms ease;
}

.rev-loadmore:hover,
.rev-loadmore:focus-visible {
  color: var(--rev-ink);
}

.rev-loadmore[hidden] {
  display: none;
}

.rev-share {
  position: absolute;
  right: 18px;
  bottom: 12px;
  color: #b5b5b5;
}

.rev-share__icon {
  width: 15px;
  height: 15px;
  display: block;
}

/* --- Powerbar ----------------------------------------------------------- */

.rev-powerbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 28px;
  font-size: 14px;
  color: var(--rev-muted);
}

/* --- Responsive --------------------------------------------------------- */

/* Breakpoints must match colCount() in the inline script. */
@media screen and (max-width: 991px) {
  .rev-grid,
  .rev-cols {
    column-gap: 20px;
    gap: 20px;
  }

  .rev-card {
    padding: 18px 18px 32px;
  }
}

@media screen and (max-width: 767px) {
  .rev-grid {
    column-count: 2;
  }
}

@media screen and (max-width: 599px) {
  .rev-grid {
    column-count: 1;
  }
}
