/**
 * Vanshap Capital — the PMPro login form.
 *
 * The sibling of forms.css, and written to the same brief: one page carries a
 * vendor-drawn form, and the form has to read as part of this site rather than
 * as the plugin's default skin sitting inside it. Everything here is scoped to
 * `.vc-login-grid`, which the login pattern puts on the two-panel wrapper, so
 * nothing reaches a PMPro component rendered anywhere else.
 *
 * Kept out of sections.css because that file owns LAYOUT — where the two
 * panels sit, how they stack, what the aside's rule looks like. This one owns
 * a vendor's markup, which is a different kind of thing with a different
 * failure mode: it breaks when PMPro reshuffles its classes, not when the
 * design changes. Enqueued by vanshap_view_has_pmpro_login() in inc/enqueue.php
 * on the `[pmpro_login]` shortcode, exactly as forms.css is gated on
 * `[fluentform]` — the rest of the site must not download this.
 *
 * ── Why the selectors are so long ──────────────────────────────────────
 *
 * ⚠️ Read this before shortening anything. PMPro's variation_1.css is written
 * with CSS NESTING: the whole file is one `.pmpro { … }` block, and every rule
 * inside it is an implicitly-`&`-prefixed child. `& .pmpro_card` desugars to
 * `:is(.pmpro) .pmpro_card`, so EVERY vendor selector silently carries one
 * more class than it appears to. `.pmpro_section #loginform .login-submit
 * .button` reads as (1,3,0) and is actually (1,4,0).
 *
 * That is why the note this file replaced claimed the winning declaration
 * "could not be located by walking document.styleSheets" — it is there, but a
 * nested rule's selectorText is `& .pmpro_btn`, which el.matches() rejects, so
 * a CSSOM walk skips the entire vendor sheet in silence. It is not missing and
 * it does not use !important. It is simply one class more specific than it
 * looks. Verified 20 Sep 2026 by toggling sheet.disabled one at a time, which
 * is the diagnostic to reach for when a rule here stops winning.
 *
 * So the rule below each vendor rule mirrors its ancestor chain and adds
 * `.vc-login-grid .pmpro` in front, which buys two classes against the
 * vendor's one. Dropping a link from a chain does not tidy the selector, it
 * loses it.
 *
 * ── TWO markups, not one ───────────────────────────────────────────────
 *
 * The shortcode renders a different form per action and they share almost no
 * class names:
 *
 *   /partner-login/                    core's wp_login_form()
 *     .pmpro_card.pmpro_login_wrap
 *       .pmpro_card_content > form#loginform
 *         p.login-username > label + input.input
 *         p.login-password > label + input.input + the toggle (moved in by
 *                            PMPro's own script after load)
 *         p.login-remember > label > input#rememberme
 *         p.login-submit   > input#wp-submit.button
 *       .pmpro_card_actions > .pmpro_actions_nav > a   "Lost Password?"
 *
 *   /partner-login/?action=reset_pass  PMPro's own form
 *     .pmpro_card.pmpro_lost_password_wrap
 *       .pmpro_card_content
 *         p.pmpro_lost_password-instructions
 *         form#lostpasswordform.pmpro_form
 *           .pmpro_form_field > label.pmpro_form_label + input.pmpro_form_input
 *           .pmpro_form_submit > input.pmpro_btn
 *       .pmpro_card_actions > .pmpro_actions_nav > a   "Log In"
 *
 * Every rule below names both, and a change made for one must be checked
 * against the other. Styling only the first is the easy mistake here and it is
 * invisible until someone forgets their password.
 *
 * @package Vanshap
 */

/* ════ The vendor's own variables ═══════════════════════════════════════ */

/* PMPro paints its form from these, which is the extension point it intends
   themes to use — overriding them restyles every PMPro component here at once
   and survives an update that reshuffles selectors. Chasing the individual
   rules instead means a specificity war against markup we do not own, and the
   sections.css block this replaced had already lost one.

   Declared on .vc-login-grid rather than :root deliberately: the plugin prints
   its own `pmpro_colors` <style> on :root near the end of the document, which
   would beat a :root declaration of ours on order. An element-scoped custom
   property wins for that element's subtree whatever the source order, so this
   is both narrower and more robust.

   The radius is not cosmetic: tokens.css sets --radius: 0 because the design
   is square-cornered throughout, and PMPro's default 8px was quietly breaking
   that on the only page where its form appears.

   Moved here from sections.css on 20 Sep 2026 with the rest of the skin. */
.vc-login-grid {
	--pmpro--color--accent:            var(--ocean);
	--pmpro--color--accent--variation: var(--vanshap-navy);
	--pmpro--btn--border-radius:       var(--radius);
	--pmpro--base--border-radius:      var(--radius);
	--pmpro--box-shadow:               none;
}


/* ════ The card ═════════════════════════════════════════════════════════ */

/* PMPro draws the form as a bordered card with 36px of padding and a tinted
   action bar along the bottom. The design has no cards on Paper — the panel IS
   the page here, the way the registration form is — so the whole box is reset
   and the form sits directly under its heading on the same left edge as
   everything else in the column. Losing the 36px inset is most of what makes
   the two panels line up. */
.vc-login-grid .pmpro .pmpro_card {
	border: 0;
	border-radius: 0;
	background: none;
	box-shadow: var(--shadow);
	margin: 0;
	padding: 0;
}

/* ⚠️ !important, and this one is unavoidable rather than lazy. The vendor
   rule is

     .pmpro_section:has(#loginform)
     .pmpro_card_content:not(.widget .pmpro_section:has(#loginform)
                             .pmpro_card_content)

   which, with the implicit `&` and with :has() and :not() each contributing
   their argument's specificity, computes to (2,6,0) — two IDs and six classes,
   for one padding-top. Beating it honestly means writing a seven-part selector
   pinned to the full DOM chain, which would break the first time PMPro moves a
   wrapper. One declaration, scoped to one element on one page, is the smaller
   liability. The rest of the padding is set normally above and does not need
   this. */
.vc-login-grid .pmpro .pmpro_card .pmpro_card_content {
	padding: 0 !important;
}

/* The wrapper's top margin lands on top of the heading's bottom margin and
   doubles the gap. The heading owns that space. */
.vc-login-grid .pmpro {
	margin-block-start: 0;
}

.vc-login-grid .pmpro .pmpro_section {
	margin-block: 0;
}


/* ════ Fields ═══════════════════════════════════════════════════════════ */

/* Mirrors `.pmpro_section #loginform .login-username, …` (1,4,0). */
.vc-login-grid .pmpro .pmpro_section #loginform .login-username,
.vc-login-grid .pmpro .pmpro_section #loginform .login-password,
.vc-login-grid .pmpro .pmpro_section #loginform .login-remember,
.vc-login-grid .pmpro .pmpro_form .pmpro_form_field {
	margin: 0 0 var(--space-5);
}

/* The label is the tracked-caps mark the rest of the site uses to annotate one
   line, identical to .vc-registration-form's. Regular rather than Light: see
   the note on --text-label in tokens.css — both halves of that pairing are
   needed and neither should be undone alone.
 *
 * ⚠️ !important on the login view's labels, for the same reason as the card
   padding above. The vendor rule is

     .pmpro_section #loginform label:not(.pmpro_section #loginform
                                         .login-remember label)

   and the :not() argument alone is (1,3,0), taking the whole selector to
   (2,5,1) to set `font-weight: 500`. The lost-password view's label is an
   ordinary (0,2,0) and is handled by specificity in the rule below, which is
   why the two are separate rather than one list — do not merge them and
   sprinkle !important across both.
 *
 * The vendor also lays this out as a flex row with space-between so the
   password toggle can sit opposite the word "Password". That layout is kept;
   only the type is ours. */
.vc-login-grid .pmpro .pmpro_section #loginform .login-username label,
.vc-login-grid .pmpro .pmpro_section #loginform .login-password label {
	font-family: var(--font-text) !important;
	font-size: var(--size-eyebrow) !important;
	font-weight: var(--weight-regular) !important;
	letter-spacing: var(--track-eyebrow);
	text-transform: uppercase;
	color: var(--text-label);
	line-height: 1.4;
	margin: 0 0 var(--space-2) !important;
}

.vc-login-grid .pmpro label.pmpro_form_label {
	display: block;
	font-family: var(--font-text);
	font-size: var(--size-eyebrow);
	font-weight: var(--weight-regular);
	letter-spacing: var(--track-eyebrow);
	text-transform: uppercase;
	color: var(--text-label);
	line-height: 1.4;
	margin: 0 0 var(--space-2);
}

/* Signal Blue, not red, for the reason forms.css gives: --signal-error is the
   page's only alarming colour and it stays reserved for a field that has
   actually failed.
 *
 * ⚠️ The <abbr> has to be named. PMPro wraps the asterisk in
   `<span class="pmpro_asterisk"> <abbr title="Required Field">*</abbr></span>`
   and colours the ABBR, not the span, from `--pmpro--color--error-text` in
   base.css — so colouring the span alone changes nothing visible and leaves
   the mark in the vendor's dark red. */
.vc-login-grid .pmpro .pmpro_asterisk,
.vc-login-grid .pmpro .pmpro_asterisk abbr,
.vc-login-grid .pmpro .pmpro_asterisk abbr[title] {
	color: var(--accent-mark);
}

/* Mirrors `.pmpro_section #loginform .input` (1,3,0) and `& .pmpro_form_input`
   (0,2,0). */
.vc-login-grid .pmpro .pmpro_section #loginform input.input,
.vc-login-grid .pmpro .pmpro_form input.pmpro_form_input {
	width: 100%;
	font-family: var(--font-text);
	font-size: var(--size-body);
	font-weight: var(--weight-light);
	line-height: var(--lh-body);
	color: var(--text-body);
	background-color: var(--paper);
	border: var(--rule-sky);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	padding: var(--space-3) var(--space-4);
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* An inset ring rather than an outer glow: the design has no shadows, and an
   outline would sit outside a square border and read as a second box. Same
   treatment as .vc-registration-form.
 *
 * ⚠️ `outline: none` is set ONLY on #loginform's inputs, and that asymmetry is
   deliberate. The registration module draws a 2px Signal Blue focus outline on
   `.pmpro_form input:focus-visible` as part of a WCAG 2.2 Accessible
   Authentication pass — see vanshap_reg_login_assets() in
   mu-plugins/vanshap-registration/login.php. That rule does not reach core's
   login form, which carries no .pmpro_form class, so this fills the gap rather
   than overriding an accessibility decision taken in a mu-plugin. The
   consequence is real and is the price: the lost-password field's focus ring
   is Signal Blue and outset while this one is Ocean and inset. To unify them,
   change the mu-plugin — not this file. */
.vc-login-grid .pmpro .pmpro_section #loginform input.input:focus,
.vc-login-grid .pmpro .pmpro_section #loginform input.input:focus-visible {
	border-color: var(--ocean);
	box-shadow: inset 0 0 0 1px var(--ocean);
	outline: none;
}

.vc-login-grid .pmpro .pmpro_form input.pmpro_form_input:focus,
.vc-login-grid .pmpro .pmpro_form input.pmpro_form_input:focus-visible {
	border-color: var(--ocean);
	box-shadow: inset 0 0 0 1px var(--ocean);
}


/* ════ The password toggle ══════════════════════════════════════════════ */

/* PMPro's script moves this into .login-password after load, where the
   vendor's grid puts it on the label's row at the right. That placement is
   left alone — only the type is brought over, since the button otherwise
   inherits a 700-weight system face at 14px.
 *
 * Its eye icon strokes var(--pmpro--color--accent), which the variable block
   at the top of this file already points at Ocean, so the icon needs nothing.
 *
 * Mirrors `& .pmpro_form_field-password-toggle button` (0,3,1). */
.vc-login-grid .pmpro .pmpro_form_field-password-toggle button {
	font-family: var(--font-text);
	font-size: var(--size-meta);
	font-weight: var(--weight-regular);
	letter-spacing: normal;
	text-transform: none;
	color: var(--ocean);
	background: none;
	border: 0;
	box-shadow: var(--shadow);
	padding: 0;
}

.vc-login-grid .pmpro .pmpro_form_field-password-toggle button:hover,
.vc-login-grid .pmpro .pmpro_form_field-password-toggle button:focus-visible {
	color: var(--vanshap-navy);
	box-shadow: var(--shadow);
}


/* ════ Remember me ══════════════════════════════════════════════════════ */

/* A sentence, not a field name, so it sets in body type and not as a label —
   the same call .vc-registration-form makes for its consents. */
.vc-login-grid .pmpro .pmpro_section #loginform .login-remember label {
	display: flex;
	align-items: center;
	gap: var(--space-3);
	font-family: var(--font-text);
	font-size: var(--size-body-sm);
	font-weight: var(--weight-light);
	line-height: var(--lh-body);
	color: var(--text-body);
	margin: 0;
	cursor: pointer;
}

.vc-login-grid .pmpro #rememberme {
	flex: none;
	width: 1rem;
	height: 1rem;
	margin: 0;
	accent-color: var(--ocean);
}


/* ════ Submit ═══════════════════════════════════════════════════════════ */

/* Filled Ocean, against the outlined Register control in the aside: the two
   read as primary and secondary rather than competing, which is the pairing
   this page has always been drawn with. What changes is only the vocabulary —
   square, tracked caps at --size-nav, and the same 13px/26px geometry the
   Register button and the registration form's submit both use, so all three
   buttons in this flow are one button.
 *
 * Inline-block rather than PMPro's `width: 100%`: the site has one button
   shape and it is not a bar.
 *
 * Mirrors `.pmpro_section #loginform .login-submit .button` (1,4,0) and
   `& .pmpro_btn` (0,2,0). */
.vc-login-grid .pmpro .pmpro_section #loginform .login-submit .button,
.vc-login-grid .pmpro .pmpro_form input.pmpro_btn {
	display: inline-block;
	width: auto;
	min-height: 0;
	background-color: var(--ocean);
	color: var(--paper);
	border: 1px solid var(--ocean);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	padding: 13px 26px;
	font-family: var(--font-text);
	font-size: var(--size-nav);
	font-weight: var(--weight-regular);
	letter-spacing: var(--track-nav);
	text-transform: uppercase;
	line-height: 1.2;
	cursor: pointer;
	transition: background-color 0.2s ease, border-color 0.2s ease;
}

/* The vendor's hover empties the fill and turns the label Ocean, which would
   make the primary action look disabled the moment a pointer touched it. This
   darkens to Navy instead, the same hover the Register button uses in reverse. */
.vc-login-grid .pmpro .pmpro_section #loginform .login-submit .button:hover,
.vc-login-grid .pmpro .pmpro_section #loginform .login-submit .button:focus,
.vc-login-grid .pmpro .pmpro_form input.pmpro_btn:hover,
.vc-login-grid .pmpro .pmpro_form input.pmpro_btn:focus {
	background-color: var(--vanshap-navy);
	border-color: var(--vanshap-navy);
	color: var(--paper);
	opacity: 1;  /* the plugin fades its buttons on :active; the darkening is the state here */
}

.vc-login-grid .pmpro .pmpro_section #loginform .login-submit,
.vc-login-grid .pmpro .pmpro_form .pmpro_form_submit {
	margin: var(--space-6) 0 0;
}


/* ════ The actions bar ══════════════════════════════════════════════════ */

/* PMPro closes the card with a tinted bar holding one link — "Lost Password?"
   on the login view, "Log In" on the reset view. With the card's border gone
   the bar has nothing to close, and a grey ground here would be a second
   surface on a page that already has the ocean band. So it is unwrapped and
   the link stands on its own under the form.
 *
 * Mirrors `& .pmpro_card_content + .pmpro_card_actions` (0,3,0). */
.vc-login-grid .pmpro .pmpro_card .pmpro_card_actions {
	background: none;
	border: 0;
	padding: 0;
	margin: var(--space-6) 0 0;
}

/* Semibold, which is what makes the link hold its own without the box around
   it. The underline is the link cue; the weight is what stops it reading as a
   footnote now that nothing frames it. */
.vc-login-grid .pmpro .pmpro_actions_nav {
	display: block;
	text-align: left;
}

.vc-login-grid .pmpro .pmpro_actions_nav a {
	font-family: var(--font-text);
	font-size: var(--size-body-sm);
	font-weight: var(--weight-semibold);
	color: var(--ocean);
	text-decoration: underline;
	text-underline-offset: 0.15em;
}

.vc-login-grid .pmpro .pmpro_actions_nav a:hover,
.vc-login-grid .pmpro .pmpro_actions_nav a:focus-visible {
	color: var(--vanshap-navy);
}


/* ════ The lost-password view ═══════════════════════════════════════════ */

/* The sentence above the field is the instruction for the whole form, so it takes
   --text-label for the same role reason forms.css gives about .ff-el-help-message.
   Both greys resolve to Graphite now (tokens.css), so this is about which name
   describes the text, not which is darker. */
.vc-login-grid .pmpro .pmpro_lost_password-instructions {
	font-family: var(--font-text);
	font-size: var(--size-body);
	font-weight: var(--weight-regular);
	line-height: var(--lh-body);
	color: var(--text-label);
	max-width: 46ch;
	margin: 0 0 var(--space-5);
}

/* The vendor's fixed-height shim between the instructions and the form; the
   margins above already do that job. */
.vc-login-grid .pmpro .pmpro_spacer {
	display: none;
}
