/* Shared styling for the three MasterPageLogin pages: Login, Forgotten Username,
   Forgotten Password. Linked after the master page's inline <style> so these rules
   win the cascade over the old dark login chrome. */

:root {
    --pageBg: #F4F5F8;
    --cardBg: #FFFFFF;
    --cardBorder: #E3E5EA;
    --cardShadow: 0 1px 2px rgba(16,20,32,.04), 0 12px 32px rgba(16,20,32,.07);
    --heading: #14171F;
    --label: #39404E;
    --subtext: #6B7280;
    --muted: #8A91A0;
    --hair: #E7E9EE;
    --focusBorder: #94A3B8;
    --focusRing: rgba(148,163,184,.30);
    --dangerBg: #FDF2F3;
    --dangerBorder: #F0C6CB;
    --dangerText: #A02734;
    --btnBg: #2D1B5E;
    --btnHover: #4A2D8A;
    --linkColor: #4A2D8A;
    --linkHover: #2D1B5E;
    --titleColor: #2D1B5E;
}

/* --- undo the master page's dark login chrome ----------------------- */

html {
    background: var(--pageBg);
}

body {
    background: var(--pageBg);
    min-width: 0;
    font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

#main-form {
    display: block;
}

/* the master's full-width purple logo banner */
#main-form > .row:first-child {
    display: none;
}

#main-form > .row {
    margin: 0;
}

/* --- page scaffold -------------------------------------------------- */

.loginPage {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 16px 32px;
}

.loginWrap {
    width: 100%;
    max-width: 520px;
}

.login-card {
    background: var(--cardBg);
    border: 1px solid var(--cardBorder);
    border-radius: 16px;
    box-shadow: var(--cardShadow);
    padding: 30px 32px 24px;
}

.brandMark {
    margin: 4px 0 24px;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--hair);
}

#mainLogo {
    margin: 0 auto;
    width: 100%;
    height: 88px;
    background-image: url('/Assets/images/main_logo_white.png');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

.login-ui-heading {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -.01em;
    color: var(--titleColor);
    margin: 0 0 18px;
    text-align: center;
    font-family: inherit;
}

.cardIntro {
    display: block;
    font-size: 13px;
    line-height: 1.5;
    color: var(--subtext);
    margin: 0 0 16px;
    text-align: left;
}

/* --- "you are on the right site" notice ----------------------------- */

.brandNotice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: #F8F9FB;
    border: 1px solid var(--cardBorder);
    border-left: 3px solid var(--btnBg);
    border-radius: 10px;
    padding: 11px 12px 11px 13px;
    margin: 0 0 18px;
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--label);
    text-align: left;
}

.brandNotice .noticeIcon {
    flex: 0 0 16px;
    margin-top: 1px;
    color: var(--btnBg);
}

.brandNotice .noticeBody {
    flex: 1 1 auto;
}

.brandNotice strong {
    display: block;
    color: var(--heading);
    font-weight: 700;
    margin-bottom: 2px;
}

.brandNotice .noticeDomain {
    font-weight: 700;
    color: var(--titleColor);
    white-space: nowrap;
}

.noticeDismiss {
    flex: 0 0 auto;
    appearance: none;
    border: 0;
    background: none;
    color: var(--muted);
    font-size: 17px;
    line-height: 1;
    padding: 0 2px;
    margin: -2px -2px 0 0;
    cursor: pointer;
}

.noticeDismiss:hover {
    color: var(--heading);
}

/* --- fields --------------------------------------------------------- */

.fieldRow {
    margin-bottom: 14px;
}

.InputLabel {
    display: block;
    font-size: 12.5px;
    font-weight: 600 !important;
    color: var(--label);
    margin: 0 0 6px;
}

.labelRow {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
}

.labelRow .InputLabel {
    margin: 0;
}

.loginInput {
    width: 100%;
    padding: 11px 14px;
    font-size: 15px;
    font-family: inherit;
    line-height: 1.5;
    color: #212529;
    background-color: #FFF;
    border: 1.33px solid var(--cardBorder);
    border-radius: 10px;
    margin: 0;
}

.loginInput::placeholder {
    color: #A6ACB8;
}

.loginInput:focus {
    outline: none;
    border-color: var(--focusBorder);
    box-shadow: 0 0 0 3px var(--focusRing);
}

.inputWrap {
    position: relative;
    display: block;
}

.inputWrap .loginInput {
    padding-right: 44px;
}

.pwToggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    color: var(--muted);
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
    line-height: 0;
}

.pwToggle:hover {
    color: var(--linkColor);
}

.forgotLink {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--linkColor);
    text-decoration: none;
    white-space: nowrap;
}

.forgotLink:hover, .forgotLink:focus {
    color: var(--linkHover);
    text-decoration: underline;
}

/* covers both the LinkButton (<a>) on Login and the Button (<input>) on the
   forgotten pages */
.submit-btn-restyle {
    -webkit-appearance: none;
    appearance: none;
    display: block;
    width: 100%;
    margin-top: 4px;
    padding: 12px 16px;
    border-radius: 10px;
    border: 2px solid var(--btnBg);
    background: var(--btnBg);
    color: #FFF;
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

.submit-btn-restyle:hover, .submit-btn-restyle:focus {
    background: var(--btnHover);
    border-color: var(--btnHover);
    color: #FFF;
    text-decoration: none;
}

.backRow {
    margin: 16px 0 0;
    text-align: center;
}

/* --- message panel (overrides the master's tomato bar) -------------- */

.errorPanel, #MainContent_msg {
    display: block;
    width: 100%;
    background: var(--dangerBg);
    border: 1px solid var(--dangerBorder);
    color: var(--dangerText) !important;
    border-radius: 10px;
    padding: 10px 12px;
    margin: 0 0 16px;
    font-size: 13px;
    line-height: 1.45;
    text-align: left;
}

/* --- forgotten username / password result ---------------------------- */

/* ShowMessage() in the master page replaces #FGForm with an <h3> result and an
   <h4> of follow-up links, both of which the master styles white for the old
   purple background. */
#FGForm h3 {
    color: var(--heading);
    font-family: inherit;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.45;
    text-align: left;
    margin: 0 0 10px;
}

#FGForm h4 {
    color: var(--subtext);
    font-family: inherit;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.7;
    text-align: left;
    margin: 0;
}

#FGForm h3 a, #FGForm h4 a {
    color: var(--linkColor);
    text-decoration: underline;
}

#loading_panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1050;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(20,23,31,.35);
}

/* --- T&Cs ------------------------------------------------------------ */

.AgreeText {
    margin: 16px 4px 0;
    text-align: center;
    font-size: 11.5px;
    line-height: 1.6;
    color: var(--muted);
}

.AgreeText a {
    color: var(--linkColor);
    text-decoration: none;
    font-size: 11.5px;
}

.AgreeText a:hover {
    text-decoration: underline;
}

@media (max-width: 479.98px) {
    .loginPage { padding: 12px 10px 20px; }
    .login-card { padding: 22px 18px 18px; border-radius: 14px; }
    #mainLogo { height: 75px; }
    .brandNotice { font-size: 12px; }
}
