
/* ==========================================
   THD – Innovative-Lehre-Hub
   Login-Seite mit Campus-Hintergrund
   ========================================== */

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    background-color: #0077cc;
    background-image: linear-gradient(
        rgba(0, 35, 70, 0.08),
        rgba(0, 35, 70, 0.08)
    ), url('/img/erweiterungsbau-dit.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    display: flex;
    min-height: 100vh;
    min-height: 100dvh;
    justify-content: center;
    align-items: center;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 24px 16px;
    overflow-x: hidden;
}

/* ==========================================
   Login-Karte
   ========================================== */

.login-card {
    background: rgba(255, 255, 255, 0.96);
    padding: 35px 40px;
    border-radius: 14px;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.25);
    text-align: center;
    width: 400px;
    max-width: 100%;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    animation: loginSlideDown 1.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Animation von ganz oben bis zur Mitte */
@keyframes loginSlideDown {
    0% {
        opacity: 0;
        transform: translateY(-100vh);
    }
    30% {
        opacity: 1;
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================
   Überschrift
   ========================================== */

h2 {
    margin-top: 0;
    color: #333;
    margin-bottom: 20px;
    font-size: 24px;
    font-weight: 600;
}

/* ==========================================
   Formularbeschriftungen
   ========================================== */

label {
    display: block;
    margin-bottom: 15px;
    font-weight: 600;
    color: #333;
    text-align: left;
}

/* ==========================================
   Eingabefelder
   ========================================== */

input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #0077cc;
    border-radius: 6px;
    font-size: 16px;
    margin-top: 5px;
    box-sizing: border-box;
    background-color: #fff;
    transition: border-color 0.3s, box-shadow 0.3s;
}

input[type="text"]:focus,
input[type="password"]:focus {
    outline: none;
    border-color: #004a99;
    box-shadow: 0 0 0 3px rgba(0, 119, 204, 0.12);
}

/* ==========================================
   Allgemeine Buttons
   ========================================== */

button {
    margin-top: 20px;
    background-color: #0077cc;
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
    width: 100%;
}

button:hover {
    background-color: #005fa3;
    transform: translateY(-2px);
}

button:active {
    transform: translateY(0);
}

button:focus-visible,
.login-sso:focus-visible,
.login-ldap-knopf:focus-visible {
    outline: 3px solid #004a99;
    outline-offset: 3px;
}

/* ==========================================
   Alert-Meldungen
   ========================================== */

.alert {
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 15px;
    font-size: 14px;
    text-align: left;
    line-height: 1.5;
}

/* Fehlermeldungen */
.alert-error {
    background-color: #ffe6e6;
    color: #d63031;
    border: 1px solid #fab1a0;
}

/* Informationsmeldungen */
.alert-info {
    background-color: #e3f2fd;
    color: #004a99;
    border: 1px solid #90caf9;
}

/* ==========================================
   SSO – OpenID Connect
   ========================================== */

.login-sso {
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin-top: 6px;
    padding: 13px 30px;
    border: none;
    border-radius: 8px;
    color: #fff;
    background-color: #0077cc;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: background-color 0.3s, transform 0.2s;
}

.login-sso:hover {
    background-color: #005fa3;
    transform: translateY(-2px);
}

.login-sso:active {
    transform: translateY(0);
}

.login-sso-erklaerung {
    margin: 10px 0 18px;
    font-size: 13px;
    color: #666;
    line-height: 1.5;
}

/* ==========================================
   LDAP – Alternative Anmeldung
   ========================================== */

.login-ldap {
    border-top: 1px solid #e5e7eb;
    padding-top: 14px;
    text-align: left;
}

.login-ldap-knopf {
    display: block;
    list-style: none;
    cursor: pointer;
    padding: 10px 14px;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    color: #374151;
    background: #fff;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    transition: border-color 0.3s, color 0.3s;
}

.login-ldap-knopf::-webkit-details-marker {
    display: none;
}

.login-ldap-knopf::marker {
    content: "";
}

.login-ldap-knopf:hover {
    border-color: #0077cc;
    color: #0077cc;
}

.login-ldap[open] .login-ldap-knopf {
    border-color: #0077cc;
    color: #0077cc;
    margin-bottom: 16px;
}

.login-ldap .login-formular button {
    margin-top: 10px;
}

/* ==========================================
   Hinweise zur Anmeldung
   ========================================== */

.login-sso-hinweis {
    margin: 0 0 14px;
    font-size: 13px;
    color: #555;
    text-align: left;
    line-height: 1.6;
}

.login-sso-hinweis code {
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    padding: 1px 5px;
    user-select: all;
}

/* ==========================================
   Responsive – Tablets
   ========================================== */

@media (max-width: 768px) {
    body {
        background-position: center center;
        padding: 20px;
    }

    .login-card {
        width: 380px;
        max-width: 100%;
        padding: 30px;
    }
}

/* ==========================================
   Responsive – Smartphones
   ========================================== */

@media (max-width: 480px) {
    body {
        padding: 16px;
        background-position: center center;
    }

    .login-card {
        width: 100%;
        padding: 25px 22px;
        border-radius: 12px;
    }

    h2 {
        font-size: 22px;
    }

    .login-sso {
        padding: 12px 16px;
    }

    button {
        padding: 12px 16px;
    }
}

/* ==========================================
   Kleine Bildschirmhöhen
   ========================================== */

@media (max-height: 600px) {
    body {
        align-items: flex-start;
    }

    .login-card {
        margin: auto 0;
    }
}

/* ==========================================
   Barrierefreiheit
   ========================================== */

@media (prefers-reduced-motion: reduce) {
    .login-card {
        animation: none;
    }

    button,
    .login-sso {
        transition: none;
    }

    button:hover,
    .login-sso:hover {
        transform: none;
    }
}
