/* Valoraciones de recetas — estrellas champagne/oro */
.cg-recipe-rating__editorial {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin: 0 0 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(217, 155, 69, 0.18);
}

.cg-recipe-rating__editorial-label {
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8a6530;
}

.cg-recipe-rating__editorial-value {
  font-family: Outfit, Inter, sans-serif;
  font-weight: 900;
  color: #8a6530;
}

.cg-recipe-rating__readonly {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.cg-recipe-rating__readonly-star {
  width: 18px;
  height: 18px;
  color: rgba(138, 101, 48, 0.22);
}

.cg-recipe-rating__readonly-star.is-full,
.cg-recipe-rating__readonly-star.is-half {
  color: var(--gold, #d99b45);
}

.cg-recipe-rating__readonly-star.is-full .cg-recipe-rating__icon path {
  fill: currentColor;
  stroke: rgba(176, 118, 38, 0.35);
  stroke-width: 0.35;
}

.cg-recipe-rating__readonly-star.is-half .cg-recipe-rating__icon path {
  fill: rgba(217, 155, 69, 0.55);
}

.cg-recipe-rating__readonly .cg-recipe-rating__icon {
  width: 18px;
  height: 18px;
}

.cg-recipe-hero-actions {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px 20px;
  flex-wrap: wrap;
  margin: 0 0 16px;
}

.detail-card .cg-recipe-hero-actions .cg-content-save-bar {
  margin: 0;
  flex: 0 0 auto;
}

.cg-recipe-rating {
  flex: 1 1 260px;
  min-width: 0;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(217, 155, 69, 0.22);
  background:
    linear-gradient(135deg, rgba(255, 253, 248, 0.98), rgba(247, 236, 214, 0.72));
  box-shadow: 0 10px 28px rgba(18, 63, 45, 0.08);
}

.cg-recipe-rating__label {
  display: block;
  margin: 0 0 8px;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8a6530;
}

.cg-recipe-rating__row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.cg-recipe-rating__stars {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.cg-recipe-rating__star {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 12px;
  padding: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.72);
  color: rgba(138, 101, 48, 0.28);
  transition:
    transform 0.16s ease,
    color 0.16s ease,
    background 0.16s ease,
    box-shadow 0.16s ease;
}

.cg-recipe-rating__star:hover,
.cg-recipe-rating__star:focus-visible {
  transform: translateY(-1px) scale(1.03);
  outline: none;
  box-shadow: 0 8px 18px rgba(217, 155, 69, 0.22);
}

.cg-recipe-rating__star.is-hover,
.cg-recipe-rating__star.is-active {
  color: var(--gold, #d99b45);
  background: linear-gradient(145deg, rgba(255, 248, 230, 0.98), rgba(240, 200, 91, 0.35));
}

.cg-recipe-rating__star.is-active .cg-recipe-rating__icon path {
  fill: currentColor;
  stroke: rgba(176, 118, 38, 0.35);
  stroke-width: 0.35;
  filter: drop-shadow(0 1px 2px rgba(217, 155, 69, 0.35));
}

.cg-recipe-rating__star.is-hover:not(.is-active) .cg-recipe-rating__icon path {
  fill: rgba(217, 155, 69, 0.55);
}

.cg-recipe-rating__icon {
  width: 22px;
  height: 22px;
  pointer-events: none;
}

.cg-recipe-rating__icon path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.35;
  stroke-linejoin: round;
}

.cg-recipe-rating__summary {
  margin: 0;
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  font-size: 0.92rem;
  color: #4f5a50;
}

.cg-recipe-rating__summary--empty {
  color: #667567;
  font-size: 0.88rem;
}

.cg-recipe-rating__average {
  font-family: Outfit, Inter, sans-serif;
  font-size: 1.35rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.03em;
  color: #8a6530;
}

.cg-recipe-rating__count {
  font-weight: 700;
  color: #667567;
}

.cg-recipe-rating__thanks {
  margin: 10px 0 0;
  font-size: 0.86rem;
  font-weight: 800;
  color: #2f7d57;
}

.cg-recipe-rating.is-busy {
  opacity: 0.82;
  pointer-events: none;
}

@media (max-width: 640px) {
  .cg-recipe-hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .detail-card .cg-recipe-hero-actions .cg-content-save-bar {
    justify-content: flex-end;
  }

  .cg-recipe-rating__star {
    width: 34px;
    height: 34px;
  }
}

html[data-theme="dark"] .cg-recipe-rating,
html.cg-dark .cg-recipe-rating {
  border-color: rgba(232, 179, 90, 0.28);
  background: linear-gradient(135deg, rgba(18, 63, 45, 0.72), rgba(9, 39, 26, 0.88));
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
}

html[data-theme="dark"] .cg-recipe-rating__label,
html.cg-dark .cg-recipe-rating__label {
  color: #e8b35a;
}

html[data-theme="dark"] .cg-recipe-rating__star,
html.cg-dark .cg-recipe-rating__star {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(232, 179, 90, 0.35);
}

html[data-theme="dark"] .cg-recipe-rating__star.is-hover,
html[data-theme="dark"] .cg-recipe-rating__star.is-active,
html.cg-dark .cg-recipe-rating__star.is-hover,
html.cg-dark .cg-recipe-rating__star.is-active {
  color: #e8b35a;
  background: linear-gradient(145deg, rgba(232, 179, 90, 0.18), rgba(217, 155, 69, 0.08));
}

html[data-theme="dark"] .cg-recipe-rating__average,
html.cg-dark .cg-recipe-rating__average {
  color: #f0c85b;
}

html[data-theme="dark"] .cg-recipe-rating__summary,
html[data-theme="dark"] .cg-recipe-rating__count,
html[data-theme="dark"] .cg-recipe-rating__summary--empty,
html.cg-dark .cg-recipe-rating__summary,
html.cg-dark .cg-recipe-rating__count,
html.cg-dark .cg-recipe-rating__summary--empty {
  color: #b8c4ba;
}

html[data-theme="dark"] .cg-recipe-rating__thanks,
html.cg-dark .cg-recipe-rating__thanks {
  color: #7fd4a8;
}
