/* ==========================================================================
   Modern storefront sign-in / create-account page  — Direction C "Refined two-column"
   Scoped under .mv-signin (cannot leak to other pages).
   Driven by the admin-editable :root vars emitted by SiteThemeCss.Build():
     --site-button-bg  --site-button-text  --site-button-hover  --site-button-hover-text
     --site-button-border  --site-surface  --site-border  --site-muted
     --site-content-text  --site-link  --site-link-hover  --site-radius
   BUG FIX: removed --site-primary / --site-text / --site-font / --site-primary-hover
   which are never emitted; all CTAs now use the real button tokens.
   ========================================================================== */

/* ── Page wrapper ─────────────────────────────────────────────────────────── */
.mv-signin {
    max-width: 1000px;
    margin: 0 auto;
    padding: 10px 0 48px;
    font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--site-content-text, #333);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Page title */
.mv-signin .page_header {
    font-size: 22px;
    font-weight: 700;
    margin: 8px 0 16px;
    border: 0;
    background: none;
    color: var(--site-content-text, #333);
}
.mv-signin .page_header span {
    color: var(--site-content-text, #333);
}

/* ── Two-column grid ──────────────────────────────────────────────────────── */
.mv-signin__grid {
    display: flex;
    flex-wrap: wrap;
    gap: 28px;
    align-items: flex-start;
}

/* Each column card */
.mv-signin__col {
    flex: 1 1 360px;
    min-width: 280px;
    margin: 0;
    padding: 0;
    border: 1px solid var(--site-border, #cdcdcd);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
    overflow: hidden;
}

/* Card header (legend) */
.mv-signin__col legend {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    padding: 14px 22px;
    font-size: 16px;
    font-weight: 700;
    color: var(--site-content-text, #333);
    background: var(--site-surface, #f6f6f6);
    border-bottom: 1px solid var(--site-border, #cdcdcd);
}

/* SVG icon inside legend */
.mv-signin__col legend svg {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    fill: var(--site-button-bg, #396b9e);
}

/* Card body */
.mv-signin__body {
    padding: 24px 22px 20px;
}

/* ── Server-injected validation messages ─────────────────────────────────── */
/* Styled here so they work regardless of which column they appear in */
.mv-signin .validationmessage {
    list-style: none;
    margin: 0 0 18px;
    padding: 12px 16px;
    border-radius: var(--site-radius, 5px);
    background: #fdecea;
    border-left: 4px solid #d33;
    color: #7f1d1d;
    font-size: 13px;
    line-height: 1.5;
}
.mv-signin .validationmessage li {
    margin: 3px 0;
}
.mv-signin .validationmessage li::before {
    content: '\2022 ';
    font-weight: bold;
}

/* Success message (e.g. ViewData["Message"]) */
.mv-signin p[style*="green"] {
    margin: 0 0 14px;
    padding: 10px 14px;
    border-radius: var(--site-radius, 5px);
    background: #f0fdf4;
    border-left: 4px solid #22c55e;
    color: #14532d;
    font-size: 13px;
}

/* ── Form field rows: override table layout into a clean vertical stack ───── */
.mv-signin table {
    width: 100%;
    border-spacing: 0;
    border-collapse: collapse;
}
.mv-signin table tr {
    display: block;
    margin-bottom: 16px;
}
.mv-signin table td {
    display: block;
    padding: 0;
    border: 0;
}

/* Section grouping label above input */
.mv-signin td.formlabel {
    margin-bottom: 5px;
    font-size: 12px;
    font-weight: 600;
    color: var(--site-muted, #666);
    text-transform: uppercase;
    letter-spacing: .4px;
    padding-right: 5px;
    text-align: left;
    white-space: nowrap;
    width: 100%;
}
/* The old <span class="required"> was just used for labeling text */
.mv-signin td.formlabel .required {
    color: var(--site-muted, #666);
}
/* Actual required star marker on labels that need one */
.mv-signin label.mv-required::after {
    content: ' *';
    color: #d33;
    font-weight: 700;
}

/* ── Input / select / textarea ────────────────────────────────────────────── */
.mv-signin .forminput {
    width: 100%;
    box-sizing: border-box;
    padding: 20px;
    border: 1.5px solid var(--site-border, #cdcdcd);
    border-radius: 6px;
    font-family: inherit;
    font-size: 14px;
    color: var(--site-content-text, #333);
    background: #fff;
    transition: border-color .15s ease, box-shadow .15s ease;
    line-height: 1.4;
}
.mv-signin .forminput:focus {
    outline: 0;
    border-color: var(--site-button-bg, #396b9e);
    box-shadow: 0 0 0 3px rgba(57, 107, 158, .18);
}
.mv-signin select.forminput {
    height: 46px;
    cursor: pointer;
}
/* Error state injected by the controller as class="errorfield" on the input */
.mv-signin .forminput.errorfield,
.mv-signin .errorfield {
    border-color: #d33 !important;
    background: #fff8f8;
}
.mv-signin .forminput.errorfield:focus {
    box-shadow: 0 0 0 3px rgba(211, 51, 51, .15) !important;
}

/* ── Password show/hide wrapper ───────────────────────────────────────────── */
.mv-pw-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.mv-pw-wrap .forminput {
    padding-right: 44px;
}
.mv-pw-toggle {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 0;
    cursor: pointer;
    padding: 0;
    color: var(--site-muted, #666);
    border-radius: 0 6px 6px 0;
    transition: color .15s;
}
.mv-pw-toggle:hover {
    color: var(--site-button-bg, #396b9e);
}
.mv-pw-toggle:focus {
    outline: 2px solid var(--site-button-bg, #396b9e);
    outline-offset: -2px;
    border-radius: 0 6px 6px 0;
}
.mv-pw-toggle svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    pointer-events: none;
}
/* Hide the eye-slash icon by default; shown via JS when password is visible */
.mv-pw-toggle .mv-pw-icon-off { display: none; }
.mv-pw-toggle .mv-pw-icon-on  { display: block; }
.mv-pw-toggle.is-visible .mv-pw-icon-off { display: block; }
.mv-pw-toggle.is-visible .mv-pw-icon-on  { display: none; }

/* ── Remember-me row ─────────────────────────────────────────────────────── */
.mv-signin #trRememberMe td {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0;
}
.mv-signin #trRememberMe label {
    font-size: 13px;
    color: var(--site-muted, #666);
    font-weight: 400;
    margin: 0;
    cursor: pointer;
    user-select: none;
}
.mv-signin #trRememberMe input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--site-button-bg, #396b9e);
    flex: 0 0 auto;
}

/* ── CTA buttons ─────────────────────────────────────────────────────────── */
/* Both submit triggers use IDs lnkSignIn / lnkCreateAccount.
   We support both <a> (existing) and <button> elements for the CTA.
   Color tokens: --site-button-bg, --site-button-text, --site-button-hover,
   --site-button-border — no --site-primary anywhere. */
.mv-signin a#lnkSignIn,
.mv-signin button#lnkSignIn,
.mv-signin a#lnkCreateAccount,
.mv-signin button#lnkCreateAccount {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 30px;
    border-radius: 6px;
    background: var(--site-button-bg, #396b9e);
    color: var(--site-button-text, #fff) !important;
    border: 0;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: .2px;
    text-decoration: none;
    text-shadow: none;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .08), 0 4px 12px rgba(0, 0, 0, .12);
    transition: transform .12s ease, box-shadow .2s ease, background .15s ease;
    line-height: 1;
    min-width: 150px;
}
.mv-signin a#lnkSignIn:hover,
.mv-signin button#lnkSignIn:hover,
.mv-signin a#lnkCreateAccount:hover,
.mv-signin button#lnkCreateAccount:hover {
    background: var(--site-button-hover, #497bae);
    color: var(--site-button-hover-text, #fff) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, .18), 0 2px 6px rgba(0, 0, 0, .10);
    text-decoration: none;
}
.mv-signin a#lnkSignIn:focus,
.mv-signin button#lnkSignIn:focus,
.mv-signin a#lnkCreateAccount:focus,
.mv-signin button#lnkCreateAccount:focus {
    outline: 3px solid var(--site-button-bg, #396b9e);
    outline-offset: 2px;
}
.mv-signin a#lnkSignIn:active,
.mv-signin button#lnkSignIn:active,
.mv-signin a#lnkCreateAccount:active,
.mv-signin button#lnkCreateAccount:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(0, 0, 0, .16);
}

/* Hide the legacy sprite spans inside the CTA anchors */
.mv-signin a#lnkSignIn .btn-agent-icon,
.mv-signin a#lnkSignIn .btn-right-on,
.mv-signin a#lnkCreateAccount .btn-previous-icon,
.mv-signin a#lnkCreateAccount .btn-right-off {
    display: none !important;
}
/* The .btn-on / .btn-off wrappers: strip the sprite styles */
.mv-signin a#lnkSignIn .btn-on,
.mv-signin a#lnkCreateAccount .btn-off {
    display: inline-flex;
    align-items: center;
    background: none !important;
    padding: 0 !important;
    width: auto !important;
    height: auto !important;
}
.mv-signin a#lnkSignIn .btn-text-on,
.mv-signin a#lnkCreateAccount .btn-text-off {
    display: inline !important;
    background: none !important;
    color: inherit !important;
    font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    letter-spacing: .3px !important;
    text-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* ── Forgot-password link ─────────────────────────────────────────────────── */
.mv-signin a.forgot {
    display: inline-block;
    margin-top: 6px;
    font-size: 13px;
    color: var(--site-link, #2489ce);
    text-decoration: none;
}
.mv-signin a.forgot:hover {
    color: var(--site-link-hover, #3399ff);
    text-decoration: underline;
}
.mv-signin a.forgot:focus {
    outline: 2px solid var(--site-button-bg, #396b9e);
    outline-offset: 2px;
    border-radius: 2px;
}

/* ── Helper text (aria-describedby targets) ──────────────────────────────── */
.mv-signin .mv-field-hint {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    color: var(--site-muted, #666);
    line-height: 1.4;
}

/* ── Submit row: button on left, extra info on right ─────────────────────── */
.mv-signin .mv-submit-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 8px;
}

/* ── Responsive: stack to single column below 720px ─────────────────────── */
@media (max-width: 720px) {
    .mv-signin__grid {
        flex-direction: column;
    }
    .mv-signin__col {
        flex: 1 1 100%;
        min-width: 0;
    }
    .mv-signin__body {
        padding: 18px 16px 16px;
    }
    .mv-signin a#lnkSignIn,
    .mv-signin button#lnkSignIn,
    .mv-signin a#lnkCreateAccount,
    .mv-signin button#lnkCreateAccount {
        width: 100%;
        padding: 14px 20px;
        font-size: 15px;
    }
    .mv-signin .forminput {
        font-size: 16px; /* prevents iOS zoom-in on focus */
        padding: 13px 16px;
    }
    .mv-signin select.forminput {
        height: 48px;
    }
    .mv-signin #trRememberMe input[type="checkbox"] {
        width: 20px;
        height: 20px;
    }
}

/* ── Utility ──────────────────────────────────────────────────────────────── */
.mv-signin .clear {
    clear: both;
}
