/* Cloudflare Turnstile bottom dock (register) */
body.page-register .login-turnstile-host-placeholder {
    display: none !important;
}

/* Turnstile: Footer erst nach Start der Prüfung; Host bleibt off-screen lauffähig */
body.page-register .login-cf-bottom-dock.is-idle {
    background-image: none;
    min-height: 0;
}

body.page-register .login-cf-bottom-dock.is-idle .login-cf-trust-footer-host {
    display: none !important;
}

body.page-register .login-cf-bottom-dock {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    /* Desktop: über Seiten-Nav; Mobile: unter Wizard-Buttons (siehe Media Query unten) */
    z-index: 10050;
    width: 100%;
    max-width: none;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-end;
    gap: 0;
    box-sizing: border-box;
    margin: 0;
    padding: 0 0 env(safe-area-inset-bottom, 0px);
    pointer-events: none;
    background-color: transparent;
    background-image: linear-gradient(
        to top,
        rgba(244, 129, 32, 0.34) 0%,
        rgba(244, 129, 32, 0.12) 36%,
        rgba(244, 129, 32, 0) 78%,
        rgba(244, 129, 32, 0) 100%
    );
    background-size: 100% 50px;
    background-position: center bottom;
    background-repeat: no-repeat;
}

body.page-register .login-cf-bottom-dock.is-verified {
    background-size: 100% 44px;
    background-image: linear-gradient(
        to top,
        rgba(16, 185, 129, 0.36) 0%,
        rgba(16, 185, 129, 0.14) 40%,
        rgba(16, 185, 129, 0) 78%,
        rgba(16, 185, 129, 0) 100%
    );
}

body.page-register .login-cf-bottom-dock.is-checking {
    visibility: visible;
    background-size: 100% 44px;
}

body.page-register .login-cf-bottom-dock.is-failed {
    background-size: 100% 44px;
    background-image: linear-gradient(
        to top,
        rgba(220, 53, 69, 0.28) 0%,
        rgba(220, 53, 69, 0.1) 40%,
        rgba(220, 53, 69, 0) 78%,
        rgba(220, 53, 69, 0) 100%
    );
}

body.page-register .login-cf-bottom-dock > * {
    pointer-events: auto;
}

body.page-register .login-turnstile-host-wrap,
body.page-register .login-turnstile-host-wrap--offscreen {
    position: fixed;
    left: 50%;
    bottom: max(calc(env(safe-area-inset-bottom, 0px) + 40px), 40px);
    transform: translateX(-50%);
    width: min(304px, calc(100vw - 24px));
    height: 70px;
    margin: 0;
    padding: 0;
    overflow: visible;
    opacity: 0.01;
    pointer-events: auto;
    z-index: 10060;
    box-sizing: border-box;
}

body.page-register .login-cf-bottom-dock.is-awaiting-check .login-turnstile-host-wrap.is-visible,
body.page-register .login-cf-bottom-dock.is-awaiting-check .login-turnstile-host-wrap:not([hidden]) {
    display: flex;
}

body.page-register #login-turnstile-host {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 65px;
}

body.page-register #login-turnstile-host iframe {
    margin-left: auto;
    margin-right: auto;
}

body.page-register .login-cf-bottom-dock.is-verified .login-turnstile-host-wrap,
body.page-register .login-cf-bottom-dock.is-awaiting-check.is-verified .login-turnstile-host-wrap {
    display: none !important;
    visibility: hidden;
    height: 0;
    min-height: 0;
    padding: 0;
    overflow: hidden;
    pointer-events: none;
}

body.page-register .login-cf-bottom-dock.is-awaiting-check .login-cf-trust-footer-host {
    display: none !important;
}

body.page-register .login-cf-bottom-dock.is-checking .login-cf-trust-footer,
body.page-register .login-cf-bottom-dock.is-verified .login-cf-trust-footer,
body.page-register .login-cf-bottom-dock.is-failed .login-cf-trust-footer {
    display: flex !important;
}

body.page-register .login-cf-bottom-dock.is-checking .login-cf-trust-footer__text {
    color: #8a4b12;
    font-weight: 500;
}

body.page-register .login-cf-bottom-dock .login-cf-trust-footer.is-failed .login-cf-trust-footer__text {
    color: #b42318;
    font-weight: 600;
}
body.page-register .login-cf-trust-hint {
    margin: 6px 0 0;
    padding: 0 4px;
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: #64748b;
    line-height: 1.35;
    min-height: 1.35em;
}

body.page-register .login-cf-trust-footer-host {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: stretch;
}

button.login-cf-trust-footer.login-cf-trust-hint {
    appearance: none;
    -webkit-appearance: none;
    border: none;
    background: transparent;
    cursor: default;
    text-align: center;
    outline-offset: 2px;
    font-family: inherit;
    opacity: 1;
    -webkit-text-fill-color: unset;
}

button.login-cf-trust-footer.login-cf-trust-hint:disabled {
    opacity: 1;
}

body.page-register .login-cf-bottom-dock.is-failed button.login-cf-trust-footer:not(:disabled) {
    cursor: pointer;
}

body.page-register .login-cf-bottom-dock.is-failed button.login-cf-trust-footer:not(:disabled):hover {
    background: rgba(180, 35, 24, 0.06);
}

body.page-register .login-cf-bottom-dock.is-failed button.login-cf-trust-footer:not(:disabled):focus-visible {
    box-shadow: inset 0 0 0 2px rgba(180, 35, 24, 0.35);
    border-radius: 6px;
}

body.page-register .login-cf-trust-footer__retry-icon {
    display: none;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    line-height: 0;
    color: #b42318;
}

body.page-register .login-cf-trust-footer.is-failed .login-cf-trust-footer__retry-icon {
    display: inline-flex;
}

body.page-register .login-cf-trust-footer__retry-svg {
    display: block;
}

body.dark-mode.page-register .login-cf-trust-footer.is-failed .login-cf-trust-footer__retry-icon {
    color: #fca5a5;
}

/* Trust-Text nach Prüfung: volle Breite, Gradient kommt vom Dock */
body.page-register .login-cf-bottom-dock .login-cf-trust-footer {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
    margin: 0;
    padding: 10px 0 calc(10px + env(safe-area-inset-bottom, 0px));
    justify-content: center;
    align-items: center;
    border-radius: 0;
    background: transparent;
}

body.page-register .login-cf-bottom-dock .login-cf-trust-footer.is-verified.is-text-only {
    padding-top: 8px;
}

body.page-register .login-cf-bottom-dock .login-cf-trust-footer.is-verified.is-text-only .login-cf-trust-footer__mark {
    display: none;
}

body.page-register .login-cf-bottom-dock .login-cf-trust-footer .login-cf-trust-footer__text {
    text-shadow:
        0 0 3px #fff,
        0 0 8px #fff,
        0 0 14px #fff,
        0 1px 0 #fff,
        0 -1px 0 #fff,
        1px 0 0 #fff,
        -1px 0 0 #fff;
}

body.page-register .login-cf-bottom-dock .login-cf-trust-footer .login-cf-trust-footer__mark {
    filter: drop-shadow(0 0 2px #fff) drop-shadow(0 0 6px #fff) drop-shadow(0 0 10px #fff);
}

body.page-register .login-cf-trust-footer__inner {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    max-width: 100%;
}

body.page-register .login-cf-trust-footer__mark {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    line-height: 0;
}

body.page-register .login-cf-trust-footer__cloud {
    display: block;
}

body.page-register .login-cf-trust-footer__text {
    text-align: left;
    min-width: 0;
    display: inline;
    font-weight: 600;
    color: #f48120;
}

body.page-register .login-cf-trust-footer.is-verified .login-cf-trust-footer__text {
    color: #0f766e;
}

body.dark-mode.page-register .login-cf-trust-footer .login-cf-trust-footer__text {
    color: #f48120;
}

body.dark-mode.page-register .login-cf-trust-footer.is-verified .login-cf-trust-footer__text {
    color: #5eead4;
}

body.dark-mode.page-register .login-cf-bottom-dock.is-verified {
    background-image: linear-gradient(
        to top,
        rgba(45, 212, 191, 0.32) 0%,
        rgba(45, 212, 191, 0.12) 40%,
        rgba(45, 212, 191, 0) 78%,
        rgba(45, 212, 191, 0) 100%
    );
}

body.page-register .login-cf-bottom-dock .login-cf-trust-footer[hidden] {
    display: none !important;
}

body.page-register .login-cf-trust-hint.is-verified {
    color: #0f766e;
    font-weight: 700;
}

body.dark-mode.page-register .login-cf-trust-hint {
    color: #94a3b8;
}

body.dark-mode.page-register .login-cf-trust-hint.is-verified {
    color: #5eead4;
}

/* Mobile Register: Cloudflare-Badge unten, Nav-Buttons darüber */
@media (max-width: 1024px) {
    body.page-register {
        --register-cf-dock-height: 44px;
    }

    body.page-register .login-cf-bottom-dock {
        z-index: 10070;
    }

    /* Wie Desktop: Widget unsichtbar/off-screen — nur Footer-Text sichtbar */
    body.page-register .login-turnstile-host-wrap,
    body.page-register .login-turnstile-host-wrap--offscreen {
        left: -10000px;
        bottom: auto;
        top: 0;
        transform: none;
        opacity: 0.01;
        pointer-events: auto;
        z-index: 0;
    }
}