/*
 * sign-in.css
 * Enqueued on the front-end sign-in page.
 * Do not duplicate these rules in vendorplus.css or vendorplus-admin.css.
 */

/* =============================================================================
   Sign-in page, Editorial layout (rebuilt 2026-10-14, Figma v2 update 2026-10-15;
   docs/sign-in-page.md). Figma: every desktop state 274:80384 ... 274:82325,
   mobile 274:82507. Mobile-first; 992px = lg. Mobile sizing (36px emblem, 20px
   gaps, 13px button labels) applies to every state, not only the default.
   Sizes are rem (16px base) with the Figma px in comments. Token map:
   bg/page --bg, bg/brand --accent, bg/brand-subtle --accent-tint, text/default
   --ink, text/muted --ink-3, text/brand --accent, text/success --success,
   text/danger --danger, border/default --line, border/control --line-2,
   bg/success-subtle --success-tint, bg/warning-subtle --warn-tint, text/warning
   --warn, border/danger-subtle --danger-border, border/success --success-border,
   border/warning --warn-border, text/warning-strong --warn-strong (core.css).
   The theme's .header and .footer are hidden here; templates/sign-in/sign-in.php
   renders the Top nav and the shared global footer (components.css) itself.
   ============================================================================= */

body.vplus-page-sign-in .header,
body.vplus-page-sign-in .footer {
  display: none;
}
body.vplus-page-sign-in > .container {
  max-width: none;
  width: 100%;
  margin: 0;
  padding: 0;
}

.vplus-signin {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--vplus-font-family-base, Inter, Arial, sans-serif);
}
/* Mobile order: Top nav, logo band, form, overview, footer. */
.vplus-signin-panel,
.vplus-signin-main {
  display: contents;
}
.vplus-signin .vplus-topnav { order: 1; }
.vplus-signin-logo          { order: 2; }
.vplus-signin-auth          { order: 3; }
.vplus-signin-overview      { order: 4; }
.vplus-signin-main > .vplus-footer { order: 5; }   /* shared footer (templates/global/footer.php) */
.vplus-signin-copyright--panel { display: none; }

/* --- Client logo (the real client logo, vplus_get_client_logo_html()) ------ */
.vplus-signin-logo {
  display: flex;
  align-items: center;
  min-height: 5.5rem;            /* 88px band */
  padding: 0 1.5rem;             /* 24px */
  background: var(--accent);
}
.vplus-signin-logo .vplus-logo {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 3rem;              /* 48px, Figma mobile monogram */
  margin: 0;
}
/* No client logo configured: VP mark + "VendorPlus" in white instead of the
   default Webtron SVG, which is unreadable on navy (2026-10-14). */
.vplus-signin-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;                  /* 12px */
}
.vplus-signin-brand-mark {
  display: block;
  flex: none;
  width: 2rem;                   /* 32px mobile */
  height: 2rem;
}
.vplus-signin-brand-name {
  font-size: 1.375rem;           /* 22px, type scale */
  font-weight: 700;              /* Figma v2 mobile banner: Inter Bold */
  line-height: normal;
  color: #fff;                   /* same white as the panel text */
}

/* --- Overview (navy block below the form on mobile) ----------------------- */
.vplus-signin-overview {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;                  /* 28px (Figma v2: was 24 mobile / 32 desktop) */
  padding: 2rem 1.5rem;          /* 32px 24px */
  background: var(--accent);
  color: #fff;                   /* text/inverse */
}
.vplus-signin-overview-intro {
  display: flex;
  flex-direction: column;
  gap: 1rem;                     /* 16px */
}
.vplus-signin-overview p {
  margin: 0;
}
.vplus-signin-overview-eyebrow {
  font-size: 0.6875rem;          /* 11px */
  font-weight: 600;
  text-transform: uppercase;
}
.vplus-signin-overview-heading {
  font-size: 1.625rem;           /* 26px */
  font-weight: 600;
  line-height: 2rem;             /* 32px, Figma 26/32 pair (4.44.0, user 2026-11-16; was 31) */
}
.vplus-signin-line {
  display: block;                /* three hard lines, desktop and mobile (Figma v2) */
}
.vplus-signin-overview-text {
  font-size: 0.875rem;           /* 14px */
  line-height: normal;           /* Figma Auto, no 14px pair (4.44.0; was 18px) */
}
.vplus-signin-benefits {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;                   /* 24px */
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.8125rem;          /* 13px (mobile was 14 before Figma v2) */
}
.vplus-signin-benefits li {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;                   /* 8px */
  padding-top: 1.25rem;          /* 20px */
  border-top: 1px solid #fff;
}
.vplus-signin-benefits strong {
  font-weight: 600;
}
.vplus-signin-benefits span {
  line-height: 1.25rem;          /* 20px, Figma 13/20 pair (4.44.0; was 17) */
}

/* --- Form region (no card) ------------------------------------------------ */
.vplus-signin-auth {
  display: flex;
  justify-content: center;
  padding: 1.75rem 1.5rem;       /* 28px 24px mobile, 48px 32px desktop */
}
.vplus-signin-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;                   /* 24px */
  width: 100%;
  max-width: 24.5rem;            /* 392px */
}
/* Every form here also carries the shared .vplus-form class (shared.css:
   flex-wrap: wrap, align-items: center, and flex: 0 0 100% on each child
   div). In a column, that 100% basis is a height, so each div wrapped into its
   own side-by-side column. No wrap, stretch, and no basis on the divs. */
.vplus-signin-form form {
  display: flex;
  flex-direction: column;        /* fields, preferences and button stack */
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 1.25rem;                  /* 20px, mobile and desktop (Figma v2) */
}
.vplus-signin-form form > div {
  flex: none;
}
.vplus-signin-form .vplus-form-builder {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;                  /* 20px */
}
.vplus-signin-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;                   /* 8px */
  margin: 0;
}

/* Introduction: emblem + eyebrow, then title and description */
.vplus-signin-intro {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;                  /* 20px (Figma v2) */
}
.vplus-signin-identity {
  display: flex;
  align-items: center;
  gap: 0.75rem;                  /* 12px */
}
.vplus-signin-emblem {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 2.25rem;                /* 36px, mobile and desktop (Figma v2) */
  height: 2.25rem;
  border-radius: 0.75rem;        /* 12px */
  background: var(--accent-tint);
  color: var(--accent);          /* #1C3F85 */
  font-size: 1.25rem;            /* 20px FA Light glyph (Figma: 20px custom SVG) */
}
.vplus-signin-emblem--success {
  background: var(--success-tint);
  color: var(--success);         /* #187A43 */
}
.vplus-signin-eyebrow {
  font-size: 0.6875rem;          /* 11px */
  font-weight: 500;
  color: var(--ink-3);
  text-transform: uppercase;
}
.vplus-signin-intro-copy {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;                   /* 8px */
}
.vplus-signin-title {
  margin: 0;
  font-size: 1.625rem;           /* 26px */
  font-weight: 600;
  line-height: 2rem;             /* 32px */
  color: var(--ink);
}
.vplus-signin-description {
  margin: 0;
  font-size: 0.8125rem;          /* 13px */
  line-height: 1.25rem;          /* 20px */
  color: var(--ink-3);
}

/* Labels, inputs, buttons */
.vplus-signin-form .form-label {
  margin: 0;
  font-size: 0.875rem;           /* 14px mobile, 13px desktop */
  font-weight: 500;
  color: var(--ink);
}
.vplus-signin-form .form-control {
  height: 2.75rem;               /* 44px mobile, 36px desktop */
  padding: 0 0.75rem;            /* 12px */
  border: 1px solid var(--line-2);
  border-radius: 0.375rem;       /* 6px */
  background: #fff;              /* bg/surface */
  font-size: 1rem;               /* 16px mobile, 14px desktop */
  color: var(--ink);
}
.vplus-signin-form .form-control::placeholder {
  color: var(--ink-3);
}
/* Figma Chrome / Form field has "Show required" off on every Sign In screen;
   the form builder's marker stays in the markup (and `required` on the input). */
.vplus-signin-form sup.required {
  display: none;
}

/* New-password requirement ticks (Figma Password reset · New password):
   muted until met, then text/success with circle-check. */
.vplus-signin-rules {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;                  /* 4px: 13/20 rows, 24px pitch */
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.8125rem;          /* 13px */
  line-height: 1.25rem;          /* 20px */
  color: var(--ink-3);
}
.vplus-signin-rules li {
  display: flex;
  align-items: center;
  gap: 0.5rem;                   /* 8px */
}
.vplus-signin-rules .fal {
  font-size: 0.8125rem;          /* 13px */
}
.vplus-signin-rules li.is-met {
  color: var(--success);         /* #187A43 */
}

/* Field-level error (Figma Sign In error frames 274:80541, 274:80994,
   274:81420): border/danger on the field, no icon inside the field, and an
   icon + text/danger 13/20 row under it. The row sits in the form builder's
   p.description, inside the 8px-gap .form-group. */
.vplus-signin-form .form-control.is-invalid,
.vplus-signin-form .form-control.is-invalid:focus {
  border-color: var(--danger);   /* #B91C1C */
  background-image: none;
  padding-right: 0.75rem;
}
.vplus-signin-form .form-group > .description {
  margin: 0;
}
.vplus-signin-error {
  display: flex;
  align-items: flex-start;
  gap: var(--space-1, 0.25rem);  /* 4px */
  font-size: 0.8125rem;          /* 13px */
  line-height: 1.25rem;          /* 20px */
  color: var(--danger);
}
.vplus-signin-error .fal {
  flex: none;
  font-size: 0.8125rem;          /* 13px */
  line-height: 1.25rem;
}
/* Shared Figma focus ring (core.css --focus-ring), 4.31.0; was a 2px navy
   outline 2px out, which doubled up with the ring form.css / core.css add. */
.vplus-signin-form .form-control:focus-visible,
.vplus-signin-form .form-check-input:focus-visible,
.vplus-signin-link:focus-visible,
.vplus-signin-return:focus-visible,
.vplus-signin-form .button:focus-visible,
.vplus-signin-form .vplus-two-factor .button:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}
.vplus-signin-form .button.button-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 2.75rem;               /* 44px mobile, 36px desktop */
  padding: 0 1rem;
  border-radius: 0.375rem;
  font-size: 0.8125rem;          /* 13px, mobile and desktop (Figma v2: was 15 on mobile) */
  font-weight: 500;
}
/* Secondary: Figma Chrome / Button Secondary, and the Two Factor plugin's own
   non-primary buttons (Resend Code). Long labels wrap (the TOTP button is 56px,
   two lines), so the height is a minimum. The !important beats Bootstrap's
   .mb-2 on the "Having problems?" buttons rendered by two-factor-fields.php. */
.vplus-signin-form .button.button-outline-secondary,
.vplus-signin-form .vplus-two-factor .button:not(.button-primary) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;           /* 44px mobile, 36px desktop */
  padding: var(--space-2, 0.5rem) var(--space-4, 1rem);
  margin-bottom: 0 !important;
  border: 1px solid var(--line-2);
  border-radius: 0.375rem;
  background: #fff;              /* bg/surface */
  font-size: 0.8125rem;          /* 13px */
  font-weight: 500;
  line-height: 1.25rem;
  text-align: center;
  color: var(--ink);
}
.vplus-signin-form .button.button-outline-secondary:hover,
.vplus-signin-form .vplus-two-factor .button:not(.button-primary):hover {
  background: var(--bg-2);
  border-color: var(--line-2);
  color: var(--ink);
}

/* Preferences row: Remember me | Forgot password? */
.vplus-signin-prefs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 2.75rem;           /* 44px mobile, 16px desktop */
}
.vplus-signin-prefs .vplus-form-builder {
  display: block;
}
.vplus-signin-form .form-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;                   /* 8px */
  min-height: 0;
  margin: 0;
  padding: 0;
  font-size: 0.8125rem;          /* 13px */
  color: var(--ink-3);
}
.vplus-signin-form .form-check-input {
  flex: none;
  width: 1.25rem;                /* 20px mobile, 16px desktop */
  height: 1.25rem;
  margin: 0;
  border: 1px solid var(--line-2);
  border-radius: 0.25rem;        /* 4px */
}
.vplus-signin-form .form-check-input:checked {
  background-color: var(--accent);
  border-color: var(--accent);
}
.vplus-signin-form .form-check-label {
  margin: 0;
  color: var(--ink-3);
}
.vplus-signin-link,
.vplus-signin-return {
  font-size: 0.8125rem;          /* 13px */
  line-height: 1.25rem;          /* 20px */
  text-decoration: none;
}
.vplus-signin-link,
.vplus-signin-return {
  font-weight: 500;
  color: var(--accent);          /* text/brand */
}
.vplus-signin-link {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
}
.vplus-signin-link:hover,
.vplus-signin-return:hover {
  color: var(--accent);
  text-decoration: underline;
}
.vplus-signin-return {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;                   /* 8px, Figma: arrow + two spaces */
  min-height: 2.75rem;           /* 44px tap area kept on mobile (user decision) */
  margin-top: 0;
}
.vplus-signin-form form .vplus-signin-return {
  margin-top: 0.25rem;           /* inside a 20px-gap form: 24px to the previous item, like the 24px column */
}
.vplus-signin-return .fal {
  font-size: 0.8125rem;          /* 13px, the "←" is 13px text in Figma */
}
/* Note under a form (reset request): Regular 13/20 muted */
.vplus-signin-note {
  margin: 0;
  font-size: 0.8125rem;          /* 13px */
  line-height: 1.25rem;          /* 20px */
  color: var(--ink-3);
}

/* Alerts (VP_Core_Alerts markup: .alert.alert-{danger|success|warning} > p).
   Figma Chrome / Notice, v2: 16px padding, 8px radius, 13/20 body. Scoped to
   this page only (templates/global/alerts.php and global alert styles are
   untouched). Not applied: the 12px icon in an 18px box and the Semi Bold title,
   because alerts.php prints only <p> text (follow-up, see docs/sign-in-page.md). */
body.vplus-page-sign-in .vplus-signin-form .alert {
  margin: 0;
  padding: 1rem;                 /* 16px */
  border: 1px solid var(--danger-border);
  border-radius: 0.5rem;         /* 8px, radius/md */
  background: var(--danger-tint);
  font-size: 0.8125rem;
  line-height: 1.25rem;          /* 20px */
  color: var(--danger);
}
body.vplus-page-sign-in .vplus-signin-form .alert p {
  margin: 0;
}
body.vplus-page-sign-in .vplus-signin-form .alert-success {
  border-color: var(--success-border);
  background: var(--success-tint);
  color: var(--success);
}
body.vplus-page-sign-in .vplus-signin-form .alert-warning {
  border-color: var(--warn-border);
  background: var(--warn-tint);  /* bg/warning-subtle #fffbeb */
  color: var(--warn-strong);
}

/* Two Factor: CSS-only handoff over the provider's own markup (.authcode,
   p.submit, "Having problems?" block). Copy, labels and placeholders come from
   the plugin. Scoped so the session modal, which shares two-factor-fields.php,
   is untouched. Figma v2: verification form gap 16, alternative method gap 12
   with 4px top padding. */
body.vplus-page-sign-in .vplus-signin-form form.vplus-two-factor {
  gap: 1rem;                     /* 16px */
}
body.vplus-page-sign-in .vplus-signin-form .vplus-two-factor p {
  margin: 0;
  font-size: 0.8125rem;          /* 13px */
  line-height: 1.25rem;          /* 20px */
}
body.vplus-page-sign-in .vplus-signin-form .vplus-two-factor label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;           /* 14px mobile, 13px desktop */
  font-weight: 500;
  color: var(--ink);
}
body.vplus-page-sign-in .vplus-signin-form .vplus-two-factor .authcode {
  width: 100%;
  text-align: left;
  letter-spacing: normal;
}
body.vplus-page-sign-in .vplus-signin-form .vplus-two-factor .button {
  width: 100%;
}
body.vplus-page-sign-in .vplus-signin-form .vplus-two-factor > .mt-3 {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;                  /* 12px */
  padding-top: 0.25rem;          /* 4px */
  margin-top: 0 !important;      /* beats Bootstrap .mt-3; the form gap already spaces it */
}
body.vplus-page-sign-in .vplus-signin-form .vplus-two-factor > .mt-3 .text-muted {
  color: var(--ink-3);
}

/* Email-code alternate-method buttons use the taller mobile size in the
   2026-11-05 Figma states. The session modal and other providers are unchanged. */
@media (max-width: 991.98px) {
  body.vplus-page-sign-in .vplus-signin-form form.vplus-two-factor--email > .mt-3 > .button {
    min-height: 5rem;            /* 80px */
  }
}

/* --- Desktop: navy client panel on the left, 360px -------------------------- */
@media (min-width: 992px) {
  .vplus-signin {
    display: grid;
    grid-template-columns: 22.5rem minmax(0, 1fr);   /* 360px */
  }
  .vplus-signin-panel {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 2rem;
    padding: 2.25rem;            /* 36px */
    background: var(--accent);
    color: #fff;
  }
  .vplus-signin-main {
    display: flex;
    flex-direction: column;
    min-width: 0;
  }

  .vplus-signin-logo {
    justify-content: center;
    min-height: 0;
    padding: 0;
    background: none;
  }
  .vplus-signin-logo .vplus-logo {
    max-height: 7.9375rem;       /* 127px, Figma logo block */
  }
  .vplus-signin-brand {
    flex-direction: column;      /* stacked and centred, like the desktop logo block */
  }
  .vplus-signin-brand-mark {
    width: 3rem;                 /* 48px */
    height: 3rem;
  }
  .vplus-signin-overview {
    padding: 0;
    background: none;
  }
  .vplus-signin-copyright--panel {
    display: block;
    margin: 0;
    font-size: 0.8125rem;
  }
  .vplus-signin-main > .vplus-footer .vplus-footer-copyright {
    display: none;               /* desktop: the copyright is in the navy panel */
  }

  .vplus-signin-auth {
    flex: 1;
    align-items: center;
    padding: var(--space-12, 3rem) 2rem; /* 48px 32px, space/12 (4.44.0, user 2026-11-16; was 44, no token) */
  }
  .vplus-signin-form .form-label {
    font-size: 0.8125rem;        /* 13px */
  }
  .vplus-signin-form .form-control {
    height: 2.25rem;             /* 36px */
    font-size: 0.875rem;         /* 14px */
  }
  .vplus-signin-form .button.button-primary {
    height: 2.25rem;
  }
  .vplus-signin-form .button.button-outline-secondary,
  .vplus-signin-form .vplus-two-factor .button:not(.button-primary) {
    min-height: 2.25rem;         /* 36px */
  }
  body.vplus-page-sign-in .vplus-signin-form .vplus-two-factor label {
    font-size: 0.8125rem;        /* 13px */
  }
  .vplus-signin-prefs {
    min-height: 1rem;            /* 16px */
  }
  .vplus-signin-form .form-check-input {
    width: 1rem;                 /* 16px */
    height: 1rem;
  }
  .vplus-signin-link,
  .vplus-signin-return {
    min-height: 0;
  }
}
