/* =========================
   Producer Rating – Frontend
   ========================= */

/* Brand color var */
:root { --pr-brand:#FE7314; }

/* Wrapper + centering rules so layout never shifts */
.pr-wrap{ max-width:520px; margin:0 auto; text-align:center; }
.pr-wrap .rating-result{ margin-top:8px; font-size:14px; color:#111; min-height:1.2em; }
.pr-wrap .rating-followup{
  margin-top:10px;
  border:1px solid #e5e7eb;
  border-radius:12px;
  padding:12px;
  background:#fff;
  max-width:520px;
  margin-left:auto; margin-right:auto; /* keep centered */
  text-align:left;                      /* copy readability */
}
.rating-followup h4{ margin:0 0 6px; font:600 14px/1.3 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; }
.rating-followup p{ margin:0 0 8px; font:400 12px/1.4 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; color:#555; }
.rating-followup input[type="email"],
.rating-followup textarea{
  width:100%;
  border:1px solid #d1d5db;
  border-radius:10px;
  padding:8px 10px;
  font-size:14px;
}
.rating-followup .row{ display:flex; gap:8px; align-items:center; margin-top:8px; flex-wrap:wrap; }
.rating-followup .btn{
  padding:8px 12px; border-radius:10px; border:1px solid #111; background:#111; color:#fff; cursor:pointer;
}
.rating-followup .btn.secondary{ background:#fff; color:#111; }
.rating-followup .help{ font-size:11px; color:#6b7280; margin-top:6px; }

/* ===== Stars ===== */
.rating-widget{
  display:flex; gap:4px; align-items:center; justify-content:center; /* always centered */
}

.rating-widget .star{
  font-size:28px;
  line-height:1;
  background:#fff;
  border:2px solid color-mix(in srgb, var(--pr-brand) 35%, #ffffff);
  border-radius:6px;
  width:36px; height:36px;
  display:flex; align-items:center; justify-content:center;
  cursor:pointer;
  transition:transform .12s ease, background .18s ease, color .18s ease, border-color .18s ease;
  color: var(--pr-brand); /* color of ☆ glyph */
}

.rating-widget .star span{ font-size:22px; }

/* Hover/keyboard focus: orange pill, white star */
.rating-widget .star:hover,
.rating-widget .star:focus-visible{
  background: var(--pr-brand);
  border-color: var(--pr-brand);
  color:#fff;
  transform:translateY(-1px);
  outline:2px solid var(--pr-brand);
  outline-offset:2px;
}

/* Selected after voting: orange pill, white star */
.rating-widget .star.selected{
  background: var(--pr-brand);
  border-color: var(--pr-brand);
  color:#fff;
}

/* Average badge below stars */
.pr-average{ font-size:14px; color:#111; margin-top:8px; }

/* Small screens tightness */
@media (max-width:480px){
  .rating-widget .star{ width:40px; height:40px; }
}
