/* ═══════════════════════════════════════════════════════════════
   AffiliBox – Product Rating Styles
   6 styles: bar-colored | bar-dark | bar-score | stars-inline |
             stars-vertical | stars-large
   ═══════════════════════════════════════════════════════════════ */

.ab-rating-wrap {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  margin: 24px auto;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.09), 0 1px 4px rgba(0,0,0,0.05);
  border: 1px solid #eee;
  overflow: hidden;
}

/* ── Shared layout: image left, ratings right ────────────────── */
.ab-rating-inner {
  display: flex;
  align-items: stretch;
}

/* Image panel */
.ab-rating-img {
  flex-shrink: 0;
  width: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #f0f4ff 0%, #e8f0fe 50%, #fdf0ff 100%);
  padding: 20px;
  position: relative;
}
.ab-rating-img::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 60%, rgba(255,255,255,0.95) 30%, transparent 75%);
}
.ab-rating-img img {
  position: relative;
  z-index: 1;
  width: 110px;
  height: 110px;
  object-fit: contain;
  filter: drop-shadow(0 8px 20px rgba(0,0,0,0.15)) drop-shadow(0 2px 6px rgba(0,0,0,0.08));
  transition: transform 0.4s cubic-bezier(0.34,1.56,0.64,1);
}
.ab-rating-wrap:hover .ab-rating-img img { transform: scale(1.07) translateY(-4px); }

/* Content panel */
.ab-rating-content {
  flex: 1;
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.ab-rating-title {
  font-size: 1rem;
  font-weight: 800;
  color: #111;
  margin: 0 0 14px;
  line-height: 1.3;
}

/* ── Rating rows ─────────────────────────────────────────────── */
.ab-rating-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.ab-rating-row:last-child { margin-bottom: 0; }
.ab-rating-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: #555;
  min-width: 80px;
  flex-shrink: 0;
}

/* ══════════════════════════════════════════════════════════════
   STYLE 1 — COLOURED PROGRESS BARS (label inside bar)
   ══════════════════════════════════════════════════════════════ */
.ab-rating-bar-col .ab-rating-row { flex-direction: column; align-items: stretch; gap: 0; margin-bottom: 8px; }
.ab-rating-bar-col .ab-rating-label { display: none; }
.ab-rating-bar-col .ab-bar-track {
  height: 26px;
  border-radius: 6px;
  background: #e5e7eb;
  overflow: hidden;
  position: relative;
}
.ab-rating-bar-col .ab-bar-fill {
  height: 100%;
  border-radius: 6px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  font-size: 0.75rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.02em;
  transition: width 1s cubic-bezier(0.4,0,0.2,1);
  white-space: nowrap;
}

/* ══════════════════════════════════════════════════════════════
   STYLE 2 — DARK PROGRESS BARS (label left, bar right)
   ══════════════════════════════════════════════════════════════ */
.ab-rating-bar-dark .ab-rating-row { align-items: center; }
.ab-rating-bar-dark .ab-bar-track {
  flex: 1;
  height: 10px;
  border-radius: 10px;
  background: #e5e7eb;
  overflow: hidden;
}
.ab-rating-bar-dark .ab-bar-fill {
  height: 100%;
  border-radius: 10px;
  transition: width 1s cubic-bezier(0.4,0,0.2,1);
}
.ab-rating-bar-dark .ab-bar-score {
  font-size: 0.78rem;
  font-weight: 800;
  color: #888;
  min-width: 36px;
  text-align: right;
}

/* ══════════════════════════════════════════════════════════════
   STYLE 3 — SCORE BARS (label + score inside bar, rounded pill)
   ══════════════════════════════════════════════════════════════ */
.ab-rating-bar-score .ab-rating-row { flex-direction: column; align-items: stretch; gap: 0; margin-bottom: 8px; }
.ab-rating-bar-score .ab-rating-label { display: none; }
.ab-rating-bar-score .ab-bar-track {
  height: 28px;
  border-radius: 100px;
  background: #e5e7eb;
  overflow: hidden;
  position: relative;
}
.ab-rating-bar-score .ab-bar-fill {
  height: 100%;
  border-radius: 100px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  font-size: 0.75rem;
  font-weight: 800;
  color: #fff;
  transition: width 1s cubic-bezier(0.4,0,0.2,1);
}

/* ══════════════════════════════════════════════════════════════
   STYLE 4 — STARS INLINE (label left, stars right)
   ══════════════════════════════════════════════════════════════ */
.ab-rating-stars-inline .ab-rating-row { justify-content: space-between; }
.ab-rating-stars-inline .ab-stars {
  display: flex;
  gap: 2px;
}
.ab-rating-stars-inline .ab-stars span {
  font-size: 1rem;
  color: #f59e0b;
}
.ab-rating-stars-inline .ab-stars .empty { color: #d1d5db; }

/* ══════════════════════════════════════════════════════════════
   STYLE 5 — STARS VERTICAL (image top, category + stars below)
   Full-width stacked layout
   ══════════════════════════════════════════════════════════════ */
.ab-rating-stars-vert {
  text-align: center;
}
.ab-rating-stars-vert .ab-rating-inner {
  flex-direction: column;
  align-items: center;
}
.ab-rating-stars-vert .ab-rating-img {
  width: 100%;
  padding: 28px 20px 20px;
  justify-content: center;
}
.ab-rating-stars-vert .ab-rating-img img { width: 130px; height: 130px; }
.ab-rating-stars-vert .ab-rating-content {
  padding: 0 24px 24px;
  text-align: center;
  align-items: center;
}
.ab-rating-stars-vert .ab-rating-row { flex-direction: column; align-items: center; gap: 4px; margin-bottom: 14px; }
.ab-rating-stars-vert .ab-rating-label { min-width: 0; font-size: 0.78rem; color: #999; text-transform: uppercase; letter-spacing: 0.06em; }
.ab-rating-stars-vert .ab-stars { font-size: 1.3rem; gap: 2px; display: flex; justify-content: center; }
.ab-rating-stars-vert .ab-stars span { color: #f59e0b; }
.ab-rating-stars-vert .ab-stars .empty { color: #d1d5db; }

/* ══════════════════════════════════════════════════════════════
   STYLE 6 — STARS LARGE (big stars, label, side by side)
   ══════════════════════════════════════════════════════════════ */
.ab-rating-stars-large .ab-rating-row {
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #f3f4f6;
}
.ab-rating-stars-large .ab-rating-row:last-child { border-bottom: none; }
.ab-rating-stars-large .ab-rating-label { font-size: 0.9rem; color: #374151; min-width: 100px; }
.ab-rating-stars-large .ab-stars { display: flex; gap: 3px; }
.ab-rating-stars-large .ab-stars span { font-size: 1.4rem; color: #f59e0b; }
.ab-rating-stars-large .ab-stars .empty { color: #d1d5db; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 520px) {
  .ab-rating-inner { flex-direction: column; }
  .ab-rating-img { width: 100%; padding: 20px; }
  .ab-rating-stars-vert .ab-rating-img { padding: 20px; }
}
