/**
 * AFIDA Praxis-Kalkulator · Ergebnisseite [afida_ergebnis]
 * Alle Regeln unter #afida-ergebnis gescoped + ae- Prefix,
 * damit weder Theme noch Elementor beeinflusst werden (und umgekehrt).
 */

#afida-ergebnis.ae-root {
  font-family: 'Ubuntu', system-ui, Arial, sans-serif;
  color: #1a2a3a;
  -webkit-font-smoothing: antialiased;
  max-width: 900px;
  margin: 0 auto;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0,40,85,.14);
  background: #f4f6f8;
}
#afida-ergebnis.ae-root *,
#afida-ergebnis.ae-root *::before,
#afida-ergebnis.ae-root *::after { box-sizing: border-box; }

/* Hero */
#afida-ergebnis .ae-hero {
  background: #002855; padding: 48px 40px 56px;
  display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center;
}
#afida-ergebnis .ae-eyebrow {
  font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: rgba(255,255,255,.45); margin-bottom: 12px;
}
#afida-ergebnis .ae-ring-wrap { position: relative; display: flex; align-items: center; justify-content: center; margin: 4px 0; }
#afida-ergebnis .ae-score-text { position: absolute; text-align: center; }
#afida-ergebnis .ae-score-num { font-size: 40px; font-weight: 700; color: #fff; line-height: 1; }
#afida-ergebnis .ae-score-sub { font-size: 8px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #05C3DE; margin-top: 3px; }
#afida-ergebnis .ae-title { font-size: 22px; font-weight: 700; color: #fff; margin-top: 8px; }
#afida-ergebnis .ae-sub { font-size: 13px; font-weight: 300; color: rgba(255,255,255,.65); max-width: 400px; line-height: 1.6; }

/* Body */
#afida-ergebnis .ae-body { max-width: 760px; margin: 0 auto; padding: 40px; display: flex; flex-direction: column; gap: 20px; }

#afida-ergebnis .ae-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
#afida-ergebnis .ae-card {
  background: #fff; border: 1.5px solid #e2e8f0; border-radius: 14px; padding: 20px;
  display: flex; flex-direction: column; gap: 5px;
}
#afida-ergebnis .ae-card-label { font-size: 9px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #05C3DE; }
#afida-ergebnis .ae-card-value { font-size: 26px; font-weight: 700; color: #002855; line-height: 1.1; }
#afida-ergebnis .ae-card-unit { font-size: 11px; font-weight: 300; color: #64748b; }

#afida-ergebnis .ae-drivers { background: #fff; border: 1.5px solid #e2e8f0; border-radius: 14px; padding: 20px; }
#afida-ergebnis .ae-drivers-title { font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #002855; margin-bottom: 12px; }
#afida-ergebnis .ae-drivers-tags { display: flex; flex-wrap: wrap; gap: 8px; }
#afida-ergebnis .ae-driver-tag {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; color: #002855;
  background: #fff; border: 1.5px solid #002855; border-radius: 20px; padding: 5px 12px;
}
#afida-ergebnis .ae-driver-check { color: #05C3DE; font-size: 13px; }

#afida-ergebnis .ae-recomm { background: #eef6fb; border: 1.5px solid rgba(5,195,222,.3); border-radius: 14px; padding: 20px; }
#afida-ergebnis .ae-recomm-label { font-size: 9px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #05C3DE; margin-bottom: 8px; }
#afida-ergebnis .ae-recomm-text { font-size: 13.5px; color: #1a2a3a; line-height: 1.7; }

/* PDF */
#afida-ergebnis .ae-pdf {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  background: #002855; border-radius: 14px; padding: 20px 24px;
}
#afida-ergebnis .ae-pdf-text { display: flex; flex-direction: column; gap: 2px; }
#afida-ergebnis .ae-pdf-label { font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.5); }
#afida-ergebnis .ae-pdf-title { font-size: 15px; font-weight: 700; color: #fff; }
#afida-ergebnis .ae-btn-pdf {
  font-size: 13px; font-weight: 700; color: #002855; background: #05C3DE;
  border: none; border-radius: 10px; padding: 12px 22px; cursor: pointer;
  font-family: inherit; letter-spacing: .02em; white-space: nowrap; transition: opacity .15s;
}
#afida-ergebnis .ae-btn-pdf:hover { opacity: .88; }

/* Kontaktformular */
#afida-ergebnis .ae-contact { background: #fff; border: 1.5px solid #e2e8f0; border-radius: 14px; padding: 24px; }
#afida-ergebnis .ae-contact-title { font-size: 17px; font-weight: 700; color: #002855; margin-bottom: 4px; }
#afida-ergebnis .ae-contact-sub { font-size: 12.5px; font-weight: 300; color: #64748b; margin-bottom: 20px; line-height: 1.5; }
#afida-ergebnis .ae-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
#afida-ergebnis .ae-field { display: flex; flex-direction: column; gap: 5px; }
#afida-ergebnis .ae-field.ae-full { grid-column: 1 / -1; }
#afida-ergebnis .ae-label { font-size: 11px; font-weight: 700; letter-spacing: .04em; color: #002855; }
#afida-ergebnis .ae-label .ae-opt { font-weight: 300; color: #94a3b8; }
#afida-ergebnis .ae-input {
  background: #f8fafc; border: 1.5px solid #e2e8f0; border-radius: 8px;
  padding: 11px 14px; font-size: 13.5px; color: #1a2a3a; font-family: inherit; transition: border-color .15s;
}
#afida-ergebnis .ae-input:focus { outline: none; border-color: #002855; background: #fff; }
#afida-ergebnis .ae-input.ae-invalid { border-color: #dc2626; background: #fef2f2; }
#afida-ergebnis .ae-consent { display: flex; gap: 10px; align-items: flex-start; margin-top: 4px; }
#afida-ergebnis .ae-consent input { margin-top: 3px; accent-color: #002855; }
#afida-ergebnis .ae-consent label { font-size: 11px; color: #64748b; line-height: 1.6; }
#afida-ergebnis .ae-consent a { color: #05C3DE; }
#afida-ergebnis .ae-btn-submit {
  width: 100%; margin-top: 16px;
  font-size: 14px; font-weight: 700; color: #fff; background: #002855;
  border: none; border-radius: 10px; padding: 14px; cursor: pointer;
  font-family: inherit; letter-spacing: .02em; transition: background .15s;
}
#afida-ergebnis .ae-btn-submit:hover { background: #003a7a; }
#afida-ergebnis .ae-btn-submit:disabled { opacity: .6; cursor: wait; }
#afida-ergebnis .ae-msg { font-size: 13px; line-height: 1.5; margin-top: 12px; display: none; }
#afida-ergebnis .ae-msg.ae-show { display: block; }
#afida-ergebnis .ae-msg.ae-ok { color: #16a34a; font-weight: 600; }
#afida-ergebnis .ae-msg.ae-err { color: #dc2626; font-weight: 600; }
#afida-ergebnis .ae-disclaimer { font-size: 10px; color: #94a3b8; margin-top: 12px; line-height: 1.6; }

/* Mobile (≤ 520px) — primärer Use-Case NFC-Tap → Handy */
@media (max-width: 520px) {
  #afida-ergebnis.ae-root { border-radius: 0; }
  #afida-ergebnis .ae-hero { padding: 32px 20px 40px; }
  #afida-ergebnis .ae-score-num { font-size: 32px; }
  #afida-ergebnis .ae-title { font-size: 18px; }
  #afida-ergebnis .ae-sub { font-size: 12px; }
  #afida-ergebnis .ae-body { padding: 24px 16px 48px; gap: 14px; }
  #afida-ergebnis .ae-grid { grid-template-columns: 1fr; }
  #afida-ergebnis .ae-card-value { font-size: 22px; }
  #afida-ergebnis .ae-driver-tag { font-size: 11px; padding: 4px 10px; }
  #afida-ergebnis .ae-recomm-text { font-size: 12.5px; }
  #afida-ergebnis .ae-pdf { flex-direction: column; align-items: stretch; gap: 14px; padding: 18px; }
  #afida-ergebnis .ae-btn-pdf { width: 100%; text-align: center; font-size: 13px; padding: 13px 16px; }
  #afida-ergebnis .ae-contact { padding: 18px 16px; }
  #afida-ergebnis .ae-contact-title { font-size: 15px; }
  #afida-ergebnis .ae-form-grid { grid-template-columns: 1fr; }
  #afida-ergebnis .ae-input { font-size: 16px; } /* verhindert iOS-Zoom bei Fokus */
  #afida-ergebnis .ae-btn-submit { font-size: 13px; padding: 13px; }
}

/* Druck / PDF: Kontaktformular + PDF-Button ausblenden */
@media print {
  #afida-ergebnis .ae-pdf,
  #afida-ergebnis .ae-contact { display: none !important; }
  #afida-ergebnis.ae-root { box-shadow: none; max-width: none; }
}
