/* Daunder — Kündigen (§ 312k BGB), 01.10.2026. Baut auf styles.css auf.
 *
 * ROLLE:      Gestalter öffentlicher Formulare (gov.uk-Mechanik): eine Frage je Block, große
 *             Felder, Fehler am Feld, nichts Verspieltes.
 * LEITIDEE:   Kündigen ist so leicht wie Kaufen — ein Formular, ein Knopf, sofort eine Bestätigung.
 * GEBROCHEN:  Kein „Bist du sicher?"-Rückhalt, keine Halteangebote. Das Gesetz will den direkten Weg,
 *             und jeder Umweg wäre ein Dark Pattern.
 */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.cancel {
  display: grid;
  width: var(--measure);
  margin: 0 auto;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: start;
  gap: clamp(2rem, 6vw, 6rem);
  padding: clamp(2rem, 5vw, 4.5rem) 0 clamp(4rem, 8vw, 7rem);
}
.cancel h1 {
  margin: 0;
  font-size: clamp(2.6rem, 5.6vw, 4.6rem);
}
.cancel .lead {
  max-width: 42ch;
  margin: 1.25rem 0 0;
  color: var(--text-muted);
  font-size: clamp(1.0625rem, 1.5vw, 1.2rem);
}
.cancel-facts {
  display: grid;
  gap: 0.6rem;
  margin: 2rem 0 0;
  border-top: 1px solid var(--line-soft);
  padding: 1.25rem 0 0 1.1rem;
  color: var(--text-muted);
}
.cancel-facts a {
  color: var(--state-text);
}

.cancel-panel {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-card);
  background: var(--surface-1);
  padding: clamp(1.5rem, 4vw, 2.75rem);
}

.cancel-form {
  display: grid;
  gap: 1.75rem;
}
.field {
  display: grid;
  gap: 0.6rem;
  margin: 0;
  border: 0;
  padding: 0;
}
.field > label,
.field legend {
  margin-bottom: 0.25rem;
  padding: 0;
  font-family: var(--font-title);
  font-size: 1.125rem;
  font-weight: 600;
}
.optional {
  color: var(--text-muted);
  font-family: var(--font-body);
  font-weight: 500;
}
.field input[type='email'],
.field input[type='date'],
.field textarea {
  width: 100%;
  min-height: 3.25rem;
  border: 2px solid var(--line);
  border-radius: 0.9rem;
  background: var(--ground);
  color: var(--text);
  padding: 0.7rem 1rem;
  font: inherit;
}
.field textarea {
  resize: vertical;
}
.field input:hover,
.field textarea:hover {
  border-color: var(--text-muted);
}
.field input:focus-visible,
.field textarea:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-color: var(--text);
}
.field input[aria-invalid='true'] {
  border-color: var(--action-text);
}
.field-error {
  margin: 0;
  color: var(--action-text);
  font-weight: 600;
}
.choice {
  display: flex;
  min-height: 2.75rem;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
}
.choice input {
  width: 1.25rem;
  height: 1.25rem;
  margin: 0.3rem 0 0;
  flex: 0 0 auto;
  accent-color: var(--brand-orange);
}
.choice small {
  display: block;
  color: var(--text-muted);
  font-size: 0.875rem;
}
.date-row {
  padding-left: 2rem;
}
.withdraw-choice {
  border-radius: 0.9rem;
  background: var(--surface-2);
  padding: 0.9rem 1rem;
}
.cancel-now {
  justify-self: start;
}
.cancel-now .de {
  font-weight: 500;
  opacity: 0.8;
}
.cancel-now[aria-busy='true'] {
  cursor: progress;
  opacity: 0.8;
}
.form-message {
  margin: 0;
  border-left: 3px solid var(--action-text);
  padding: 0.2rem 0 0.2rem 0.85rem;
}

.confirmation:focus {
  outline: none;
}
.confirmation h2 {
  margin: 1rem 0 0.5rem;
  font-size: clamp(2rem, 4vw, 2.8rem);
}
.confirmation > p {
  margin: 0;
  color: var(--text-muted);
}
.done-mark {
  display: inline-grid;
  width: 3.25rem;
  height: 3.25rem;
  place-items: center;
  margin: 0;
  border-radius: 999px;
  background: var(--state-fill);
  color: var(--on-state-fill);
}
.done-mark svg {
  width: 1.6rem;
  height: 1.6rem;
}
.confirmation-facts {
  display: grid;
  gap: 0;
  margin: 1.5rem 0 0;
  border-top: 1px solid var(--line-soft);
}
.confirmation-facts div {
  display: grid;
  grid-template-columns: 11rem 1fr;
  gap: 1rem;
  border-bottom: 1px solid var(--line-soft);
  padding: 0.75rem 0;
}
.confirmation-facts dt {
  color: var(--text-muted);
}
.confirmation-facts dd {
  margin: 0;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.done-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

@media (max-width: 900px) {
  .cancel {
    grid-template-columns: 1fr;
  }
  .confirmation-facts div {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }
}

/* Die Bestätigung speichern: beim Drucken nur sie, ohne Kopf und Fuß. */
@media print {
  .site-header,
  .site-footer,
  .cancel-intro,
  .done-actions,
  .skip-link {
    display: none !important;
  }
  .cancel {
    display: block;
    padding: 0;
  }
  .cancel-panel {
    border: 0;
    padding: 0;
  }
}
