/* =========================================================
   Webtonia login screen — branded split card
   ========================================================= */

body.login {
    --wt-brand: #60a231;
    --wt-brand-dark: #4e8527;
    --wt-brand-darker: #3e6c1f;
    --wt-ink: #1d2327;
    --wt-muted: #646970;
    --wt-border: #dcdcde;

    background: #f4f6f2;
    background-image:
        radial-gradient(circle at 12% 8%, rgba(96, 162, 49, .07), transparent 40%),
        radial-gradient(circle at 88% 92%, rgba(96, 162, 49, .06), transparent 45%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

body.login div#login {
    padding-top: 0;
}

/* ── Shell / split card (credentials step only) ─────────── */

.wt-login-shell {
    width: 100%;
    display: flex;
    justify-content: center;
}

.wt-login-card {
    display: flex;
    width: 100%;
    max-width: 940px;
    min-height: 560px;
    background: #fff;
    border-radius: 22px;
    overflow: hidden;
    box-shadow:
        0 30px 70px rgba(29, 35, 39, .16),
        0 8px 20px rgba(29, 35, 39, .07);
    opacity: 0;
    transform: translateY(28px) scale(.985);
    animation: wtLoginIn .65s cubic-bezier(.16, 1, .3, 1) .05s forwards;
}

@keyframes wtLoginIn {
    to {
        opacity: 1;
        transform: none;
    }
}

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

.wt-login-brand {
    position: relative;
    flex: 0 0 42%;
    padding: 48px 44px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: #fff;
    background: linear-gradient(155deg, var(--wt-brand) 0%, var(--wt-brand-darker) 100%);
    overflow: hidden;
}

.wt-login-brand::before,
.wt-login-brand::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, .08);
    pointer-events: none;
}

.wt-login-brand::before {
    width: 280px;
    height: 280px;
    top: -110px;
    right: -110px;
}

.wt-login-brand::after {
    width: 200px;
    height: 200px;
    bottom: -90px;
    left: -70px;
    background: rgba(255, 255, 255, .06);
}

.wt-login-logo-mark {
    position: relative;
    width: 300px;
    max-width: 100%;
}

.wt-login-logo-mark svg {
    display: block;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .15));
}

/* Source SVG is authored for light backgrounds (green hex + white W,
   dark grey wordmark). On the brand panel we invert it: white hex,
   green W, white wordmark. */
.wt-login-logo-mark svg .cls-2 {
    fill: #fff;
}

.wt-login-logo-mark svg .cls-3 {
    fill: var(--wt-brand, #60a231);
}

.wt-login-logo-mark svg .cls-1 {
    fill: #fff;
}

.wt-login-quote {
    position: relative;
    margin: 0;
    padding: 0;
    border: 0;
    max-width: 100%;
    font-size: 25px;
    line-height: 1.35;
    font-weight: 600;
    color: #fff;
}

/* ── Right panel: the actual WP login form ──────────────── */

.wt-login-panel {
    position: relative;
    flex: 1;
    min-width: 0;
    padding: 56px 52px;
    display: flex;
    flex-direction: column;
}

.wt-login-heading h2 {
    margin: 0 0 28px;
    font-size: 27px;
    font-weight: 800;
    color: var(--wt-ink);
}

.wt-login-panel #login {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    background: none;
    box-shadow: none;
    position: static;
    top: auto;
    transform: none;
}

.wt-login-panel #login h1 {
    display: none;
}

.wt-login-panel form {
    background: transparent;
    border: 0;
    box-shadow: none;
    margin: 0;
    padding: 0;
}

/* The plain credentials form isn't deep enough to reliably stretch a
   flex chain down to its submit button (its own nesting depth differs
   from the 2FA wizard below), so it's pinned directly to the panel's
   padding box instead — exact and independent of content height. */
.wt-login-panel #loginform p.submit {
    position: absolute;
    left: 52px;
    right: 52px;
    bottom: 40px;
    margin: 0;
}

/* Stretch every ancestor down to the actual <form> so its submit
   button can be pinned to the bottom of the card via margin-top:
   auto — this covers the 2FA wizard
   (.wp-ap-wizard-wrap > .wp-ap-wizard-card > form). */
.wt-login-panel .wp-ap-wizard-wrap,
.wt-login-panel .wp-ap-wizard-card,
.wt-login-panel .wp-ap-wizard-card form {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.wt-login-panel .wp-ap-wizard-card form p.submit,
.wt-login-panel .wp-ap-wizard-btn {
    margin-top: auto;
}

/* The wizard card normally draws its own boxed card (border, shadow,
   padding, entrance animation) — inside our split card that would
   nest a box within a box, so strip it down to plain content here. */
.wt-login-panel .wp-ap-wizard-wrap {
    padding: 0;
    justify-content: flex-start;
    width: 100%;
}

.wt-login-panel .wp-ap-wizard-card {
    width: 100%;
    max-width: none;
    padding: 0;
    background: none;
    border: 0;
    box-shadow: none;
    opacity: 1;
    transform: none;
    animation: none;
}

.wt-login-panel .wp-ap-wizard-header {
    text-align: center;
    margin-bottom: 26px;
}

.wt-login-panel .wp-ap-wizard-icon {
    margin: 0 auto 16px;
}

.wt-login-panel .wp-ap-otp {
    justify-content: center;
    gap: 14px;
}

.login label {
    display: block;
    color: var(--wt-ink, #1d2327);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    padding: 0;
}

.login form .input,
.login input[type="text"],
.login input[type="password"] {
    width: 100%;
    background: #fff;
    border: 1.5px solid var(--wt-border, #dcdcde);
    border-radius: 10px;
    box-shadow: none;
    font-size: 15px;
    padding: 11px 14px;
    top: auto;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.login input[type="text"]:focus,
.login input[type="password"]:focus {
    border-color: var(--wt-brand, #60a231) !important;
    box-shadow: 0 0 0 4px rgba(96, 162, 49, .15) !important;
    outline: none;
}

.user-pass-wrap {
    position: relative;
    margin: 0 0 20px;
}

.user-pass-wrap .wp-pwd {
    position: relative;
    margin-top: 0;
}

.user-pass-wrap input[type="password"],
.user-pass-wrap input[type="text"] {
    padding-right: 42px;
}

.wp-pwd .button.wp-hide-pw {
    position: absolute;
    top: 50%;
    right: 4px;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    min-height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: 0;
    box-shadow: none;
    padding: 0;
    color: var(--wt-muted, #646970);
    cursor: pointer;
    transition: color .15s ease;
}

.wp-pwd .button.wp-hide-pw:hover,
.wp-pwd .button.wp-hide-pw:focus {
    background: none;
    box-shadow: none;
    color: var(--wt-brand, #60a231);
}

.wp-pwd .button.wp-hide-pw .dashicons {
    width: 18px;
    height: 18px;
    font-size: 18px;
}

.forgetmenot {
    margin: 4px 0 20px !important;
    padding: 0 !important;
}

/* Native checkbox stays in the DOM (and keeps the click target/label
   association) but is visually hidden; the toggle track + thumb are
   drawn on ::before/::after of the <label> instead, since browsers
   don't render generated content on void elements like <input>. */
.forgetmenot input[type="checkbox"] {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.forgetmenot label {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding-left: 44px;
    min-height: 22px;
    font-weight: 500;
    font-size: 13px;
    color: var(--wt-muted);
    cursor: pointer;
    user-select: none;
}

.forgetmenot label::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 20px;
    border-radius: 999px;
    background: #d5d8db;
    transition: background .2s ease;
}

.forgetmenot label::after {
    content: "";
    position: absolute;
    left: 3px;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .3);
    transition: left .2s ease;
}

.forgetmenot input[type="checkbox"]:checked + label::before {
    background: linear-gradient(135deg, var(--wt-brand), var(--wt-brand-dark));
}

.forgetmenot input[type="checkbox"]:checked + label::after {
    left: 19px;
}

.forgetmenot input[type="checkbox"]:focus-visible + label::before {
    box-shadow: 0 0 0 4px rgba(96, 162, 49, .25);
}

.wp-core-ui .button-primary {
    display: block;
    width: 100%;
    float: none;
    margin-top: 6px;
    padding: 9px 16px !important;
    border: 0 !important;
    border-radius: 10px !important;
    background: linear-gradient(135deg, var(--wt-brand), var(--wt-brand-dark)) !important;
    box-shadow: 0 10px 22px rgba(96, 162, 49, .3) !important;
    color: #fff !important;
    font-size: 15px;
    font-weight: 700 !important;
    line-height: 1.5;
    text-shadow: none !important;
    text-align: center;
    transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}

.wp-core-ui .button-primary:hover {
    filter: brightness(1.05);
    transform: translateY(-1px);
    box-shadow: 0 14px 26px rgba(96, 162, 49, .38) !important;
}

.wp-core-ui .button-primary:active {
    transform: translateY(0);
    box-shadow: 0 6px 14px rgba(96, 162, 49, .3) !important;
}

#nav,
#backtoblog {
    display: none;
}

.login .message,
.login #login_error {
    max-width: none;
    border-left: 4px solid var(--wt-brand, #60a231) !important;
    border-radius: 8px;
    margin: 0 0 20px !important;
}

/* ── Responsive ──────────────────────────────────────────── */

@media (max-width: 680px) {
    .wt-login-card {
        flex-direction: column;
        max-width: 420px;
        min-height: auto;
    }

    .wt-login-brand {
        flex: none;
        padding: 30px 28px;
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
    }

    .wt-login-quote {
        display: none;
    }

    .wt-login-panel {
        padding: 34px 28px 40px;
    }
}
