/* ================================================================
   FLORIN+ Bewertungs- & Kommentar-Widget
   ================================================================ */

.fp-ratings-widget {
  margin: 3rem 0 2rem;
  border-top: 2px solid #e5e7eb;
  padding-top: 2.5rem;
  font-family: inherit;
}

/* ── Ladeanimation ─────────────────────────────────────────────── */
.fp-ratings-loading {
  text-align: center;
  color: #9ca3af;
  padding: 2rem;
  font-size: 0.95rem;
}

/* ── Fehler ────────────────────────────────────────────────────── */
.fp-ratings-error {
  text-align: center;
  color: #dc2626;
  padding: 1.5rem;
  font-size: 0.95rem;
}

.fp-retry-btn {
  display: inline-block;
  margin-top: 0.75rem;
  padding: 0.4rem 1rem;
  background: #6b21a8;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.875rem;
  transition: background 0.2s;
}
.fp-retry-btn:hover { background: #7c3aed; }

/* ── Abschnitt-Titel ───────────────────────────────────────────── */
.fp-ratings-section {
  margin-bottom: 2.5rem;
}

.fp-ratings-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1f2937;
  margin: 0 0 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ── Aggregate-Anzeige ─────────────────────────────────────────── */
.fp-ratings-aggregate {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
  width: fit-content;
}

.fp-agg-stars {
  display: flex;
  gap: 2px;
}

.fp-agg-stars .fp-star {
  font-size: 1.4rem;
  color: #d1d5db;
  line-height: 1;
}
.fp-agg-stars .fp-star--filled { color: #f59e0b; }

.fp-agg-info {
  display: flex;
  flex-direction: column;
}

.fp-agg-avg {
  font-size: 1.5rem;
  font-weight: 800;
  color: #1f2937;
  line-height: 1.1;
}

.fp-agg-count {
  font-size: 0.8rem;
  color: #6b7280;
}

/* ── Interaktive Sterne ────────────────────────────────────────── */
.fp-rate-prompt {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.fp-rate-label {
  font-size: 0.9rem;
  color: #4b5563;
  font-weight: 500;
}

.fp-interactive-stars {
  display: flex;
  gap: 4px;
}

.fp-interactive-stars .fp-star {
  font-size: 1.75rem;
  color: #d1d5db;
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
  line-height: 1;
  transition: color 0.15s, transform 0.1s;
}
.fp-interactive-stars .fp-star:hover,
.fp-interactive-stars .fp-star--hover { color: #f59e0b; transform: scale(1.15); }
.fp-interactive-stars .fp-star--filled { color: #f59e0b; }

.fp-rate-hint {
  font-size: 0.8rem;
  color: #9ca3af;
  font-style: italic;
}

.fp-rate-feedback {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: #dc2626;
  min-height: 1.25rem;
}

/* ── Kommentar-Badge ────────────────────────────────────────────── */
.fp-comment-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #6b21a8;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 0 0.5rem;
  min-width: 1.4rem;
  height: 1.4rem;
  line-height: 1;
}

/* ── Kommentar-Formular ─────────────────────────────────────────── */
.fp-comment-form {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
}

/* Honeypot verstecken */
.fp-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
  tabindex: -1;
}

.fp-form-row {
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.fp-form-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
}

.fp-form-input,
.fp-form-textarea {
  width: 100%;
  padding: 0.6rem 0.85rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 0.9rem;
  color: #1f2937;
  background: #fff;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
  box-sizing: border-box;
  resize: vertical;
}

.fp-form-input:focus,
.fp-form-textarea:focus {
  outline: none;
  border-color: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
}

.fp-char-count {
  text-align: right;
  font-size: 0.75rem;
  color: #9ca3af;
}

.fp-form-notice {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  font-size: 0.78rem;
  color: #6b7280;
  margin: 0.5rem 0 1rem;
  background: #f3f4f6;
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
}

.fp-submit-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #6b21a8;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.6rem 1.4rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s, opacity 0.2s;
}
.fp-submit-btn:hover:not(:disabled) { background: #7c3aed; }
.fp-submit-btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* ── Formular-Nachrichten ──────────────────────────────────────── */
.fp-form-msg {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  min-height: 1.5rem;
}

.fp-msg-success { color: #059669; font-weight: 500; }
.fp-msg-error   { color: #dc2626; font-weight: 500; }

/* ── Kommentar-Liste ────────────────────────────────────────────── */
.fp-no-comments {
  color: #9ca3af;
  font-size: 0.9rem;
  font-style: italic;
  text-align: center;
  padding: 1rem;
}

.fp-comment {
  border-bottom: 1px solid #f3f4f6;
  padding: 1rem 0;
}
.fp-comment:last-child { border-bottom: none; }

.fp-comment-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
}

.fp-comment-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c3aed, #6b21a8);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  flex-shrink: 0;
}

.fp-comment-name {
  font-weight: 600;
  font-size: 0.875rem;
  color: #1f2937;
}

.fp-comment-date {
  font-size: 0.75rem;
  color: #9ca3af;
  margin-left: auto;
}

.fp-comment-text {
  font-size: 0.9rem;
  color: #374151;
  line-height: 1.6;
  margin: 0;
  word-break: break-word;
}

/* ── Dark-Mode-Anpassungen (optional) ──────────────────────────── */
@media (prefers-color-scheme: dark) {
  .fp-ratings-widget       { border-top-color: #374151; }
  .fp-ratings-aggregate    { background: #1f2937; border-color: #374151; }
  .fp-agg-avg              { color: #f9fafb; }
  .fp-ratings-title        { color: #f9fafb; }
  .fp-comment-form         { background: #1f2937; border-color: #374151; }
  .fp-form-input,
  .fp-form-textarea        { background: #111827; border-color: #374151; color: #f9fafb; }
  .fp-form-notice          { background: #111827; }
  .fp-comment-text         { color: #d1d5db; }
  .fp-comment-name         { color: #f3f4f6; }
}

/* ── Mobile ─────────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .fp-ratings-aggregate    { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
  .fp-rate-prompt          { flex-direction: column; align-items: flex-start; }
  .fp-comment-form         { padding: 1rem; }
  .fp-agg-avg              { font-size: 1.25rem; }
}
