/* ==========================================================================
   Optimierte CSS-Definitionen für mitglieder.php (Mitglieder-Login)
   ========================================================================== */


html,
body {
    margin: 0;
    padding: 0;
    background-color: #edf2f6;
}

.login-heading {
    font-family: 'Open Sans', sans-serif !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    color: #1e3a8a !important;
    margin-top: 0 !important;
    margin-bottom: 10px !important;
}

.login-wrapper {
    width: 84%;
    max-width: 400px;
    margin: 20px auto;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    box-sizing: border-box;
}

.login-wrapper #header {
    background: transparent;
    border: none;
    padding: 0 0 20px 0;
    text-align: center;
}

.login-wrapper .header-logos-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 25px;
    margin-bottom: 20px;
    width: 100%;
}

.login-wrapper .header-logos-row img {
    max-height: 110px;
    width: auto;
    object-fit: contain;
}

.login-content {
    background: transparent;
    border: none;
    padding: 0;
    width: 100%;
}

.login-wrapper fieldset.login-fieldset {
    width: 100%;
    max-width: 500px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 25px;
    background: #ffffff;
    margin: 0 auto;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    box-sizing: border-box;
}

.login-wrapper legend {
    font-family: 'Open Sans', sans-serif !important;
    font-weight: 600 !important;
    color: #1e3a8a !important;
    padding: 0 10px !important;
    font-size: 15px !important;
}

.login-wrapper input.full-input {
    width: 100%;
    height: 35px;
    padding: 6px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
    background: #ffffff;
    -webkit-appearance: none; /* Verhindert iOS-Safari Standard-Styling bei Inputs */
}

.login-wrapper input.full-input:focus {
    border-color: #3b82f6;
    outline: none;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.login-wrapper .checkbox-container {
    display: flex;
    align-items: center;
    font-size: 13px;
    color: #475569;
    cursor: pointer;
    margin-bottom: 15px;
}

.login-wrapper .checkbox-container input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin-right: 8px;
    accent-color: #1e3a8a;
}

.login-wrapper .login-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    margin-top: 15px;
    box-sizing: border-box;
}

.login-wrapper .login-actions-top {
    display: flex;
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
}

/* ==========================================================================
   STANDARD-GRÖSSE FÜR TABLETS & DESKTOPS (> 10")
   ========================================================================== */
.login-wrapper .login-actions-top input.knopf {
    flex: 1 1 50%;
    width: 50%;
    background-color: #3b82f6;
    color: #ffffff;
    border: 1px solid #2563eb;
    padding: 9px 14px;
    font-weight: 600;
    font-size: 18px;
    border-radius: 4px;
    cursor: pointer;
    text-align: center;
    box-sizing: border-box;
    transition: background-color 0.2s ease;
    -webkit-appearance: none; /* Verhindert Safari iOS Button-Verlauf */
}

.login-wrapper .login-actions-top input.knopf:hover {
    background-color: #1d4ed8;
}

.login-wrapper .login-actions > input.knopf.knopf-startseite {
    display: block;
    width: 100%;
    min-width: 100%;
    flex: none;
    background-color: #ffffff;
    color: #ef4444;
    border: 1px solid #fca5a5;
    padding: 9px 14px;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    text-align: center;
    box-sizing: border-box;
    margin: 0;
    transition: background-color 0.2s ease;
    -webkit-appearance: none; /* Verhindert Safari iOS Button-Verlauf */
}

.login-wrapper .login-actions > input.knopf.knopf-startseite:hover {
    background-color: #fef2f2;
}


/* ==========================================================================
   Spezieller Hinweis-Kasten für Download / Fehler (passend zum Login-Design)
   ========================================================================== */
.login-wrapper .login-notice-box {
    font-family: 'Open Sans', sans-serif;
    background-color: #fff5f5;
    border: 1px solid #feb2b2;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 20px;
    box-sizing: border-box;
}

.login-wrapper .login-notice-heading {
    font-family: 'Open Sans', sans-serif;
    font-size: 16px;
    color: #c53030;
    margin-top: 0;
    margin-bottom: 8px;
    font-weight: 700;
}

.login-wrapper .login-notice-text {
    font-family: 'Open Sans', sans-serif;
    color: #9b2c2c;
    font-size: 13.5px;
    font-weight: normal;
    line-height: 1.5;
    margin: 0;
    text-align: justify;
}

/* Standard-Zustand (Leer / Neutral): Hellgrau */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
select,
textarea {
    background-color: #f3f4f6 !important;
    border: 1px solid #cbd5e1 !important;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

/* Korrekt ausgefüllt / Gültig: Hellgrün */
input.is-valid,
input[type="email"]:valid:not(:placeholder-shown),
input[type="text"]:valid:not(:placeholder-shown),
input[type="password"]:valid:not(:placeholder-shown),
input[type="date"]:valid {
    background-color: #d1fae5 !important; /* Hellgrün */
    border-color: #16a34a !important;    /* Grüner Rand */
}

/* Fehlerhafter Zustand: Rot */
input.is-invalid {
    background-color: #fef2f2 !important; /* Hellrot */
    border-color: #dc2626 !important;    /* Roter Rand */
}

/* ==========================================================================
   SPEZIAL-ANPASSUNG FÜR HANDYS IM HOCHFORMAT (bis max. 450px Breite)
   ========================================================================== */
@media screen and (max-width: 450px) {
    .login-wrapper {
        width: 95%;
    }
    
    .login-wrapper fieldset.login-fieldset {
        padding: 15px; /* Etwas weniger Innenabstand, um Platz zu sparen */
    }

    .login-wrapper .login-actions-top input.knopf {
        padding: 8px 4px;     /* Schmälerer Innenabstand */
        font-size: 11.5px;    /* Kleinere Schrift, damit "Passwort vergessen" perfekt reinpasst */
        white-space: nowrap;  /* Verhindert harten Umbruch */
    }
}

/* ==========================================================================
   ANPASSUNG FÜR GROSSE TABLETS & DESKTOPS (> 900px / ab 12")
   ========================================================================== */
@media screen and (min-width: 900px) {
    .login-wrapper {
        max-width: 560px; /* Formular wird deutlich breiter auf großen Bildschirmen */
    }

    .login-wrapper fieldset.login-fieldset {
        max-width: 560px;
        padding: 35px;    /* Mehr Luft und Innenabstand */
    }

    .login-heading {
        font-size: 24px !important; /* Größere Überschrift */
    }

    .login-wrapper input.full-input {
        height: 42px;     /* Höhere, angenehmere Eingabefelder */
        font-size: 15px;  /* Größere Schrift in den Feldern */
        padding: 8px 14px;
    }

    .login-wrapper legend {
        font-size: 17px !important;
    }

    .login-wrapper .checkbox-container {
        font-size: 15px;  /* Größerer Checkbox-Text */
    }

    .login-wrapper .login-actions-top input.knopf,
    .login-wrapper .login-actions > input.knopf.knopf-startseite {
        padding: 12px 20px; /* Größere, griffigere Buttons */
        font-size: 16px;
    }
}

