/*
 * FMA Mitgliedsantrag - gemeinsames Stylesheet (ersetzt w3.css + alle Inline-Styles).
 *
 * Mobile-first: der Normalzustand (keine Media-Query) ist für Handy/Tablet gedacht,
 * da das Formular laut Anforderung hauptsächlich dort und als eingebettetes iframe
 * genutzt wird. Header/Footer sind bewusst NICHT position:fixed - in einem iframe
 * gehört das dem umgebenden Dokument, nicht uns, und "100vw"/feste Pixel-Paddings
 * fürs Freihalten eines fixierten Headers waren die Hauptursache der bisherigen
 * Layoutprobleme auf unterschiedlichen Bildschirmen.
 */

:root {
    --fma-black: #111;
    --fma-green: #2e7d32;
    --fma-red: #c62828;
    --fma-border: #ccc;
    --fma-bg: #f5f5f5;
    --fma-radius: 8px;
    --fma-max-width: 640px;
    --fma-touch: 48px; /* Mindest-Tippfläche */
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--fma-bg);
    color: #1a1a1a;
    line-height: 1.4;
}

.page {
    max-width: var(--fma-max-width);
    margin: 0 auto;
    min-height: 100%;
    background: #fff;
    display: flex;
    flex-direction: column;
}

.banner {
    width: 100%;
}
.banner img {
    width: 100%;
    height: auto;
    display: block;
}
.banner h1, .banner h2 {
    text-align: center;
    margin: 0.3em 0.5em;
}
.banner h1 { font-size: clamp(1.3rem, 5vw, 1.8rem); }
.banner h2 { font-size: clamp(1rem, 4vw, 1.3rem); font-weight: normal; }

main {
    flex: 1;
    padding: 1rem 1rem 2rem;
}

.fee-line {
    text-align: center;
    background: #fff8e1;
    border: 1px solid #ffe082;
    border-radius: var(--fma-radius);
    padding: 0.6rem;
    margin: 0 0 1rem;
    font-size: 1.05rem;
}

form .field {
    margin-bottom: 1rem;
}
form label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.3rem;
    font-size: 0.95rem;
}
form input[type="text"],
form input[type="email"],
form input[type="tel"],
form input[type="date"],
form select {
    width: 100%;
    font-size: 1rem;
    padding: 0.7rem 0.6rem;
    min-height: var(--fma-touch);
    border: 1px solid var(--fma-border);
    border-radius: 6px;
    background: #fff;
}
form input:focus, form select:focus {
    outline: 2px solid #1565c0;
    outline-offset: 1px;
}
form input:invalid:not(:placeholder-shown) {
    border-color: var(--fma-red);
}

.required-note {
    font-size: 0.85rem;
    color: #555;
    margin: 0.5rem 0 1rem;
}

.btn-row {
    display: flex;
    gap: 0.6rem;
    margin-top: 1.2rem;
}
.btn-row.stacked { flex-direction: column; }

.btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: var(--fma-touch);
    padding: 0.7rem 1rem;
    font-size: 1.05rem;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}
.btn-dark { background: var(--fma-black); color: #fff; }
.btn-green { background: var(--fma-green); color: #fff; }
.btn-red { background: var(--fma-red); color: #fff; }

.iban-error {
    display: none;
    background: #ffebee;
    border: 1px solid var(--fma-red);
    border-radius: 6px;
    padding: 0.6rem;
    margin-top: 0.5rem;
    color: #7a0000;
}
.iban-error.show { display: block; }

.hp-field {
    position: absolute;
    left: -9999px;
    top: -9999px;
}

.privacy-box {
    background: #fafafa;
    border: 1px solid var(--fma-border);
    border-radius: var(--fma-radius);
    padding: 0.8rem;
    margin-bottom: 1.2rem;
    display: flex;
    gap: 0.6rem;
    align-items: flex-start;
}
.privacy-box input[type="checkbox"] {
    width: 24px;
    height: 24px;
    flex: none;
    margin-top: 0.1rem;
}
.privacy-box label { font-weight: normal; font-size: 0.95rem; }

#signature-pad {
    border: 1px solid var(--fma-border);
    border-radius: var(--fma-radius);
    background: #fff;
    padding: 0.5rem;
    margin-bottom: 1rem;
}
#signature-pad canvas {
    width: 100%;
    height: 180px;
    display: block;
    touch-action: none;
}
#signature-pad p {
    text-align: center;
    margin: 0.4rem 0 0;
    font-size: 0.85rem;
    color: #555;
}

.wait-screen {
    text-align: center;
    padding: 2rem 1rem;
}
.wait-screen img { max-width: 120px; }

footer.site-footer {
    background: var(--fma-black);
    color: #fff;
    text-align: center;
    padding: 0.6rem;
    font-size: 0.85rem;
}

/* Sprachauswahl */
.lang-choice {
    text-align: center;
    padding: 1rem;
}
.lang-choice .btn-lang {
    display: inline-block;
    margin: 0.5rem;
    border: none;
    background: none;
    padding: 0;
    cursor: pointer;
}
.lang-choice .btn-lang img {
    width: 120px;
    max-width: 40vw;
    height: auto;
}

/* Erfolgsseite */
.success-box {
    text-align: center;
    padding: 1.5rem 1rem;
}
.success-box img { max-width: 100%; height: auto; }

/* Ab Tablet/Desktop etwas mehr Luft, aber dasselbe Layout - keine separate
   "PC-Welt" mehr mit eigenen Canvas-Größen/Fixed-Headern. */
@media (min-width: 600px) {
    body { padding: 1.5rem 0; }
    .page {
        border-radius: var(--fma-radius);
        box-shadow: 0 2px 10px rgba(0,0,0,0.08);
        overflow: hidden;
    }
    .btn-row.stacked { flex-direction: row; }
}

/* -------------------------------------------------------------------- */
/* Infoslides-Kiosk (template_index.php) - läuft im Leerlauf auf einem   */
/* Tablet am Infostand, komplettes Slide tippen = Start der Anmeldung.  */
/* Ersetzt w3.css + fixierten 100vw-Header + Desktop-Only-Breakpoint.   */
/* -------------------------------------------------------------------- */
.kiosk-page {
    max-width: 800px;
    margin: 0 auto;
    min-height: 100%;
    background: #fff;
    display: flex;
    flex-direction: column;
    cursor: pointer;
}
.kiosk-slides { position: relative; padding: 1rem 1.2rem 2rem; flex: 1; }
.kiosk-slide { display: none; }
.kiosk-slide.active { display: block; animation: kiosk-fade 0.6s ease; }
@keyframes kiosk-fade { from { opacity: 0; } to { opacity: 1; } }
.kiosk-slide h1 { font-size: clamp(1.2rem, 4vw, 1.6rem); margin: 0.6em 0 0.4em; }
.kiosk-slide ul { margin: 0.3em 0; padding-left: 1.3em; }
.kiosk-slide li { margin-bottom: 0.3em; }
.kiosk-slide img.kiosk-img { max-width: 100%; height: auto; display: block; margin: 0.8rem auto; }
.kiosk-slide img.kiosk-img-half { max-width: 45%; }
.kiosk-tap {
    text-align: center;
    color: var(--fma-red);
    font-weight: 700;
    margin: 0.8rem 0 0;
    animation: kiosk-blink 3s ease-in-out infinite;
}
@keyframes kiosk-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
.kiosk-dots { text-align: center; padding: 0.6rem 0; }
.kiosk-dots .dot {
    display: inline-block; height: 12px; width: 12px; margin: 0 4px;
    border-radius: 50%; background: #bbb;
}
.kiosk-dots .dot.active { background: #717171; }
