/* =========================================
   RK Survey Pro – Frontend Styles (dynamic)
   Nutzt CSS-Variablen aus :root
   ========================================= */

/* Default-Fallbacks (falls Inline-Design fehlt) */
:root{
  --rk-primary:#e91e63;
  --rk-bg:#ffffff;
  --rk-text:#111111;
  --rk-radius:8px;
  --rk-border:#e1e1e1;
  --rk-input-border:#cccccc;
}

/* Container */
.rk-survey-card{
  background: var(--rk-bg);
  color: var(--rk-text);
  padding: 30px;
  border: 1px solid var(--rk-border);
  border-radius: var(--rk-radius);
  max-width: 720px;
  margin-bottom: 30px;
  border: var(--rk-border-width) var(--rk-border-style) var(--rk-border-color);
}

/* Headline */
.rk-survey-card h3{
  margin-bottom: 20px;
}

/* Fieldsets */
.rk-survey-card fieldset{
  border: 1px solid var(--rk-border);
  padding: 18px;
  margin-bottom: 25px;
  border-radius: calc(var(--rk-radius) - 2px);
}

.rk-survey-card legend{
  font-weight: 600;
  padding: 0 6px;
}

/* Options */
.rk-survey-card label{
  display:block;
  margin-bottom: 10px;
  line-height: 1.5;
}

.rk-survey-card input[type="checkbox"],
.rk-survey-card input[type="radio"]{
  margin-right: 8px;
}

/* Textareas & Inputs */
.rk-survey-card textarea,
.rk-survey-card input[type="email"]{
  width: 100%;
  padding: 8px;
  border: 1px solid var(--rk-input-border);
  border-radius: calc(var(--rk-radius) - 4px);
  color: var(--rk-text);
  background: #fff;
}

/* Fokus */
.rk-survey-card textarea:focus,
.rk-survey-card input[type="email"]:focus{
  outline: none;
  border-color: var(--rk-primary);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--rk-primary) 25%, transparent);
}

/* Button */
.rk-survey-card button{
  background: var(--rk-primary);
  color:#fff;
  border:none;
  padding: 10px 20px;
  border-radius: calc(var(--rk-radius) - 4px);
  cursor:pointer;
}

.rk-survey-card button:hover{
  opacity: .92;
}

/* Success */
.rk-survey-success{
  background:#e6f7ec;
  border:1px solid #b6e2c6;
  padding:12px 15px;
  margin-bottom:15px;
  border-radius: calc(var(--rk-radius) - 4px);
}

/* Statistiken */
.rk-survey-stats {
    margin-top: 20px;
}

.rk-stat-row {
    margin-bottom: 12px;
}

.rk-stat-label {
    font-size: 14px;
    margin-bottom: 4px;
}

.rk-stat-bar {
    background: #eee;
    border-radius: var(--rk-radius);
    overflow: hidden;
    height: 14px;
}

.rk-stat-fill {
    background: var(--rk-primary);
    height: 100%;
    transition: width 0.4s ease;
}
/* ✅ Checkbox/Radio + Text bleiben immer nebeneinander (auch auf Mobile) */
.rk-survey-card label.rk-option{
  display: flex !important;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.35;
  margin: 8px 0;
}

/* Kästchen/Radio: oben bündig, nicht mitspringen */
.rk-survey-card label.rk-option input[type="checkbox"],
.rk-survey-card label.rk-option input[type="radio"]{
  flex: 0 0 auto;
  margin-top: 2px;
}

/* Text im Label darf umbrechen, aber neben dem Kästchen bleiben */
.rk-survey-card label.rk-option{
  white-space: normal;
}
/* Default */
.rk-survey-form button {
    display: inline-block;
}

/* Zentriert */
.rk-survey-card[data-button="center"] .rk-survey-form button {
    display: block;
    margin: 20px auto 0;
}

/* Volle Breite */
.rk-survey-card[data-button="full"] .rk-survey-form button {
    display: block;
    width: 100%;
    margin-top: 20px;
}