/* Отзывы: карточка (главная и страница «Отзывы») и сводка оценок.
   Токены и шрифты — из styles.css. */

/* ---------- Card ---------- */
.rv-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 22px 24px 18px;
  overflow: hidden;
  border: 1px solid var(--border-soft, var(--border));
  border-radius: 14px;
  background: var(--panel);
  transition: border-color 200ms ease;
}
.rv-card:hover { border-color: var(--border-strong); }
/* A large quote mark in the corner, in the accent colour, barely visible. */
.rv-card::before {
  content: "\201C";
  position: absolute;
  top: 44px;
  right: 20px;
  color: rgb(var(--accent-rgb) / .09);
  font-family: var(--font-display, "Oswald"), sans-serif;
  font-size: 84px;
  font-weight: 700;
  line-height: 1;
  pointer-events: none;
}

.rv-head {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.rv-stars { display: inline-flex; gap: 3px; line-height: 0; }
.rv-star svg { width: 16px; height: 16px; fill: var(--border-strong); }
.rv-star.is-on svg { fill: var(--amber); }
.rv-stars--lg .rv-star svg { width: 20px; height: 20px; }
.rv-date {
  color: var(--muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.rv-text {
  position: relative;
  flex: 1;
  margin: 14px 0 0;
  color: var(--text);
  font-size: 16px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.rv-card--clamp .rv-text {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.rv-foot {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border-soft, var(--border));
}
.rv-avatar {
  position: relative;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  overflow: hidden;
  border-radius: 50%;
  background: var(--panel-3);
  box-shadow: 0 0 0 1px var(--border-strong);
}
.rv-avatar img,
.rv-avatar-letters {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.rv-avatar img { object-fit: cover; opacity: 0; transition: opacity 160ms ease; }
.rv-avatar.has-image img { opacity: 1; }
.rv-avatar-letters {
  display: grid;
  place-items: center;
  color: var(--accent-text);
  font-size: 13px;
  font-weight: 750;
}
.rv-who { display: grid; gap: 2px; min-width: 0; }
.rv-name {
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rv-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.3;
}
.rv-verified {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--green);
}
.rv-verified::before {
  content: "";
  width: 10px;
  height: 6px;
  margin-top: -3px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
}

/* Name and avatar lead to the author's Steam profile. */
.rv-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  margin: -6px -8px;
  padding: 6px 8px;
  border-radius: 10px;
  color: inherit;
  text-decoration: none;
  transition: background-color 180ms ease;
}
.rv-profile:hover { background: var(--panel-2); }
.rv-profile:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.rv-name-row { display: flex; align-items: center; gap: 6px; min-width: 0; }
.rv-external {
  flex: none;
  width: 13px;
  height: 13px;
  color: var(--muted);
  opacity: 0;
  transform: translate(-2px, 1px);
  transition: opacity 180ms ease, transform 180ms ease, color 180ms ease;
}
.rv-profile:hover .rv-name { color: var(--accent-text); }
.rv-profile:hover .rv-external { opacity: 1; transform: translate(0, 0); color: var(--accent-text); }
.rv-name { transition: color 180ms ease; }
@media (hover: none) { .rv-external { opacity: .7; transform: none; } }

/* ---------- Home: three cards in a row, same height ---------- */
.review-preview-grid { align-items: stretch; }

/* ---------- Reviews page: heading with the summary ---------- */
.reviews-page .reviews-page-main { gap: 22px; }
.rv-page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px 40px;
}
.rv-page-copy { min-width: 0; }
.reviews-page .rv-page-head .reviews-page-title { text-align: left; }
.rv-page-lead { margin: 6px 0 0; color: var(--muted); font-size: 15px; line-height: 1.5; }

.rv-summary {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 16px 22px;
  border: 1px solid var(--border-soft, var(--border));
  border-radius: 14px;
  background: var(--panel);
}
.rv-summary[hidden] { display: none; }
.rv-summary-score { display: flex; align-items: center; gap: 14px; }
.rv-summary-average {
  color: #fff;
  font-family: var(--font-display, "Oswald"), sans-serif;
  font-size: 46px;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.rv-summary-side { display: grid; gap: 6px; }
.rv-summary-count { color: var(--muted); font-size: 13px; }

.rv-bars { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.rv-bars li {
  display: grid;
  grid-template-columns: 10px 120px 24px;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.rv-bar { height: 6px; overflow: hidden; border-radius: 3px; background: var(--panel-3); }
.rv-bar i { display: block; height: 100%; border-radius: 3px; background: var(--amber); }
.rv-bar-count { text-align: right; }

/* The page measures cards to fill columns; the gap between cards stays as set there. */
.reviews-page .review-column .rv-card { flex: 0 0 auto; }

@media (max-width: 620px) {
  .rv-card { padding: 18px 18px 16px; }
  .rv-text { font-size: 15px; }
  .rv-summary { width: 100%; justify-content: space-between; gap: 16px; padding: 14px 16px; }
  .rv-bars li { grid-template-columns: 10px minmax(60px, 1fr) 22px; }
  .rv-summary-average { font-size: 40px; }
}
