/* =========================================================
   FUH Auth UI (Login, Registrierung, Passwort vergessen)
   Bereinigt: redundantes zusammengeführt, Reihenfolge klar
   ========================================================= */

/* ---------- Background + Overlay ---------- */
body.fuh-auth{
    min-height: 100vh;
    margin: 0;
    background-image: url("/files/fuh/ui/login-bg.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    /* Variablen (angelehnt an KiWiWo) */
    --card-bg: rgba(10, 55, 85, 0.18);
    --card-border: rgba(120, 210, 255, 0.28);
    --card-shadow: 0 22px 70px rgba(0, 0, 0, 0.35);
    --card-radius: 26px;

    --field-bg: rgba(10, 30, 50, 0.35);
    --field-border: rgba(140, 220, 255, 0.28);

    --text: #eaf7ff;
}

body.fuh-auth::before{
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.25);
    pointer-events: none;
    z-index: 0;
}

/* Theme-Hintergründe neutralisieren */
body.fuh-auth #wrapper,
body.fuh-auth #container,
body.fuh-auth #main,
body.fuh-auth #main .inside{
    background: transparent !important;
}

/* Karte im Viewport zentrieren */
body.fuh-auth #main .inside{
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

/* ---------- Auth Card (Module) ---------- */
body.fuh-auth .mod_login,
body.fuh-auth .mod_registration,
body.fuh-auth .mod_lostPassword{
    position: relative;
    z-index: 1;

    /* “spätere Regeln obsiegen” -> finale Breite wie bei dir */
    width: min(560px, 94vw) !important;
    max-width: none !important;

    margin: 0 auto;
    padding: 26px 26px 22px;

    border-radius: var(--card-radius);
    background: var(--card-bg);
    border: 2px solid rgba(120, 210, 255, 0.38);

    box-shadow:
            0 22px 70px rgba(0,0,0,0.35),
            0 0 26px rgba(80, 220, 255, 0.18),
            inset 0 0 0 1px rgba(255,255,255,0.10);

    backdrop-filter: blur(10px);
    color: var(--text);
    box-sizing: border-box;
}

/* Glow links/rechts */
body.fuh-auth .mod_login::before,
body.fuh-auth .mod_login::after,
body.fuh-auth .mod_registration::before,
body.fuh-auth .mod_registration::after,
body.fuh-auth .mod_lostPassword::before,
body.fuh-auth .mod_lostPassword::after{
    content: "";
    position: absolute;
    top: 14px;
    bottom: 14px;
    width: 26px;
    border-radius: 26px;
    pointer-events: none;

    background: rgba(80, 220, 255, 0.55);
    filter: blur(14px);
    opacity: 1;
}

body.fuh-auth .mod_login::before,
body.fuh-auth .mod_registration::before,
body.fuh-auth .mod_lostPassword::before{
    left: -18px;
    box-shadow: 0 0 40px rgba(80, 220, 255, 0.65);
}

body.fuh-auth .mod_login::after,
body.fuh-auth .mod_registration::after,
body.fuh-auth .mod_lostPassword::after{
    right: -18px;
    box-shadow: 0 0 40px rgba(80, 220, 255, 0.65);
}

/* ---------- Form Layout ---------- */
body.fuh-auth .mod_login form,
body.fuh-auth .mod_registration form,
body.fuh-auth .mod_lostPassword form{
    max-width: none !important; /* Theme darf nicht verengen */
    margin: 0 auto;
}

body.fuh-auth .mod_login form .widget,
body.fuh-auth .mod_registration form .widget,
body.fuh-auth .mod_lostPassword form .widget{
    position: relative;
    margin: 0 0 14px 0;
}

/* Inputs */
body.fuh-auth .mod_login input[type="text"],
body.fuh-auth .mod_login input[type="email"],
body.fuh-auth .mod_login input[type="password"],
body.fuh-auth .mod_registration input[type="text"],
body.fuh-auth .mod_registration input[type="email"],
body.fuh-auth .mod_registration input[type="password"],
body.fuh-auth .mod_registration input[type="tel"],
body.fuh-auth .mod_registration input[type="number"],
body.fuh-auth .mod_registration input[type="url"],
body.fuh-auth .mod_lostPassword input[type="text"],
body.fuh-auth .mod_lostPassword input[type="email"],
body.fuh-auth .mod_lostPassword input[type="password"]{
    width: 100% !important;
    box-sizing: border-box !important;

    border-radius: 14px !important;
    border: 1px solid var(--field-border) !important;
    background: var(--field-bg) !important;
    color: var(--text) !important;

    padding: 12px 14px 12px 44px !important; /* Platz für linkes Icon */
    font-size: 16px !important;
    outline: none !important;
}

body.fuh-auth input::placeholder{
    color: rgba(234, 247, 255, 0.7);
}

/* ---------- Left Icons (User + Lock) ---------- */
body.fuh-auth .mod_login form .widget::before,
body.fuh-auth .mod_registration form .widget::before,
body.fuh-auth .mod_lostPassword form .widget::before{
    content: "";
    position: absolute;
    left: 14px;
    top: 50%;
    width: 18px;
    height: 18px;
    transform: translateY(-50%);
    opacity: 0.9;

    background-repeat: no-repeat;
    background-size: 18px 18px;

    /* Default: User */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23cfefff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 21a8 8 0 0 0-16 0'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E");
}

/* Passwort-Icon (Schloss) */
body.fuh-auth .mod_login form .widget.widget-password::before,
body.fuh-auth .mod_login form .widget-password::before,
body.fuh-auth .mod_registration form .widget.widget-password::before,
body.fuh-auth .mod_registration form .widget-password::before,
body.fuh-auth .mod_lostPassword form .widget.widget-password::before,
body.fuh-auth .mod_lostPassword form .widget-password::before{
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23cfefff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='11' width='18' height='11' rx='2'/%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4'/%3E%3C/svg%3E");
}

/* Keine Icons bei Checkbox, Captcha und Submit */
body.fuh-auth .widget.widget-checkbox::before,
body.fuh-auth .widget.widget-captcha::before,
body.fuh-auth .widget.widget-submit::before{
    content: none !important;
    background: none !important;
}

/* Login: Icon-Layer darf Klick auf Auge nicht blockieren */
body.fuh-auth .mod_login .widget-text::before,
body.fuh-auth .mod_login .widget-password::before,
body.fuh-auth .mod_login .widget::before{
    pointer-events: none !important;
}

/* Registrierung: Icon am Input ausrichten, auch wenn Hint/Fehlertext darüber steht */
body.fuh-auth .mod_registration .widget::before{
    top: auto !important;
    bottom: 27px !important;               /* Mitte eines 54px Inputs */
    transform: translateY(50%) !important;
}

/* ---------- Checkbox ---------- */
body.fuh-auth .widget.widget-checkbox,
body.fuh-auth .widget.widget-checkbox fieldset,
body.fuh-auth .widget.widget-checkbox .checkbox_container,
body.fuh-auth .widget.widget-checkbox span{
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
}

/* ---------- Submit Button ---------- */
body.fuh-auth .widget.widget-submit{
    display: flex;
    justify-content: center;
    margin-top: 14px !important;
}

body.fuh-auth button.submit,
body.fuh-auth input[type="submit"]{
    width: auto !important;
    min-width: 220px;

    border: 0;
    border-radius: 12px;
    padding: 12px 26px !important;

    font-size: 14px;
    letter-spacing: 1px;
    text-transform: uppercase;

    color: var(--text);
    cursor: pointer;

    background: linear-gradient(180deg, rgba(20, 140, 210, 0.95), rgba(10, 90, 150, 0.95));
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.25);

    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Button-Icons sicher entfernen */
body.fuh-auth button.submit::before,
body.fuh-auth button.submit::after,
body.fuh-auth input[type="submit"]::before,
body.fuh-auth input[type="submit"]::after{
    content: none !important;
    background: none !important;
}

/* ---------- Links ---------- */
body.fuh-auth a{
    color: rgba(234, 247, 255, 0.95);
    text-decoration: underline;
    text-underline-offset: 3px;
}

body.fuh-auth a:hover{
    text-decoration: none;
}

body.fuh-auth .kiwiwo-authlinks{
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    width: 100%;
    margin-top: 14px;
}

body.fuh-auth .kiwiwo-authlinks a{
    display: inline-block;
    white-space: nowrap;
}

/* (Optional) falls irgendwo noch formfooter genutzt wird */
body.fuh-auth .mod_login .formfooter,
body.fuh-auth .mod_registration .formfooter,
body.fuh-auth .mod_lostPassword .formfooter{
    display: flex;
    justify-content: space-between;
    gap: 14px;
    margin-top: 10px;
    font-size: 14px;
}

/* ---------- Password Toggle (Auge) ---------- */
body.fuh-auth .pw-wrap{
    position: relative;
}

body.fuh-auth .pw-wrap input{
    position: relative;
    z-index: 1;
    padding-right: 56px !important; /* Platz fürs Auge */
}

/* Standard: SVG-Button */
body.fuh-auth .pw-toggle{
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);

    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;

    font-size: 0;                 /* SVG, keine Schrift */
    line-height: 1;

    border: 0;
    background: transparent;
    color: rgba(255,255,255,0.95);
    cursor: pointer;

    z-index: 10 !important;
    pointer-events: auto !important;
}

body.fuh-auth .pw-toggle svg{
    width: 20px;
    height: 20px;
    display: block;
}

body.fuh-auth .pw-toggle:hover{
    color: #ffffff;
    filter: brightness(1.05);
}

/* ---------- Landingpages (Text-Card) ---------- */
body.fuh-auth .fuh-authcard{
    position: relative;
    z-index: 1;

    width: min(560px, 94vw);
    margin: 0 auto;
    padding: 26px 26px 22px;

    border-radius: 26px;
    background: rgba(10, 55, 85, 0.18);
    border: 2px solid rgba(120, 210, 255, 0.28);
    box-shadow: 0 22px 70px rgba(0,0,0,0.35);
    backdrop-filter: blur(10px);

    color: #eaf7ff;
}

/* ---------- Mobile / S20 Fix ---------- */
html, body{
    height: 100%;
    background: #000; /* verhindert weiße Ränder */
}

@media (max-width: 600px){
    body.fuh-auth{
        background-size: cover !important;
        background-position: center top !important;
        background-color: #000 !important;
    }

    body.fuh-auth #main .inside{
        min-height: 100vh;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 14px !important;
    }

    body.fuh-auth .mod_login,
    body.fuh-auth .mod_registration,
    body.fuh-auth .mod_lostPassword{
        width: calc(100vw - 28px) !important;
        max-width: 520px !important;
        margin: 0 !important;
        padding: 18px 16px 16px !important;
        border-radius: 18px !important;
    }

    body.fuh-auth .kiwiwo-authlinks{
        width: 100%;
        display: flex;
        justify-content: space-between;
        gap: 12px;
        margin-top: 12px;
    }

    body.fuh-auth .kiwiwo-authlinks a{
        font-size: 14px;
        white-space: nowrap;
    }
}