/* ============================================================
   Predict Health sign-in page (GTW-210) — Views/User/Index.cshtml
   Colors and type follow the Predict Health design-system tokens.
   Class prefix "phs-" keeps these rules clear of app.min.css.
   ============================================================ */
:root {
    --phs-navy: #02003e;
    --phs-oxford-blue: #0c153d;
    --phs-blue: #1476bd;
    --phs-light-blue: #6ecde6;
    --phs-ink-muted: #555555;
    --phs-border: #8a8a8a;
    --phs-error: #be6d71;
    --phs-error-ink: #8a3a3f;
    --phs-error-bg: #f8ecec;
    --phs-font-sans: Calibri, Carlito, "Segoe UI", Arial, sans-serif;
    --phs-font-display: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

body { margin: 0; background: #ffffff; }

.phs-page {
    min-height: 100vh;
    display: flex;
    background: #ffffff;
    color: var(--phs-oxford-blue);
    font-family: var(--phs-font-sans);
    -webkit-font-smoothing: antialiased;
}

.phs-page *, .phs-page *::before, .phs-page *::after { box-sizing: border-box; }

/* ---- left: brand panel ---- */
.phs-brand {
    position: relative;
    flex: 1 1 56%;
    min-width: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 48px;
    padding: 40px 48px;
    background: var(--phs-navy);
    color: #ffffff;
}

.phs-brand__network {
    position: absolute;
    top: 0;
    right: 0;
    width: 78%;
    height: 100%;
    object-fit: cover;
    /* the design's network image (a 1170x1150 JPG), anchored at its left edge as in the design */
    object-position: left center;
    opacity: .9;
    pointer-events: none;
}

.phs-brand__logo {
    position: relative;
    display: block;
    align-self: flex-start;
    height: 33px;
    width: auto;
    max-width: 100%;
}

.phs-brand__legal {
    position: relative;
    margin: 0;
    font-size: 13px;
    line-height: 18px;
    font-weight: 300;
    color: #ffffff;
}

/* ---- right: form panel ---- */
.phs-main {
    position: relative;
    flex: 1 1 44%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 32px 48px;
}

.phs-panel {
    width: 100%;
    max-width: 380px;
    margin: 0 auto;
}

.phs-card {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.phs-heading { display: flex; flex-direction: column; gap: 8px; }

.phs-page .phs-title {
    margin: 0;
    font-family: var(--phs-font-display);
    font-weight: 400;
    font-size: 32px;
    line-height: 1.2;
    color: var(--phs-oxford-blue);
    letter-spacing: 0;
    text-transform: none;
}

.phs-lede {
    margin: 0;
    font-size: 15px;
    line-height: 22px;
    font-weight: 300;
    color: var(--phs-ink-muted);
}

.phs-form { display: flex; flex-direction: column; gap: 20px; margin: 0; }

.phs-field { display: flex; flex-direction: column; gap: 8px; }

.phs-label-row { display: flex; justify-content: space-between; align-items: center; }

.phs-page .phs-label {
    margin: 0;
    font-size: 15px;
    line-height: 20px;
    font-weight: 400;
    color: var(--phs-oxford-blue);
}

.phs-page .phs-input {
    width: 100%;
    height: 48px;
    padding: 0 14px;
    border: 1px solid var(--phs-border);
    border-radius: 6px;
    background: #ffffff;
    color: var(--phs-oxford-blue);
    font-family: inherit;
    font-size: 16px; /* 16px keeps iOS Safari from zooming on focus */
    box-shadow: none;
}

.phs-page .phs-input::placeholder { color: #8a8a8a; opacity: 1; }
.phs-page .phs-input:focus { outline: 2px solid var(--phs-blue); outline-offset: 1px; border-color: var(--phs-border); }
.phs-page .phs-input.is-invalid { border-color: var(--phs-error); }
.phs-page .phs-input::-ms-reveal { display: none; } /* Edge's own eye icon duplicates Show/Hide */

.phs-error,
.phs-alert {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 6px;
    background: var(--phs-error-bg);
    color: var(--phs-error-ink);
    font-size: 14px;
    line-height: 20px;
}

.phs-error.d-none { display: none; }
.phs-alert svg { flex-shrink: 0; }
.phs-alert .field-validation-error,
.phs-alert .field-validation-valid { color: inherit; }

.phs-page .phs-link-button {
    min-height: 32px;
    padding: 0 4px;
    border: 0;
    background: transparent;
    color: var(--phs-blue);
    font-family: inherit;
    font-size: 15px;
    line-height: 22px;
    cursor: pointer;
}

.phs-page .phs-link-button:hover,
.phs-page .phs-link:hover { color: var(--phs-oxford-blue); }

.phs-page .phs-link-button:focus-visible,
.phs-page .phs-link:focus-visible,
.phs-page .phs-button:focus-visible,
.phs-toast__close:focus-visible { outline: 2px solid var(--phs-blue); outline-offset: 2px; }

.phs-forgot-link { align-self: flex-end; padding: 0; }

.phs-back-link {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    padding: 0;
}

.phs-page .phs-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 48px;
    border: 0;
    border-radius: 9999px;
    background: var(--phs-oxford-blue);
    color: #ffffff;
    font-family: var(--phs-font-display);
    font-size: 14px;
    letter-spacing: .12em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
}

.phs-page .phs-button:hover { background: #1b2758; color: #ffffff; }

.phs-help { margin: 0; font-size: 15px; line-height: 22px; color: var(--phs-ink-muted); }

.phs-page .phs-link { color: var(--phs-blue); text-decoration: underline; }

/* ---- "check your email" toast ---- */
.phs-toast-region {
    position: absolute;
    top: 24px;
    right: 24px;
    left: 24px;
    z-index: 10;
    display: flex;
    justify-content: flex-end;
    pointer-events: none;
}

.phs-toast {
    pointer-events: auto;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    width: 380px;
    max-width: 100%;
    padding: 16px;
    border-radius: 6px;
    background: var(--phs-oxford-blue);
    color: #ffffff;
    box-shadow: 0 8px 24px rgba(12, 21, 61, .24);
}

.phs-toast__icon { flex-shrink: 0; margin-top: 1px; color: var(--phs-light-blue); }
.phs-toast__body { flex-grow: 1; display: flex; flex-direction: column; gap: 2px; }
.phs-toast__title { margin: 0; font-size: 16px; line-height: 22px; font-weight: 700; color: #ffffff; }
.phs-toast__text { margin: 0; font-size: 15px; line-height: 22px; font-weight: 300; color: #ffffff; }

.phs-toast__close {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    margin: -6px -6px 0 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #ffffff;
    cursor: pointer;
}

/* ---- "logged out due to inactivity" modal (Bootstrap modal, ?q=sessiontimedout / ssosessout) ---- */
.phs-modal .modal-dialog { max-width: 400px; }

.phs-modal .phs-modal__content {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 28px 28px 24px;
    border: 0;
    border-radius: 12px;
    background: #ffffff;
    color: var(--phs-oxford-blue);
    font-family: var(--phs-font-sans);
    box-shadow: 0 16px 40px rgba(12, 21, 61, .28);
}

.phs-modal__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }

.phs-modal .phs-modal__title {
    margin: 0;
    font-family: var(--phs-font-display);
    font-weight: 400;
    font-size: 24px;
    line-height: 1.25;
    color: var(--phs-oxford-blue);
    text-transform: none;
}

.phs-modal__text { margin: 0 0 8px; font-size: 16px; line-height: 24px; color: var(--phs-ink-muted); }

.phs-modal__close {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    margin: -4px -8px 0 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--phs-oxford-blue);
    cursor: pointer;
}

.phs-modal__close:hover { background: #eef1f6; }
.phs-modal__close:focus-visible { outline: 2px solid var(--phs-blue); outline-offset: 2px; }

/* Navy scrim instead of Bootstrap's black; this stylesheet only loads on the sign-in page.
   "body" outranks app.min.css's own .modal-backdrop, which loads after this file. */
body .modal-backdrop { --bs-backdrop-bg: var(--phs-navy); --bs-backdrop-opacity: .6; }

/* ---- tablet / mobile: brand becomes a top band, form below ---- */
@media (max-width: 900px) {
    .phs-page { flex-direction: column; }

    .phs-brand {
        flex: 0 0 auto;
        min-height: 160px;
        padding: 28px 24px;
        gap: 24px;
    }

    .phs-brand__network { width: 100%; }
    .phs-brand__legal { display: none; }

    .phs-main {
        flex: 1 0 auto;
        justify-content: flex-start;
        padding: 40px 24px 48px;
    }

    /* bottom of the screen so the toast doesn't cover the logo band */
    .phs-toast-region { position: fixed; top: auto; bottom: 16px; right: 16px; left: 16px; justify-content: center; }
}

@media (max-width: 480px) {
    .phs-brand { min-height: 112px; padding: 24px 16px; }
    .phs-brand__logo { height: 26px; }
    .phs-main { padding: 32px 16px 40px; }
    .phs-page .phs-title { font-size: 28px; }
    .phs-card { gap: 24px; }
}

@media (prefers-reduced-motion: no-preference) {
    .phs-toast { animation: phs-toast-in .2s ease-out; }
    @keyframes phs-toast-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
}
