/*
    pac-login.css — shared look of the signed-out pages:
    Sign In (Login.cshtml), Reset Password and Verify Code.

    Deploy at /Content/pac-login.css and link it AFTER pac-ledger.css (it uses that file's colour tokens).
    Page-specific rules (password eye, code box, password rules) stay inside each page.
*/

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--paper);
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
}

.login-wrap { display: flex; min-height: 100vh; min-height: 100dvh; width: 100%; } /* dvh = the visible height on phones, so the footer is not hidden behind the browser bar */

/* ---- left brand panel ---- */
.login-brand-panel {
    width: 40%;
    min-width: 340px;
    background-color: var(--ink);
    background-image: radial-gradient(120% 90% at 0% 0%, #2d4373 0%, var(--ink) 60%);
    color: #f6f3ea;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 48px 40px;
    text-align: center;
    position: relative;
}
.login-brand-panel::after { content: ""; position: absolute; bottom: 0; left: 0; right: 0; height: 5px; background: var(--brass); }
.login-brand-name { font-family: 'Source Serif 4', Georgia, serif; font-weight: 700; font-size: 42px; margin: 0; letter-spacing: 0.01em; line-height: 1.15; }
.login-brand-rule { width: 60px; height: 2px; background: var(--brass); margin: 20px 0; }
.login-brand-subtitle { font-size: 14px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--sand); }
.login-brand-tagline { max-width: 290px; margin: 26px 0 0; font-size: 14.5px; line-height: 1.55; color: rgba(246, 243, 234, 0.72); }

/* "Test site" / "Local site" marker (shown only when the site is not the live one) */
.login-site-flag {
    position: absolute;
    top: 22px;
    left: 24px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: var(--sand);
    color: var(--ink);
    padding: 4px 11px;
    border-radius: 20px;
}

/* ---- right form panel ---- */
.login-form-panel { flex: 1; min-width: 0; background: var(--paper); display: flex; flex-direction: column; padding: 0 24px; }
.login-main { flex: 1; display: flex; align-items: center; justify-content: center; padding: 40px 0 16px; }
.login-main > div { width: 100%; max-width: 440px; }
.login-footer { text-align: center; font-size: 12px; color: var(--muted); margin: 0; padding: 12px 0 22px; }
.login-footer a { color: var(--muted); }

.login-card {
    background: var(--card);
    border: 1px solid var(--rule);
    border-radius: 6px;
    box-shadow: 0 1px 2px rgba(28, 43, 74, 0.04), 0 14px 32px -18px rgba(28, 43, 74, 0.2);
    padding: 44px 44px 38px;
    width: 100%;
    max-width: 440px;
    position: relative;
}
.login-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--navy2); border-radius: 6px 0 0 6px; }
.login-card h1 { font-family: 'Source Serif 4', Georgia, serif; font-size: 28px; font-weight: 700; color: var(--ink); margin: 0 0 8px; }
.login-card p.login-subtext { font-size: 14px; color: var(--muted); margin: 0 0 26px; }

/* ---- fields ---- */
.login-field { margin-bottom: 20px; }
.login-field label { display: block; font-size: 13px; font-weight: 700; color: var(--ink); margin-bottom: 6px; }
.login-field input {
    width: 100%;
    padding: 12px 13px;
    font-size: 15px;
    font-family: inherit;
    color: var(--ink);
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: 4px;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.login-field input:focus { outline: none; border-color: var(--navy2); box-shadow: 0 0 0 3px rgba(52, 81, 140, 0.22); }

/* Browser autofill: keep the page colours instead of the browser's pale blue. */
.login-field input:-webkit-autofill,
.login-field input:-webkit-autofill:hover,
.login-field input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--ink);
    caret-color: var(--ink);
    -webkit-box-shadow: 0 0 0 1000px var(--paper) inset;
    box-shadow: 0 0 0 1000px var(--paper) inset;
    transition: background-color 9999s ease-out 0s;
}
.login-field input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px var(--paper) inset, 0 0 0 3px rgba(52, 81, 140, 0.22);
    box-shadow: 0 0 0 1000px var(--paper) inset, 0 0 0 3px rgba(52, 81, 140, 0.22);
}
.login-field input:autofill {
    -webkit-text-fill-color: var(--ink);
    box-shadow: 0 0 0 1000px var(--paper) inset;
}

.text-danger { color: var(--rust); font-size: 12.5px; display: block; margin-top: 4px; }

/* ---- buttons and links ---- */
.login-submit-btn { width: 100%; padding: 13px; font-size: 15px; font-weight: 700; font-family: inherit; background: var(--ink); color: #f6f3ea; border: none; border-radius: 4px; cursor: pointer; transition: background 0.15s; margin-top: 6px; }
.login-submit-btn:hover { background: var(--navy2); }
.login-submit-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.login-secondary-btn { display: block; width: 100%; text-align: center; text-decoration: none; padding: 12px; font-size: 14px; font-weight: 600; font-family: inherit; background: none; color: var(--ink); border: 1px solid var(--rule); border-radius: 4px; cursor: pointer; transition: border-color 0.15s, background 0.15s; margin-top: 10px; }
.login-secondary-btn:hover { border-color: var(--brass); background: #f6f3ea; }

.login-submit-btn:focus-visible, .login-secondary-btn:focus-visible, .login-forgot-link:focus-visible { outline: 2px solid var(--navy2); outline-offset: 2px; }

.login-forgot-link { font-size: 13px; font-weight: 600; color: var(--brass-text, var(--brass)); text-decoration: none; background: none; border: none; padding: 0; cursor: pointer; font-family: inherit; }
.login-forgot-link:hover { text-decoration: underline; }
.login-back { text-align: center; margin-top: 18px; }

/* ---- messages ---- */
.login-banner { padding: 11px 14px; border-radius: 4px; font-size: 13.5px; margin-bottom: 18px; }
.login-banner.error { background: #fbeceb; color: var(--rust); border: 1px solid #e7c3c0; }
.login-banner.success { background: #eef6f1; color: var(--green); border: 1px solid #c8e2d1; }

.login-validation-summary { background: #fbeceb; color: var(--rust); border: 1px solid #e7c3c0; border-radius: 4px; padding: 11px 14px; font-size: 13.5px; margin-bottom: 18px; }
.login-validation-summary ul { list-style: none; margin: 0; padding: 0; }
.login-validation-summary li { margin: 0; }

/* ---- phone: the brand panel becomes a slim bar above the card ---- */
@media (max-width: 767px) {
    .login-wrap { flex-direction: column; }
    .login-brand-panel { width: 100%; min-width: 0; padding: 22px 20px 21px; }
    .login-brand-panel::after { height: 3px; }
    .login-brand-name { font-size: 26px; }
    .login-brand-rule { width: 44px; margin: 11px 0; }
    .login-brand-subtitle { font-size: 12px; }
    .login-brand-tagline { display: none; }
    .login-site-flag { position: static; margin-bottom: 12px; }
    .login-form-panel { padding: 0 16px; }
    .login-main { align-items: flex-start; padding: 24px 0 8px; }
    .login-card { padding: 28px 22px 24px; }
    .login-card h1 { font-size: 24px; }
    /* 16px stops iPhones from zooming in when a field is tapped */
    .login-field input { font-size: 16px; }
}
