/* ============================================
   Interaktive Schmerzskala (Seite und Embed)
   Eigenständig: läuft auch ohne Bootstrap/style.css im iframe.
   ============================================ */

.psw {
  --psw-ink: #292827;
  --psw-muted: #6b6966;
  --psw-accent: #af73e6;
  --psw-border: #dcd7d3;
  --psw-cream: #e9e5dd;
  color: var(--psw-ink);
  max-width: 600px;
  margin: 0 auto;
}

.psw-display {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 150px;
}

.psw-face {
  flex: 0 0 auto;
  width: 112px;
  height: 112px;
}
.psw-face-i,
.psw-face-svg {
  display: block;
  width: 100%;
  height: 100%;
}
.psw-face-i[hidden] {
  display: none;
}

.psw-text {
  flex: 1 1 auto;
  min-width: 0;
}
.psw-value {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 10px;
  line-height: 1;
}
.psw-num {
  font-size: 56px;
  font-weight: 540;
  letter-spacing: -1.3px;
}
.psw-of {
  font-size: 18px;
  color: var(--psw-muted);
  margin-left: -6px;
}
.psw-band {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(175, 115, 230, 0.15);
  color: #5c2d91;
  border-radius: 8px;
  padding: 4px 8px;
}
.psw-label {
  font-size: 20px;
  font-weight: 540;
  line-height: 1.2;
  margin: 10px 0 4px;
}
.psw-desc {
  margin: 0;
  line-height: 1.5;
  color: var(--psw-ink);
}

/* Regler: großer Daumen für Touch */
.psw-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 44px;
  margin: 16px 0 0;
  background: transparent;
  cursor: pointer;
}
.psw-range::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: 8px;
  background: linear-gradient(90deg, #efe7f8 0%, #af73e6 60%, #5c2d91 100%);
}
.psw-range::-moz-range-track {
  height: 8px;
  border-radius: 8px;
  background: linear-gradient(90deg, #efe7f8 0%, #af73e6 60%, #5c2d91 100%);
}
.psw-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 30px;
  height: 30px;
  margin-top: -11px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--psw-ink);
}
.psw-range::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--psw-ink);
}
.psw-range:focus-visible {
  outline: 2px solid var(--psw-accent);
  outline-offset: 2px;
  border-radius: 8px;
}

.psw-ticks {
  display: flex;
  justify-content: space-between;
  /* Daumenbreite/2 links und rechts, damit die Ziffern unter den Positionen stehen */
  padding: 0 4px;
}
.psw-ticks button {
  flex: 0 0 auto;
  width: 26px;
  height: 30px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--psw-muted);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  border-radius: 8px;
}
.psw-ticks button.is-active {
  color: var(--psw-ink);
  font-weight: 700;
  background: var(--psw-cream);
}

@media (max-width: 420px) {
  .psw-display {
    gap: 14px;
  }
  .psw-face {
    width: 84px;
    height: 84px;
  }
  .psw-num {
    font-size: 44px;
  }
  .psw-label {
    font-size: 18px;
  }
  .psw-ticks button {
    width: 22px;
    font-size: 13px;
  }
}

/* --- Nur im Embed --- */
.psw-embed {
  margin: 0;
  padding: 16px;
  background: #fff;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  font-size: 16px;
  line-height: 1.5;
}
.psw-credit {
  max-width: 600px;
  margin: 12px auto 0;
  font-size: 13px;
  text-align: right;
}
.psw-credit a {
  color: #714cb6;
}
