/* FlowCraft Review Wall â€” style.css
   The few things Tailwind classes can't do on their own: the stars, the
   filter chips, the grid-to-swipe layout, initials colours and the bars. */

.rw [hidden] { display: none !important; }

/* Stars: app.js adds .is-on to the lit ones */
.rw-stars { display: inline-flex; gap: 2px; }
.rw-stars svg { width: 16px; height: 16px; fill: #e2e8f0; }
.rw-stars svg.is-on { fill: #f59e0b; }
.rw-stars-lg svg { width: 22px; height: 22px; }

/* Filter chips (aria-pressed shows the active one) */
.rw-chip {
  padding: .4rem .85rem; border: 1px solid #cbd5e1; border-radius: 999px; background: #fff;
  font-size: .85rem; font-weight: 700; color: #334155; cursor: pointer; transition: background-color .15s, border-color .15s, color .15s;
}
.rw-chip:hover { border-color: #818cf8; }
.rw-chip[aria-pressed="true"] { background: #4f46e5; border-color: #4f46e5; color: #fff; }
.rw-chip:focus-visible { outline: none; box-shadow: 0 0 0 4px #c7d2fe; }

/* Cards: a swipeable row on phones, a grid from 768px */
.rw-grid { display: flex; align-items: flex-start; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; -webkit-overflow-scrolling: touch; }
.rw-grid > * { flex: 0 0 85%; scroll-snap-align: start; }
@media (min-width: 768px) {
  .rw-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; overflow: visible; }
  .rw-grid > * { flex: none; }
}
@media (min-width: 1024px) { .rw-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Initials when there's no photo; the colour comes from the name */
.rw-initials { background: hsl(var(--hue, 240) 70% 92%); color: hsl(var(--hue, 240) 55% 30%); }

/* Rating breakdown bars grow in */
.rw-bar { width: 0; transition: width .6s cubic-bezier(.22, 1, .36, 1); }

@media (prefers-reduced-motion: reduce) {
  .rw-bar, .rw-chip { transition: none; }
}
/* =====================================================================
   TIER 1 UPGRADE: DARK MODE & INTERACTIVE FEEDBACK / SURVEY MODAL
   ===================================================================== */

/* Dark Mode Theme Override (add class="rw-dark" to <section class="rw ...">) */
.rw.rw-dark {
  background-color: #0b132b !important;
  border-color: #1e293b !important;
  color: #e2e8f0 !important;
}
.rw.rw-dark h1, .rw.rw-dark [data-avg], .rw.rw-dark [data-r-name] {
  color: #f8fafc !important;
}
.rw.rw-dark .text-slate-500, .rw.rw-dark .text-slate-600, .rw.rw-dark .text-slate-700 {
  color: #94a3b8 !important;
}
.rw.rw-dark .text-indigo-600, .rw.rw-dark .text-indigo-700 {
  color: #38bdf8 !important;
}
.rw.rw-dark .rw-card, .rw.rw-dark form[data-lead-form] {
  background-color: #111c3d !important;
  border-color: #1e293b !important;
}
.rw.rw-dark [data-r-reply] {
  background-color: #0b132b !important;
  border-left-color: #38bdf8 !important;
}
.rw.rw-dark .rw-chip {
  background-color: #111c3d;
  border-color: #334155;
  color: #cbd5e1;
}
.rw.rw-dark .rw-chip:hover {
  border-color: #38bdf8;
}
.rw.rw-dark .rw-chip[aria-pressed="true"] {
  background-color: #38bdf8;
  border-color: #38bdf8;
  color: #0b132b;
}
.rw.rw-dark select, .rw.rw-dark input {
  background-color: #0b132b !important;
  border-color: #334155 !important;
  color: #f8fafc !important;
}
.rw.rw-dark .bg-slate-100 {
  background-color: #1e293b !important;
}
.rw.rw-dark [data-r-service] {
  background-color: rgba(56, 189, 248, 0.15) !important;
  color: #38bdf8 !important;
}

/* Action Bar Button */
.rw-feedback-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #38bdf8;
  color: #0b132b;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 10px 18px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease;
}
.rw-feedback-trigger:hover {
  background: #7dd3fc;
  transform: translateY(-1px);
}

/* Survey & Feedback Modal Overlay */
.rw-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.8);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.rw-modal-backdrop[hidden] {
  display: none !important;
}
.rw-modal-box {
  background: #0f172a;
  color: #f8fafc;
  border: 1px solid #334155;
  border-radius: 20px;
  width: 100%;
  max-width: 520px;
  padding: 24px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
  font-family: inherit;
}
.rw-modal-box label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: #94a3b8;
  margin-bottom: 6px;
  margin-top: 14px;
}
.rw-modal-box input, .rw-modal-box select, .rw-modal-box textarea {
  width: 100%;
  box-sizing: border-box;
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 10px;
  padding: 10px 12px;
  color: #f8fafc;
  font-size: 0.9rem;
}
.rw-modal-box input:focus, .rw-modal-box select:focus, .rw-modal-box textarea:focus {
  outline: none;
  border-color: #38bdf8;
}

/* Interactive Star Picker inside Modal */
.rw-star-picker {
  display: flex;
  gap: 6px;
}
.rw-star-picker button {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 1.2rem;
  color: #64748b;
  cursor: pointer;
}
.rw-star-picker button.active {
  color: #f59e0b;
  border-color: #f59e0b;
  background: rgba(245, 158, 11, 0.12);
}

/* Quick Survey Tag Pills */
.rw-survey-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.rw-survey-pill {
  background: #1e293b;
  border: 1px solid #334155;
  color: #cbd5e1;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}
.rw-survey-pill.selected {
  background: #38bdf8;
  border-color: #38bdf8;
  color: #0b132b;
}
.rw.rw-dark form[data-lead-form] label {
  color: #f8fafc !important;
}
