/*
 * Getty Images branding for the EFT DOWNLOADS and EWS sites - account pages
 * (Login, LoggedOut, ChangePassword, LostPassword, LostUsername, ManageAccount, ResetPassword).
 *
 * Replaces the stock /Web/Shared/forms.css for each branded site only. Every selector the stock
 * templates rely on is kept. Do not edit the token block by hand - it is regenerated from
 * brand.json by Build-EftBranding.ps1.
 */

/* BRAND-TOKENS:START */
@font-face{font-family:"Lato";src:url("/Web/Shared/fonts/Lato-Light.ttf?v=4bf2ccef65") format("truetype");font-weight:300;font-style:normal;font-display:swap}
@font-face{font-family:"Lato";src:url("/Web/Shared/fonts/Lato-Regular.ttf?v=4bf2ccef65") format("truetype");font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:"Lato";src:url("/Web/Shared/fonts/Lato-Bold.ttf?v=4bf2ccef65") format("truetype");font-weight:700;font-style:normal;font-display:swap}
:root {
    --brand-primary: #000000;
    --brand-on-primary: #FFFFFF;
    --brand-accent: #333333;
    --brand-warn: #D0021B;
    --page-bg: #FFFFFF;
    --surface: #FFFFFF;
    --text: #000000;
    --text-muted: #666666;
    --border: #D9D9D9;
    --focus: #000000;
    --error-bg: #D0021B;
    --error-text: #FFFFFF;
    --font: Lato, "Helvetica Neue", Helvetica, Arial, sans-serif;
    --logo-url: url(/Web/Shared/images/brand-logo.svg?v=4bf2ccef65);
    --logo-width: 200px;
}
/* BRAND-TOKENS:END */

:root {
    --radius: 4px;
    --card-width: 400px;
    --control-height: 44px;
}

/* ---------- Base ---------- */

*, *::before, *::after {
    box-sizing: border-box;
}
html {
    -webkit-text-size-adjust: 100%;
}
body {
    margin: 0;
    padding: 0 16px 48px;
    background-color: var(--page-bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.5;
}
input, button, select, textarea {
    font-family: inherit;
    font-size: 16px; /* 16px stops iOS zooming into fields */
    color: inherit;
}
a {
    color: var(--text);
    font-size: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}
a:hover {
    color: var(--brand-accent);
}
:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 2px;
}
h3 {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 8px;
}
.scriptRequired {
    max-width: var(--card-width);
    margin: 24px auto;
    padding: 12px 16px;
    background: var(--error-bg);
    color: var(--error-text);
    border-radius: var(--radius);
}

/* ---------- Logo ---------- */

/* Secondary pages: <div id="logo"></div> */
#logo {
    width: var(--logo-width);
    max-width: 100%;
    height: 56px;
    margin: 56px auto 32px;
    background-image: var(--logo-url);
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}
/* Login page: <img id="login-logo" height="125"> sits inside the card - pull it to the top */
#login-logo {
    order: -1;
    display: block;
    width: var(--logo-width);
    max-width: 100%;
    height: auto;
    margin: 0 auto 32px;
}

/* ---------- Card ---------- */

fieldset {
    min-width: 0;
    margin: 0;
    padding: 32px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
}
legend {
    float: left;      /* moves the legend inside the card and makes it a normal block */
    width: 100%;
    margin: 0 0 24px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--text);
    font-size: 22px;
    font-weight: 700;
    line-height: 1.25;
}
legend + * {
    clear: both;
}
.wrapper {
    width: 100%;
    max-width: var(--card-width);
    margin: 0 auto;
}
.wrapper p {
    margin: 0 0 16px;
}

/* ---------- Login page ---------- */

.loginWrapper {
    width: 100%;
    max-width: var(--card-width);
    margin: 64px auto 0;
    text-align: left;
}
#loginFieldset {
    display: flex;
    flex-direction: column;
    width: 100%;
    text-align: left;
}
#loginLegend {
    margin-left: 0;
    color: var(--text);
    background: none;
    border: 0;
}
#loginFieldset form {
    margin: 0;
}

/* Stack the stock label/input table into a single column */
.loginTable,
.loginTable tbody,
.loginTable tr,
.loginTable td {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    text-align: left;
}
.loginTable {
    border-collapse: collapse;
}
.loginTable .col1 {
    padding-top: 16px;
}
.loginTable tr:first-child .col1 {
    padding-top: 0;
}
.loginTable label {
    display: block;
    margin-bottom: 6px;
    font-weight: 700;
}
.loginTable label u {
    text-decoration: none; /* accesskey hint */
}
.colSpanRow,
.inputText {
    text-align: right;
    padding-right: 0;
}
.forgotCreds {
    display: inline-block;
    margin-top: 6px;
    color: var(--text-muted);
    font-size: 13px;
}
.colSpanRowCheckBox {
    padding-top: 8px;
}
#loginSubmitTd,
#loginSubmitTd2 {
    text-align: center;
}

/* ---------- Form controls ---------- */

input[type="text"],
input[type="password"],
input[type="email"],
.tbInput {
    display: block;
    width: 100%;
    height: var(--control-height);
    margin: 0;
    padding: 0 12px;
    border: 1px solid #8C8C8C;
    border-radius: var(--radius);
    background: #FFFFFF;
    color: #000000;
}
input[type="text"]:hover,
input[type="password"]:hover {
    border-color: var(--text);
}
input[type="text"]:focus,
input[type="password"]:focus {
    border-color: var(--focus);
    outline: 2px solid var(--focus);
    outline-offset: 0;
}
input[type="checkbox"] {
    margin: 0 8px 0 0;
    accent-color: var(--brand-primary);
}

input[type="submit"] {
    display: block;
    width: 100%;
    height: 48px;
    margin: 24px 0 0;
    padding: 0 24px;
    border: 1px solid var(--brand-primary);
    border-radius: var(--radius);
    background: var(--brand-primary);
    color: var(--brand-on-primary);
    font-weight: 700;
    letter-spacing: 0.01em;
    cursor: pointer;
}
input[type="submit"]:hover {
    background: var(--brand-accent);
    border-color: var(--brand-accent);
}
input[type="submit"]:active {
    transform: translateY(1px);
}
#loginSubmit {
    margin-top: 32px;
}

/* Secondary actions: smart card, SSO, challenge "No" */
input[name="CACLoginButton"],
#samlform input[type="submit"],
input[type="submit"][name="no"] {
    width: 100% !important;
    height: 48px;
    margin-top: 12px;
    background: transparent;
    color: var(--brand-primary);
}
input[name="CACLoginButton"]:hover,
#samlform input[type="submit"]:hover,
input[type="submit"][name="no"]:hover {
    background: var(--brand-primary);
    color: var(--brand-on-primary);
}
#samlform {
    margin: 0;
}

/* ---------- Secondary pages (tablularForm) ---------- */

div.tablularForm label {
    display: block;
    float: none;
    width: auto;
    margin: 16px 0 6px;
    padding: 0;
    text-align: left;
    font-weight: 700;
}
div.tablularForm legend + * label:first-child,
div.tablularForm form > label:first-child {
    margin-top: 0;
}
div.tablularForm br {
    display: none;
}
div.tablularForm input,
div.tablularForm input[type="checkbox"],
div.tablularForm input[type="submit"] {
    margin-left: 0;
}
div.tablularForm input[type="submit"] {
    margin-top: 24px;
    padding-bottom: 0;
}
div.tablularForm .loginLink,
.loginLink {
    display: inline-block;
    margin: 16px 0 0;
}
div.tablularForm label.error {
    margin-top: 6px;
    color: var(--brand-warn);
    font-weight: 400;
}
input.error {
    border-color: var(--brand-warn);
    color: var(--text);
}

input[type="submit"]:disabled,
input[type="submit"]:disabled:hover {
    background: #E0E0E0;
    border-color: #E0E0E0;
    color: #8C8C8C;
    cursor: not-allowed;
    transform: none;
}

/* ---------- Password requirements checklist (password-policy.js) ---------- */

.pw-policy {
    margin: 12px 0 0;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 13px;
    line-height: 1.4;
}
.pw-policy__title {
    margin: 0 0 8px !important;
    font-weight: 700;
    color: var(--text) !important;
}
.pw-policy__list {
    margin: 0;
    padding: 0;
    list-style: none;
}
.pw-policy__item {
    position: relative;
    margin: 6px 0;
    padding-left: 24px;
    color: var(--text-muted);
}
/* checkbox */
.pw-policy__item::before {
    content: "";
    position: absolute;
    top: 1px;
    left: 0;
    width: 14px;
    height: 14px;
    border: 1.5px solid #8C8C8C;
    border-radius: 3px;
    box-sizing: border-box;
}
.pw-policy__item.is-met {
    color: var(--text);
}
.pw-policy__item.is-met::before {
    background: var(--brand-primary);
    border-color: var(--brand-primary);
}
/* tick */
.pw-policy__item.is-met::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 5px;
    width: 4px;
    height: 8px;
    border: solid var(--brand-on-primary);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
/* information-only rule (password history): a bullet, not a checkbox, as it is never ticked */
.pw-policy__item--info::before {
    top: 6px;
    left: 4px;
    width: 6px;
    height: 6px;
    border: 0;
    border-radius: 50%;
    background: #8C8C8C;
}
.pw-policy__list--categories {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 12px;
    margin-top: 6px;
}
.pw-policy__list--categories .pw-policy__item {
    margin: 2px 0;
}
.pw-policy__item[data-rule="nonAlphanumeric"],
.pw-policy__item[data-rule="unicode"] {
    grid-column: 1 / -1; /* long labels get their own row */
}
.pw-policy__sr {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}
.pw-mismatch {
    margin: 6px 0 0 !important;
    color: var(--brand-warn) !important;
    font-size: 13px;
}
.pw-mismatch[hidden] {
    display: none;
}

/* ---------- Messages ---------- */

div.tablularForm p,
div.loginTablularForm p {
    margin: 0 0 16px;
    color: var(--text);
}
.loginErrorMsg,
div.loginTablularForm p.loginErrorMsg {
    margin: 0 0 24px !important;
    padding: 12px 16px !important;
    border-radius: var(--radius);
    background-color: var(--error-bg);
    color: var(--error-text) !important;
}
.samlErrorWrapper {
    width: 100%;
    max-width: var(--card-width);
    margin: 0 auto 24px;
    padding: 12px 16px;
    border-radius: var(--radius);
    background-color: var(--error-bg);
    color: var(--error-text);
    text-align: center;
}

/* ---------- Desktop client (scClient) block, hidden by default in Login.htm ---------- */

.scClientWrapper {
    width: 100%;
    max-width: var(--card-width);
    margin: 24px auto 0;
}
#scClientFieldset {
    width: 100%;
}
#scClientLegend {
    margin-left: 0;
    background: none;
    color: var(--text);
    border: 0;
}
.scClientTable {
    width: 100%;
    border-collapse: collapse;
}
#scClientTransferTextTd {
    padding: 0;
    text-align: left;
}
#scClientButtonTd {
    padding: 0;
}
#scClientSubmit {
    width: 100%;
}
.questionMark {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--brand-primary);
    color: var(--brand-on-primary);
    line-height: 20px;
    text-align: center;
    font-size: 12px;
}
.tooltip {
    position: relative;
    cursor: help;
    outline: none;
    text-decoration: none;
}
.tooltip span {
    position: absolute;
    margin-left: -999em;
}
.tooltip:hover span {
    position: absolute;
    top: 2em;
    left: -15em;
    z-index: 99;
    width: 250px;
    margin-left: 0;
    border-radius: var(--radius);
}
.classic {
    padding: 0.8em 1em;
    background: var(--brand-primary);
    color: var(--brand-on-primary);
}

/* ---------- Small screens ---------- */

@media (max-width: 480px) {
    #logo {
        margin-top: 32px;
    }
    .loginWrapper {
        margin-top: 32px;
    }
    fieldset {
        padding: 24px 20px;
    }
}
