/* ------------------------------------------------------------------
   wp-login.php (incl. the Two Factor code screen) in the same look as
   the landing page and the /login/ card (css/landing.css).
   Replaces the old snowflake layout in custom-login-styles.css.
   ------------------------------------------------------------------ */

@font-face {
    font-family: "Bricolage Grotesque";
    src: url("../fonts/wl/bricolage-grotesque-latin.woff2") format("woff2");
    font-weight: 200 800;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Nunito";
    src: url("../fonts/wl/nunito-latin.woff2") format("woff2");
    font-weight: 200 1000;
    font-style: normal;
    font-display: swap;
}

body.login {
    --wl-red: #be1622;
    --wl-red-deep: #9e111b;
    --wl-ink: #221b1d;
    --wl-ink-soft: #4a4045;
    --wl-mist: #efedf7;
    --wl-line: #e4e0ec;
    --wl-display: "Bricolage Grotesque", "Nunito", system-ui, sans-serif;
    --wl-body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
    --wl-gradient: linear-gradient(90deg, #be1622 0%, #f39200 45%, #f9b233 100%);

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    padding: 32px 12px;
    box-sizing: border-box;
    background: linear-gradient(155deg, #f8ede4 0%, var(--wl-mist) 42%, var(--wl-mist) 62%, #f3e4ec 100%) fixed;
    font-family: var(--wl-body);
    color: var(--wl-ink-soft);
    -webkit-font-smoothing: antialiased;
}

/* Flexible spacers centre the card but collapse when the page is taller than the window,
   so the top of the card is never cut off (plain justify-content: center would clip it) */
body.login::before,
body.login::after {
    content: "";
    flex: 1 1 0;
}

/* The card */
.login #login {
    position: static;
    width: 100%;
    max-width: 440px;
    margin: 0;
    padding: 40px 36px 32px;
    box-sizing: border-box;
    background: #fff;
    border-radius: 28px;
    box-shadow: 0 30px 60px -30px rgba(34, 27, 29, 0.35), 0 0 0 1px rgba(34, 27, 29, 0.04);
}

/* Logo */
.login h1.wp-login-logo {
    margin: 0 0 28px;
    text-align: left;
}

.login h1.wp-login-logo a {
    display: block;
    width: 96px;
    height: 34px;
    margin: 0;
    background: url("../img/logo_solo.svg") left center / contain no-repeat;
    text-indent: -9999px;
    overflow: hidden;
    outline: none;
    box-shadow: none;
}

/* Forms: no inner box, the card is the box */
.login #login form {
    margin: 0;
    padding: 0 !important; /* OwnID adds 55px !important for its widget, which no longer loads */
    background: none;
    border: none;
    box-shadow: none;
    overflow: visible;
}

.login #login form > p,
.login #login form > div,
.login #login form .user-pass-wrap {
    margin: 0 0 18px;
}

.login label {
    display: block;
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
    color: var(--wl-ink);
}

.login form .input,
.login input[type="text"],
.login input[type="email"],
.login input[type="password"] {
    width: 100%;
    height: 52px;
    margin: 0;
    padding: 0 16px;
    box-sizing: border-box;
    font-family: var(--wl-body);
    font-size: 16px; /* 16px keeps iOS from zooming in on focus */
    color: var(--wl-ink);
    background: #faf9fd;
    border: 1.5px solid var(--wl-line);
    border-radius: 14px;
    box-shadow: none;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.login form .input::placeholder {
    color: #9a929c;
    opacity: 1;
}

.login form .input:focus,
.login input[type="text"]:focus,
.login input[type="password"]:focus {
    background: #fff;
    border-color: var(--wl-red);
    box-shadow: 0 0 0 4px rgba(190, 22, 34, 0.12);
}

/* Password field with the show/hide eye inside */
.login .wp-pwd {
    position: relative;
}

.login .wp-pwd .input {
    padding-right: 52px;
}

.login .button.wp-hide-pw {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 40px;
    height: 40px;
    min-width: 0;
    min-height: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 10px;
    color: #8a8290;
    box-shadow: none;
}

.login .button.wp-hide-pw:hover,
.login .button.wp-hide-pw:focus {
    color: var(--wl-ink);
    background: rgba(34, 27, 29, 0.05);
    box-shadow: none;
}

.login .button.wp-hide-pw .dashicons {
    top: 0;
    width: 20px;
    height: 20px;
}

/* Two Factor: prompt text + one large, spaced code field */
.login .two-factor-prompt {
    margin: 0 0 20px;
    font-size: 15px;
    line-height: 1.55;
    color: var(--wl-ink-soft);
}

.login #authcode,
.login form .input.authcode {
    height: 60px;
    padding: 0 16px;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: 0.3em;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.login #authcode::placeholder {
    font-weight: 400;
    letter-spacing: 0.3em;
}

/* Jetpack's "Beweise deine Menschlichkeit" maths question */
.login #jetpack_protect_answer {
    display: inline-block;
    width: 96px !important;
    height: 44px !important;
    margin-left: 6px;
    font-size: 16px !important;
    text-align: center;
    vertical-align: middle !important;
}

.login #loginform label[for="jetpack_protect_answer"] {
    display: inline;
    vertical-align: middle !important;
}

.login #loginform br {
    display: none;
}

/* Remember me */
.login #login form .forgetmenot {
    display: flex;
    align-items: center;
    gap: 10px;
    float: none;
    margin: 0 0 24px;
}

.login form .forgetmenot label {
    display: inline;
    margin: 0;
    font-weight: 600;
    cursor: pointer;
}

.login form input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin: 0;
    border-radius: 5px;
    accent-color: var(--wl-red);
}

.login form input[type="checkbox"]:checked::before {
    margin: -1px 0 0 -1px;
}

.login form input[type="checkbox"]:focus {
    border-color: var(--wl-red);
    box-shadow: 0 0 0 3px rgba(190, 22, 34, 0.15);
}

.login .wp-tooltip__toggle {
    color: #8a8290;
}

/* Primary button: full-width red pill */
.login #login form p.submit,
.login .submit {
    float: none;
    margin: 0;
    padding: 0;
}

.login #login .button-primary,
.login #login .button.button-primary,
.login #login input[type="submit"].button {
    float: none;
    display: block;
    width: 100%;
    height: 54px;
    min-height: 54px;
    margin: 0;
    padding: 0 24px;
    font-family: var(--wl-body);
    font-size: 17px;
    font-weight: 800;
    line-height: 54px;
    text-transform: none;
    color: #fff;
    background: var(--wl-red);
    border: none;
    border-radius: 999px;
    box-shadow: 0 14px 28px -14px rgba(190, 22, 34, 0.7);
    text-shadow: none;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.login #login .button-primary:hover,
.login #login .button-primary:focus {
    color: #fff;
    background: var(--wl-red-deep);
    border: none;
    box-shadow: 0 14px 28px -14px rgba(190, 22, 34, 0.7);
}

.login .button-primary:focus-visible {
    outline: 3px solid var(--wl-red);
    outline-offset: 3px;
}

.login .button-primary:active {
    transform: translateY(1px);
}

/* Messages */
.login #login_error,
.login .message,
.login .notice,
.login .success {
    margin: 0 0 20px;
    padding: 12px 16px;
    font-size: 15px;
    line-height: 1.5;
    border: none;
    border-radius: 12px;
    box-shadow: none;
    background: rgba(249, 178, 51, 0.16);
    color: var(--wl-ink);
}

.login #login_error,
.login .notice-error {
    background: rgba(190, 22, 34, 0.08);
    color: var(--wl-red-deep);
}

/* Links under the card content */
.login #nav,
.login #backtoblog,
.login .backup-methods-wrap {
    margin: 22px 0 0;
    padding: 0;
    text-align: center;
    font-size: 15px;
}

.login #backtoblog {
    margin-top: 10px;
}

.login .backup-methods-wrap p {
    margin: 0 0 6px;
    color: var(--wl-ink-soft);
}

.login .backup-methods-wrap ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.login .backup-methods-wrap li {
    margin: 4px 0 0;
}

.login #login a,
.login .privacy-policy-page-link a {
    font-weight: 700;
    color: var(--wl-red);
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
    box-shadow: none;
}

.login #login a:hover,
.login .privacy-policy-page-link a:hover {
    color: var(--wl-red-deep);
}

.login #login h1.wp-login-logo a {
    text-decoration: none;
}

/* Below the card */
.login .privacy-policy-page-link {
    margin: 24px 0 0;
    text-align: center;
    font-size: 14px;
}

.login #login .privacy-policy-page-link a,
.login .privacy-policy-page-link a {
    color: var(--wl-ink-soft);
    font-weight: 600;
    text-decoration-thickness: 1px;
}

/* Language switcher under the card: quiet, not a second red button */
.login .language-switcher {
    margin-top: 16px;
}

.login .language-switcher form {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 0;
    background: none;
    border: none;
    box-shadow: none;
}

.login .language-switcher label {
    margin: 0;
    font-size: 13px;
    color: var(--wl-ink-soft);
}

.login .language-switcher select {
    height: 36px;
    min-height: 36px;
    padding: 0 28px 0 10px;
    font-family: var(--wl-body);
    font-size: 14px;
    border: 1.5px solid var(--wl-line);
    border-radius: 10px;
    background-color: #fff;
}

.login .language-switcher .button {
    float: none;
    height: 36px;
    min-height: 36px;
    margin: 0;
    padding: 0 14px;
    font-family: var(--wl-body);
    font-size: 14px;
    font-weight: 700;
    line-height: 34px;
    color: var(--wl-ink);
    background: #fff;
    border: 1.5px solid var(--wl-line);
    border-radius: 999px;
    box-shadow: none;
}

.login .language-switcher .button:hover {
    color: var(--wl-red);
    border-color: var(--wl-red);
    background: #fff;
}

@media screen and (max-width: 480px) {
    body.login {
        justify-content: flex-start;
        padding-top: 24px;
    }
    .login #login {
        padding: 32px 22px 26px;
        border-radius: 24px;
    }
}

/* ------------------------------------------------------------------
   Two Factor: one box per digit (built by login/wl-otp.js)
   ------------------------------------------------------------------ */

.login .wl-otp-source {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    border: 0 !important;
    opacity: 0;
}

.login .wl-otp {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.login #login .wl-otp__box {
    flex: 1 1 0;
    min-width: 0;
    max-width: 52px;
    height: 62px;
    margin: 0;
    padding: 0;
    font-family: var(--wl-body);
    font-size: 28px;
    font-weight: 800;
    line-height: 1;
    text-align: center;
    color: var(--wl-ink);
    caret-color: var(--wl-red);
    background: #faf9fd;
    border: 1.5px solid var(--wl-line);
    border-radius: 14px;
    box-shadow: none;
    font-variant-numeric: tabular-nums;
}

.login #login .wl-otp__box.is-filled {
    background: #fff;
    border-color: #cfc8da;
}

.login #login .wl-otp__box:focus {
    background: #fff;
    border-color: var(--wl-red);
    box-shadow: 0 0 0 4px rgba(190, 22, 34, 0.12);
}

.login .wl-otp__sep {
    flex: 0 0 10px;
    height: 3px;
    border-radius: 3px;
    background: var(--wl-line);
}

@media screen and (max-width: 380px) {
    .login .wl-otp {
        gap: 5px;
    }
    .login #login .wl-otp__box {
        height: 54px;
        font-size: 24px;
        border-radius: 12px;
    }
    .login .wl-otp__sep {
        flex-basis: 6px;
    }
}
