/* ==========================================================================
   reviews.css — R18 verified-reviews layer for /reviews/
   Loads after site-core.css + company.css. Platform summary strip, filter
   chips, and the review card grid.
   ========================================================================== */

/* --- Platform summary strip ---------------------------------------------- */
.plat-strip {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px; margin: 0 0 30px;
}
.plat-card {
  display: flex; flex-direction: column; gap: 6px;
  padding: 20px 22px;
  background: var(--bg-card); border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  position: relative; overflow: hidden;
}
.plat-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-cyan));
  opacity: 0.7;
}
.plat-name {
  display: flex; align-items: center; gap: 9px;
  font-family: var(--font-primary); font-size: 12px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-tertiary);
}
.plat-name i { color: var(--accent-light); font-size: 14px; }
.plat-score {
  font-family: var(--font-display); font-size: 30px; font-weight: 700;
  color: #fff; line-height: 1; letter-spacing: -0.02em;
}
.plat-score span { font-size: 15px; color: var(--text-tertiary); font-weight: 500; }
.plat-meta { font-size: 13.5px; color: var(--text-secondary); }
.plat-card a {
  margin-top: 4px; font-size: 13px; font-weight: 600;
  color: var(--accent-light); text-decoration: none;
  display: inline-flex; align-items: center; gap: 6px;
}
.plat-card a:hover, .plat-card a:focus-visible { color: #fff; }

/* --- Stars ---------------------------------------------------------------- */
.stars { display: inline-flex; gap: 2px; color: #f5b301; font-size: 13px; }
.stars i { filter: drop-shadow(0 1px 2px rgba(0,0,0,0.4)); }

/* --- Filter chips --------------------------------------------------------- */
.rv-filterbar { margin: 0 0 24px; display: flex; flex-direction: column; gap: 12px; }
.rv-filtergroup { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.rv-filter-label {
  font-family: var(--font-primary); font-size: 11px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-tertiary);
  margin-right: 4px; flex: 0 0 auto;
}
.rv-filters {
  display: flex; flex-wrap: wrap; gap: 9px; margin: 0 0 24px;
}
.rv-filter {
  font-family: var(--font-primary); font-size: 13.5px; font-weight: 600;
  padding: 9px 17px; border-radius: 999px; cursor: pointer;
  background: var(--bg-glass); color: var(--text-secondary);
  border: 1px solid var(--border-card);
  transition: color 0.2s var(--ease-out), border-color 0.2s var(--ease-out),
              background-color 0.2s var(--ease-out);
}
.rv-filter:hover { color: #fff; border-color: var(--accent); }
.rv-filter[aria-pressed="true"] {
  background: rgba(66,133,244,0.14); color: #fff; border-color: var(--accent);
}
.rv-filter .n { color: var(--text-tertiary); font-weight: 500; margin-left: 5px; }
.rv-filter[aria-pressed="true"] .n { color: var(--accent-light); }

/* --- Review grid ---------------------------------------------------------- */
.rv-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px; align-items: start;
}
.rv-card {
  display: flex; flex-direction: column; gap: 12px;
  padding: 22px 22px 20px;
  background: var(--bg-card); border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  transition: border-color 0.25s var(--ease-out), transform 0.25s var(--ease-out);
}
.rv-card:hover { border-color: rgba(66,133,244,0.4); transform: translateY(-2px); }
.rv-card[hidden] { display: none; }

.rv-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.rv-who { min-width: 0; }
.rv-name {
  font-family: var(--font-display); font-size: 15.5px; font-weight: 600;
  color: #fff; margin: 0 0 2px; letter-spacing: -0.005em;
}
.rv-role { font-size: 12.5px; color: var(--text-tertiary); }
.rv-badge {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-primary); font-size: 10.5px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  padding: 5px 10px; border-radius: 999px; white-space: nowrap;
}
.rv-badge.google  { color: #9dc0fb; background: rgba(66,133,244,0.14);  border: 1px solid rgba(66,133,244,0.3); }
.rv-badge.yelp    { color: #ffa8a0; background: rgba(211,53,42,0.16);   border: 1px solid rgba(211,53,42,0.34); }
.rv-badge.spectora{ color: #7fe3f0; background: rgba(34,211,238,0.12);  border: 1px solid rgba(34,211,238,0.3); }

.rv-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rv-date { font-size: 12.5px; color: var(--text-tertiary); }
.rv-loc {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12.5px; color: var(--text-tertiary);
}
.rv-loc i { font-size: 11px; color: var(--accent-light); opacity: 0.85; }

/* Inspection-type tag */
.rv-type {
  display: inline-flex; align-items: center; gap: 6px; align-self: flex-start;
  font-family: var(--font-primary); font-size: 10.5px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 6px; white-space: nowrap;
}
.rv-type i { font-size: 10px; }
.rv-type.insurance { color: #9dc0fb; background: rgba(66,133,244,0.12);  border: 1px solid rgba(66,133,244,0.28); }
.rv-type.home      { color: #7fe3c4; background: rgba(34,211,180,0.10);  border: 1px solid rgba(34,211,180,0.26); }
.rv-type.agent     { color: #ffcf9e; background: rgba(232,158,52,0.12);  border: 1px solid rgba(232,158,52,0.3); }

/* Body grows to fill, so every collapsed card reaches the same floor height */
.rv-body {
  font-size: 14.5px; line-height: 1.62; color: var(--text-secondary);
  margin: 0; flex: 1 1 auto;
}
.rv-body q { quotes: "\201C" "\201D"; }
.rv-norating {
  font-size: 13.5px; color: var(--text-tertiary); font-style: italic;
  margin: 0; flex: 1 1 auto; display: flex; align-items: center;
}

/* Equal-height + clamp — applied only when JS enhancement is active, so the
   no-JS experience always shows every review in full. Uniform collapsed tile
   height regardless of review length; expanding one never stretches siblings
   (the grid uses align-items:start). */
.rv-grid[data-enhanced] .rv-card:not(.is-expanded) { min-height: 356px; }
.rv-grid[data-enhanced] .rv-card:not(.is-expanded) .rv-body {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 5;
  overflow: hidden;
}
.rv-grid[data-enhanced] .rv-card:not(.is-expanded) .rv-reply { display: none; }

/* Read full review toggle */
.rv-toggle {
  align-self: flex-start; margin-top: 2px;
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-primary); font-size: 13px; font-weight: 600;
  color: var(--accent-light); background: none; border: 0; padding: 4px 0;
  cursor: pointer;
}
.rv-toggle:hover, .rv-toggle:focus-visible { color: #fff; }
.rv-toggle i { font-size: 10px; transition: transform 0.2s var(--ease-out); }
.rv-card.is-expanded .rv-toggle i { transform: rotate(180deg); }

/* Owner response — only used where the full text is known */
.rv-reply {
  margin: 2px 0 0; padding: 13px 15px;
  background: var(--bg-glass); border-left: 2px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 13.5px; line-height: 1.58; color: var(--text-tertiary);
}
.rv-reply strong { display: block; color: var(--text-secondary); font-size: 12px;
  letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 5px; }

/* --- Methodology note ----------------------------------------------------- */
.rv-method {
  margin-top: 28px; padding: 20px 22px;
  background: var(--bg-glass); border: 1px dashed var(--border-light);
  border-radius: var(--radius-md);
  font-size: 13.5px; line-height: 1.65; color: var(--text-tertiary);
}
.rv-method p { margin: 0 0 9px; }
.rv-method p:last-child { margin-bottom: 0; }
.rv-method strong { color: var(--text-secondary); }
.rv-method a { color: var(--accent-light); font-weight: 600; text-decoration: none; }
.rv-method a:hover { text-decoration: underline; }

.rv-empty {
  padding: 26px; text-align: center; color: var(--text-tertiary);
  font-size: 14px;
}

/* --- Feedback / leave-a-review CTA (ungated, FTC-compliant) --------------- */
.rv-feedback {
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 30px; align-items: center;
  padding: clamp(26px, 4vw, 40px);
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(66,133,244,0.14), transparent 60%),
    var(--bg-card);
  border: 1px solid var(--border-card); border-radius: var(--radius-lg);
}
.rv-feedback h2 {
  font-family: var(--font-display); font-size: clamp(21px, 2.6vw, 27px);
  font-weight: 600; color: #fff; margin: 6px 0 12px; letter-spacing: -0.01em;
}
.rv-feedback p { font-size: 14.5px; line-height: 1.65; color: var(--text-secondary); margin: 0 0 12px; }
.rv-fb-note {
  font-size: 12.5px !important; color: var(--text-tertiary) !important;
  padding-top: 12px; border-top: 1px solid var(--border-subtle);
}
.rv-fb-actions { display: flex; flex-direction: column; gap: 12px; }
.rv-fb-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 20px; border-radius: var(--radius-md);
  font-family: var(--font-primary); font-size: 15px; font-weight: 600;
  text-decoration: none; border: 1px solid var(--border-card);
  background: var(--bg-glass); color: #fff;
  transition: border-color 0.2s var(--ease-out), background-color 0.2s var(--ease-out),
              transform 0.2s var(--ease-out);
}
.rv-fb-btn:hover, .rv-fb-btn:focus-visible { transform: translateY(-2px); }
.rv-fb-btn.google:hover, .rv-fb-btn.google:focus-visible { border-color: #4285f4; background: rgba(66,133,244,0.14); }
.rv-fb-btn.yelp:hover, .rv-fb-btn.yelp:focus-visible { border-color: #d3352a; background: rgba(211,53,42,0.14); }
.rv-fb-btn i { font-size: 17px; }
.rv-fb-btn.google i { color: #9dc0fb; }
.rv-fb-btn.yelp i { color: #ffa8a0; }
.rv-fb-private {
  margin-top: 2px; font-size: 13.5px; font-weight: 600; color: var(--accent-light);
  text-decoration: none; display: inline-flex; align-items: center; gap: 7px;
}
.rv-fb-private:hover, .rv-fb-private:focus-visible { color: #fff; }

@media (prefers-reduced-motion: reduce) {
  .rv-card { transition: none; }
  .rv-card:hover { transform: none; }
  .rv-fb-btn:hover, .rv-fb-btn:focus-visible { transform: none; }
}

@media (max-width: 760px) {
  .rv-feedback { grid-template-columns: 1fr; gap: 22px; }
}
@media (max-width: 560px) {
  .rv-grid { grid-template-columns: 1fr; }
  .rv-head { flex-direction: column; }
}
