/* Haupt-Container */
.kuendigungsgenerator-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    line-height: 1.6;
    background: linear-gradient(135deg, #0A1224 0%, #1a2744 100%);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    color: #ffffff;
}

/* Header */
.kuendigungsgenerator-header {
    text-align: center;
    margin-bottom: 40px;
}

.kuendigungsgenerator-header h1 {
    font-size: 2.5rem;
    margin: 0 0 20px 0;
    font-weight: 700;
    color: #ffffff;
}

.kuendigungsgenerator-header p {
    font-size: 1.1rem;
    color: #e0e8f7;
    margin: 0 0 30px 0;
}

.kuendigungsgenerator-icon {
    font-size: 3rem;
    margin: 30px 0;
}

.kuendigungsgenerator-header h2 {
    font-size: 1.5rem;
    margin: 30px 0 15px 0;
    color: #ffffff;
    font-weight: 600;
}

.kuendigungsgenerator-subtitle {
    color: #b8c9e8 !important;
    font-size: 1rem !important;
    margin: 10px 0 !important;
}

.kuendigungsgenerator-link-info {
    color: #9bb3dd !important;
    font-size: 0.9rem !important;
    margin-bottom: 40px !important;
}

/* Abschnitte */
.kuendigungsgenerator-section {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    backdrop-filter: blur(10px);
}

.kuendigungsgenerator-section h3 {
    margin-top: 0;
    color: #ffffff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 10px;
    margin-bottom: 20px;
}

/* Formular-Elemente */
.kuendigungsgenerator-form {
    background: rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 40px;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.kuendigungsgenerator-form-group {
    margin-bottom: 24px;
}

.kuendigungsgenerator-form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 24px;
}

.kuendigungsgenerator-form-group.kuendigungsgenerator-form-group-small {
    flex: 0 0 auto;
    min-width: 180px;
    width: 30%;
}

.kuendigungsgenerator-form-row .kuendigungsgenerator-form-group:not(.kuendigungsgenerator-form-group-small) {
    flex: 1;
}

.kuendigungsgenerator-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #ffffff;
}

.kuendigungsgenerator-form-group input,
.kuendigungsgenerator-form-group textarea {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid rgba(244, 166, 35, 0.3);
    border-radius: 12px;
    font-size: 16px;
    font-family: inherit;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    color: #ffffff;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.kuendigungsgenerator-form-group input::placeholder,
.kuendigungsgenerator-form-group textarea::placeholder {
    color: #c0d0f0;
    font-weight: 400;
    opacity: 0.9;
}

.kuendigungsgenerator-form-group input:focus,
.kuendigungsgenerator-form-group textarea:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.25);
    border-color: #F4A623;
    box-shadow: 0 0 0 3px rgba(244, 166, 35, 0.2);
    transform: translateY(-1px);
}

.kuendigungsgenerator-form-group input:hover,
.kuendigungsgenerator-form-group textarea:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(244, 166, 35, 0.5);
}

/* Input validation styling */
.kuendigungsgenerator-form-group input.valid {
    border-color: #2ecc71;
    box-shadow: 0 0 0 1px rgba(46, 204, 113, 0.2);
}

.kuendigungsgenerator-form-group input:invalid:not(:placeholder-shown) {
    border-color: #e74c3c;
    box-shadow: 0 0 0 1px rgba(231, 76, 60, 0.2);
}

.kuendigungsgenerator-form-group textarea {
    min-height: 100px;
    resize: vertical;
    font-family: inherit;
    line-height: 1.6;
}

/* Spezifische Styling für verschiedene Input-Typen */
.kuendigungsgenerator-form-group input[type="date"] {
    color: #ffffff;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.kuendigungsgenerator-form-group input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    opacity: 0.7;
    cursor: pointer;
}

.kuendigungsgenerator-form-group input[type="date"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

.kuendigungsgenerator-form-group small {
    display: block;
    color: #b8c9e8;
    font-size: 13px;
    margin-top: 5px;
}

/* Button */
.kuendigungsgenerator-btn,
.kuendigungsgenerator-btn-primary,
.kuendigungsgenerator-button {
    display: inline-block;
    padding: 16px 32px;
    background: #F6BB28 !important;
    color: #ffffff !important;
    text-decoration: none;
    border: none;
    border-radius: 40px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: none;
    font-family: inherit;
    text-align: center;
    width: auto;
    min-width: 200px;
}

.kuendigungsgenerator-btn:hover,
.kuendigungsgenerator-btn-primary:hover,
.kuendigungsgenerator-button:hover {
    background: #F6BB28 !important;
    transform: translateY(-1px);
    box-shadow: none;
}

.kuendigungsgenerator-btn:active,
.kuendigungsgenerator-btn-primary:active,
.kuendigungsgenerator-button:active {
    transform: translateY(0);
    background: #F6BB28 !important;
    box-shadow: none;
}

.kuendigungsgenerator-btn:disabled,
.kuendigungsgenerator-btn-primary:disabled,
.kuendigungsgenerator-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.kuendigungsgenerator-form-actions {
    margin-top: 30px;
    text-align: center;
}

.kuendigungsgenerator-actions {
    margin-top: 30px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.kuendigungsgenerator-actions .kuendigungsgenerator-button {
    width: auto;
    min-width: 200px;
}

/* Meldungen */
.kuendigungsgenerator-message {
    padding: 15px 20px;
    margin-bottom: 30px;
    border-radius: 8px;
    display: none;
    backdrop-filter: blur(10px);
}

.kuendigungsgenerator-message.success {
    background: rgba(46, 204, 113, 0.1);
    border: 1px solid rgba(46, 204, 113, 0.3);
    color: #2ecc71;
    display: block;
}

.kuendigungsgenerator-message.error {
    background: rgba(231, 76, 60, 0.1);
    border: 1px solid rgba(231, 76, 60, 0.3);
    color: #e74c3c;
    display: block;
}

/* Kündigungsbrief */
.kuendigungsgenerator-letter {
    background: #ffffff;
    border: 1px solid #ddd;
    padding: 20px;
    margin: 30px 0;
    line-height: 1.6;
    font-family: "Arial", sans-serif;
    color: #000000;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    max-height: 600px;
    overflow-y: auto;
}

/* DIN-A4 Brief Styling für Druck */
.din-brief {
    width: 210mm; /* Vollständige A4-Breite */
    min-height: 297mm; /* Vollständige A4-Höhe */
    padding: 0;
    font-family: "Times New Roman", Times, serif;
    font-size: 12pt;
    line-height: 1.5;
    color: #000;
    background: #fff;
    margin: 0 auto;
    box-sizing: border-box;
    position: relative;
}

/* Absender (nach DIN 5008 oben rechts) */
.absender-zeile {
    position: absolute;
    top: 27mm;
    right: 20mm;
    font-size: 10pt;
    line-height: 1.3;
    text-align: right;
}

/* Datum (rechts, unter Absender) */
.datum-zeile {
    position: absolute;
    top: 50mm;
    right: 20mm;
    font-size: 11pt;
    text-align: right;
}

/* Empfänger im Sichtfenster (DIN 5008: 20mm von links, 45mm von oben) */
.empfaenger-block {
    position: absolute;
    top: 45mm;
    left: 20mm;
    width: 85mm;
    min-height: 45mm;
}

.empfaenger-titel {
    font-size: 9pt;
    margin-bottom: 3mm;
    color: #666;
}

.empfaenger-adresse {
    font-size: 12pt;
    line-height: 1.3;
    font-weight: normal;
}

/* Betreff und Brieftext beginnen bei 105mm von oben */
.betreff-zeile {
    position: absolute;
    top: 105mm;
    left: 25mm;
    right: 20mm;
    font-weight: bold;
    font-size: 12pt;
}

.brief-text {
    position: absolute;
    top: 125mm;
    left: 25mm;
    right: 20mm;
    text-align: justify;
    font-size: 12pt;
    line-height: 1.5;
}

.brief-text p {
    margin-bottom: 12pt;
}

/* Unterschriftenplatz */
.unterschrift-platz {
    margin-top: 30mm;
    width: 60mm;
    text-align: left;
}

.unterschrift-linie {
    border-bottom: 1px solid #000;
    min-height: 15mm;
    display: flex;
    align-items: end;
    padding-bottom: 2mm;
    font-size: 11pt;
    margin-bottom: 3mm;
}

/* Print-spezifische Stile */
@media print {
    .din-brief {
        width: 210mm;
        height: 297mm;
        margin: 0;
        padding: 25mm 20mm;
        page-break-after: auto;
    }
    
    @page {
        size: A4;
        margin: 0;
    }
}

.kuendigungsgenerator-result {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 30px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.kuendigungsgenerator-result h3 {
    color: #ffffff;
    text-align: center;
    margin-bottom: 30px;
}

/* Responsive Anpassungen */
@media (max-width: 768px) {
    .kuendigungsgenerator-container {
        padding: 20px 15px;
    }
    
    .kuendigungsgenerator-header h1 {
        font-size: 2rem;
    }
    
    .kuendigungsgenerator-form {
        padding: 24px;
    }
    
    .kuendigungsgenerator-form-row {
        flex-direction: column;
        gap: 20px;
        margin-bottom: 20px;
    }
    
    .kuendigungsgenerator-form-group.kuendigungsgenerator-form-group-small {
        width: 100%;
        min-width: auto;
    }
    
    .kuendigungsgenerator-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .kuendigungsgenerator-actions .kuendigungsgenerator-button {
        width: 100%;
        max-width: 300px;
        margin-bottom: 10px;
    }
    
    .kuendigungsgenerator-letter {
        padding: 16px;
        font-size: 14px;
        max-height: 500px;
    }
}

@media (max-width: 480px) {
    .kuendigungsgenerator-header h1 {
        font-size: 1.8rem;
    }
    
    .kuendigungsgenerator-form {
        padding: 20px;
        border-radius: 12px;
    }
    
    .kuendigungsgenerator-form-group input,
    .kuendigungsgenerator-form-group textarea {
        padding: 14px 16px;
        font-size: 16px; /* Verhindert Zoom auf iOS */
        border-radius: 10px;
    }
    
    .kuendigungsgenerator-form-group {
        margin-bottom: 20px;
    }
}

@media (min-width: 769px) {
    /* Desktop-spezifische Optimierungen */
    .kuendigungsgenerator-form-row {
        align-items: flex-end;
    }
    
    .kuendigungsgenerator-form-row:first-child .kuendigungsgenerator-form-group {
        flex: 1;
    }
    
    .kuendigungsgenerator-form-row:nth-child(2) .kuendigungsgenerator-form-group:first-child {
        flex: 2;
    }
}
