/* ==========================================================================
   Kundenumfrage / Bewertungsformular
   ========================================================================== */

.umfrage-section {
  padding: 70px 0 80px 0;
  background-color: #f8fafc;
}

.umfrage-intro {
  text-align: center;
  margin-bottom: 36px;
}

.umfrage-intro-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: #f0fdf4;
  color: #16a34a;
  border: 1px solid #dcfce7;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 16px;
}

.umfrage-intro h2 {
  font-family: var(--font-heading);
  font-size: 1.85rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.015em;
  margin-bottom: 8px;
}

.umfrage-intro p {
  color: #64748b;
  font-size: 0.98rem;
  margin: 0;
}

.umfrage-form {
  gap: 26px;
}

/* Abschnitte mit Nummer */
.umfrage-block {
  border-top: 1px solid #e2e8f0;
  padding-top: 24px;
}

.umfrage-heading {
  font-family: var(--font-heading);
  font-size: 1.08rem;
  font-weight: 700;
  color: #0f172a;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 14px 0;
}

.umfrage-heading > span:first-child {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #f0fdf4;
  border: 1px solid #dcfce7;
  color: #16a34a;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.umfrage-heading .required,
.umfrage-checks .required {
  color: #dc2626;
  font-weight: 700;
}

.umfrage-form .umfrage-heading label {
  font: inherit;
  color: inherit;
}

.umfrage-hint {
  font-size: 0.86rem;
  color: #64748b;
  margin: -8px 0 12px 0;
}

/* 1. Dienstleistungen als Auswahl-Chips */
.service-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.service-chip {
  position: relative;
  cursor: pointer;
}

.service-chip input,
.rating-option input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
}

.service-chip span,
.rating-option span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border: 1.5px solid #cbd5e1;
  border-radius: 999px;
  background: #ffffff;
  color: #334155;
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.3;
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.service-chip:hover span,
.rating-option:hover span {
  border-color: #94a3b8;
}

.service-chip input:checked + span {
  border-color: var(--primary-green);
  background: #f0fdf4;
  color: #166534;
}

.service-chip input:checked + span::before {
  content: "\2713";
  font-weight: 700;
}

.service-chip input:focus-visible + span,
.rating-option input:focus-visible + span {
  box-shadow: 0 0 0 3px rgba(21, 139, 40, 0.25);
}

/* 2.–5. Bewertungszeilen */
.rating-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 0;
}

.umfrage-block > .rating-row + .rating-row {
  border-top: 1px dashed #e2e8f0;
}

.umfrage-block.rating-row {
  display: block;
  padding: 24px 0 0 0;
}

.rating-question {
  font-size: 0.95rem;
  font-weight: 600;
  color: #1e293b;
}

.rating-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.rating-option {
  cursor: pointer;
}

.rating-option i {
  font-size: 1.1rem;
}

.rating-option.is-good input:checked + span {
  border-color: #16a34a;
  background: #f0fdf4;
  color: #166534;
}

.rating-option.is-ok input:checked + span {
  border-color: #d97706;
  background: #fffbeb;
  color: #92400e;
}

.rating-option.is-bad input:checked + span {
  border-color: #dc2626;
  background: #fef2f2;
  color: #991b1b;
}

.rating-option.is-none input:checked + span {
  border-color: #64748b;
  background: #f1f5f9;
  color: #334155;
}

/* Unbeantwortete Pflichtfrage nach dem Absenden */
.rating-row.missing .rating-question,
.rating-row.missing .umfrage-heading,
.umfrage-block.missing .umfrage-heading {
  color: #dc2626;
}

.rating-row.missing .rating-option span,
.umfrage-block.missing .service-chip span {
  border-color: #fca5a5;
}

.umfrage-checks {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.umfrage-form .btn-submit-form {
  width: 100%;
  justify-content: center;
}

@media (max-width: 768px) {
  .umfrage-section {
    padding: 40px 0 60px 0;
  }

  .umfrage-intro h2 {
    font-size: 1.5rem;
  }

  .rating-option {
    flex: 1 1 auto;
  }

  .rating-option span {
    width: 100%;
    justify-content: center;
    padding: 9px 12px;
  }
}
