/* Spezifisches CSS für Geburtsdatum-Formular */
.birthdate-form-wrapper * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Screen Reader Only - für Barrierefreiheit */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* Birthdate form wrapper positioning */
.birthdate-form-wrapper {
    position: relative;
}

/* Layout für Desktop und Mobil */
.birthdate-form-layout {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.birthdate-form-container {
    background-color: #cbf0d9;
    border-radius: 6px; /* Halbe Rundung */
    padding: 16px; /* Verringertes Padding */
    width: 100%;
    max-width: calc(100vw - 40px); /* Maximale Breite verhindert Überlauf */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin: 0;
    border: 2px solid #88d6c2; /* Hellere, weniger auffällige grüne Farbe */
    outline: none;
    box-sizing: border-box;
}

/* Titel-Stile */
.birthdate-form-title {
    color: #2e7d32;
    font-size: 14px; /* Kleinere Schriftgröße */
    font-weight: 500;
    margin-bottom: 4px;
    text-align: left;
    line-height: 1.4;
    border: none;
    background: none;
    padding: 0;
}

/* Desktop-Titel außerhalb der Box in grau */
.birthdate-form-desktop-title {
    display: none; /* In Media Query unten auf block gesetzt */
    color: #666; /* Graue Schrift */
    margin-bottom: 8px; /* Näher an der Box */
    margin-left: 10px; /* Einrückung nach rechts */
    font-size: 15px; /* Noch kleinere Schriftgröße für Desktop-Titel */
}

/* Mobile-Titel innerhalb der Box in grau */
.birthdate-form-mobile-title {
    display: block; /* In Media Query unten auf none gesetzt */
    color: #666; /* Graue Schrift für mobile Variante */
}

.birthdate-form-inputs {
    display: flex;
    gap: 8px; /* Kleinere Abstände zwischen Eingabefeldern */
    margin-bottom: 0;
    flex-wrap: nowrap;
}

.birthdate-form-input-group {
    flex: 1;
    position: relative;
    margin: 0;
}

.birthdate-form-input-group.birthdate-form-year-input {
    flex: 1.5;
}

.birthdate-form-date-input {
    width: 100% !important;
    height: 56px;
    border: 2px solid #e0e0e0;
    border-radius: 4px; /* Halbe Rundung */
    background-color: white;
    font-size: 18px;
    font-weight: 500;
    text-align: center;
    color: #333; /* Dunkles Grau für bessere Lesbarkeit */
    outline: none;
    transition: border-color 0.2s ease;
    -webkit-appearance: none;
    -moz-appearance: textfield;
    margin: 0;
    padding: 0 8px;
    font-family: inherit;
    line-height: normal;
    vertical-align: baseline;
    box-shadow: none;
    box-sizing: border-box;
}

.birthdate-form-date-input::-webkit-outer-spin-button,
.birthdate-form-date-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Platzhaltertext-Styling */
.birthdate-form-date-input::placeholder {
    color: #999;
    opacity: 1;
}
.birthdate-form-date-input::-webkit-input-placeholder {
    color: #999;
    opacity: 1;
}
.birthdate-form-date-input::-moz-placeholder {
    color: #999;
    opacity: 1;
}
.birthdate-form-date-input:-ms-input-placeholder {
    color: #999;
    opacity: 1;
}

.birthdate-form-date-input:focus {
    border-color: #26a69a;
    box-shadow: 0 0 0 3px rgba(38, 166, 154, 0.25);
    outline: none;
    background-color: #fafafa;
}

.birthdate-form-date-input.birthdate-form-error {
    border-color: #f44336;
    box-shadow: 0 0 0 2px rgba(244, 67, 54, 0.15);
}

.birthdate-form-date-input.birthdate-form-valid {
    border-color: #4caf50;
}

.birthdate-form-submit-button {
    width: 100%;
    height: 56px;
    background-color: #26a69a;
    color: white;
    border: none;
    border-radius: 4px; /* Halbe Rundung */
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
    text-transform: none;
    margin: 0;
    padding: 0;
    font-family: inherit;
    line-height: normal;
    vertical-align: baseline;
    box-shadow: none;
    outline: none;
    box-sizing: border-box;
    /* Link-spezifische Styles für identisches Aussehen */
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.birthdate-form-submit-button:hover:not(:disabled) {
    background-color: #00897b;
}

.birthdate-form-submit-button:disabled {
    background-color: #b0bec5;
    cursor: not-allowed;
}

.birthdate-form-error-message {
    color: #f44336;
    font-size: 13px;
    margin-top: 6px;
    margin-bottom: -6px;
    text-align: center;
    opacity: 0;
    transition: opacity 0.2s ease;
    line-height: 1.3;
    font-weight: normal;
    background: none;
    border: none;
    padding: 0;
}

.birthdate-form-error-message.birthdate-form-show {
    opacity: 1;
}

/* Medium Screen Optimierung (769px - 1200px) */
@media (min-width: 769px) and (max-width: 1200px) {
    .birthdate-form-wrapper {
        max-width: 665px;
        margin: 0 auto;
        padding: 0 20px;
    }

    .birthdate-form-layout {
        flex-direction: row;
        align-items: flex-start;
        gap: 15px;
    }

    .birthdate-form-inputs-container {
        flex: 1;
    }

    .birthdate-form-submit-button {
        width: 250px;
        min-width: 200px;
        align-self: flex-end;
    }

    .birthdate-form-desktop-title {
        display: block;
    }

    .birthdate-form-mobile-title {
        display: none;
    }
}

/* Desktop-Optimierung: Button neben den Eingabefeldern (ab 1201px) */
@media (min-width: 1201px) {
    .birthdate-form-layout {
        flex-direction: row;
        align-items: flex-start;
        gap: 15px; /* Reduzierter Abstand zwischen Button und Eingabefeldern in Desktop */
    }

    .birthdate-form-inputs-container {
        flex: 1;
    }

    .birthdate-form-submit-button {
        width: 280px; /* Breiterer Button */
        min-width: 200px;
        align-self: flex-end;
    }

    .birthdate-form-desktop-title {
        display: block;
    }

    .birthdate-form-mobile-title {
        display: none;
    }
}

/* Mobile Optimierung */
@media (max-width: 768px) {
    .birthdate-form-container {
        padding: 10px 8px; /* Noch kompakteres Padding */
        /*margin: 0 10px;*/
        border-radius: 6px; /* Kleinere Rundung für eleganteres Aussehen */
        max-width: calc(100vw - 20px); /* Verhindert Überlauf auf mobil */
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); /* Subtilerer Schatten */
    }

    .birthdate-form-title {
        font-size: 14px; /* Noch kleinere Schriftgröße */
        text-align: left;
        margin-bottom: 6px; /* Kleinerer Abstand */
        font-weight: 500;
    }

    .birthdate-form-inputs {
        gap: 5px; /* Noch kleinere Abstände zwischen Eingabefeldern */
        margin-bottom: 8px; /* Weiter reduzierter Abstand zum Button */
    }

    .birthdate-form-date-input {
        height: 48px; /* Deutlich kleinere Höhe */
        font-size: 17px; /* Kleinere Schriftgröße */
        border-radius: 4px; /* Kleinere Rundung */
        width: 100% !important;
        border: 1.5px solid #e0e0e0; /* Dünnerer Rahmen */
        padding: 0 6px; /* Weniger Padding */
    }

    .birthdate-form-submit-button {
        height: 48px; /* Gleiche Höhe wie Eingabefelder */
        font-size: 16px; /* Kleinere Schriftgröße */
        border-radius: 4px; /* Kleinere Rundung */
        font-weight: 500; /* Leichtere Schriftgewichtung */
        padding: 0 16px;
    }
}

/* Extra kleine Bildschirme */
@media (max-width: 360px) {
    .birthdate-form-container {
        margin: 0 5px;
        max-width: calc(100vw - 10px); /* Noch weniger Margin für sehr kleine Screens */
        padding: 8px 6px; /* Noch kompakteres Padding für sehr kleine Screens */
    }
    
    .birthdate-form-inputs {
        gap: 4px; /* Noch kleinere Abstände */
    }
    
    .birthdate-form-date-input {
        height: 44px; /* Noch etwas kleiner für sehr kleine Screens */
        font-size: 16px; /* Leicht reduzierte Schriftgröße */
        padding: 0 4px; /* Minimales Padding */
    }
    
    .birthdate-form-submit-button {
        height: 44px; /* Gleiche Höhe wie Eingabefelder */
        font-size: 15px; /* Angepasste Schriftgröße */
        padding: 0 12px;
    }
    
    .birthdate-form-title {
        font-size: 13px; /* Noch kleinere Schriftgröße */
        margin-bottom: 5px;
    }
}
