/* bewertungen.css — Hero-Chip, Bewertungsband und Sternwahl (BestBreakBewertungen).
   Wird über bewertung_assets() nur auf Rezeptseiten geladen. Alles unter .bb-bew-…
   bzw. .rezept-hero-fact--bewertung; style.css bleibt unberührt.
   Farben aus dem Entwurf: Gold #E0B62F, Linie #EFE6C8, Balken #EFE9D6, Stern leer #D9D4C4. */

/* ---------- Hero-Chip (Pill kommt aus .rezept-hero-fact) ---------- */
.rezept-hero-fact--bewertung { gap: .35rem; }
.rezept-hero-fact--bewertung .bb-bew-chip-stern { color: #E0B62F; }
.bb-bew-chip-n { opacity: .8; }

/* ---------- Band ---------- */
.bb-bew-band {
  margin-top: clamp(40px, 5vw, 72px);
  background: var(--color-rezepte-soft, #FFFBEC);
  border-top: 1px solid #EFE6C8;
  padding: 2rem 0;
  scroll-margin-top: 100px;   /* wie #naehrwerte: Platz für den Kopf beim Sprung */
  color: var(--color-primary, #6B6970);
}

/* Band sitzt direkt über „Ähnliche Rezepte": dort ohne Abstand und ohne
   Trennlinie anschließen (style.css bleibt unberührt). */
.bb-bew-band + .rezept-related {
  margin-top: 0;
  border-top: 0;
}

.bb-bew-inner {
  max-width: 820px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(170px, 220px) 1fr;
  column-gap: 2.2rem;
  row-gap: .9rem;
  align-items: start;
}

.bb-bew-titel {
  grid-column: 1 / -1;
  margin: 0;
  font-family: var(--font-headline, 'Caladea', Georgia, serif);
  font-size: clamp(1.5rem, 1.2rem + 1vw, 1.9rem);
  color: var(--color-primary, #6B6970);
}

/* Unter der Schwelle: Erste-Text und Aktion über die volle Breite */
.bb-bew-erste { grid-column: 1 / -1; margin: 0; }
.bb-bew-band:not(.is-sichtbar) .bb-bew-aktion { grid-column: 1 / -1; }

/* Ab Schwelle: links Schnitt, rechts Verteilung, darunter rechts die Aktion */
.bb-bew-schnitt {
  grid-column: 1;
  grid-row: span 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .35rem;
}
.bb-bew-verteilung { grid-column: 2; }
.bb-bew-band.is-sichtbar .bb-bew-aktion { grid-column: 2; }

.bb-bew-zahl {
  font-family: var(--font-headline, 'Caladea', Georgia, serif);
  font-weight: 700;
  font-size: 2.6rem;
  line-height: 1;
}

/* Fünf Sterne mit Teilfüllung: goldene Kopie darüber, Breite = --f */
.bb-bew-sterne {
  position: relative;
  display: inline-block;
  font-size: 1.1rem;
  line-height: 1;
  letter-spacing: .08em;
  color: #D9D4C4;
  white-space: nowrap;
}
.bb-bew-sterne-an {
  position: absolute;
  top: 0;
  left: 0;
  width: var(--f, 0%);
  overflow: hidden;
  color: #E0B62F;
}

.bb-bew-anzahl { font-size: .8rem; }

.bb-bew-verteilung {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .35rem;
  font-size: .75rem;
  font-variant-numeric: tabular-nums;
}
.bb-bew-verteilung li {
  display: grid;
  grid-template-columns: 2.2em 1fr 2.4em;
  gap: .6rem;
  align-items: center;
}
.bb-bew-verteilung li > span:last-child { text-align: right; }
.bb-bew-verteilung b {
  position: relative;
  display: block;
  height: 6px;
  border-radius: 3px;
  background: #EFE9D6;
  overflow: hidden;
}
.bb-bew-verteilung b::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: var(--w, 0%);
  background: #E0B62F;
}

/* ---------- Aktion (nur mit JS: bewertungen.js setzt .bb-bew-js) ---------- */
.bb-bew-aktion { display: none; }
.bb-bew-js .bb-bew-aktion { display: block; }

/* Button im Look von .bb-jetzt-kochen-btn (style.css), aber bewusst ohne
   dessen Klasse: rezepte.js öffnet bei Klicks auf .bb-jetzt-kochen-btn den
   Kochmodus. Stern-Icon als Kontur-SVG analog zum Play-Icon. */
.bb-bew-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  margin-top: .4rem;
  padding: .85rem 1.5rem;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  background: linear-gradient(135deg, var(--color-rezepte, #FFF1B5) 0%, #E0C84A 100%);
  color: var(--color-primary, #6B6970);
  font-family: var(--font-text, 'Outfit', Helvetica, sans-serif);
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  line-height: 1;
  box-shadow: 0 8px 22px rgba(214, 184, 74, .45);
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}
.bb-bew-btn:hover,
.bb-bew-btn:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(214, 184, 74, .55);
  filter: brightness(1.03);
  color: var(--color-primary, #6B6970);
}
.bb-bew-btn-icon { display: inline-flex; align-items: center; }
.bb-bew-btn-icon svg { display: block; }
.bb-bew-btn[hidden] { display: none; }

.bb-bew-wahl {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem;
  margin-top: .2rem;
}
.bb-bew-wahl[hidden] { display: none; }
.bb-bew-wahl button {
  min-width: 44px;
  min-height: 44px;
  padding: 0 .1rem;
  border: 0;
  border-radius: 10px;
  background: transparent;
  font-family: inherit;
  font-size: 2rem;
  line-height: 1;
  color: #D9D4C4;
  cursor: pointer;
  transition: color .12s ease, transform .12s ease;
}
.bb-bew-wahl button.is-on { color: #E0B62F; }
.bb-bew-wahl button:focus { outline: none; }
.bb-bew-wahl button:focus-visible {
  outline: 3px solid #6B6970;
  outline-offset: 2px;
}
.bb-bew-wahl button:disabled { cursor: progress; }
.bb-bew-wahl[aria-busy="true"] { opacity: .6; }

.bb-bew-status { margin: .4rem 0 0; font-size: .8rem; }
.bb-bew-status:empty { display: none; }
.bb-bew-status .bb-bew-mein { color: #E0B62F; letter-spacing: .06em; }

/* „ändern" / „Seite neu laden": Button im Look eines Textlinks */
.bb-bew-link {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
  text-decoration: underline;
  cursor: pointer;
}
.bb-bew-link:focus-visible { outline: 2px solid #6B6970; outline-offset: 2px; }

/* Honeypot: für Menschen unsichtbar, für Bots ein normales Feld */
.bb-bew-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

/* ---------- Mobil ---------- */
@media (max-width: 767px) {
  .bb-bew-inner { grid-template-columns: 1fr; }
  .bb-bew-titel,
  .bb-bew-schnitt,
  .bb-bew-verteilung,
  .bb-bew-erste,
  .bb-bew-band .bb-bew-aktion,
  .bb-bew-band.is-sichtbar .bb-bew-aktion { grid-column: 1; }
  .bb-bew-schnitt { grid-row: auto; }
  .bb-bew-btn { width: 100%; padding: 14px 0; }   /* wie .bb-jetzt-kochen-btn mobil */
  .bb-bew-wahl { gap: .2rem; }
  .bb-bew-wahl button { min-width: 48px; min-height: 48px; }
}

@media (prefers-reduced-motion: reduce) {
  .bb-bew-wahl button,
  .bb-bew-btn { transition: none; }
  .bb-bew-btn:hover,
  .bb-bew-btn:focus-visible { transform: none; }
}

@media print {
  .bb-bew-band,
  .rezept-hero-fact--bewertung { display: none; }
}

/* ============================================================
   Kochmodus-Abschluss (Task 6): #bb-kochen-fertig + „Fertig"-Button
   Layout/Farben wie die übrigen Kochmodus-Screens (style.css); hier nur,
   was style.css nicht kennt.
   ============================================================ */
/* Body und Titel kommen über .bb-kochen-step-body / .bb-kochen-step-titel aus
   style.css (gleicher Look wie die Schritt-Screens inkl. Unterstrich). */
.bb-kochen-fertig-body .bb-bew-kochmodus {
  width: 100%;
  max-width: 420px;
}

/* „Wie war's?" und die Statuszeile im Stil von .bb-kochen-step-text */
.bb-kochen-fertig-body .bb-bew-frage,
.bb-kochen-fertig-body .bb-bew-status {
  margin: 0;
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.7;
  color: var(--color-primary, #6B6970);
  text-align: center;
}
.bb-kochen-fertig-body .bb-bew-wahl { justify-content: center; margin-top: .6rem; }
.bb-kochen-fertig-body .bb-bew-status { margin-top: .6rem; }
.bb-kochen-fertig-body .bb-bew-status .bb-bew-mein { font-size: 1.25rem; vertical-align: -.08em; }

/* „Schließen" im Abschluss-Screen: gleiche Pille wie „Fertig" (Basis wie
   .bb-kochen-next in style.css, die Klasse selbst ist dort nicht bekannt). */
.bb-kochen-fertig-schliessen {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  background: #fff;
  border: 1px solid rgba(214, 184, 74, .55);
  color: var(--color-primary, #6B6970);
  cursor: pointer;
  transition: background-color .15s ease, transform .12s ease, box-shadow .15s ease;
}
.bb-kochen-fertig-schliessen svg { display: block; }
.bb-kochen-fertig-schliessen:hover {
  background: var(--color-rezepte, #FFF1B5);
  transform: scale(1.08);
  box-shadow: 0 6px 16px rgba(214, 184, 74, .4);
}

/* „Weiter"-Button auf dem letzten Schritt: Pille mit Beschriftung statt
   reinem Icon-Kreis. */
.bb-kochen-next.is-fertig,
.bb-kochen-fertig-schliessen {
  width: auto;
  min-width: 48px;
  padding: 0 1.4rem 0 1rem;
  gap: .4rem;
  border-radius: 999px;
}

.bb-kochen-next-label {
  font-family: var(--font-text, 'Outfit', Helvetica, sans-serif);
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  line-height: 1;
}

/* Pillen und Kreis-Buttons nie zusammendrücken (mobil sonst oval, Icon weg);
   der Zähler darf dafür schmaler werden und umbrechen. */
.bb-kochen-step-nav .bb-kochen-prev,
.bb-kochen-next.is-fertig,
.bb-kochen-fertig-schliessen { flex-shrink: 0; }
.bb-kochen-next.is-fertig svg,
.bb-kochen-fertig-schliessen svg { flex-shrink: 0; }

@media (max-width: 767px) {
  .bb-kochen-step-nav .bb-kochen-step-counter { min-width: 0; flex: 0 1 auto; }
  /* „Geschafft!" passt mobil nicht neben die breitere Schließen-Pille */
  .bb-kochen-fertig .bb-kochen-step-counter { display: none; }
  .bb-kochen-step-nav { gap: 16px; }
  .bb-kochen-next.is-fertig,
  .bb-kochen-fertig-schliessen { padding: 0 1.1rem 0 .85rem; }
}

