/* ============================================================
   ANTRAGSGLUECK - RESPONSIVE CSS
   Funktioniert auf: Handy, Tablet, Computer (alt + neu)
   Keine Icons, keine Symbole - nur Text
   ============================================================ */

/* RESET - Gleiche Basis auf allen Geräten */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.5;
    color: #333;
    background: #f5f5f5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ============================================================
   LAYOUT - Container
   ============================================================ */

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

/* ============================================================
   HEADER
   ============================================================ */

.header {
    background: #1565C0;
    color: white;
    padding: 15px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inhalt {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.logo {
    color: white;
    text-decoration: none;
    font-size: 1.25rem;
    font-weight: bold;
}

.nav-links {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.nav-links a {
    color: white;
    text-decoration: none;
    padding: 5px 0;
    font-size: 0.9rem;
}

.nav-links a:hover,
.nav-links a:focus {
    text-decoration: underline;
}

/* ============================================================
   KARTEN
   ============================================================ */

.karte {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.karte-klickbar {
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s;
}

.karte-klickbar:hover,
.karte-klickbar:focus {
    border-color: #1565C0;
}

.karte-klickbar.ausgewaehlt {
    border-color: #FF6B35;
    background: #FFF8F5;
}

.karte-titel {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
}

/* ============================================================
   BUTTONS - Große Touch-Targets
   ============================================================ */

.btn {
    display: block;
    width: 100%;
    padding: 15px 20px;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    min-height: 50px;
    line-height: 1.3;
}

.btn:focus {
    outline: 3px solid #FF6B35;
    outline-offset: 2px;
}

.btn-orange {
    background: #FF6B35;
    color: white;
}

.btn-orange:hover,
.btn-orange:focus {
    background: #E55A2B;
}

.btn-primaer {
    background: #1565C0;
    color: white;
}

.btn-primaer:hover,
.btn-primaer:focus {
    background: #0D47A1;
}

.btn-grau {
    background: #E0E0E0;
    color: #333;
}

.btn-grau:hover,
.btn-grau:focus {
    background: #BDBDBD;
}

.btn-block {
    display: block;
    width: 100%;
}

/* ============================================================
   FORMULARE - Touch-optimiert
   ============================================================ */

.formular-gruppe {
    margin-bottom: 15px;
}

.formular-label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 0.95rem;
    color: #333;
}

.formular-input,
.formular-select,
select,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="number"],
textarea {
    display: block;
    width: 100%;
    padding: 12px 15px;
    font-size: 1rem;
    line-height: 1.5;
    border: 2px solid #DDD;
    border-radius: 8px;
    background: white;
    color: #333;
    -webkit-appearance: none;
    appearance: none;
}

.formular-input:focus,
.formular-select:focus,
select:focus,
input:focus,
textarea:focus {
    outline: none;
    border-color: #1565C0;
    box-shadow: 0 0 0 3px rgba(21, 101, 192, 0.2);
}

select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 40px;
}

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

/* Formular-Reihen für Desktop */
.formular-reihe {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* ============================================================
   CHECKBOXEN - Große Touch-Targets
   ============================================================ */

.checkbox-gruppe {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.checkbox-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 15px;
    background: #F8F9FA;
    border: 2px solid #E0E0E0;
    border-radius: 8px;
    cursor: pointer;
    min-height: 50px;
}

.checkbox-item:hover,
.checkbox-item:focus-within {
    border-color: #1565C0;
}

.checkbox-item.ausgewaehlt {
    background: #E3F2FD;
    border-color: #1565C0;
}

.checkbox-item input[type="checkbox"] {
    width: 24px;
    height: 24px;
    min-width: 24px;
    margin: 0;
    cursor: pointer;
    accent-color: #1565C0;
}

.checkbox-item label {
    font-size: 1rem;
    cursor: pointer;
    flex: 1;
    padding-top: 2px;
}

/* ============================================================
   MELDUNGEN
   ============================================================ */

.meldung {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.meldung-erfolg {
    background: #E8F5E9;
    color: #2E7D32;
    border: 1px solid #A5D6A7;
}

.meldung-fehler {
    background: #FFEBEE;
    color: #C62828;
    border: 1px solid #EF9A9A;
}

.meldung-warnung {
    background: #FFF3E0;
    color: #E65100;
    border: 1px solid #FFCC80;
}

.meldung-info {
    background: #E3F2FD;
    color: #1565C0;
    border: 1px solid #90CAF9;
}

/* ============================================================
   FORTSCHRITT
   ============================================================ */

.fortschritt {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    padding: 15px;
    background: white;
    border-radius: 8px;
}

.fortschritt-schritt {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    text-align: center;
}

.fortschritt-kreis {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #E0E0E0;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.fortschritt-text {
    font-size: 0.75rem;
    color: #666;
}

.fortschritt-schritt.aktiv .fortschritt-kreis {
    background: #1565C0;
    color: white;
}

.fortschritt-schritt.aktiv .fortschritt-text {
    color: #1565C0;
    font-weight: 600;
}

.fortschritt-schritt.fertig .fortschritt-kreis {
    background: #4CAF50;
    color: white;
}

/* ============================================================
   BRIEF-ANSICHT
   ============================================================ */

.brief-ansicht {
    background: white;
    border: 1px solid #DDD;
    padding: 20px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 0.95rem;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.brief-blur {
    max-height: 250px;
    overflow: hidden;
    position: relative;
}

.brief-blur::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(transparent, white);
    pointer-events: none;
}

.wasserzeichen {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-30deg);
    font-size: 2rem;
    color: rgba(255, 0, 0, 0.2);
    font-weight: bold;
    pointer-events: none;
    white-space: nowrap;
    font-family: Arial, sans-serif;
}

/* ============================================================
   BEHÖRDE-DATEN FORMULAR
   ============================================================ */

.behoerde-daten {
    background: #F8F9FA;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
    border: 1px solid #E0E0E0;
}

.behoerde-daten h3 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #1565C0;
    font-size: 1.1rem;
}

/* ============================================================
   ÜBERWEISUNG BOX
   ============================================================ */

.ueberweisung-box {
    background: #F8F9FA;
    border: 2px solid #1565C0;
    border-radius: 8px;
    padding: 20px;
}

.ueberweisung-zeile {
    display: flex;
    flex-direction: column;
    padding: 10px 0;
    border-bottom: 1px solid #E0E0E0;
    gap: 5px;
}

.ueberweisung-zeile:last-child {
    border-bottom: none;
}

.ueberweisung-label {
    color: #666;
    font-size: 0.85rem;
}

.ueberweisung-wert {
    font-weight: bold;
    font-family: monospace;
    font-size: 1rem;
    word-break: break-all;
}

/* ============================================================
   PREIS
   ============================================================ */

.preis-gross {
    font-size: 2.5rem;
    color: #1565C0;
    font-weight: bold;
    text-align: center;
    margin: 10px 0;
}

/* ============================================================
   FEATURE LISTE
   ============================================================ */

.feature-liste {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.feature-liste li {
    padding: 10px 0;
    border-bottom: 1px solid #EEE;
    font-size: 0.95rem;
}

.feature-liste li:last-child {
    border-bottom: none;
}

/* ============================================================
   FOOTER
   ============================================================ */

.footer {
    margin-top: auto;
    padding: 20px 15px;
    background: #333;
    color: white;
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
}

.footer-links a {
    color: white;
    text-decoration: none;
    font-size: 0.9rem;
}

.footer-links a:hover,
.footer-links a:focus {
    text-decoration: underline;
}

/* ============================================================
   HILFSKLASSEN
   ============================================================ */

.versteckt {
    display: none !important;
}

.text-center {
    text-align: center;
}

.text-grau {
    color: #666;
}

.text-klein {
    font-size: 0.85rem;
}

.mt-1 { margin-top: 5px; }
.mt-2 { margin-top: 10px; }
.mt-3 { margin-top: 20px; }
.mt-4 { margin-top: 30px; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 5px; }
.mb-2 { margin-bottom: 10px; }
.mb-3 { margin-bottom: 20px; }

.trennlinie {
    border: none;
    border-top: 1px solid #E0E0E0;
    margin: 25px 0;
}

/* ============================================================
   LADEN ANIMATION
   ============================================================ */

.laden-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.laden {
    width: 40px;
    height: 40px;
    border: 4px solid #E0E0E0;
    border-top-color: #1565C0;
    border-radius: 50%;
    animation: drehen 1s linear infinite;
}

@keyframes drehen {
    to { transform: rotate(360deg); }
}

/* ============================================================
   STATUS BADGES
   ============================================================ */

.status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-bereit {
    background: #4CAF50;
    color: white;
}

.status-gespeichert {
    background: #FF9800;
    color: white;
}

/* ============================================================
   TABLET (ab 600px)
   ============================================================ */

@media screen and (min-width: 600px) {
    .container {
        padding: 0 25px;
    }
    
    .karte {
        padding: 25px;
    }
    
    .formular-reihe {
        flex-direction: row;
        gap: 15px;
    }
    
    .formular-reihe .formular-gruppe {
        margin-bottom: 0;
    }
    
    .checkbox-gruppe {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .ueberweisung-zeile {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    .brief-ansicht {
        padding: 30px;
        font-size: 1rem;
    }
    
    .wasserzeichen {
        font-size: 3rem;
    }
    
    .preis-gross {
        font-size: 3rem;
    }
}

/* ============================================================
   DESKTOP (ab 900px)
   ============================================================ */

@media screen and (min-width: 900px) {
    .header {
        padding: 20px;
    }
    
    .header-inhalt {
        max-width: 900px;
    }
    
    .container {
        max-width: 900px;
    }
    
    .logo {
        font-size: 1.5rem;
    }
    
    .nav-links {
        gap: 25px;
    }
    
    .nav-links a {
        font-size: 1rem;
    }
    
    .karte {
        padding: 30px;
    }
    
    .btn {
        display: inline-block;
        width: auto;
        min-width: 200px;
    }
    
    .btn-block {
        display: block;
        width: 100%;
    }
    
    .brief-ansicht {
        padding: 40px;
    }
}

/* ============================================================
   DRUCK
   ============================================================ */

@media print {
    .header,
    .footer,
    .no-print,
    .btn {
        display: none !important;
    }
    
    body {
        background: white;
    }
    
    .karte {
        box-shadow: none;
        padding: 0;
    }
    
    .brief-ansicht {
        border: none;
        padding: 0;
    }
}

/* ============================================================
   ALTE BROWSER SUPPORT
   ============================================================ */

/* Flexbox Fallback */
.header-inhalt {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
}

.nav-links {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
}

/* Border-radius für alte Browser */
.karte,
.btn,
.formular-input {
    -webkit-border-radius: 8px;
    -moz-border-radius: 8px;
    border-radius: 8px;
}

/* Box-shadow für alte Browser */
.karte {
    -webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    -moz-box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
