:root {
    color-scheme: light;
    --brand: #005ea8;
    --brand-dark: #004779;
    --ink: #183042;
    --muted: #607486;
    --line: #dce5ec;
    --surface: #ffffff;
    --background: #f3f7fa;
    --danger: #b42318;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    background: linear-gradient(145deg, #edf5fa 0%, var(--background) 48%, #e8f0f5 100%);
    color: var(--ink);
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    line-height: 1.5;
}

.support-shell {
    width: min(920px, calc(100% - 32px));
    margin: 0 auto;
    padding: 28px 0 24px;
}

.support-header, footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.support-header { margin-bottom: 22px; }

.brand {
    display: inline-flex;
    align-items: baseline;
    gap: 9px;
    color: inherit;
    text-decoration: none;
}

.brand-mark {
    color: var(--brand);
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: .04em;
}

.brand-company { font-weight: 600; }

.support-label {
    border: 1px solid #bad0df;
    border-radius: 999px;
    color: var(--brand-dark);
    padding: 6px 13px;
    font-size: .85rem;
    font-weight: 650;
}

.support-card {
    overflow: hidden;
    padding: clamp(24px, 5vw, 52px);
    border: 1px solid rgba(142, 167, 185, .35);
    border-radius: 18px;
    background: var(--surface);
    box-shadow: 0 18px 50px rgba(34, 67, 91, .12);
}

.intro { max-width: 680px; margin-bottom: 34px; }
.eyebrow { margin: 0 0 7px; color: var(--brand); font-size: .78rem; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
h1 { margin: 0 0 12px; font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.15; letter-spacing: -.025em; }
.intro p:last-child, .confirmation-card > p { color: var(--muted); }

.form-grid { display: grid; gap: 20px; }
.two-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field { margin-bottom: 20px; }
.field label { display: block; margin-bottom: 7px; font-size: .92rem; font-weight: 650; }
.field label::after { content: " *"; color: var(--brand); }
.field:has(input[name="Telefon"]) label::after,
.field:has(input[name="Anhaenge"]) label::after { content: ""; }

input, select, textarea {
    width: 100%;
    border: 1px solid #bdcbd6;
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    font: inherit;
    padding: 11px 12px;
    transition: border-color .15s, box-shadow .15s;
}

textarea { min-height: 175px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(0, 94, 168, .13); }
input[type="file"] { padding: 9px; background: #f8fafc; }
.field small { display: block; margin-top: 6px; color: var(--muted); font-size: .8rem; }

.field-validation-error, .validation-summary, .consent > span { display: block; margin-top: 5px; color: var(--danger); font-size: .84rem; }
.validation-summary:empty { display: none; }
.validation-summary ul { margin: 0 0 20px; padding-left: 20px; }

.consent {
    display: grid;
    grid-template-columns: 20px 1fr;
    gap: 0 10px;
    align-items: start;
    margin: 3px 0 26px;
    font-size: .88rem;
    color: var(--muted);
}

.consent input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--brand); }
.consent a, footer a, .confirmation-actions a { color: var(--brand-dark); }
.consent > span { grid-column: 2; }
.honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.form-actions { display: flex; align-items: center; gap: 18px; }
button, .primary-link {
    display: inline-flex;
    justify-content: center;
    border: 0;
    border-radius: 8px;
    background: var(--brand);
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
    padding: 12px 20px;
    text-decoration: none;
}
button:hover, .primary-link:hover { background: var(--brand-dark); }
.form-actions p { margin: 0; color: var(--muted); font-size: .8rem; }

footer { justify-content: flex-start; gap: 20px; padding: 19px 5px 0; color: var(--muted); font-size: .8rem; }
footer span { margin-right: auto; }

/* Die WordPress-Einbettung übernimmt Kopfbereich, Seitentitel und Fußzeile.
   Im iFrame entspricht das Formular deshalb bewusst der kompakten bisherigen Ansicht. */
body.embedded {
    min-height: 0;
    background: #fff;
    color: #111;
    font-family: Arial, "Segoe UI", sans-serif;
    font-size: 12px;
    line-height: 1.3;
}

.embedded .support-shell {
    width: min(1100px, 100%);
    margin: 0 auto;
    padding: 0;
}

.embedded .support-header,
.embedded .intro,
.embedded footer {
    display: none;
}

.embedded .support-card {
    overflow: visible;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: #fff;
    box-shadow: none;
}

.embedded .form-grid { gap: 30px; }
.embedded .field { margin-bottom: 16px; }
.embedded .category-field { width: calc(50% - 15px); }
.embedded .field label {
    margin-bottom: 4px;
    font-size: 12px;
    font-weight: 700;
}

.embedded input,
.embedded select,
.embedded textarea {
    border-color: #777;
    border-radius: 2px;
    padding: 5px 7px;
    font-size: 12px;
    line-height: 1.2;
}

.embedded input,
.embedded select { min-height: 28px; }
.embedded textarea { min-height: 150px; }
.embedded input[type="file"] { padding: 4px; background: #fff; }
.embedded .field small { margin-top: 4px; font-size: 10px; }

.embedded .consent {
    grid-template-columns: 16px 1fr;
    gap: 0 7px;
    margin: 0 0 13px;
    color: #444;
    font-size: 11px;
}

.embedded .consent input {
    width: 14px;
    height: 14px;
    margin-top: 0;
}

.embedded .form-actions { gap: 12px; }
.embedded button {
    border-radius: 3px;
    padding: 7px 12px;
    font-size: 11px;
}
.embedded .form-actions p { font-size: 10px; }
.embedded .field-validation-error,
.embedded .validation-summary,
.embedded .consent > span { font-size: 10px; }

.embedded .confirmation-shell { min-height: 0; padding: 32px 0; }
.embedded .confirmation-card { max-width: 620px; padding: 24px; }

.confirmation-shell { display: grid; place-items: center; min-height: 100vh; }
.confirmation-card { max-width: 650px; text-align: center; }
.success-icon { display: grid; place-items: center; width: 58px; height: 58px; margin: 0 auto 22px; border-radius: 50%; background: #e7f6ed; color: #147d43; font-size: 1.7rem; font-weight: 800; }
.ticket-number { display: inline-block; margin: 10px 0 16px; border-radius: 8px; background: #eef5fa; padding: 9px 14px; color: var(--ink) !important; }
.confirmation-actions { display: flex; justify-content: center; align-items: center; gap: 20px; margin-top: 28px; }

/* Bereits übertragene Anhänge. Sie überstehen einen Validierungsfehler und werden deshalb
   sichtbar aufgelistet, statt nur im Datei-Feld zu stehen. */
.anhang-liste { margin: 10px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.anhang-liste:empty { margin: 0; }
.anhang-liste li {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f7fbfd;
    padding: 7px 10px;
    font-size: .86rem;
}
.anhang-name { flex: 1; overflow-wrap: anywhere; }
.anhang-entfernen {
    width: auto;
    border: 0;
    border-radius: 6px;
    background: transparent;
    padding: 2px 7px;
    color: var(--muted);
    font-size: .95rem;
    line-height: 1;
    cursor: pointer;
}
.anhang-entfernen:hover { background: #fdeceb; color: var(--danger); }
.anhang-status { margin: 8px 0 0; color: var(--muted); font-size: .84rem; }
.anhang-status:empty { margin: 0; }
.anhang-status-fehler { color: var(--danger); }
.anhang-warnung {
    margin-top: 16px;
    border: 1px solid #f3d7a3;
    border-radius: 8px;
    background: #fdf6e8;
    padding: 11px 14px;
    text-align: left;
    font-size: .9rem;
}

.embedded .anhang-liste li, .embedded .anhang-status { font-size: 10px; }
.embedded .anhang-warnung { font-size: 11px; padding: 9px 11px; }

@media (max-width: 650px) {
    .support-shell { width: min(100% - 20px, 920px); padding-top: 16px; }
    .two-columns { grid-template-columns: 1fr; gap: 0; }
    .brand-company { display: none; }
    .support-card { border-radius: 13px; }
    .form-actions, .confirmation-actions { align-items: stretch; flex-direction: column; text-align: center; }
    button { width: 100%; }
    footer { flex-wrap: wrap; }
    footer span { width: 100%; }
    .embedded .two-columns { gap: 0; }
    .embedded .category-field { width: 100%; }
}
