/* CCUS Product Reviews - storefront styles
 * Design language: flat, restrained, modern. Accent colour is the site green #08795a (configurable).
 * Scoped to .ccus-rv / .ccus-rv-stars so the rest of the theme is untouched.
 */
.ccus-rv,
.ccus-rv-stars,
.ccus-rv-inline-stars {
  --ccus-star: #08795a;
  --ccus-star-size: 16px;
  --ccus-ink: #0f172a;
  --ccus-body: #334155;
  --ccus-muted: #64748b;
  --ccus-line: #e2e8f0;
  --ccus-soft: #f8fafc;
  --ccus-track: #eef2f6;
  --ccus-green: #08795a;
  --ccus-green-d: #065f46;
  --ccus-green-l: #ecfdf5;
}

/* ---------------- stars (inline SVG) ---------------- */
.ccus-rv-stars {
  display: inline-block;
  position: relative;
  line-height: 0;
  vertical-align: -2px;
  font-size: 0;
}
.ccus-rv-stars svg {
  width: var(--ccus-star-size);
  height: var(--ccus-star-size);
  display: inline-block;
  margin-right: 2px;
  fill: currentColor;
}
.ccus-rv-stars svg:last-child { margin-right: 0; }
.ccus-rv-stars-bg { display: block; color: rgba(15, 23, 42, .16); }
.ccus-rv-stars-fg {
  position: absolute;
  inset: 0 auto 0 0;
  display: block;
  overflow: hidden;
  white-space: nowrap;
  color: var(--ccus-star);
}
.ccus-rv-inline-stars { display: inline-flex; align-items: center; gap: 6px; }
.ccus-rv-inline-score { font-weight: 700; font-size: 13px; color: var(--ccus-ink); }
.ccus-rv-inline-count { font-size: 12px; color: var(--ccus-muted); }

/* the line under the product title */
.ccus-rv-title-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0 10px;
  font-size: 13px;
  color: var(--ccus-muted);
}
.ccus-rv-title-score { font-weight: 700; color: var(--ccus-ink); }
.ccus-rv-title-link { color: var(--ccus-green); text-decoration: none; border-bottom: 1px solid currentColor; }
.ccus-rv-title-link:hover { color: var(--ccus-green-d); }
.ccus-rv-title-line--empty .ccus-rv-title-link { border-bottom-style: dashed; }

/* ---------------- summary card ---------------- */
.ccus-rv { color: var(--ccus-ink); }
.ccus-rv .ccus-rv-summary {
  display: grid;
  grid-template-columns: minmax(150px, 200px) 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 22px 24px;
  margin-bottom: 22px;
  background: #fff;
  border: 1px solid rgba(8, 121, 90, .18);
  border-radius: 16px;
}
.ccus-rv-summary-score { text-align: center; }
.ccus-rv-summary-score strong {
  display: block;
  font-size: 40px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -.03em;
  color: var(--ccus-ink);
}
.ccus-rv-summary-score strong.is-empty { color: var(--ccus-muted); font-weight: 400; }
.ccus-rv-summary-stars { margin: 8px 0 6px; }
.ccus-rv-summary-count { display: block; font-size: 12.5px; color: var(--ccus-muted); }
.ccus-rv-bars { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.ccus-rv-bar { display: grid; grid-template-columns: 34px 1fr 42px; align-items: center; gap: 10px; font-size: 12px; color: var(--ccus-muted); }
.ccus-rv-bar-track { height: 8px; border-radius: 999px; background: var(--ccus-track); overflow: hidden; }
.ccus-rv-bar-fill { display: block; height: 100%; border-radius: 999px; background: var(--ccus-star); transition: width .3s ease; }
.ccus-rv-bar-num { text-align: right; font-variant-numeric: tabular-nums; }
.ccus-rv-summary-cta { display: flex; align-items: center; }

/* ---------------- buttons ---------------- */
.ccus-rv .ccus-rv-btn,
.ccus-rv-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 20px;
  border: 1px solid var(--ccus-line);
  border-radius: 10px;
  background: #fff;
  color: var(--ccus-ink);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
}
.ccus-rv-btn:hover { background: var(--ccus-soft); border-color: #cbd5e1; color: var(--ccus-ink); }
.ccus-rv-btn--primary { border-color: var(--ccus-green); background: var(--ccus-green); color: #fff; }
.ccus-rv-btn--primary:hover { background: var(--ccus-green-d); border-color: var(--ccus-green-d); color: #fff; transform: translateY(-1px); }
.ccus-rv-btn--ghost { background: #fff; color: var(--ccus-green); border-color: var(--ccus-green); }
.ccus-rv-btn--ghost:hover { background: var(--ccus-green-l); color: var(--ccus-green-d); }

/* ---------------- review list ---------------- */
/* Review cards: 3 per row on desktop, 1 per row on tablet/mobile.
   Thin border + slightly translucent white background. */
.ccus-rv .ccus-rv-items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  align-items: stretch;
}
/* The theme gives every ol > li a left margin (~21px); without this the first card
   would sit indented from the summary card above it. */
.ccus-rv .ccus-rv-items > li { margin: 0; }
.ccus-rv-item {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 16px;
  border: 1px solid rgba(8, 121, 90, .22);   /* light green, matches the brand */
  border-radius: 14px;
  background: rgba(255, 255, 255, .72);
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
.ccus-rv-item-text { flex: 1 1 auto; }
.ccus-rv-item-images { margin-top: 12px; }
.ccus-rv-item .ccus-rv-helpful { margin-top: auto; padding-top: 12px; }
@media (max-width: 1024px) {
  .ccus-rv .ccus-rv-items { grid-template-columns: 1fr; }
}
/* Row 1: name + verification icon. Row 2: the real date. Stars sit at the top right. */
.ccus-rv-item-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.ccus-rv-item-ident { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ccus-rv-item-name { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.ccus-rv-item-author { font-weight: 700; font-size: 13.5px; color: var(--ccus-ink); overflow-wrap: anywhere; }
.ccus-rv-item-date { font-size: 12px; color: var(--ccus-muted); }
.ccus-rv-item-stars { flex: 0 0 auto; }
/* Verification icon: no text on screen, the state lives in the tooltip / aria-label */
.ccus-rv-verified {
  display: inline-flex;
  align-items: center;
  line-height: 0;
  flex: 0 0 auto;
}
.ccus-rv-verified svg {
  width: 16px;
  height: 16px;
  display: block;
}
.ccus-rv-verified.is-verified { color: var(--ccus-star); }
.ccus-rv-verified.is-unverified { color: #94a3b8; }
.ccus-rv-item-title { margin: 12px 0 6px; font-size: 15px; font-weight: 700; color: var(--ccus-ink); }
.ccus-rv-item-text { font-size: 15px; line-height: 1.65; color: var(--ccus-body); overflow-wrap: anywhere; }
.ccus-rv-item-images { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.ccus-rv-thumb-link { display: block; border-radius: 10px; overflow: hidden; border: 1px solid var(--ccus-line); }
.ccus-rv-thumb { width: 88px; height: 88px; object-fit: cover; display: block; }
.ccus-rv-helpful { margin-top: 12px; }
.ccus-rv-vote { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.ccus-rv-vote-btn {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(8, 121, 90, .28);
  border-radius: 999px;
  background: #fff;
  color: var(--ccus-muted);
  font-size: 12px; font-weight: 600;
  cursor: pointer;
  transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.ccus-rv-vote-btn:hover { border-color: var(--ccus-green); color: var(--ccus-green); background: var(--ccus-green-l); }
.ccus-rv-vote-btn.is-done { border-color: var(--ccus-green); color: var(--ccus-green-d); background: var(--ccus-green-l); }
.ccus-rv-empty {
  padding: 28px 20px;
  border: 1px dashed var(--ccus-line);
  border-radius: 14px;
  text-align: center;
  color: var(--ccus-muted);
  font-size: 14px;
  background: var(--ccus-soft);
}
.ccus-rv-more { display: flex; justify-content: center; margin: 18px 0 8px; }

/* ---------------- form ---------------- */
.ccus-rv .ccus-rv-form-wrap {
  margin-top: 26px;
  padding: 24px;
  border: 1px solid rgba(8, 121, 90, .28);
  border-radius: 16px;
  background: #fff;
}
.ccus-rv-form-title { margin: 0 0 16px; font-size: 18px; font-weight: 800; letter-spacing: -.01em; }
.ccus-rv-field { margin-bottom: 16px; }
.ccus-rv-label { display: block; margin-bottom: 7px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ccus-muted); }
.ccus-rv-label em { color: var(--ccus-green); font-style: normal; }
.ccus-rv-form input[type="text"],
.ccus-rv-form input[type="email"],
.ccus-rv-form textarea {
  width: 100%;
  min-height: 46px;
  padding: 12px 14px;
  border: 1px solid var(--ccus-line);
  border-radius: 10px;
  background: #fff;
  color: var(--ccus-ink);
  font-size: 15px;
  line-height: 1.5;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.ccus-rv-form textarea { min-height: 124px; resize: vertical; }
.ccus-rv-form input[readonly] { background: var(--ccus-soft); color: var(--ccus-muted); }
.ccus-rv-form input:focus,
.ccus-rv-form textarea:focus { border-color: var(--ccus-green); box-shadow: 0 0 0 3px rgba(8, 121, 90, .14); outline: none; }
.ccus-rv-form input[type="file"] { font-size: 13px; color: var(--ccus-muted); }
.ccus-rv-hint { display: block; margin-top: 6px; font-size: 12px; color: var(--ccus-muted); }
.ccus-rv-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* Star picker: pure CSS, row-reverse so hovering highlights the stars before it. */
.ccus-rv-rate { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: 4px; }
.ccus-rv-rate input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ccus-rv-rate label { cursor: pointer; line-height: 0; color: rgba(15, 23, 42, .18); transition: color .12s ease, transform .12s ease; }
.ccus-rv-rate label svg { width: 28px; height: 28px; fill: currentColor; }
.ccus-rv-rate label:hover { transform: scale(1.08); }
.ccus-rv-rate label:hover,
.ccus-rv-rate label:hover ~ label,
.ccus-rv-rate input:checked ~ label { color: var(--ccus-star); }
.ccus-rv-rate input:focus-visible + label { outline: 2px solid var(--ccus-green); outline-offset: 3px; border-radius: 4px; }

.ccus-rv-form-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 4px; }
.ccus-rv-form-msg { font-size: 13px; color: var(--ccus-muted); }
.ccus-rv-form-msg.is-error { color: #b91c1c; }
.ccus-rv-form-msg.is-ok { color: var(--ccus-green-d); }
.ccus-rv-form-note {
  padding: 14px 16px;
  border: 1px solid var(--ccus-line);
  border-radius: 12px;
  background: var(--ccus-soft);
  font-size: 14px;
  color: var(--ccus-body);
}
.ccus-rv-form-note a { color: var(--ccus-green); font-weight: 700; }
.ccus-rv-notice {
  margin-bottom: 18px;
  padding: 12px 16px;
  border: 1px solid var(--ccus-line);
  border-radius: 12px;
  font-size: 14px;
}
.ccus-rv-notice.is-ok { border-color: #bbf7d0; background: var(--ccus-green-l); color: var(--ccus-green-d); }
.ccus-rv-notice.is-warn { border-color: #fde68a; background: #fffbeb; color: #78350f; }
.ccus-rv-ts { margin: 12px 0; }

/* Embedded (shortcode) version: no extra margins. */
.ccus-rv-embed .ccus-rv-summary { margin-bottom: 0; }

@media (max-width: 849px) {
  .ccus-rv .ccus-rv-summary { grid-template-columns: 1fr; gap: 16px; padding: 18px; }
  .ccus-rv-summary-score { text-align: left; }
  .ccus-rv-summary-cta { width: 100%; }
  .ccus-rv-summary-cta .ccus-rv-btn { width: 100%; }
  .ccus-rv-item-stars { margin-left: 0; }
  .ccus-rv .ccus-rv-form-wrap { padding: 18px; }
}
