/* ====================================================================
   PEUKER IMMOBILIEN – BEWERTUNGS-QUIZ  |  Plugin CSS
   Scoped under .pib-quiz to prevent any theme conflicts.
   Markenfarben: Blau #134f81 / Orange #ed6c04
   ==================================================================== */

.pib-quiz {
  --blau: #134f81;
  --blau-dunkel: #0e3c63;
  --orange: #ed6c04;
  --orange-dunkel: #ce5f05;
  --grau: #666666;
  --grau-hell: #f5f7fa;
  --rahmen: #dde3ea;
  --text: #1f2733;
  --erfolg: #1a8f5a;
  --radius: 14px;
  --schatten: 0 6px 24px rgba(19,79,129,.10);
  --ff: 'Segoe UI', system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  font-family: var(--ff);
}

.pib-quiz * {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ---- Quiz wrapper ---- */
.pib-quiz .quiz {
  max-width: 640px;
  margin: 0 auto;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--schatten);
  overflow: hidden;
  border: 1px solid var(--rahmen);
}

/* ---- Marke / Logo ---- */
.pib-quiz .marke {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 22px 26px 0;
}

.pib-quiz .marke img {
  height: 40px;
  width: auto;
  display: block;
}

/* ---- Kopf / Fortschritt ---- */
.pib-quiz .kopf {
  padding: 18px 26px 0;
}

.pib-quiz .kopf-zeile {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--grau);
  margin-bottom: 10px;
}

.pib-quiz .schritt-zahl {
  font-weight: 600;
  color: var(--blau);
}

.pib-quiz .balken {
  height: 7px;
  background: var(--grau-hell);
  border-radius: 99px;
  overflow: hidden;
}

.pib-quiz .balken-fuell {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--blau), #2a7ab5);
  border-radius: 99px;
  transition: width .4s ease;
}

/* ---- Inhalt ---- */
.pib-quiz .inhalt {
  padding: 24px 26px 28px;
}

.pib-quiz .frage {
  font-size: 22px;
  font-weight: 700;
  color: var(--blau-dunkel);
  margin-bottom: 6px;
  letter-spacing: -.01em;
}

.pib-quiz .hinweis {
  font-size: 14px;
  color: var(--grau);
  margin-bottom: 20px;
}

/* ---- Auswahl-Kacheln ---- */
.pib-quiz .optionen {
  display: grid;
  gap: 12px;
}

.pib-quiz .optionen.zwei {
  grid-template-columns: 1fr 1fr;
}

.pib-quiz .opt {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border: 2px solid var(--rahmen);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  text-align: left;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  transition: all .15s ease;
  width: 100%;
  font-family: var(--ff);
}

.pib-quiz .opt:hover {
  border-color: var(--blau);
  background: var(--grau-hell);
}

.pib-quiz .opt.aktiv {
  border-color: var(--blau);
  background: #eef5fb;
  box-shadow: 0 0 0 3px rgba(19,79,129,.12);
}

.pib-quiz .opt .ic {
  flex: 0 0 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blau);
}

.pib-quiz .opt .ic svg {
  width: 26px;
  height: 26px;
}

/* ---- Chips (z.B. Zimmer) ---- */
.pib-quiz .chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pib-quiz .chip {
  padding: 12px 20px;
  border: 2px solid var(--rahmen);
  border-radius: 99px;
  background: #fff;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  transition: all .15s;
  min-width: 54px;
  text-align: center;
  font-family: var(--ff);
}

.pib-quiz .chip:hover {
  border-color: var(--blau);
}

.pib-quiz .chip.aktiv {
  border-color: var(--blau);
  background: var(--blau);
  color: #fff;
}

/* ---- Eingabefelder ---- */
.pib-quiz .feld {
  position: relative;
  margin-bottom: 14px;
}

.pib-quiz .feld label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.pib-quiz .feld input {
  width: 100%;
  padding: 14px 16px;
  font-size: 16px;
  border: 2px solid var(--rahmen);
  border-radius: 10px;
  font-family: var(--ff);
  transition: border-color .15s;
  background: #fff;
  color: var(--text);
}

.pib-quiz .feld input:focus {
  outline: none;
  border-color: var(--blau);
}

.pib-quiz .feld .einheit {
  position: absolute;
  right: 16px;
  top: 38px;
  color: var(--grau);
  font-size: 15px;
  pointer-events: none;
}

.pib-quiz .zwei-spalten {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.pib-quiz .feld-fehler input {
  border-color: #e23d3d;
}

.pib-quiz .fehlertext {
  color: #e23d3d;
  font-size: 13px;
  margin-top: 4px;
  display: none;
}

.pib-quiz .feld-fehler .fehlertext {
  display: block;
}

/* ---- DSGVO ---- */
.pib-quiz .dsgvo {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 6px;
  font-size: 13px;
  color: var(--grau);
}

.pib-quiz .dsgvo input {
  margin-top: 3px;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  accent-color: var(--blau);
}

.pib-quiz .dsgvo a {
  color: var(--blau);
}

/* ---- Vertrauen ---- */
.pib-quiz .vertrauen {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--rahmen);
  font-size: 12.5px;
  color: var(--grau);
}

.pib-quiz .vertrauen span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pib-quiz .vertrauen svg {
  width: 15px;
  height: 15px;
  color: var(--erfolg);
}

/* ---- Fußnavigation ---- */
.pib-quiz .nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
}

.pib-quiz .btn {
  padding: 14px 28px;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--ff);
  transition: all .15s;
}

.pib-quiz .btn-weiter {
  background: var(--orange);
  color: #fff;
  flex: 1;
  box-shadow: 0 4px 12px rgba(237,108,4,.28);
}

.pib-quiz .btn-weiter:hover {
  background: var(--orange-dunkel);
}

.pib-quiz .btn-weiter:disabled {
  background: #cdd5de;
  box-shadow: none;
  cursor: not-allowed;
}

.pib-quiz .btn-zurueck {
  background: transparent;
  color: var(--grau);
  padding: 14px 8px;
  font-weight: 600;
}

.pib-quiz .btn-zurueck:hover {
  color: var(--blau);
}

.pib-quiz .btn-zurueck.versteckt {
  visibility: hidden;
}

/* ---- Abschluss ---- */
.pib-quiz .abschluss {
  text-align: center;
  padding: 40px 26px;
}

.pib-quiz .abschluss .haken {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #e6f6ee;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.pib-quiz .abschluss .haken svg {
  width: 40px;
  height: 40px;
  color: var(--erfolg);
}

.pib-quiz .abschluss h2 {
  font-size: 24px;
  color: var(--blau-dunkel);
  margin-bottom: 12px;
}

.pib-quiz .abschluss p {
  color: var(--grau);
  font-size: 16px;
  max-width: 420px;
  margin: 0 auto 8px;
}

.pib-quiz .abschluss .tel {
  margin-top: 22px;
  font-size: 15px;
  color: var(--text);
}

.pib-quiz .abschluss .tel a {
  color: var(--blau);
  font-weight: 700;
  text-decoration: none;
}

/* ---- Lade-Spinner ---- */
.pib-quiz .lade {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 3px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: pib-dreh .7s linear infinite;
  vertical-align: -3px;
  margin-right: 8px;
}

@keyframes pib-dreh {
  to { transform: rotate(360deg); }
}

/* ---- Responsive ---- */
@media (max-width: 480px) {
  .pib-quiz .quiz {
    border-radius: 0;
    border-left: none;
    border-right: none;
  }
  .pib-quiz .inhalt {
    padding: 20px 18px 24px;
  }
  .pib-quiz .marke {
    padding: 18px 18px 0;
  }
  .pib-quiz .marke img {
    height: 32px;
  }
  .pib-quiz .kopf {
    padding: 14px 18px 0;
  }
  .pib-quiz .frage {
    font-size: 19px;
  }
  .pib-quiz .optionen.zwei {
    grid-template-columns: 1fr;
  }
  .pib-quiz .zwei-spalten {
    grid-template-columns: 1fr;
  }
}

/* ====================================================================
   GDPR ZWEI-KLICK-EINWILLIGUNGSGATE
   Scoped under .pib-quiz — zeigt sich inline, wo das Quiz erscheinen
   wuerde. Erfordert keine externen Ressourcen.
   Markenfarben: Navy #152d4a  |  Orange #ED6D04
   ==================================================================== */

/* ---- Outer wrapper (fills the quiz content area) ---- */
.pib-quiz .pib-einwilligung {
  padding: 32px 26px 28px;
  min-height: 260px;
  display: flex;
  flex-direction: column;
}

/* ---- State 1: Teaser ---- */
.pib-quiz .pib-einw-teaser {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0;
  opacity: 1;
  transform: translateY(0);
  transition: opacity .22s ease, transform .22s ease;
}

.pib-quiz .pib-einw-teaser--hidden {
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  position: absolute;
}

/* House icon circle */
.pib-quiz .pib-einw-haus {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #eef4fb;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  color: #152d4a;
  flex-shrink: 0;
}

.pib-quiz .pib-einw-haus svg {
  width: 36px;
  height: 36px;
}

.pib-quiz .pib-einw-teaser h3 {
  font-size: 20px;
  font-weight: 700;
  color: #152d4a;
  margin-bottom: 10px;
  letter-spacing: -.01em;
}

.pib-quiz .pib-einw-teaser > p {
  font-size: 15px;
  color: var(--grau);
  max-width: 380px;
  line-height: 1.55;
  margin-bottom: 22px;
}

/* Primary CTA — orange */
.pib-quiz .pib-einw-btn-aktivieren {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  background: #ED6D04;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 700;
  font-family: var(--ff);
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(237,109,4,.30);
  transition: background .15s, box-shadow .15s, transform .1s;
  margin-bottom: 14px;
}

.pib-quiz .pib-einw-btn-aktivieren:hover {
  background: #ce5f05;
  box-shadow: 0 6px 18px rgba(237,109,4,.38);
  transform: translateY(-1px);
}

.pib-quiz .pib-einw-btn-aktivieren:active {
  transform: translateY(0);
}

.pib-quiz .pib-einw-btn-aktivieren svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* Small reassurance text below button */
.pib-quiz .pib-einw-hinweis {
  font-size: 12.5px;
  color: #999;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* ---- State 2: Consent detail panel ---- */
.pib-quiz .pib-einw-panel {
  display: none;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .25s ease, transform .25s ease;
  background: #f8fafc;
  border: 1.5px solid #d0dce9;
  border-radius: 12px;
  padding: 22px 22px 20px;
}

.pib-quiz .pib-einw-panel--sichtbar {
  display: block;
  opacity: 1;
  transform: translateY(0);
  animation: pib-einw-einblenden .25s ease forwards;
}

@keyframes pib-einw-einblenden {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0);     }
}

/* Panel heading with info icon */
.pib-quiz .pib-einw-panel-kopf {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 15px;
  font-weight: 700;
  color: #152d4a;
  margin-bottom: 14px;
}

.pib-quiz .pib-einw-panel-kopf svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: #152d4a;
}

/* Consent text paragraphs */
.pib-quiz .pib-einw-panel > p {
  font-size: 13.5px;
  color: #444;
  line-height: 1.6;
  margin-bottom: 10px;
}

.pib-quiz .pib-einw-panel > p:last-of-type {
  margin-bottom: 18px;
}

.pib-quiz .pib-einw-panel a {
  color: #152d4a;
  font-weight: 600;
  text-decoration: underline;
}

.pib-quiz .pib-einw-panel strong {
  color: #152d4a;
}

/* Action buttons row */
.pib-quiz .pib-einw-aktionen {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Confirm — orange (same family as primary CTA) */
.pib-quiz .pib-einw-btn-bestaetigen {
  flex: 1;
  padding: 13px 20px;
  background: #ED6D04;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  font-family: var(--ff);
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(237,109,4,.28);
  transition: background .15s, transform .1s;
  white-space: nowrap;
}

.pib-quiz .pib-einw-btn-bestaetigen:hover {
  background: #ce5f05;
  transform: translateY(-1px);
}

/* Cancel — ghost/secondary */
.pib-quiz .pib-einw-btn-abbrechen {
  padding: 13px 20px;
  background: transparent;
  color: var(--grau);
  border: 1.5px solid var(--rahmen);
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  font-family: var(--ff);
  cursor: pointer;
  transition: border-color .15s, color .15s;
  white-space: nowrap;
}

.pib-quiz .pib-einw-btn-abbrechen:hover {
  border-color: #152d4a;
  color: #152d4a;
}

/* ---- Responsive tweaks for consent gate ---- */
@media (max-width: 480px) {
  .pib-quiz .pib-einwilligung {
    padding: 24px 18px 22px;
  }
  .pib-quiz .pib-einw-aktionen {
    flex-direction: column;
  }
  .pib-quiz .pib-einw-btn-bestaetigen,
  .pib-quiz .pib-einw-btn-abbrechen {
    width: 100%;
    text-align: center;
  }
}
