/* =====================================================================
   Widerrufsformular – Stylesheet (cleanes, modernes Design)
   ===================================================================== */

:root {
    --accent: #111111;
    --bg: #f6f7f8;
    --card-bg: #ffffff;
    --text: #111111;
    --text-muted: #6b7280;
    --border: #e4e4e7;
    --border-focus: #111111;
    --error: #dc2626;
    --error-bg: #fef2f2;
    --success: #111111;
    --radius: 14px;
    --radius-sm: 10px;
    --shadow: 0 1px 3px rgba(16, 24, 40, 0.04), 0 8px 28px rgba(16, 24, 40, 0.06);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.55;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

.container {
    width: 100%;
    max-width: 620px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ----- Header --------------------------------------------------- */
.site-header {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    padding-bottom: 16px;
}

.logo-link { display: inline-flex; }

.logo {
    max-height: 40px;
    width: auto;
    display: block;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 8px;
    transition: background .15s ease, color .15s ease;
}

.back-link:hover {
    color: var(--text);
    background: var(--bg);
}

/* ----- Card ----------------------------------------------------- */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 38px 40px;
    margin-top: 40px;
}

h1 {
    font-size: 26px;
    font-weight: 650;
    letter-spacing: -0.02em;
    margin: 0 0 10px;
}

.intro {
    color: var(--text-muted);
    margin: 0 0 28px;
    font-size: 15px;
}

/* ----- Formular ------------------------------------------------- */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group {
    margin-bottom: 18px;
}

label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 7px;
    color: var(--text);
}

.req { color: var(--accent); font-weight: 700; }
.optional { color: var(--text-muted); font-weight: 400; font-size: 12px; }

input[type="text"],
input[type="email"],
input[type="date"],
textarea {
    width: 100%;
    padding: 12px 14px;
    font-size: 15px;
    font-family: inherit;
    color: var(--text);
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: border-color .15s ease, box-shadow .15s ease;
    -webkit-appearance: none;
    appearance: none;
}

textarea { resize: vertical; min-height: 84px; }

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent);
}

input::placeholder,
textarea::placeholder { color: #aab1bb; }

input.has-error,
textarea.has-error {
    border-color: var(--error);
}

.field-error {
    display: block;
    color: var(--error);
    font-size: 13px;
    margin-top: 6px;
}

/* ----- DSGVO-Checkbox ------------------------------------------ */
.consent-group { margin-top: 24px; margin-bottom: 22px; }

.consent {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    font-weight: 400;
    margin-bottom: 0;
    cursor: pointer;
    padding: 14px 15px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: border-color .15s ease, background .15s ease;
}

.consent:hover { background: var(--bg); }

.consent.has-error { border-color: var(--error); background: var(--error-bg); }

.consent input[type="checkbox"] {
    flex: 0 0 auto;
    width: 19px;
    height: 19px;
    margin: 1px 0 0;
    accent-color: var(--accent);
    cursor: pointer;
}

.consent-text {
    font-size: 13.5px;
    line-height: 1.5;
    color: var(--text-muted);
}

.consent-text a {
    color: var(--text);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.consent-text a:hover { color: var(--accent); }

/* ----- Buttons -------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 22px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    text-decoration: none;
    transition: background .15s ease, transform .05s ease, box-shadow .15s ease;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.1);
}

.btn-primary:hover { background: color-mix(in srgb, var(--accent) 88%, #000); }
.btn-primary:active { transform: translateY(1px); }

.btn-block { width: 100%; margin-top: 6px; }

/* ----- Hinweise / Alerts --------------------------------------- */
.form-hint {
    font-size: 13px;
    color: var(--text-muted);
    margin: 16px 0 0;
    text-align: center;
}

.alert {
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    margin-bottom: 22px;
}

.alert-error {
    background: var(--error-bg);
    color: var(--error);
    border: 1px solid color-mix(in srgb, var(--error) 25%, transparent);
}

/* ----- Honeypot ------------------------------------------------- */
.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* ----- Bestätigung --------------------------------------------- */
.confirmation { text-align: center; padding: 12px 0; }

.confirmation-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: color-mix(in srgb, var(--success) 12%, transparent);
    color: var(--success);
}

.confirmation h1 { margin-bottom: 12px; }

.confirmation .lead {
    font-size: 16px;
    color: var(--text);
    margin: 0 auto 18px;
    max-width: 440px;
}

.legal-note {
    font-size: 13.5px;
    color: var(--text-muted);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px 18px;
    text-align: left;
    margin: 0 auto 26px;
    max-width: 480px;
}

/* ----- Footer --------------------------------------------------- */
.site-footer {
    text-align: center;
    padding: 28px 0 40px;
    font-size: 14px;
    color: var(--text-muted);
}

.site-footer a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color .15s ease;
}

.site-footer a:hover { color: var(--accent); }

.site-footer .dot { margin: 0 10px; color: var(--border); }

/* ----- Mobile --------------------------------------------------- */
@media (max-width: 560px) {
    .card { padding: 28px 22px; margin-top: 24px; }
    .form-row { grid-template-columns: 1fr; gap: 0; }
    h1 { font-size: 22px; }
}
