/* Grundlayout */
:root {
    color-scheme: light;
    --blue: #176b9a;
    --ink: #1d2935;
    --muted: #647383;
    --line: #dce4eb;
    --bg: #f3f6f9;
    --white: #fff;
    --orange: #e5611a;
    --red: #a62918;
    --green: #17552b;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font: 15px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif;
}
main { max-width: 1040px; margin: 14px auto; padding: 0 10px; }
.brand { display: block; width: 100%; padding: 4px 4px 2px; margin: 0 0 2px; color: var(--blue); font-size: 1.05rem; font-weight: 800; line-height: 1.4; letter-spacing: .04em; overflow: visible; }
h1 { margin: 5px 0 7px; font-size: clamp(1.3rem, 3vw, 1.75rem); line-height: 1.2; }
h2 { margin: 0 0 10px; font-size: 1.08rem; }
h3 { margin: 0 0 8px; font-size: .98rem; }
.intro { margin: 4px 0 12px; color: var(--muted); font-size: .9rem; }

/* Formulare und Karten */
.panel {
    margin: 10px 0;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--white);
    box-shadow: 0 3px 12px #243b5308;
}
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.field { min-width: 0; margin-bottom: 10px; }
.field label { display: block; margin-bottom: 4px; font-size: .88rem; font-weight: 650; }
.field input, .field select, .field textarea {
    width: 100%;
    min-height: 40px;
    padding: 9px 10px;
    border: 1px solid #b8c6d2;
    border-radius: 7px;
    background: #fff;
    color: var(--ink);
    font: inherit;
    font-size: .95rem;
}
.field textarea { min-height: 76px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid #8ec9ed; outline-offset: 1px; }
.button {
    display: inline-flex;
    min-height: 39px;
    align-items: center;
    justify-content: center;
    padding: 9px 13px;
    border: 0;
    border-radius: 7px;
    background: var(--blue);
    color: white;
    cursor: pointer;
    font: inherit;
    font-size: .91rem;
    font-weight: 700;
    text-decoration: none;
}
.button.secondary { border: 1px solid #d4dee6; background: #e9eff4; color: var(--ink); }
.button:disabled { background: #aeb8c2; cursor: not-allowed; }
.button-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.button-row form { margin: 0; }
.muted { color: var(--muted); font-size: .86rem; }
.meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.pill { padding: 4px 8px; border-radius: 999px; background: #eef3f7; font-size: .8rem; }

/* Tarifkarten */
.tariffs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.tariff { display: flex; min-width: 0; flex-direction: column; gap: 6px; padding: 10px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.tariff h3 { min-height: 2.2em; line-height: 1.2; }
.price { color: var(--orange); font-size: 1.42rem; font-weight: 800; line-height: 1.15; white-space: nowrap; }
.tariff p { margin: 0; font-size: .78rem; line-height: 1.35; }
.status { margin-top: auto !important; padding-top: 4px; font-weight: 700; }
.tariff form { margin-top: 3px; }
.tariff .button { width: 100%; min-height: 36px; padding: 7px 6px; font-size: .82rem; }

/* Hinweise und Zusammenfassung */
.error, .success { margin: 10px 0; padding: 11px; border-radius: 8px; }
.error { border: 1px solid #efb4a9; background: #fff1ee; color: #8c2415; }
.success { border: 1px solid #b8dfc3; background: #edf8f0; color: var(--green); }
.field-error { display: block; margin-top: 3px; color: var(--red); font-size: .8rem; }
.has-error input, .has-error select { border-color: #c34230; }
.summary-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 16px; }
.summary-row { padding: 6px 0; border-bottom: 1px solid var(--line); }
.summary-row strong { display: block; color: var(--muted); font-size: .78rem; font-weight: 600; }
.summary-row span { overflow-wrap: anywhere; }
.section-title { margin: 14px 0 10px; padding-bottom: 7px; border-bottom: 1px solid var(--line); }
.consent { display: flex; align-items: flex-start; gap: 9px; font-size: .85rem; }
.consent input { flex: none; margin-top: 4px; }
.step { margin-bottom: 6px; color: var(--muted); font-size: .8rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }

/* Kleine Bildschirme */
@media (max-width: 760px) {
    main { margin: 8px auto; }
    .tariffs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .fields, .summary-grid { grid-template-columns: 1fr; }
    .panel { padding: 12px; }
}
@media (max-width: 390px) {
    .tariff { padding: 8px; }
    .price { font-size: 1.25rem; }
    .tariff h3 { font-size: .88rem; }
    .button-row .button { flex: 1; }
}
@media print {
    body { background: white; font-size: 12pt; }
    main { max-width: none; margin: 0; padding: 0; }
    .panel { padding: 0; border: 0; box-shadow: none; }
    .no-print, .brand, .intro { display: none !important; }
    h1 { margin-bottom: 16px; }
}

/* Tariftexte und Reservierungsbestätigung */
.tariff .features { margin: 0; padding-left: 17px; font-size: .76rem; line-height: 1.32; }
.tariff .features li { margin: 0 0 4px; }
.available { color: var(--green); }
.unavailable { color: var(--red); }
.form-intro { margin: 6px 0 12px; color: var(--muted); font-size: .88rem; }
.legacy-notes { margin-top: 20px; padding-top: 12px; border-top: 1px solid var(--line); }
.legacy-notes h3 { margin: 12px 0 5px; }
.legacy-notes p, .legacy-notes li, .contact-details { font-size: .88rem; line-height: 1.45; }
.legacy-notes ul { padding-left: 22px; }
.contact-details { margin-top: 16px; color: var(--muted); }
@media (max-width: 760px) {
    .tariff .features { font-size: .8rem; }
}

/* Verhindert seitliches Überlaufen in eingebetteten Ansichten. */
html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}
main, .panel, .tariffs, .tariff, .fields, .summary-grid {
    width: 100%;
    min-width: 0;
    max-width: 100%;
}
input, select, textarea, button {
    max-width: 100%;
}

/* Auf schmalen Handys Tarife untereinander statt in engen Spalten. */
@media (max-width: 540px) {
    main {
        margin: 6px auto;
        padding: 7px 12px 0;
    }
    .brand {
        padding: 5px 4px 3px;
        line-height: 1.5;
    }
    .panel {
        margin: 8px 0;
        padding: 10px;
        border-radius: 9px;
    }
    .tariffs {
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
    }
    .tariff {
        padding: 10px;
    }
    .tariff h3 {
        min-height: 0;
    }
    .price {
        white-space: normal;
        overflow-wrap: anywhere;
    }
    .fields, .summary-grid {
        grid-template-columns: minmax(0, 1fr);
    }
    .field input, .field select, .field textarea {
        font-size: 16px;
    }
    .button-row {
        flex-direction: column;
        align-items: stretch;
    }
    .button-row > form,
    .button-row > .button,
    .button-row form .button {
        width: 100%;
        max-width: 100%;
    }
    .meta {
        align-items: flex-start;
    }
}


/* Zusätzliche Absicherung für eingebettete Ansichten (z. B. WordPress/Elementor).
   Die Einbettungsseite meldet dem Rechner die tatsächlich verfügbare iframe-Breite. */
html.parkeasy-embedded-mobile main,
html.parkeasy-embedded-mobile .panel,
html.parkeasy-embedded-mobile .fields,
html.parkeasy-embedded-mobile .summary-grid,
html.parkeasy-embedded-mobile .field,
html.parkeasy-embedded-mobile .field input,
html.parkeasy-embedded-mobile .field select,
html.parkeasy-embedded-mobile .field textarea,
html.parkeasy-embedded-mobile .button-row,
html.parkeasy-embedded-mobile .button-row form {
    min-width: 0;
    max-width: 100%;
}
html.parkeasy-embedded-mobile main {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
}
html.parkeasy-embedded-mobile .fields,
html.parkeasy-embedded-mobile .summary-grid {
    grid-template-columns: minmax(0, 1fr);
}
html.parkeasy-embedded-mobile h1,
html.parkeasy-embedded-mobile .intro,
html.parkeasy-embedded-mobile .muted,
html.parkeasy-embedded-mobile .step {
    max-width: 100%;
    overflow-wrap: anywhere;
}
html.parkeasy-embedded-small .tariffs {
    grid-template-columns: minmax(0, 1fr);
}
html.parkeasy-embedded-small .button-row {
    flex-direction: column;
    align-items: stretch;
}
html.parkeasy-embedded-small .button-row > form,
html.parkeasy-embedded-small .button-row > .button,
html.parkeasy-embedded-small .button-row form .button {
    width: 100%;
    max-width: 100%;
}


/* Tarifauswahl nach erfolgreicher Datumsprüfung klar hervorheben. */
#tarifauswahl {
    scroll-margin-top: 12px;
}
.quote-prompt {
    margin: 8px 0 12px;
    padding: 12px 13px;
    border: 1px solid #a9cfe3;
    border-left: 4px solid var(--blue);
    border-radius: 8px;
    background: #edf7fc;
    color: #173f56;
    font-size: .94rem;
    line-height: 1.4;
}
.quote-prompt strong {
    display: block;
    margin-bottom: 2px;
}
@media (max-width: 760px) {
    #tarifauswahl {
        border: 2px solid var(--blue);
        padding: 12px;
    }
    #tarifauswahl > .step {
        display: inline-block;
        margin: 0 0 8px;
        padding: 7px 10px;
        border-radius: 6px;
        background: var(--blue);
        color: #fff;
        font-size: .86rem;
        letter-spacing: .02em;
    }
    .quote-prompt {
        font-size: .95rem;
        padding: 13px;
    }
}


/* Separater, klar beschrifteter Rückweg zur Datumsauswahl in Schritt 2. */
.change-reservation-row {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}
