/* contract-form.css — MIL-1056: „Verträge hier kündigen“ (/kuendigen) und „Vertrag widerrufen“
   (/widerrufen). Gestalt wie die übrigen Rechtsseiten (Karte auf warmem Papier), Inhalt wie die
   Mockups K1/K2/W1/W2. Hell, wie widerruf.html (color-scheme light only).
   MIL-1023: auch das Kontaktformular (/kontakt) nutzt dieses Blatt (?v=2 dort). */

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
[hidden] { display: none !important; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; background-color: #F4F1F0; color: #1F1A26; padding: 40px 16px; }
a { color: #5F4EA5; }

.card { max-width: 560px; margin: 0 auto; background: #FFFFFF; border-radius: 24px; overflow: hidden; box-shadow: 0 8px 32px rgba(95, 78, 165, 0.08); }
.header { background: #F8F6F4; border-bottom: 1px solid rgba(31, 26, 38, 0.08); padding: 32px 32px 24px; text-align: center; }
.logo { width: 56px; height: 56px; border-radius: 14px; margin: 0 auto 14px; display: block; }
.header h1 { color: #1F1A26; font-size: 26px; line-height: 1.2; font-weight: 700; letter-spacing: -0.3px; }
.body { padding: 28px 32px 32px; display: flex; flex-direction: column; gap: 22px; }
.lead { font-size: 15px; line-height: 1.5; color: #484551; }

/* Gruppen-Karte wie in der App (Mockup): Zeilen mit Haarlinie */
.group { background: #FFFFFF; border: 1px solid rgba(31, 26, 38, 0.12); border-radius: 16px; }
.row { display: flex; flex-direction: column; gap: 6px; padding: 12px 16px; }
.row + .row { border-top: 1px solid rgba(31, 26, 38, 0.10); }
.label { font-size: 13px; font-weight: 600; color: #484551; }
.optional { font-weight: 400; color: #6E6A7A; }
.row input[type="text"], .row input[type="email"], .row input[type="date"], .row select, .reason textarea {
  font: inherit; font-size: 17px; color: #1F1A26; background: transparent; border: 0; padding: 4px 0; min-height: 32px; width: 100%;
  border-radius: 6px;
}
.row select { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23484551' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 4px center; padding-right: 24px; }
.reason { display: flex; flex-direction: column; gap: 6px; }
.reason textarea { background: #FFFFFF; border: 1px solid rgba(31, 26, 38, 0.18); border-radius: 12px; padding: 10px 12px; resize: vertical; min-height: 96px; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible, .segmented input:focus-visible + span {
  outline: 2px solid #5F4EA5; outline-offset: 2px;
}

/* Segment „Art der Kündigung“: echte Radios, als Segment gezeichnet */
fieldset { border: 0; min-width: 0; }
fieldset.row > legend { float: left; width: 100%; margin-bottom: 2px; }
fieldset.row > legend + * { clear: both; }
legend { font-size: 13px; font-weight: 600; color: #484551; margin-bottom: 8px; padding: 0; }
.segmented { display: flex; gap: 3px; padding: 3px; border-radius: 999px; background: rgba(31, 26, 38, 0.08); }
.segmented label { flex: 1; position: relative; }
.segmented input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.segmented span { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 10px; border-radius: 999px; font-size: 15px; font-weight: 600; color: #5F4EA5; text-align: center; }
.segmented input:checked + span { background: #5F4EA5; color: #FFFFFF; }

/* „Beenden zum“: nächstmöglicher Zeitpunkt oder Datum */
.choice { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 16px; color: #1F1A26; }
.choice input[type="radio"] { width: 20px; height: 20px; accent-color: #5F4EA5; flex: none; }
.choice input[type="date"] { flex: 1; }
#endAtDate { margin-left: 30px; width: calc(100% - 30px); }

.error { font-size: 13px; line-height: 1.4; color: #1F1A26; display: flex; gap: 6px; align-items: flex-start; }
.error::before { content: "!"; flex: none; display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border-radius: 50%; background: #1F1A26; color: #FFFFFF; font-size: 11px; font-weight: 700; margin-top: 1px; }
.error[hidden] { display: none; }
[aria-invalid="true"] { box-shadow: inset 0 -2px 0 #1F1A26; }
.reason textarea[aria-invalid="true"] { box-shadow: none; border-color: #1F1A26; border-width: 2px; }

.notice { font-size: 15px; line-height: 1.5; color: #1F1A26; background: #F4F2FB; border-radius: 12px; padding: 14px 16px; }
.notice[hidden] { display: none; }

.primary { font: inherit; font-size: 17px; font-weight: 600; color: #FFFFFF; background: #5F4EA5; border: 0; border-radius: 16px; min-height: 54px; width: 100%; cursor: pointer; display: flex; align-items: center; justify-content: center; text-decoration: none; text-align: center; padding: 0 16px; }
.primary[disabled] { opacity: 0.6; cursor: progress; }
.secondary { font: inherit; font-size: 15px; font-weight: 600; color: #5F4EA5; background: #FFFFFF; border: 1px solid rgba(95, 78, 165, 0.30); border-radius: 12px; min-height: 44px; width: 100%; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; padding: 0 14px; }
.textlink { font-size: 15px; font-weight: 500; text-align: center; min-height: 44px; display: flex; align-items: center; justify-content: center; }

/* Honeypot: für Menschen unsichtbar, nicht fokussierbar, nicht vorgelesen */
.hp { position: absolute !important; left: -10000px !important; top: auto !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }

/* Erfolgsseite */
.done-icon { width: 44px; height: 44px; }
.success h2 { font-size: 26px; line-height: 1.2; font-weight: 700; color: #1F1A26; }
.facts { margin: 0; }
.facts div { display: flex; justify-content: space-between; gap: 16px; padding: 13px 16px; }
.facts div + div { border-top: 1px solid rgba(31, 26, 38, 0.10); }
.facts dt { font-size: 15px; color: #484551; flex: none; }
.facts dd { font-size: 15px; font-weight: 500; color: #1F1A26; text-align: right; overflow-wrap: anywhere; white-space: pre-line; }
.hint { font-size: 15px; line-height: 1.5; color: #484551; }
/* MIL-1023: Kleingedrucktes unter dem Senden-Knopf (Datenschutz-Hinweis, Mail-Alternative) */
.hint.small { font-size: 13px; text-align: center; color: #6E6A7A; }

.footer { background: #F8F6F4; padding: 20px 32px; text-align: center; }
.footer p { font-size: 12px; color: #6E6A7A; line-height: 1.8; }
.footer a { color: #5F4EA5; text-decoration: none; }
.footer button { font: inherit; font-size: 12px; color: #5F4EA5; background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; min-height: 24px; }

@media (max-width: 480px) {
  body { padding: 16px 12px; }
  .header { padding: 24px 20px 18px; }
  .body { padding: 22px 18px 26px; }
  .facts div { flex-direction: column; gap: 2px; }
  .facts dd { text-align: left; }
}

/* „Erklärung sichern“: Drucken / als PDF sichern — nur die Erklärung, ohne Knöpfe */
@media print {
  body { background: #FFFFFF; padding: 0; }
  .card { box-shadow: none; border-radius: 0; max-width: none; }
  .header { background: #FFFFFF; }
  .no-print, .footer, form, .notice { display: none !important; }
  .facts div { break-inside: avoid; }
  .print-only { display: block !important; }
}
.print-only { display: none; font-size: 13px; color: #484551; }
