/* Gesamt-Wrapper (sichert Spezifität) */
.csr-wrap {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
    font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}

/* Container für Badge + Sterne */
.csr-wrap .csr-container {
    display: flex;
    align-items: center;
}

/* Linker Badge mit Wert + Claim */
.csr-wrap .csr-badge {
    /* Nummer steht als Textknoten vor dem <span> */
    background: linear-gradient(90deg, #ffb800, #ff9000);
    color: #fff;
    font-size: 1.6rem;
    font-weight: bold;
    padding: 0.6rem 1rem;
    border-top-left-radius: 6px;
    border-bottom-left-radius: 6px;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    line-height: 1.2;
    white-space: nowrap;
}
.csr-wrap .csr-badge span {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: none;
    opacity: 0.95;
}

/* Rechte Sternleiste (ein durchgehender Balken, keine Einzel-Rahmen) */
.csr-wrap .csr-stars {
    background: #2e3338;
    padding: 0.6rem 1rem;
    border-top-right-radius: 6px;
    border-bottom-right-radius: 6px;
    display: flex;
    gap: 0.4rem;
}

/* Einzelne Sterne – hart isoliert gegen Theme-CSS */
.csr-wrap .csr-star {
    all: unset;
    cursor: pointer;
    font-size: 2.4rem !important;       /* große Sterne */
    line-height: 1 !important;
    color: #888 !important;              /* leere Sterne */
    /* harte Resets gegen globale Styles */
    border: none !important;
    border-radius: 0 !important;
    background: none !important;
    box-shadow: none !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    padding: 0 !important;
    margin: 0 !important;
    transition: color 0.2s ease !important;
}
.csr-wrap .csr-star.is-filled {
    color: #facc15 !important;           /* gefüllt = Gold */
}

.pulse-heart{
  --size: 16px;
  --color: #e11d48; /* Himbeerrot */
  width: var(--size);
  height: var(--size);
  background: var(--color);
  transform: rotate(45deg);
  position: relative;
  display: inline-block;
  animation: heart-beat 1s ease-in-out infinite;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,.25));
}
.pulse-heart::before,
.pulse-heart::after{
  content:"";
  position:absolute;
  width: var(--size);
  height: var(--size);
  background: var(--color);
  border-radius: 50%;
}
.pulse-heart::before{ left: -50%; }
.pulse-heart::after { top: -50%; }

@keyframes heart-beat{
  0%, 100% { transform: rotate(45deg) scale(1); }
  14%      { transform: rotate(45deg) scale(1.12); }
  28%      { transform: rotate(45deg) scale(0.98); }
  42%      { transform: rotate(45deg) scale(1.1); }
  70%      { transform: rotate(45deg) scale(1); }
}

/* Barrierearmut: Animation abschalten, falls gewünscht */
@media (prefers-reduced-motion: reduce){
  .pulse-heart{ animation: none; }
}

.csr-wrap .csr-star:hover,
.csr-wrap .csr-star:focus {
    color: #ffd94a !important;           /* Hover-Gold */
    outline: none !important;
}

/* --- Mobile-Optimierung (am Ende der Datei einfügen) --- */

/* Generell: nie breiter als der Viewport */
.csr-wrap,
.csr-wrap .csr-container { max-width: 100%; }

/* Sterne responsiv skalieren – passt sich der Viewport-Breite an */
.csr-wrap .csr-star {
  font-size: clamp(1.4rem, 9vw, 2.2rem) !important; /* vorher 2.4rem fix */
}

/* Tablet & kleiner: etwas kompakter */
@media (max-width: 640px) {
  .csr-wrap .csr-badge {
    font-size: 1.3rem;
    padding: 0.5rem 0.75rem;
    gap: 0.5rem;
    white-space: nowrap; /* bleibt einzeilig bis 640px */
  }
  .csr-wrap .csr-badge span { font-size: 0.85rem; }

  .csr-wrap .csr-stars {
    padding: 0.5rem 0.75rem;
    gap: 0.3rem;
  }
}

/* Sehr kleine Screens: umbrechen & volle Breite nutzen */
@media (max-width: 420px) {
  .csr-wrap .csr-container {
    flex-direction: column;        /* Badge über Sterne */
    align-items: stretch;
  }

  /* Badge oben, volle Breite, runde Ecken oben */
  .csr-wrap .csr-badge {
    width: 100%;
    border-radius: 6px 6px 0 0;
    white-space: normal;           /* darf umbrechen */
  }

  /* Sternleiste unten, volle Breite, runde Ecken unten */
  .csr-wrap .csr-stars {
    width: 100%;
    justify-content: space-between;  /* Sterne verteilen */
    border-radius: 0 0 6px 6px;
    gap: 0.25rem;
    padding: 0.5rem 0.75rem;
  }

  /* Herz im Badge etwas kleiner */
  .csr-wrap .pulse-heart { --size: 14px; }
}

/* Ultra-klein (optional, wenn’s noch zu breit ist) */
@media (max-width: 340px) {
  .csr-wrap .csr-stars { padding: 0.45rem 0.6rem; }
  .csr-wrap .csr-badge { font-size: 1.15rem; }
  .csr-wrap .csr-badge span { font-size: 0.8rem; }
}
