/* ============================================================
   review-widget.css — Styles for the review system
   Used by: index.html, reviews.html, and all results pages
   ============================================================ */

/* ===== SHARED REVIEW VARS ===== */
:root {
  --rw-gold: #FBBF24;
  --rw-gold-dark: #F59E0B;
}

/* ===== STARS ===== */
.rw-star { width: 20px; height: 20px; color: var(--rw-gold); display: inline-block; vertical-align: middle; }
.rw-star-sm { width: 16px; height: 16px; }
.rw-star-lg { width: 28px; height: 28px; }
.rw-star-empty { color: #E2E8F0; }

/* ===== REVIEW CARDS (carousel) ===== */
.rw-card {
  width: 380px; flex-shrink: 0;
  background: var(--bg-card, #fff); border-radius: var(--radius, 16px); padding: 24px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.06); border: 1px solid var(--border, #E2E8F0);
  transition: all 0.3s; position: relative; overflow: hidden;
}
.rw-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--primary, #0D9488), var(--accent, #2DD4BF), var(--blue, #0284C7));
  opacity: 0; transition: opacity 0.3s;
}
.rw-card:hover { box-shadow: 0 8px 40px rgba(0,0,0,0.10); transform: translateY(-4px); }
.rw-card:hover::before { opacity: 1; }
.rw-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.rw-user { display: flex; align-items: center; gap: 10px; }
.rw-avatar {
  width: 40px; height: 40px; border-radius: 50%; display: flex;
  align-items: center; justify-content: center; font-weight: 700;
  font-size: 14px; color: white; flex-shrink: 0;
}
.rw-name { font-size: 14px; font-weight: 600; }
.rw-date { font-size: 11px; color: var(--text-muted, #64748B); }
.rw-card-stars { margin-bottom: 10px; }
.rw-card-text { font-size: 14px; line-height: 1.6; color: var(--text, #1E293B); margin: 0; }
.rw-tag {
  display: inline-flex; align-items: center; gap: 4px; margin-top: 12px;
  padding: 4px 10px; background: rgba(13,148,136,0.06); border-radius: 6px;
  font-size: 11px; color: var(--primary, #0D9488); font-weight: 500;
}
.rw-verified {
  display: inline-flex; align-items: center; gap: 4px; margin-top: 12px; margin-left: 6px;
  padding: 4px 10px; background: rgba(34,197,94,0.08); border-radius: 6px;
  font-size: 11px; color: #16A34A; font-weight: 500;
}

/* Grid cards (reviews page) */
.rw-grid-card {
  background: var(--bg-card, #fff); border-radius: var(--radius, 16px); padding: 24px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.06); border: 1px solid var(--border, #E2E8F0);
  transition: all 0.3s;
}
.rw-grid-card:hover { box-shadow: 0 8px 40px rgba(0,0,0,0.10); }
.rw-grid-card .rw-card-top,
.rw-grid-card .rw-user,
.rw-grid-card .rw-avatar,
.rw-grid-card .rw-name,
.rw-grid-card .rw-date,
.rw-grid-card .rw-card-stars,
.rw-grid-card .rw-card-text,
.rw-grid-card .rw-tag,
.rw-grid-card .rw-verified { /* inherits from .rw-* above */ }

/* ===== HOMEPAGE SECTION ===== */
.rw-home-section { padding: 80px 24px; max-width: 1200px; margin: 0 auto; }

/* Empty state */
.rw-empty { display: none; }
.rw-empty.show { display: block; }
.rw-populated { display: none; }
.rw-populated.show { display: block; }

.rw-empty-hero {
  text-align: center; padding: 48px 32px;
  background: var(--bg-card, #fff); border-radius: var(--radius, 16px);
  box-shadow: 0 4px 24px rgba(0,0,0,0.06); border: 1px solid var(--border, #E2E8F0);
  margin-bottom: 40px;
}
.rw-empty-icon {
  width: 80px; height: 80px; border-radius: 20px; margin: 0 auto 20px;
  background: linear-gradient(135deg, rgba(13,148,136,0.08), rgba(2,132,199,0.08));
  display: flex; align-items: center; justify-content: center;
}
.rw-empty-icon svg { width: 40px; height: 40px; color: var(--primary, #0D9488); }
.rw-empty-hero h3 { font-size: 22px; font-weight: 700; margin-bottom: 8px; }
.rw-empty-hero p { font-size: 15px; color: var(--text-muted, #64748B); max-width: 420px; margin: 0 auto 24px; line-height: 1.6; }

/* Aggregate strip */
.rw-agg-strip {
  display: flex; align-items: center; justify-content: center; gap: 28px;
  padding: 20px 36px; margin-bottom: 40px;
  background: var(--bg-card, #fff); border-radius: var(--radius, 16px);
  box-shadow: 0 4px 24px rgba(0,0,0,0.06); border: 1px solid var(--border, #E2E8F0); flex-wrap: wrap;
}
.rw-agg-big { font-size: 48px; font-weight: 800; line-height: 1;
  background: linear-gradient(135deg, var(--rw-gold-dark), var(--rw-gold));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.rw-agg-meta { display: flex; flex-direction: column; gap: 3px; }
.rw-agg-meta-text { font-size: 13px; color: var(--text-muted, #64748B); }
.rw-agg-div { width: 1px; height: 44px; background: var(--border, #E2E8F0); }
.rw-agg-stat { text-align: center; }
.rw-agg-stat b { display: block; font-size: 24px; font-weight: 700; color: var(--text, #1E293B); }
.rw-agg-stat span { font-size: 12px; color: var(--text-muted, #64748B); }

/* Carousel */
.rw-carousel-wrap { position: relative; overflow: hidden; margin-bottom: 40px; }
.rw-carousel-track { display: flex; gap: 20px; animation: rwScroll 40s linear infinite; width: max-content; }
.rw-carousel-track:hover { animation-play-state: paused; }
@keyframes rwScroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

.rw-cta-row { display: flex; align-items: center; justify-content: center; gap: 16px; flex-wrap: wrap; }

/* ===== RESULTS PAGE PROMPT ===== */
.rw-prompt-wrapper { max-width: 800px; margin: 0 auto; padding: 40px 24px 60px; }
.rw-prompt {
  background: linear-gradient(135deg, rgba(13,148,136,0.04), rgba(2,132,199,0.04));
  border: 1px solid rgba(13,148,136,0.15); border-radius: var(--radius, 16px);
  padding: 32px; display: flex; align-items: center; gap: 24px; transition: all 0.3s;
}
.rw-prompt:hover { box-shadow: 0 4px 24px rgba(0,0,0,0.06); }
.rw-prompt-icon {
  width: 64px; height: 64px; border-radius: 16px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--primary, #0D9488), var(--accent, #2DD4BF));
  display: flex; align-items: center; justify-content: center;
}
.rw-prompt-icon svg { width: 32px; height: 32px; color: white; }
.rw-prompt-content { flex: 1; }
.rw-prompt-content h3 { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.rw-prompt-content p { font-size: 14px; color: var(--text-muted, #64748B); line-height: 1.5; margin: 0; }
.rw-prompt-stars { display: flex; gap: 4px; margin-top: 10px; }
.rw-prompt-star {
  width: 36px; height: 36px; border-radius: 8px; border: 2px solid var(--border, #E2E8F0);
  background: white; display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all 0.2s; color: #CBD5E1;
}
.rw-prompt-star:hover, .rw-prompt-star.active { border-color: var(--rw-gold); color: var(--rw-gold); transform: scale(1.1); background: rgba(251,191,36,0.06); }
.rw-prompt-star svg { width: 20px; height: 20px; }

/* ===== REVIEW MODAL ===== */
.rw-modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; z-index: 10000;
  opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
.rw-modal-overlay.show { opacity: 1; pointer-events: auto; }
.rw-modal {
  background: white; border-radius: 20px; padding: 40px; max-width: 520px; width: 90%;
  box-shadow: 0 24px 80px rgba(0,0,0,0.2); transform: translateY(20px); transition: transform 0.3s;
  position: relative;
}
.rw-modal-overlay.show .rw-modal { transform: translateY(0); }
.rw-modal-close {
  position: absolute; top: 16px; right: 16px; width: 36px; height: 36px;
  border-radius: 50%; border: none; background: #F1F5F9; cursor: pointer;
  display: flex; align-items: center; justify-content: center; font-size: 18px; color: var(--text-muted, #64748B);
}
.rw-modal-close:hover { background: #E2E8F0; }
.rw-modal-title { font-size: 22px; font-weight: 700; margin-bottom: 4px; }
.rw-modal-sub { font-size: 14px; color: var(--text-muted, #64748B); margin-bottom: 24px; }
.rw-modal-stars { display: flex; gap: 6px; margin-bottom: 24px; justify-content: center; }
.rw-modal-star {
  width: 44px; height: 44px; border-radius: 10px; border: 2px solid var(--border, #E2E8F0);
  background: white; display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all 0.2s; color: #CBD5E1;
}
.rw-modal-star:hover, .rw-modal-star.active { border-color: var(--rw-gold); color: var(--rw-gold); transform: scale(1.15); background: rgba(251,191,36,0.06); }
.rw-modal-star svg { width: 24px; height: 24px; }
.rw-modal-field { margin-bottom: 16px; }
.rw-modal-field label { display: block; font-size: 13px; font-weight: 600; color: var(--text, #1E293B); margin-bottom: 6px; }
.rw-modal-field input, .rw-modal-field textarea, .rw-modal-field select {
  width: 100%; padding: 12px 16px; border-radius: 10px; border: 1.5px solid var(--border, #E2E8F0);
  font-size: 14px; font-family: inherit; color: var(--text, #1E293B); transition: border-color 0.2s; background: white;
}
.rw-modal-field input:focus, .rw-modal-field textarea:focus, .rw-modal-field select:focus { outline: none; border-color: var(--primary, #0D9488); }
.rw-modal-field textarea { resize: vertical; min-height: 100px; }
.rw-modal-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rw-modal-error { background: #FEF2F2; color: #DC2626; padding: 10px 16px; border-radius: 8px; font-size: 13px; font-weight: 500; margin-bottom: 12px; }
.rw-modal-submit {
  width: 100%; padding: 14px; border-radius: 12px; border: none; cursor: pointer;
  font-size: 15px; font-weight: 600; font-family: inherit; color: white;
  background: linear-gradient(135deg, var(--primary, #0D9488), var(--primary-dark, #0F766E));
  box-shadow: 0 4px 16px rgba(13,148,136,0.3); transition: all 0.3s; margin-top: 8px;
}
.rw-modal-submit:hover { box-shadow: 0 6px 24px rgba(13,148,136,0.4); transform: translateY(-1px); }
.rw-modal-submit:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.rw-modal-or { text-align: center; margin: 20px 0; font-size: 13px; color: var(--text-muted, #64748B); position: relative; }
.rw-modal-or::before, .rw-modal-or::after { content: ''; position: absolute; top: 50%; width: 35%; height: 1px; background: var(--border, #E2E8F0); }
.rw-modal-or::before { left: 0; } .rw-modal-or::after { right: 0; }
.rw-google-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 12px; border-radius: 12px; border: 1.5px solid #E8EAED;
  background: white; cursor: pointer; font-size: 14px; font-weight: 600;
  color: #5F6368; font-family: inherit; transition: all 0.2s; text-decoration: none;
}
.rw-google-btn:hover { border-color: #4285F4; color: #4285F4; background: rgba(66,133,244,0.04); }

/* ===== TOAST ===== */
.rw-toast {
  position: fixed; bottom: 32px; left: 50%; transform: translateX(-50%) translateY(100px);
  background: #065F46; color: white; padding: 14px 28px; border-radius: 12px;
  font-size: 14px; font-weight: 600; box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  display: flex; align-items: center; gap: 10px; transition: transform 0.4s; z-index: 20000;
}
.rw-toast.show { transform: translateX(-50%) translateY(0); }
.rw-toast svg { width: 20px; height: 20px; }

/* ===== REVIEWS PAGE ===== */
.rw-page { max-width: 1200px; margin: 0 auto; padding: 48px 24px 80px; }
.rw-page-header { text-align: center; margin-bottom: 48px; }
.rw-page-header h1 {
  font-size: 44px; font-weight: 800; margin: 12px 0;
  background: linear-gradient(135deg, var(--text, #1E293B) 0%, var(--primary-dark, #0F766E) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.rw-page-header p { font-size: 18px; color: var(--text-muted, #64748B); line-height: 1.6; }

/* Breakdown panel */
.rw-breakdown {
  display: grid; grid-template-columns: 260px 1fr auto; gap: 40px; align-items: center;
  margin-bottom: 40px; padding: 32px; background: var(--bg-card, #fff); border-radius: var(--radius, 16px);
  box-shadow: 0 4px 24px rgba(0,0,0,0.06); border: 1px solid var(--border, #E2E8F0);
}
.rw-bd-score { text-align: center; }
.rw-bd-big {
  font-size: 64px; font-weight: 800; line-height: 1;
  background: linear-gradient(135deg, var(--rw-gold-dark), var(--rw-gold));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.rw-bd-count { font-size: 14px; color: var(--text-muted, #64748B); margin-top: 4px; }
.rw-bd-bars { display: flex; flex-direction: column; gap: 8px; }
.rw-bar-row { display: flex; align-items: center; gap: 10px; }
.rw-bar-label { font-size: 13px; font-weight: 500; color: var(--text-muted, #64748B); width: 44px; text-align: right; }
.rw-bar-track { flex: 1; height: 10px; background: #F1F5F9; border-radius: 100px; overflow: hidden; }
.rw-bar-fill { height: 100%; border-radius: 100px; background: linear-gradient(90deg, var(--rw-gold-dark), var(--rw-gold)); transition: width 0.6s; }
.rw-bar-pct { font-size: 12px; color: var(--text-muted, #64748B); width: 32px; }
.rw-bd-cta { text-align: center; }

/* Empty breakdown */
.rw-breakdown-empty {
  margin-bottom: 40px; padding: 48px 32px; background: var(--bg-card, #fff);
  border-radius: var(--radius, 16px); box-shadow: 0 4px 24px rgba(0,0,0,0.06); border: 1px solid var(--border, #E2E8F0);
  text-align: center;
}
.rw-breakdown-empty .rw-empty-stars-row { display: flex; justify-content: center; gap: 6px; margin-bottom: 16px; }
.rw-breakdown-empty h3 { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.rw-breakdown-empty p { font-size: 15px; color: var(--text-muted, #64748B); max-width: 400px; margin: 0 auto 24px; line-height: 1.6; }

/* Filter bar */
.rw-filter-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 28px; flex-wrap: wrap; }
.rw-filter-btn {
  padding: 8px 16px; border-radius: 100px; border: 1.5px solid var(--border, #E2E8F0);
  background: white; font-size: 13px; font-weight: 500; color: var(--text-muted, #64748B);
  cursor: pointer; transition: all 0.2s; font-family: inherit;
}
.rw-filter-btn:hover { border-color: var(--primary, #0D9488); color: var(--primary, #0D9488); }
.rw-filter-btn.active { background: var(--primary, #0D9488); border-color: var(--primary, #0D9488); color: white; }
.rw-filter-sort {
  margin-left: auto; padding: 8px 16px; border-radius: 10px;
  border: 1.5px solid var(--border, #E2E8F0); background: white; font-size: 13px;
  color: var(--text-muted, #64748B); font-family: inherit; cursor: pointer;
}
.rw-reviews-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }

/* Empty grid */
.rw-empty-grid {
  display: flex; flex-direction: column; align-items: center; padding: 80px 32px;
  text-align: center;
}
.rw-empty-grid svg { width: 64px; height: 64px; color: #CBD5E1; margin-bottom: 20px; }
.rw-empty-grid h3 { font-size: 18px; font-weight: 600; margin-bottom: 8px; }
.rw-empty-grid p { font-size: 14px; color: var(--text-muted, #64748B); max-width: 360px; margin-bottom: 24px; line-height: 1.6; }

/* Load more */
.rw-load-more {
  display: flex; justify-content: center; margin-top: 32px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .rw-reviews-grid { grid-template-columns: 1fr; }
  .rw-breakdown { grid-template-columns: 1fr; text-align: center; }
  .rw-bd-bars { max-width: 400px; margin: 0 auto; }
  .rw-page-header h1 { font-size: 32px; }
  .rw-agg-div { display: none; }
  .rw-prompt { flex-direction: column; text-align: center; }
  .rw-prompt-stars { justify-content: center; }
  .rw-modal-row { grid-template-columns: 1fr; }
  .rw-card { width: 300px; }
}
