/* ═══════════════════════════════════════════════════════════════
   XODE REVIEWS
   Shared by the homepage feedback strip and the Great Wall page.
   Depends on the design tokens in shared.css.
   ═══════════════════════════════════════════════════════════════ */

/* ── MARQUEE ──────────────────────────────────────────── */
.rv-marquee {
  position: relative;
  /* Fade the edges so cards enter and leave rather than being cut. */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
.rv-row { overflow: hidden; padding: 8px 0; }
.rv-row + .rv-row { margin-top: 14px; }

.rv-track {
  display: flex; gap: 18px; width: max-content;
  animation: rv-scroll 46s linear infinite;
  will-change: transform;
}
.rv-track.reverse { animation-name: rv-scroll-rev; }

/* Translating exactly -50% works because the card list is duplicated once. */
@keyframes rv-scroll     { from { transform: translateX(0); }    to { transform: translateX(-50%); } }
@keyframes rv-scroll-rev { from { transform: translateX(-50%); } to { transform: translateX(0); } }

/* Respect users who have asked for less motion. */
@media (prefers-reduced-motion: reduce) {
  .rv-track { animation: none; }
  .rv-row { overflow-x: auto; }
}

/* ── CARD ─────────────────────────────────────────────── */
.rv-card {
  flex: 0 0 340px; max-width: 340px;
  background: var(--bg-2); border: 1px solid var(--border-1);
  border-radius: var(--r-lg); padding: 22px 24px;
  display: flex; flex-direction: column; gap: 14px;
  transition: border-color .18s, transform .18s, box-shadow .18s;
  position: relative; overflow: hidden;
}
.rv-card::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(110% 80% at 100% 0%, rgba(124,92,255,.08), transparent 60%);
}
.rv-card:hover,
.rv-card:focus-visible {
  border-color: rgba(124,92,255,.45);
  transform: translateY(-3px);
  box-shadow: 0 14px 34px rgba(var(--shadow-rgb), .4);
  outline: none;
}

.rv-stars { display: flex; gap: 2px; font-size: 14px; line-height: 1; position: relative; }
.rv-star { color: var(--bg-4); }
.rv-star.on { color: var(--amber-ink); }

.rv-text {
  font-size: 13.5px; line-height: 1.75; color: var(--text-1);
  flex: 1; position: relative;
  display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical;
  overflow: hidden;
}

.rv-foot { display: flex; align-items: center; gap: 11px; position: relative; }
.rv-av {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center; overflow: hidden;
  font-size: 12.5px; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, var(--violet), #5B42C9);
}
.rv-av img { width: 100%; height: 100%; object-fit: cover; }
.rv-who { min-width: 0; }
.rv-name {
  font-size: 13px; font-weight: 700; color: var(--text-0);
  display: flex; align-items: center; gap: 5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rv-check { width: 13px; height: 13px; color: var(--violet-ink); flex-shrink: 0; }
.rv-role {
  font-family: var(--font-caption); font-style: italic; font-weight: 700;
  font-size: 10.5px; color: var(--text-3); margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.rv-empty {
  font-family: var(--font-caption); font-style: italic; font-weight: 700;
  font-size: 13px; color: var(--text-3); text-align: center;
  padding: 40px 20px; line-height: 1.9;
}

/* ── SORT CONTROLS ────────────────────────────────────── */
.rv-controls {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-bottom: 26px;
}
.rv-tabs {
  display: inline-flex; background: var(--bg-2);
  border: 1px solid var(--border-1); border-radius: var(--r-md); padding: 3px;
}
.rv-tab {
  padding: 8px 17px; border-radius: 7px; border: none; background: none;
  font-family: var(--font-body); font-size: 12.5px; font-weight: 700;
  color: var(--text-2); cursor: pointer; transition: all .13s; white-space: nowrap;
}
.rv-tab:hover { color: var(--text-0); }
.rv-tab.active { background: var(--violet); color: #fff; }

.rv-summary { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.rv-avg {
  font-family: var(--font-display); font-size: 34px; font-weight: 900;
  background: var(--grad); -webkit-background-clip: text;
  -webkit-text-fill-color: transparent; background-clip: text; line-height: 1;
}
.rv-avg-meta { font-size: 12px; color: var(--text-3); }
.rv-avg-meta .rv-star { font-size: 13px; }

/* ── SUBMIT FORM ──────────────────────────────────────── */
.rv-form {
  background: var(--bg-2); border: 1px solid var(--border-1);
  border-radius: var(--r-xl); padding: 30px; position: relative; overflow: hidden;
}
.rv-form::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--grad);
}
.rv-form::after {
  content: ''; position: absolute; top: -70px; right: -70px;
  width: 240px; height: 240px; pointer-events: none;
  background: radial-gradient(circle, rgba(124,92,255,.12), transparent 68%);
}
.rv-form > * { position: relative; z-index: 1; }
.rv-form-title {
  font-family: var(--font-display); font-size: 20px; font-weight: 900;
  color: var(--text-0); margin-bottom: 6px; letter-spacing: -.02em;
}
.rv-form-sub {
  font-family: var(--font-caption); font-style: italic; font-weight: 700;
  font-size: 12px; color: var(--text-3); margin-bottom: 22px; line-height: 1.7;
}

.rv-rate { display: flex; align-items: center; gap: 6px; margin-bottom: 20px; }
.rv-rate-btn {
  background: none; border: none; cursor: pointer; padding: 2px;
  font-size: 27px; line-height: 1; color: var(--bg-4);
  transition: color .12s, transform .12s;
}
.rv-rate-btn:hover { transform: scale(1.15); }
.rv-rate-btn.on { color: var(--amber-ink); }
.rv-rate-label {
  margin-left: 10px; font-size: 12.5px; color: var(--text-2); font-weight: 600;
}

.rv-field { margin-bottom: 15px; }
.rv-field label {
  display: block; font-size: 11px; font-weight: 700;
  color: var(--text-3); letter-spacing: .08em; text-transform: uppercase;
  margin-bottom: 7px; font-family: var(--font-caption); font-style: italic;
}
.rv-field input, .rv-field textarea {
  width: 100%; background: var(--bg-3); border: 1px solid var(--border-2);
  border-radius: var(--r-md); color: var(--text-0);
  font-family: var(--font-body); font-size: 14px; padding: 12px 14px;
  transition: all .15s; resize: none; outline: none;
}
.rv-field input:focus, .rv-field textarea:focus {
  border-color: var(--violet-ink); box-shadow: 0 0 0 3px var(--violet-glow);
}
.rv-field input::placeholder, .rv-field textarea::placeholder { color: var(--text-3); }
.rv-field textarea { height: 108px; }
.rv-count {
  text-align: right; font-family: var(--font-mono); font-size: 10.5px;
  color: var(--text-3); margin-top: 5px;
}
.rv-count.over { color: var(--danger); }

.rv-msg {
  padding: 11px 14px; border-radius: var(--r-md);
  font-size: 12.5px; line-height: 1.6; margin-bottom: 14px; display: none;
}
.rv-msg.show { display: block; }
.rv-msg.error   { background: rgba(255,107,107,.1); border: 1px solid rgba(255,107,107,.3); color: #FF9A9A; }
.rv-msg.success { background: rgba(74,222,128,.1); border: 1px solid rgba(74,222,128,.3); color: #86EFAC; }

/* ── RESPONSIVE ───────────────────────────────────────── */
@media (max-width: 600px) {
  .rv-card { flex: 0 0 280px; max-width: 280px; padding: 18px 20px; }
  .rv-track { gap: 14px; }
  .rv-form { padding: 24px 20px; }
  .rv-avg { font-size: 28px; }
}

/* ── Sign-in gate on the review form ───────────────────────────
   Reviews carry a verified badge, so the form tells you up front
   that posting needs an account — before you have typed anything. */
.rv-signin-note {
  background: color-mix(in srgb, var(--accent) 9%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--text-2);
  margin-bottom: 18px;
}

/* Any control that will ask for an account before it acts. */
.needs-account { position: relative; }
.needs-account::after {
  content: '';
  position: absolute;
  top: 7px;
  right: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
  pointer-events: none;
}
