/*
    Zusätzliche Optik für die Account-/Login-Seiten der RCL Atlas.Auth.Identity.UI.
    Wird ausschließlich vom _IdentityLayout geladen und passt die für Bootstrap 5
    geschriebenen RCL-Seiten an MyScouts gewohnten Login-Look an – OHNE die RCL zu
    verändern. Alles auf den Layout-Wrapper #layoutAuthentication gescoped, damit die
    restliche App unberührt bleibt.
*/

/* Sticky-Footer + heller Seitenhintergrund (Karte hebt sich weiß ab). */
html, body {
    height: 100%;
}

#layoutAuthentication {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: #eaeef6;
}

#layoutAuthentication_content {
    flex: 1 0 auto;
}

#layoutAuthentication_footer {
    flex-shrink: 0;
    padding: 1rem 0;
}

/* Footer-Links dezent grau (statt BS5-Blau). */
#layoutAuthentication_footer a {
    color: #6c757d;
    text-decoration: none;
}

#layoutAuthentication_footer a:hover {
    text-decoration: underline;
}

/* Karte: weiche Ecken, Kopf-/Trennlinien-Streifen sauber beschnitten. */
#layoutAuthentication .card {
    border-radius: .5rem;
    overflow: hidden;
}

/* Formular über die volle Kartenbreite (RCL rendert es in einer schmalen .col-md-4). */
#layoutAuthentication .account-page .col-md-4 {
    flex: 0 0 100%;
    max-width: 100%;
}

/*
    Karten-Kopf: "Anmelden" als eigener, dezent getönter Streifen über die volle
    Kartenbreite (negative Margin gegen das .card-body-Padding p-4 = 1.5rem) mit
    Trennlinie darunter. Der Untertitel (h2) steht darunter auf weißem Grund.
*/
#layoutAuthentication .account-page .page-header h1 {
    margin: -1.5rem -1.5rem 0;
    padding: 1.1rem 1.5rem;
    background-color: #f6f7f9;
    border-bottom: 1px solid #e3e6ea;
    font-size: 1.6rem;
    font-weight: 300;
    color: #495057;
}

#layoutAuthentication .account-page .page-header h2 {
    margin: 1.5rem 0 1.25rem;
    font-size: .95rem;
    font-weight: 400;
    color: #6c757d;
}

/*
    form-floating -> klassisches Label ÜBER dem Feld (statt schwebend). Vermeidet das
    Überlappen von Label und (auto-)ausgefülltem Wert. Per Flex-Reihenfolge: Label nach
    oben, Eingabefeld in die Mitte, Validierungsmeldung darunter.
*/
#layoutAuthentication .form-floating {
    display: flex;
    flex-direction: column;
    margin-bottom: 1rem;
}

#layoutAuthentication .form-floating > label {
    order: -1;
    position: static;
    height: auto;
    padding: 0 0 .25rem;
    transform: none;
    opacity: 1;
    font-size: .875rem;
    color: #6c757d;
    pointer-events: auto;
}

#layoutAuthentication .form-floating > .form-control {
    height: auto;
    line-height: 1.5;
    padding: .5rem .75rem;
}

/* Platzhalter ausblenden – das Label steht jetzt darüber. */
#layoutAuthentication .form-floating > .form-control::placeholder {
    color: transparent;
}

#layoutAuthentication .form-floating > .text-danger {
    order: 1;
}

/* Eingabefelder hellblau gefüllt (wie im gewohnten MyScout-Login). */
#layoutAuthentication .form-control {
    background-color: #edf1fb;
    border: 1px solid #d8e0f3;
    border-radius: .375rem;
}

#layoutAuthentication .form-control:focus {
    background-color: #edf1fb;
    border-color: #aebde8;
    box-shadow: 0 0 0 .2rem rgba(120, 149, 220, .25);
}

/* "Angemeldet bleiben": etwas Luft zwischen Checkbox und Text. */
#layoutAuthentication .checkbox .form-check-input {
    margin-right: .4rem;
}

/*
    Abschlusszeile: "Kennwort vergessen?" links, "Anmelden" rechts – in einer Zeile.
    Das RCL-Markup rendert den Button (voll­breit, w-100) in einem eigenen div VOR dem
    div mit dem Forgot-Link; per Float werden beide in dieselbe Zeile gebracht.
*/
#layoutAuthentication #account::after {
    content: "";
    display: block;
    clear: both;
}

#layoutAuthentication #account > div:has(> #login-submit) {
    float: right;
    width: auto;
    margin-top: .5rem;
}

#layoutAuthentication #login-submit.w-100 {
    width: auto !important;
    padding-left: 1.9rem;
    padding-right: 1.9rem;
}

#layoutAuthentication #account > div:has(#forgot-password) {
    float: left;
    margin-top: 1rem;
}

#layoutAuthentication #account > div:has(#forgot-password) p {
    margin-bottom: 0;
}

/*
    "Kennwort vergessen?" blau (wie im gewohnten Login-Look) – überschreibt gezielt die
    generelle Orange-Link-Regel aus myscout-orange.css (a { color:#da573b }), die nach
    dieser Datei geladen wird. Höhere Spezifität (2 IDs) gewinnt unabhängig von der
    Ladereihenfolge; nur dieser Link ist betroffen, das übrige Orange-Branding bleibt.
*/
#layoutAuthentication #forgot-password {
    color: #0d6efd;
}

#layoutAuthentication #forgot-password:hover {
    color: #0a58ca;
}

/* Marken-Button (MyScout-Primary #da573b) statt BS5-Blau. */
#layoutAuthentication .btn-primary {
    background-color: #da573b;
    border-color: #da573b;
}

#layoutAuthentication .btn-primary:hover,
#layoutAuthentication .btn-primary:focus,
#layoutAuthentication .btn-primary:active {
    background-color: #c44a30;
    border-color: #c44a30;
}
