/* ============================================================
   Ygetit login — two-panel auth screen matching the design-system
   login.html (left brand panel + right white form card).
   Restyles wp-login.php; uses tokens from colors_and_type.css.
   ============================================================ */

body.login {
    background: var(--ygetit-bg-app, #F4F4F5) !important;
    font-family: var(--ygetit-font-ui) !important;
    min-height: 100vh;
    margin: 0 !important;
}

/* Hide ONLY the default WordPress logo (the brand panel carries the logo).
   Scoped to the direct child so the injected "Sign in" heading survives. */
body.login #login > h1 { display: none !important; }

/* ---- Left brand panel (injected via login_footer; fixed so DOM order is irrelevant) ---- */
.ygetit-authbrand {
    position: fixed; left: 0; top: 0; bottom: 0; width: 60%;
    /* a11y: white text on the bright getbrand gradient was 2.0-2.5:1. A dark scrim
       over the gradient lifts white body text to >=5:1 on every stop (green/teal/blue)
       while the brand colours still show through at ~60%. */
    background: linear-gradient(rgba(0,0,0,0.50), rgba(0,0,0,0.50)), var(--ygetit-grad-getbrand-135);
    color: #fff; padding: 56px; box-sizing: border-box;
    display: flex; flex-direction: column; justify-content: space-between;
    overflow: hidden; z-index: 0;
}
.ygetit-authbrand::before {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(circle at 30% 20%, rgba(255,255,255,0.16) 0%, transparent 52%);
}
.ygetit-authbrand > * { position: relative; z-index: 1; }
.ygetit-authbrand__logo {
    background: #fff; padding: 12px 18px; border-radius: 10px;
    display: inline-flex; align-items: center; gap: 12px; width: fit-content;
    box-shadow: 0 4px 16px rgba(0,0,0,0.10);
}
.ygetit-authbrand__logo img { height: 40px; width: auto; display: block; }
.ygetit-authbrand__logo strong { color: var(--ygetit-ink); font-weight: 700; font-size: 15px; letter-spacing: -0.2px; }
.ygetit-authbrand__quote { max-width: 460px; }
.ygetit-authbrand__quote h2 { font-size: 30px; font-weight: 600; line-height: 1.25; margin: 0 0 14px; letter-spacing: -0.01em; }
.ygetit-authbrand__quote p { font-size: 14px; line-height: 1.6; opacity: 1; margin: 0; }
.ygetit-authbrand__compliance { display: flex; gap: 18px; flex-wrap: wrap; font-size: 12px; opacity: 1; }
.ygetit-authbrand__compliance span { display: inline-flex; align-items: center; gap: 6px; }

/* ---- Right form area: the remaining 40%, with the form centered ---- */
body.login #login {
    position: relative; z-index: 1;
    margin-left: 60% !important; width: 40% !important; max-width: none !important;
    min-height: 100vh; box-sizing: border-box;
    padding: 40px !important;
    display: flex !important; flex-direction: column;
    justify-content: center; align-items: center;
}
/* Center + constrain the stacked blocks (heading, form, footer) inside the 40% */
body.login #login > * {
    width: 100% !important; max-width: 380px !important;
    margin-left: auto !important; margin-right: auto !important;
}

/* "Sign in" heading injected via login_message */
.ygetit-signin-head { margin: 0 0 18px; }
.ygetit-signin-head h1 { font-size: 24px; font-weight: 700; color: var(--ygetit-ink); margin: 0 0 6px; letter-spacing: -0.01em; }
.ygetit-signin-head p { font-size: 13px; color: #4B5563; margin: 0; } /* a11y: was ink-3 #637381 (4.44:1 on grey) -> 6.5:1 */
.ygetit-signin-head a { color: var(--ygetit-accent-deep); text-decoration: none; }

/* Form card */
body.login #loginform,
body.login #lostpasswordform,
body.login #registerform {
    background: #fff !important;
    border: 1px solid var(--ygetit-border-soft) !important;
    border-radius: 12px !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06) !important;
    padding: 30px 28px !important;
    margin-top: 0 !important;
}
body.login #loginform label,
body.login #lostpasswordform label {
    color: var(--ygetit-ink-2) !important; font-weight: 600 !important; font-size: 12px !important;
}

.login form .input,
.login input[type="text"],
.login input[type="password"],
.login input[type="email"] {
    background: #fff !important;
    border: 1px solid #8C939C !important;   /* a11y: was #D1D5DB (1.47:1) -> 3.10:1 field boundary */
    border-radius: 8px !important;
    padding: 10px 12px !important;
    font-size: 14px !important;
    color: var(--ygetit-ink) !important;
    box-shadow: none !important;
}
.login form .input:focus,
.login input[type="text"]:focus,
.login input[type="password"]:focus,
.login input[type="email"]:focus {
    border-color: var(--ygetit-accent-deep) !important;
    box-shadow: 0 0 0 3px rgba(0,173,239,0.40) !important;   /* a11y: stronger, visible focus ring */
    outline: none !important;
}

/* Primary CTA — gov rectangular button (matches kit Sign in button) */
.login .submit { display: block !important; }
.login .button-primary,
.login #wp-submit {
    width: 100% !important;
    float: none !important;
    display: block !important;
    background: var(--ygetit-primary-700) !important;   /* a11y: white text 2.56:1 -> 5.23:1 */
    border: 0 !important;
    border-radius: 8px !important;
    box-shadow: none !important;
    text-shadow: none !important;
    color: #fff !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    padding: 11px 0 !important;
    height: auto !important;
    line-height: 1.4 !important;
    margin-top: 8px;
}
.login .button-primary:hover,
.login #wp-submit:hover { background: var(--ygetit-primary-800) !important; }

/* ---- New-kit form details (injected via login JS) ---- */

/* Required asterisk on field labels */
.login .ygetit-req { color: var(--ygetit-danger, #DC2626); font-weight: 700; margin-left: 2px; }

/* Password label row: label left, "Forgot password?" right */
.login .ygetit-pw-row { display: flex; align-items: baseline; }
.login .ygetit-pw-row .ygetit-forgot {
    margin-left: auto; font-size: 11px; font-weight: 500;
    color: var(--ygetit-accent-deep) !important; text-decoration: none !important; text-shadow: none;
}
.login .ygetit-pw-row .ygetit-forgot:hover { text-decoration: underline !important; }

/* Field hint under the password */
.login .ygetit-hint { display: block; font-size: 11px; color: var(--ygetit-ink-muted, #6B7280); margin-top: 6px; }

/* Remember-me styled as the kit's teal check + stacked subtext:
   [checkbox]  [ "Keep me signed in on this device"
                 "Not recommended on shared workstations." ] */
.login .forgetmenot { display: flex; align-items: flex-start; gap: 10px; margin: 6px 0 0; }
/* High specificity to beat `#loginform label { font-weight:600 }` above. */
body.login #loginform .forgetmenot label {
    display: block !important; flex: 1; margin: 0 !important;
    font-weight: 400 !important; color: var(--ygetit-ink-2, #374151) !important; font-size: 13px !important; line-height: 1.4;
}
.login #rememberme {
    appearance: none; -webkit-appearance: none; width: 18px; height: 18px; border-radius: 4px;
    border: 1.5px solid #9CA3AF; background: #fff; cursor: pointer; flex: none; margin: 1px 0 0;
    position: relative; transition: all .15s ease;
}
.login #rememberme:checked { background: var(--ygetit-primary-700); border-color: var(--ygetit-primary-700); }
.login #rememberme:checked::after {
    content: ''; position: absolute; left: 5px; top: 1px; width: 5px; height: 10px;
    border: 2px solid #fff; border-top: 0; border-left: 0; transform: rotate(45deg);
}
.login .ygetit-remember-sub { display: block; font-size: 11px; color: var(--ygetit-ink-muted, #6B7280); margin-top: 2px; }

/* Inline validation errors */
.login .ygetit-error {
    display: none; align-items: center; gap: 6px;
    margin: 6px 0 0; font-size: 12px; color: var(--ygetit-danger, #DC2626);
}
.login input.ygetit-invalid,
.login input.ygetit-invalid:focus {
    border-color: var(--ygetit-danger, #DC2626) !important;
    box-shadow: 0 0 0 2px rgba(220,38,38,0.18) !important;
}

/* Our own footer (replaces the default #nav / #backtoblog / privacy links) */
.login .ygetit-authfoot { margin-top: 18px; font-size: 12px; color: #565E6B; text-align: center; } /* a11y: on grey body, #6B7280 was 4.40:1 -> #565E6B 5.95:1 */
.login .ygetit-authfoot a { color: var(--ygetit-accent-deep) !important; font-weight: 500; text-decoration: none !important; text-shadow: none; }
.login .ygetit-authfoot a:hover { text-decoration: underline !important; }

/* Hide the default WordPress login nav links — our footer replaces them */
.login #nav, .login #backtoblog, .login .privacy-policy-page-link { display: none !important; }

/* ---- Responsive: stack (hide brand panel) ---- */
@media (max-width: 900px) {
    .ygetit-authbrand { display: none !important; }
    body.login #login { margin: 0 auto !important; width: 100% !important; max-width: 440px !important; min-height: auto; padding: 6vh 24px 40px !important; }
}
