/**
 * KantineConnect — Login-Branding
 * Version: 6.2
 *
 * Hinweis: Backdrop-Filter der Login-Box ist FEST auf 16px (siehe Briefing).
 * Background-Blur ist konfigurierbar via Settings (kc_login_background_blur).
 */

/* ========== Body / Hintergrund ========== */
body.login {
    background: linear-gradient(135deg, #0c4a6e 0%, #0284c7 50%, #0369a1 100%);
    font-family: 'Inter', 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    min-height: 100vh;
    position: relative;
    background-color: transparent;
}

/* Hintergrundbild-Layer (::before) — bekommt den Blur, nicht der Body */
body.login::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    transform: scale(1.05);
    transform-origin: center center;
}

/* Dunkler Overlay (::after) — über dem Bild, unter dem Inhalt */
body.login::after {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.35);
    z-index: 0;
    pointer-events: none;
}

body.login > * {
    position: relative;
    z-index: 1;
}

/* ========== Logo-Bereich (Original WP-Logo komplett verstecken) ========== */
/* Wir rendern das Logo selbst im login_message (siehe class-login-branding.php),
   damit es UNTER der "Willkommen bei"-Zeile erscheint und nicht darüber. */
#login h1 {
    display: none !important;
}

/* ========== Title-Block: "Willkommen bei" → Logo → Untertitel ========== */
.kc-login-titleblock {
    text-align: center;
    margin-bottom: 16px;
    padding: 0 8px;
}
.kc-login-greeting {
    font-size: 18px;
    color: #ffffff;
    font-weight: 600;
    letter-spacing: 0.3px;
    margin-bottom: 14px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}
.kc-login-logo {
    margin-bottom: 14px;
}
.kc-login-logo-link,
.kc-login-logo-fallback {
    display: inline-block;
    text-decoration: none;
    border: none;
    outline: none;
}
.kc-login-logo-link:focus,
.kc-login-logo-fallback:focus {
    box-shadow: none !important;
    outline: none !important;
}
.kc-login-logo-img {
    max-width: 320px;
    max-height: 100px;
    width: auto;
    height: auto;
    display: block;
    margin: 0 auto;
}
.kc-login-logo-fallback {
    font-size: 28px;
    color: #ffffff;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
.kc-login-subtitle {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 400;
    line-height: 1.4;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}
.kc-login-subtitle::before {
    content: "";
}

/* ========== Login-Box (Glasmorphism) ========== */
#loginform,
#registerform,
#lostpasswordform {
    background: rgba(255, 255, 255, 0.78) !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    border-radius: 14px !important;
    padding: 32px 28px !important;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.18),
        0 2px 8px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.5) !important;
    backdrop-filter: blur(16px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(16px) saturate(180%) !important;
}

/* ========== Eingabefelder ========== */
.login form .input,
.login input[type="text"],
.login input[type="password"],
.login input[type="email"] {
    border: 1px solid rgba(203, 213, 225, 0.8) !important;
    border-radius: 8px !important;
    background: rgba(255, 255, 255, 0.85) !important;
    padding: 10px 12px !important;
    font-size: 14px !important;
    color: #0f172a !important;
}
.login form .input:focus,
.login input[type="text"]:focus,
.login input[type="password"]:focus,
.login input[type="email"]:focus {
    border-color: #0ea5e9 !important;
    background: white !important;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.18) !important;
    outline: none !important;
}

/* Labels & Checkbox */
.login label {
    color: #1e293b !important;
    font-size: 13px !important;
}
.login .forgetmenot label {
    color: #334155 !important;
}

/* ========== Submit-Button (Plugin-Sky-Blue) ========== */
.wp-core-ui .button-primary,
#wp-submit {
    background: #0ea5e9 !important;
    border-color: #0ea5e9 !important;
    color: #ffffff !important;
    text-shadow: none !important;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.25) !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    padding: 8px 20px !important;
    height: auto !important;
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease !important;
}
.wp-core-ui .button-primary:hover,
#wp-submit:hover {
    background: #0284c7 !important;
    border-color: #0284c7 !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 15px rgba(14, 165, 233, 0.35) !important;
}
.wp-core-ui .button-primary:focus,
#wp-submit:focus {
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.3) !important;
    outline: none !important;
}

/* ========== Links unter der Login-Box ========== */
#nav,
#backtoblog {
    text-align: center !important;
    padding: 0 8px !important;
    margin: 16px 0 0 0 !important;
}
#nav a,
#backtoblog a {
    color: rgba(255, 255, 255, 0.9) !important;
    text-decoration: none !important;
    font-size: 13px !important;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3) !important;
}
#nav a:hover,
#backtoblog a:hover {
    color: #ffffff !important;
    text-decoration: underline !important;
}

/* ========== Sprach-Auswahl-Block (falls eingeblendet) ========== */
.language-switcher {
    text-align: center !important;
    margin-top: 16px !important;
}

/* ========== Mobile ========== */
@media (max-width: 480px) {
    #loginform,
    #registerform,
    #lostpasswordform {
        padding: 20px 16px !important;
    }
    .kc-login-greeting {
        font-size: 16px;
        margin-bottom: 10px;
    }
    .kc-login-subtitle {
        font-size: 12px;
    }
    .kc-login-logo-img {
        max-height: 70px;
        max-width: 240px;
    }
    .kc-login-logo-fallback {
        font-size: 22px;
    }
}
