/* ==========================================================================
   HFW Staff Portal — Branded login screen
   Split layout: shelter photo (left) · blue-dominant gradient sign-in (right).
   Restyles WordPress's native wp-login.php form — core keeps handling auth and
   password resets; this only changes the look. Enqueued on login_enqueue_scripts.
   ========================================================================== */

body.login {
    margin: 0;
    min-height: 100vh;
    font-family: 'Montserrat', system-ui, -apple-system, sans-serif;
    /* Blue Heeler dominant; Pawsitively Pink tucked into the bottom-right corner. */
    background:
        radial-gradient(130% 100% at 100% 100%, rgba(219,48,105,.62) 0%, rgba(219,48,105,.12) 38%, transparent 60%),
        linear-gradient(158deg, #17184f 0%, #262873 55%, #2E3091 100%);
}
#login { position: relative; z-index: 2; }

/* ---------- Left: shelter photo canvas (injected via login_footer) ---------- */
.hfw-login-canvas {
    position: fixed; top: 0; left: 0;
    width: 56%; height: 100vh;
    background-size: cover;
    background-position: 48% 60%;
    z-index: 1;
    overflow: hidden;
    animation: hfwKenburns 28s cubic-bezier(.33,1,.68,1) infinite alternate;
}
.hfw-login-canvas__scrim {
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(10,11,42,.76) 0%, rgba(10,11,42,.14) 48%, transparent 74%);
    box-shadow: inset 0 0 180px rgba(8,9,30,.5);
}
.hfw-login-canvas__note {
    position: absolute; left: 52px; right: 52px; bottom: 52px;
    color: #fff;
    animation: hfwRise 1s cubic-bezier(.33,1,.68,1) .2s both;
}
.hfw-login-canvas__kicker {
    font-family: 'Caveat Brush', cursive;
    font-size: 30px; line-height: 1; color: #EDED40; margin-bottom: 8px;
}
.hfw-login-canvas__headline {
    font-size: 40px; font-weight: 800; line-height: 1.06; letter-spacing: -.01em;
    text-shadow: 0 2px 18px rgba(0,0,0,.4);
}
.hfw-login-canvas__headline b { color: #6EC7C7; font-weight: 800; }
.hfw-login-canvas__sub { margin-top: 14px; font-size: 15px; font-weight: 500; color: rgba(255,255,255,.82); }

/* ---------- Right: sign-in column ---------- */
body.login #login {
    width: 44%;
    margin: 0 0 0 56%;
    max-width: none;
    min-height: 100vh;
    box-sizing: border-box;
    padding: 40px 6%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
body.login #login > * { width: 100%; max-width: 392px; }

/* Logo (WP h1) -> HFW reversed wordmark, pops on the navy gradient */
.login h1 { margin: 0 auto 30px; }
.login h1 a {
    background-image: url('../images/HFW-Color-Rev.png');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    width: 315px; height: 144px; margin: 0 auto;
    text-indent: -9999px; overflow: hidden; display: block;
    position: relative; left: -4px; /* optical-center the right-leaning script wordmark; tune to taste */
}

/* Intro (eyebrow . greeting . subhead) injected via login_message */
.hfw-login-intro { text-align: center; margin: 0 0 36px; }
.hfw-login-intro__eyebrow {
    font-size: 20px; letter-spacing: .22em; text-transform: uppercase;
    font-weight: 700; color: #EDED40; margin: 0 0 10px;
}
.hfw-login-intro__greeting {
    font-family: 'Caveat Brush', cursive; font-size: 72px; line-height: 1;
    color: #fff; margin: 0 0 6px;
}
.hfw-login-intro__sub { font-size: 15px; font-weight: 500; color: rgba(255,255,255,.78); margin: 0; }

/* Form — strip WP's white card, sit clean on the gradient */
.login form {
    background: transparent; border: 0; box-shadow: none; padding: 0; margin: 0;
    overflow: visible;
}
/* Field groups — cover BOTH the <p> (username) and .user-pass-wrap (password).
   WP wraps them differently and its own rules out-specify plain .login form p,
   so this uses #loginform to win and spaces the two fields apart. */
body.login #loginform > p,
body.login #loginform > .user-pass-wrap { margin: 0 0 22px; }
.login label {
    color: #fff; font-size: 12.5px; font-weight: 700;
    display: block; text-align: left; margin: 0 0 5px;
}
.login form .input,
.login input[type="text"],
.login input[type="password"] {
    width: 100%; box-sizing: border-box;
    margin: 0;
    font-family: 'Montserrat', sans-serif; font-size: 15px; color: #1c1d3a;
    background: #fff; border: 1.5px solid transparent; border-radius: 12px;
    padding: 14px 16px; line-height: 1.3;
    box-shadow: none; transition: box-shadow .18s;
}
.login form .input:focus,
.login input[type="text"]:focus,
.login input[type="password"]:focus {
    border-color: transparent; box-shadow: 0 0 0 4px rgba(237,237,64,.42);
    outline: none;
}
/* Password show/hide — WP makes .wp-pwd a flex row that shoves the button
   outside the field, so force block + absolute to pin it inside the right edge. */
body.login .wp-pwd { position: relative !important; display: block !important; }
body.login .wp-pwd .input { padding-right: 70px; }
body.login .wp-pwd .button.wp-hide-pw {
    position: absolute !important; right: 18px !important; left: auto !important;
    top: 50% !important; bottom: auto !important; transform: translateY(-50%) !important;
    width: auto !important; height: auto !important; min-height: 0;
    padding: 6px 0; margin: 0 !important;
    background: transparent; border: 0; box-shadow: none; line-height: 1;
}
.login .button.wp-hide-pw:hover,
.login .button.wp-hide-pw:focus,
.login .button.wp-hide-pw:focus-visible,
.login .button.wp-hide-pw:active { background: transparent; box-shadow: none; }
/* Flat Show/Hide text in place of WP's realistic eye dashicon. */
.login .wp-hide-pw .dashicons,
.login .wp-hide-pw .dashicons::before {
    font-family: 'Montserrat', sans-serif !important;
    font-size: 11px !important; font-weight: 700; line-height: 1;
    width: auto; height: auto;
}
.login .wp-hide-pw .dashicons { text-transform: uppercase; letter-spacing: .04em; color: #8a8ba0; }
.login .wp-hide-pw:hover .dashicons { color: #2E3091; }
.login .wp-hide-pw .dashicons-visibility::before { content: "Show"; }
.login .wp-hide-pw .dashicons-hidden::before { content: "Hide"; }

/* Remember me — quiet, light, left-aligned, with real breathing room */
body.login #loginform > p.forgetmenot { text-align: left; margin: 4px 0 24px; }
.login .forgetmenot label { display: inline; font-weight: 500; font-size: 13px; color: rgba(255,255,255,.8); }

/* Sign in button -> Tennis Ball, navy text, pill */
.login .button-primary,
.login #wp-submit {
    width: 100%; float: none;
    font-family: 'Montserrat', sans-serif; font-size: 15px; font-weight: 800;
    letter-spacing: .02em; text-transform: none; text-shadow: none;
    color: #1a1b5c; background: #EDED40; border: 2px solid #EDED40;
    border-radius: 100px; padding: 14px 18px; height: auto; line-height: 1.2;
    box-shadow: none; transition: transform .16s cubic-bezier(.33,1,.68,1), box-shadow .16s;
}
.login .button-primary:hover,
.login #wp-submit:hover { background: #EDED40; transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0,0,0,.22); color: #1a1b5c; }
.login .button-primary:active,
.login #wp-submit:active { transform: translateY(0); }
/* State pin sweep (July 17 2026): WP core's .wp-core-ui button skin repaints
   :focus/:active (admin blue) at higher specificity than our base rule — pin
   bg/color on every state so the Tennis Ball pill never flips. */
.login .button-primary:focus,
.login .button-primary:focus-visible,
.login .button-primary:active,
.login #wp-submit:focus,
.login #wp-submit:focus-visible,
.login #wp-submit:active { background: #EDED40; border-color: #EDED40; color: #1a1b5c; }
.login .button-primary:focus:not(:focus-visible),
.login #wp-submit:focus:not(:focus-visible) { outline: none; box-shadow: none; }
.login .button-primary:focus-visible,
.login #wp-submit:focus-visible { outline: 2px solid #6EC7C7; outline-offset: 3px; }
body.login #loginform > p.submit { margin: 0; }

/* Forgot password (WP #nav); "back to site" (#backtoblog) removed */
.login #nav { text-align: center; padding: 0; margin: 28px 0 0; }
.login #nav a { color: #EDED40; font-size: 13.5px; font-weight: 600; text-decoration: none; }
/* State pin sweep (July 17 2026): pin non-hover states first, hover last. */
.login #nav a:visited,
.login #nav a:focus,
.login #nav a:focus-visible,
.login #nav a:active { color: #EDED40; }
.login #nav a:hover { color: #fff; text-decoration: underline; }
.login #nav a:focus:not(:focus-visible) { outline: none; }
.login #nav a:focus-visible { outline: 2px solid #6EC7C7; outline-offset: 2px; }
.login #backtoblog { display: none; }

/* Hide WP chrome we don't want */
.login .language-switcher { display: none; }
.login .privacy-policy-page-link { display: none; }

/* Error / message notices — readable on the gradient (full border, no left accent) */
.login #login_error, .login .message, .login .notice {
    background: rgba(255,255,255,.96); border: 1.5px solid #DB3069;
    border-radius: 10px; color: #1c1d3a; box-shadow: none;
    margin: 0 0 28px; padding: 12px 16px; font-size: 14px; text-align: center;
}

@keyframes hfwKenburns { from { transform: scale(1); } to { transform: scale(1.06); } }
@keyframes hfwRise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- Responsive: stack on narrow screens ---------- */
@media (max-width: 860px) {
    .hfw-login-canvas { position: relative; width: 100%; height: 38vh; }
    body.login #login { width: 100%; margin: 0; min-height: auto; padding: 40px 24px 56px; }
    .hfw-login-canvas__note { bottom: 24px; }
    .hfw-login-canvas__headline { font-size: 30px; }
}
@media (prefers-reduced-motion: reduce) {
    .hfw-login-canvas, .hfw-login-canvas__note, .login form { animation: none; }
    .login .button-primary, .login #wp-submit { transition: none; }
}
