/* ==========================================================================
 * Monogo_UnilayerLoginStyles - shared auth-page styles.
 *
 * Loaded on four pages via layout XML:
 *   customer_account_login.xml           (/customer/account/login)
 *   customer_account_create.xml          (/customer/account/create)
 *   customer_account_forgotpassword.xml  (/customer/account/forgotpassword)
 *   customer_account_logoutsuccess.xml   (/customer/account/logoutSuccess)
 *
 * Each of those layouts adds `monogo-auth-page` to <body> via
 * `<attribute name="class" value="monogo-auth-page"/>`. The bulk of
 * the rules below scope to `body.monogo-auth-page:not(.page-monogo-customerauth-embed)` so the floating-
 * label inputs, password toggle, primary buttons, validation
 * messages and required-field affordances stay identical across all
 * three surfaces — same affordance the iframe modal uses, same
 * tokens Monogo_UnilayerCheckout uses.
 *
 * Login-only rules (the two-column grid, CMS-driven marketing copy,
 * benefits list, in-form forgot-password link, …) stay scoped to
 * `body.customer-account-login:not(.page-monogo-customerauth-embed)` so they don't leak onto the other
 * auth pages.
 *
 * Selectors are deliberately prefixed with `body.` so they outrank
 * Luma's `styles-l.css` (loaded after this file) — for example
 * Luma's `.login-container .block.block-customer-login { float: right }`
 * is (0,3,0) and we beat it with (0,4,0) without resorting to
 * `!important` on every property.
 *
 * Embed-chrome guard (`:not(.page-monogo-customerauth-embed)`):
 * the auth-iframe modal renders /customer/account/login (and friends)
 * through Monogo_UnilayerCustomerAuth's chrome-strip handle. The
 * iframe body carries `page-monogo-customerauth-embed` along with our
 * `monogo-auth-page` class, so without an explicit exclusion the two
 * stylesheets fight over the same form. We resolve this with two
 * independent defences:
 *
 *   1. Primary — this asset is removed from the embed page's <head>
 *      via `view/frontend/layout/monogo_customerauth_embed_chrome.xml`
 *      in this module (a `<remove src="..."/>` against this exact
 *      asset URL).
 *
 *   2. Belt-and-braces — every base selector below carries a
 *      `:not(.page-monogo-customerauth-embed)` guard so that even if
 *      FPC serves a cached variant of the embed page where the
 *      remove didn't take effect (handle merge order edge case,
 *      module-sequence regression, etc.), no rule from this file
 *      can match.
 * ========================================================================== */

/* --------------------------------------------------------------------------
 * @font-face — ProximaNova brand typeface (5 weights, woff2 + woff)
 * --------------------------------------------------------------------------
 * Files live in `app/code/Monogo/UnilayerLoginStyles/view/frontend/web/fonts/`
 * and are reused cross-module by `Monogo_UnilayerAccountDashboard::dashboard.css`
 * (which loads them via a relative URL — single browser cache hit across
 * the auth flow → customer dashboard navigation, no duplicate download).
 *
 * Format strategy:
 *   - woff2 first (~58 KB / weight, ~97 % browser support including Safari 12+)
 *   - woff fallback (~93 KB / weight) for older browsers
 *   - eot / ttf intentionally NOT shipped (eot = legacy IE only;
 *     ttf would double the payload without adding browser coverage)
 *
 * font-display: swap → text paints immediately with the system fallback,
 * then swaps to ProximaNova when the font is ready. No FOIT (flash of
 * invisible text), small FOUT (flash of unstyled text) accepted as a
 * brand-typography trade-off.
 *
 * Weight mapping:
 *   400 → ProximaNova-Regular  (body, paragraphs, default text)
 *   500 → ProximaNova-Medium   (labels, secondary emphasis)
 *   600 → ProximaNova-Semibold (buttons, headings, strong)
 *   700 → ProximaNova-Bold     (h1-h2, accent CTAs)
 *   800 → ProximaNova-Extrabld (auth chrome bar headlines, the only 800 use)
 *
 * Italic, Light (300) intentionally NOT shipped — no current rule
 * declares them; if a future rule needs italic, the browser will
 * synthesise oblique from the Regular face (acceptable for sporadic
 * <em>/<i> in native Magento messages). Adding the italic faces is a
 * 4-line addition in this file plus 4 woff2/woff pairs in /fonts.
 * (Story 31 D25a, 2026-05-15.)
 * -------------------------------------------------------------------------- */

@font-face {
    font-family: ProximaNova;
    src: url('../fonts/ProximaNova-Regular.woff2') format('woff2'),
         url('../fonts/ProximaNova-Regular.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: ProximaNova;
    src: url('../fonts/ProximaNova-Medium.woff2') format('woff2'),
         url('../fonts/ProximaNova-Medium.woff') format('woff');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: ProximaNova;
    src: url('../fonts/ProximaNova-Semibold.woff2') format('woff2'),
         url('../fonts/ProximaNova-Semibold.woff') format('woff');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: ProximaNova;
    src: url('../fonts/ProximaNova-Bold.woff2') format('woff2'),
         url('../fonts/ProximaNova-Bold.woff') format('woff');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: ProximaNova;
    src: url('../fonts/ProximaNova-Extrabld.woff2') format('woff2'),
         url('../fonts/ProximaNova-Extrabld.woff') format('woff');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

/* --------------------------------------------------------------------------
 * Design Tokens (mirrored from Monogo_UnilayerCheckout)
 * Declared on the body so every descendant — including widget blocks
 * (Name, Dob, Telephone, Country, …) Magento injects via PHP — inherits.
 * -------------------------------------------------------------------------- */
body.monogo-auth-page:not(.page-monogo-customerauth-embed) {
    --muc-color-primary: #000;
    --muc-color-bg: #fff;
    --muc-color-surface: #F4F4F4;
    --muc-color-border: #e5e5e5;
    --muc-color-border-input: #ccc;
    --muc-color-text: #111;
    --muc-color-text-secondary: #6b6b6b;
    --muc-color-text-muted: #999;
    --muc-color-success: #2e7d32;
    --muc-color-error: #d32f2f;
    --muc-color-link: #0066cc;
    /* Brand font stack — ProximaNova preferred, gracefully degrades through
       the modern UI / system fonts. The `@font-face` block ABOVE :root
       activates ProximaNova in 5 weights (400/500/600/700/800) loaded
       from `Monogo_UnilayerLoginStyles::fonts/` and reused cross-module
       by `Monogo_UnilayerAccountDashboard::dashboard.css` (which loads
       the same files via a relative URL — single browser-cache hit
       across auth flow → customer dashboard navigation).
       Stack mirrored across `Monogo_UnilayerLoginStyles::login.css` and
       `Monogo_UnilayerAccountDashboard::dashboard.css` so login,
       register, forgot, post-login and customer dashboard all render
       with one consistent typeface. (Story 31 D25 + D25a.) */
    --muc-font-family: ProximaNova, ui-sans-serif, system-ui,
        -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, "Noto Sans", sans-serif,
        "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol",
        "Noto Color Emoji";
    --muc-font-size-xs: 11px;
    --muc-font-size-sm: 12px;
    --muc-font-size-base: 14px;
    --muc-font-size-md: 16px;
    --muc-font-size-lg: 20px;
    --muc-font-size-heading: 32px;
    --muc-line-height: 1.5;
    --muc-border-radius: 0;
    --muc-transition-speed: 300ms;
    --muc-input-height: 48px;
    --muc-button-height: 52px;
    --muc-gutter: 80px;
}

/* --------------------------------------------------------------------------
 * Auth-page chrome bars (top + bottom)
 *
 * The shared `monogo_unilayerloginstyles_auth_chrome` layout handle
 * (see monogo_unilayerloginstyles_auth_chrome.xml) removes the global
 * `header.container` and `footer-container` on every auth surface
 * (/login, /create, /forgotpassword) and replaces them with two
 * full-bleed `<div>` strips wrapped in CMS blocks:
 *
 *   <div class="monogo-auth-topbar">…CMS monogo_auth_topbar…</div>
 *   <main role="main" class="page-main">…form…</main>
 *   <div class="monogo-auth-bottombar">…CMS monogo_auth_bottombar…</div>
 *
 * The strips are pure decoration — solid black background, large
 * uppercase white headline centred horizontally. Default seeded copy
 * is "(in development)" until the merchant edits the CMS blocks in
 * admin. Both strips share the same visual treatment so they read as
 * a matching pair of marketing bookends around the form.
 *
 * `body.monogo-auth-chrome` is the body class the shared handle adds
 * — scoping every rule to it means these styles only render on the
 * three pages that pulled the handle in, and they vanish automatically
 * the moment another page mistakenly imports this CSS.
 *
 * Iframe context is excluded via `:not(.page-monogo-customerauth-embed)`
 * even though monogo_customerauth_embed_chrome.xml removes the strips
 * outright — belt-and-braces in case FPC serves a stale variant.
 * -------------------------------------------------------------------------- */

/* When the auth chrome handle is active, Luma's `.page-wrapper`
   sometimes still reserves vertical room for the removed
   header.container (paddings declared at the wrapper level rather
   than the header itself). Clamp it to 0 so the top strip really
   sits at the very top of the viewport. Same for the bottom edge. */
body.monogo-auth-chrome:not(.page-monogo-customerauth-embed) .page-wrapper {
    padding-top: 0;
    padding-bottom: 0;
}

/* --------------------------------------------------------------------------
 * Page-level reset
 *
 * Zeroes Luma's default `.page-main` padding so the form / hero / two
 * column grid below render edge-to-edge inside our auth chrome wrapper.
 *
 * Scope deliberately EXCLUDES `.customer-account-login` — the login
 * screen keeps Luma's native `.page-main` gutter so the two-column
 * grid (sign-in + register) inherits the same horizontal breathing
 * room the rest of the storefront uses, and so 3rd-party blocks
 * (Mageplaza social-login, reCAPTCHA, Persistent remember-me) that
 * read `.page-main` paddings keep aligning with the form. The /create
 * and /forgotpassword pages still get padding zero because they
 * manage their own gutters: /create through the full-width hero +
 * inner two-column container (with its own 24px padding), and
 * /forgotpassword through `.page-title-wrapper` + single-column
 * form, both centred with auto margins.
 * -------------------------------------------------------------------------- */

body.monogo-auth-page:not(.page-monogo-customerauth-embed) .columns .column.main {
    padding: 0;
    width: 100%;
    max-width: none;
    float: none;
}

/* Single-column wrapper used by /create and /forgotpassword. Both
   pages render the form directly inside `.column.main` with no
   `.login-container` siblings, so we centre and cap it here.
   `.customer-account-login` opts out (overridden by the grid below). */
body.monogo-auth-page:not(.page-monogo-customerauth-embed) .columns .column.main > .form,
body.monogo-auth-page:not(.page-monogo-customerauth-embed) .columns .column.main > form {
    box-sizing: border-box;
    width: 100%;
    max-width: 480px;
    margin: 48px auto 72px;
    padding: 0 24px;
    font-family: var(--muc-font-family);
    font-size: var(--muc-font-size-base);
    line-height: var(--muc-line-height);
    color: var(--muc-color-text);
}

@media (max-width: 768px) {
    body.monogo-auth-page:not(.page-monogo-customerauth-embed) .columns .column.main > .form,
    body.monogo-auth-page:not(.page-monogo-customerauth-embed) .columns .column.main > form {
        margin: 16px auto 48px;
    }
}

/* --------------------------------------------------------------------------
 * Floating-label underline inputs (mirror Monogo_UnilayerCustomerAuth
 * embed.css). Same affordance the iframe modal uses on firstname /
 * email / password fields:
 *
 *   - .field reserves a 16px top pad so the floated label has room.
 *   - .label sits absolutely positioned over the input as a placeholder
 *     substitute in the rest state.
 *   - On focus or when the input carries a value, `:has()` +
 *     `:placeholder-shown` translates the label up and scales it down.
 *   - Companion `floating-labels.js` primes inputs with `placeholder=" "`
 *     so `:placeholder-shown` resolves on Magento templates that ship
 *     without a placeholder attribute.
 * -------------------------------------------------------------------------- */
body.monogo-auth-page:not(.page-monogo-customerauth-embed) .fieldset {
    margin: 0 0 16px;
    padding: 0;
    border: 0;
}

body.monogo-auth-page:not(.page-monogo-customerauth-embed) .fieldset > .legend {
    margin: 0 0 16px;
    padding: 0;
    border: 0;
    font-family: var(--muc-font-family);
    font-size: var(--muc-font-size-lg);
    font-weight: 700;
    color: var(--muc-color-text);
}

body.monogo-auth-page:not(.page-monogo-customerauth-embed) .fieldset > .legend + br {
    display: none;
}

/* Hide structural fieldset legends on the register page. The auth
   iframe modal does the same (its register screen renders the form
   as a single flat list without "Personal Information" / "Sign-in
   Information" / "Address Information" headings) — keeping parity
   with that surface. Magento ships the legends inside <fieldset>
   for semantic grouping; we keep them in the DOM for screen-readers
   and a11y tooling, just visually clipped to zero. */
body.customer-account-create:not(.page-monogo-customerauth-embed) form.form-create-account .fieldset > .legend,
body.customer-account-create:not(.page-monogo-customerauth-embed) form.form-create-account .fieldset > .legend + br {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    border: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    clip-path: inset(50%);
}

/* Consent checkboxes moved to the bottom of the form by
   js/embed/register-reorder.js. That script lifts every
   `.field.choice` (newsletter, GDPR, 3rd-party plug-ins) out of its
   originating fieldset and inserts it as a direct child of
   `<form.form-create-account>` immediately before `.actions-toolbar`.
   The base `.field.choice` rule already styles the checkbox + label
   pair; we only need a small top margin on the FIRST reordered
   choice so it doesn't sit flush against the password-confirmation
   field above, and a slightly larger bottom gap before the submit
   button to keep the consent block visually separate from the CTA. */
body.customer-account-create:not(.page-monogo-customerauth-embed) form.form-create-account > .field.choice {
    margin: 12px 0;
}

body.customer-account-create:not(.page-monogo-customerauth-embed) form.form-create-account > .field.choice:first-of-type {
    margin-top: 20px;
}

body.customer-account-create:not(.page-monogo-customerauth-embed) form.form-create-account > .field.choice:last-of-type {
    margin-bottom: 4px;
}

/* The "or relocated DOB" branches below mirror the canonical
   `.fieldset > .field` selectors so the DOB field — relocated by
   js/embed/dob-newsletter-toggle.js to be a direct child of
   `.form-create-account` (right after the newsletter `.field.choice`
   that register-reorder.js already pulled out of its fieldset) — gets
   the same floating-label treatment. Without this branch the floating-
   label rules silently drop on the relocated DOB and the tooltip's
   absolute positioning loses its `.field` containing block, which is
   exactly what caused the off-screen tooltip + non-floating label on
   /customer/account/create. */
/* --------------------------------------------------------------------------
 * First-name + last-name pair on the create-account screen
 *
 * `Monogo_UnilayerCustomerAuth::js/embed/register-fields-reorder.js` wraps
 * the native firstname + lastname `.field` siblings in a thin
 * `<div class="monogo-name-row">` so the two name fields can sit on the
 * same visual row at >= 768px and stack on smaller screens. The wrapper
 * is a CSS Grid with two equal columns and a 32 px column gap.
 *
 * Floating-label compatibility: every `.fieldset > .field:not(.choice)`
 * selector below has been extended via `:is(.fieldset, .monogo-name-row)`
 * so the floating-label cascade keeps applying to fields wrapped inside
 * the name row exactly the same way it applies to fields directly inside
 * the fieldset. No padding/margin/positioning regression.
 * -------------------------------------------------------------------------- */
body.monogo-auth-page:not(.page-monogo-customerauth-embed) .monogo-name-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 32px;
    row-gap: 0;
}

@media (max-width: 767.98px) {
    body.monogo-auth-page:not(.page-monogo-customerauth-embed) .monogo-name-row {
        grid-template-columns: 1fr;
    }
}

body.monogo-auth-page:not(.page-monogo-customerauth-embed) :is(.fieldset, .monogo-name-row) > .field:not(.choice),
body.monogo-auth-page:not(.page-monogo-customerauth-embed) .form-create-account > .field.field-dob {
    position: relative;
    margin: 0 0 16px;
    padding-top: 16px;
}

body.monogo-auth-page:not(.page-monogo-customerauth-embed) :is(.fieldset, .monogo-name-row) > .field:not(.choice) > .label:not(.mage-error),
body.monogo-auth-page:not(.page-monogo-customerauth-embed) .form-create-account > .field.field-dob > .label:not(.mage-error) {
    position: absolute;
    top: 16px;
    left: 0;
    width: auto;
    max-width: calc(100% - 44px);
    height: var(--muc-input-height);
    line-height: var(--muc-input-height);
    margin: 0;
    padding: 0;
    float: none;
    text-align: left;
    color: var(--muc-color-text-muted);
    font-family: var(--muc-font-family);
    /* Resting label size matches the iframe modal
       (Monogo_UnilayerCustomerAuth embed.css line 342:
        `font-size: var(--mca-font-size-sm) !important`).
       Both pages now read the same token (--muc-font-size-sm =
       12px). Floated state stays scale(0.75) → ~9px caption. */
    font-size: var(--muc-font-size-sm);
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    pointer-events: none;
    transform-origin: 0 0;
    transition:
        transform var(--muc-transition-speed) ease,
        color var(--muc-transition-speed) ease;
    z-index: 1;
}

body.monogo-auth-page:not(.page-monogo-customerauth-embed) :is(.fieldset, .monogo-name-row) > .field:not(.choice) > .label > span,
body.monogo-auth-page:not(.page-monogo-customerauth-embed) .form-create-account > .field.field-dob > .label > span {
    color: inherit;
    font-weight: inherit;
}

/* Floated state: input has focus OR holds a value. */
body.monogo-auth-page:not(.page-monogo-customerauth-embed) :is(.fieldset, .monogo-name-row) > .field:not(.choice):has(.control input:focus) > .label:not(.mage-error),
body.monogo-auth-page:not(.page-monogo-customerauth-embed) :is(.fieldset, .monogo-name-row) > .field:not(.choice):has(.control input:not(:placeholder-shown)) > .label:not(.mage-error),
body.monogo-auth-page:not(.page-monogo-customerauth-embed) :is(.fieldset, .monogo-name-row) > .field:not(.choice):has(.control select:focus) > .label:not(.mage-error),
body.monogo-auth-page:not(.page-monogo-customerauth-embed) :is(.fieldset, .monogo-name-row) > .field:not(.choice):has(.control textarea:focus) > .label:not(.mage-error),
body.monogo-auth-page:not(.page-monogo-customerauth-embed) :is(.fieldset, .monogo-name-row) > .field:not(.choice):has(.control textarea:not(:placeholder-shown)) > .label:not(.mage-error),
body.monogo-auth-page:not(.page-monogo-customerauth-embed) .form-create-account > .field.field-dob:has(.control input:focus) > .label:not(.mage-error),
body.monogo-auth-page:not(.page-monogo-customerauth-embed) .form-create-account > .field.field-dob:has(.control input:not(:placeholder-shown)) > .label:not(.mage-error) {
    transform: translateY(-16px) scale(0.75);
    color: var(--muc-color-text-secondary);
}

/* Error state: recolour the label to mirror the underline colour. */
body.monogo-auth-page:not(.page-monogo-customerauth-embed) :is(.fieldset, .monogo-name-row) > .field:not(.choice):has(.control input.mage-error) > .label:not(.mage-error),
body.monogo-auth-page:not(.page-monogo-customerauth-embed) :is(.fieldset, .monogo-name-row) > .field:not(.choice):has(.control input[aria-invalid="true"]) > .label:not(.mage-error),
body.monogo-auth-page:not(.page-monogo-customerauth-embed) :is(.fieldset, .monogo-name-row) > .field:not(.choice):has(.control select.mage-error) > .label:not(.mage-error),
body.monogo-auth-page:not(.page-monogo-customerauth-embed) :is(.fieldset, .monogo-name-row) > .field:not(.choice):has(.control textarea.mage-error) > .label:not(.mage-error),
body.monogo-auth-page:not(.page-monogo-customerauth-embed) .form-create-account > .field.field-dob:has(.control input.mage-error) > .label:not(.mage-error),
body.monogo-auth-page:not(.page-monogo-customerauth-embed) .form-create-account > .field.field-dob:has(.control input[aria-invalid="true"]) > .label:not(.mage-error) {
    color: var(--muc-color-error);
}

/* Required-field asterisks. Mirror the iframe modal:
       label text   *
   The asterisk is rendered as the `::after` pseudo-element of the
   field's `<label>`, painted in `--muc-color-error` and offset from
   the label text by 4px, exactly matching `embed.css` lines 256-260.

   Two upstream sources can paint the asterisk:
     - Luma core   `.required > .label::after  { content: '*' }`
                   `._required > .label::after { content: '*' }`
     - This module (legacy) `.label > span::after { content: ' *' }`
   We let Luma core paint the character (`content: '*'` from theme)
   and override only the `color` + `margin-left`. The legacy
   `> span::after` selector is suppressed (`content: none`) so we
   don't render a duplicate asterisk on top of the Luma one when
   both selectors match the same DOM (the `> span` variant exists in
   some module-customer templates that wrap the label text in
   `<span>`). */
body.monogo-auth-page:not(.page-monogo-customerauth-embed) .fieldset > .field.required > .label::after,
body.monogo-auth-page:not(.page-monogo-customerauth-embed) .fieldset > .field._required > .label::after,
body.monogo-auth-page:not(.page-monogo-customerauth-embed) .fieldset > .fields > .field.required > .label::after,
body.monogo-auth-page:not(.page-monogo-customerauth-embed) .fieldset > .fields > .field._required > .label::after,
body.monogo-auth-page:not(.page-monogo-customerauth-embed) .field.required > .label::after,
body.monogo-auth-page:not(.page-monogo-customerauth-embed) .field._required > .label::after {
    color: var(--muc-color-error);
    margin-left: 4px;
}

body.monogo-auth-page:not(.page-monogo-customerauth-embed) .fieldset > .field.required > .label > span::after,
body.monogo-auth-page:not(.page-monogo-customerauth-embed) .fieldset > .field._required > .label > span::after,
body.monogo-auth-page:not(.page-monogo-customerauth-embed) .field.required > .label > span::after,
body.monogo-auth-page:not(.page-monogo-customerauth-embed) .field._required > .label > span::after {
    content: none;
    display: none;
}

/* Suppress the fieldset-level "* Required Fields" hint Luma paints
   via `fieldset[data-hasrequired]::after { content: attr(...) }`.
   On /login this pseudo renders AFTER the actions-toolbar because
   the fieldset.login wraps the whole form (incl. the submit button),
   so the hint visually drops below the Sign In button. On /create it
   sits below the fieldset.create.account block. Either way the
   asterisks themselves are already gone (see rule above), so the
   matching helper sentence is now redundant copy. */
body.monogo-auth-page:not(.page-monogo-customerauth-embed) .fieldset::after,
body.monogo-auth-page:not(.page-monogo-customerauth-embed) .fieldset[data-hasrequired]::after {
    content: none;
    display: none;
}

body.monogo-auth-page:not(.page-monogo-customerauth-embed) :is(.fieldset, .monogo-name-row) > .field:not(.choice) > .control,
body.monogo-auth-page:not(.page-monogo-customerauth-embed) .form-create-account > .field.field-dob > .control {
    width: 100%;
    float: none;
    position: relative;
}

body.monogo-auth-page:not(.page-monogo-customerauth-embed) .control > input.input-text,
body.monogo-auth-page:not(.page-monogo-customerauth-embed) .control > input[type="text"],
body.monogo-auth-page:not(.page-monogo-customerauth-embed) .control > input[type="email"],
body.monogo-auth-page:not(.page-monogo-customerauth-embed) .control > input[type="tel"],
body.monogo-auth-page:not(.page-monogo-customerauth-embed) .control > input[type="number"],
body.monogo-auth-page:not(.page-monogo-customerauth-embed) .control > input[type="password"],
body.monogo-auth-page:not(.page-monogo-customerauth-embed) .control > select,
body.monogo-auth-page:not(.page-monogo-customerauth-embed) .control > textarea {
    box-sizing: border-box;
    width: 100%;
    height: var(--muc-input-height);
    padding: 0 0 4px 0;
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--muc-color-border-input);
    border-radius: 0;
    color: var(--muc-color-text);
    font-family: var(--muc-font-family);
    font-size: var(--muc-font-size-md);
    line-height: 1.4;
    box-shadow: none;
    appearance: none;
    transition: border-color var(--muc-transition-speed) ease;
}

body.monogo-auth-page:not(.page-monogo-customerauth-embed) .control > textarea {
    height: auto;
    min-height: calc(var(--muc-input-height) * 2);
    padding-top: 4px;
}

body.monogo-auth-page:not(.page-monogo-customerauth-embed) .control > input.input-text:focus,
body.monogo-auth-page:not(.page-monogo-customerauth-embed) .control > input.input-text:focus-visible,
body.monogo-auth-page:not(.page-monogo-customerauth-embed) .control > input[type="text"]:focus,
body.monogo-auth-page:not(.page-monogo-customerauth-embed) .control > input[type="email"]:focus,
body.monogo-auth-page:not(.page-monogo-customerauth-embed) .control > input[type="tel"]:focus,
body.monogo-auth-page:not(.page-monogo-customerauth-embed) .control > input[type="number"]:focus,
body.monogo-auth-page:not(.page-monogo-customerauth-embed) .control > input[type="password"]:focus,
body.monogo-auth-page:not(.page-monogo-customerauth-embed) .control > select:focus,
body.monogo-auth-page:not(.page-monogo-customerauth-embed) .control > textarea:focus {
    outline: 0;
    border-bottom-color: var(--muc-color-primary);
    border-bottom-width: 2px;
    box-shadow: none;
}

/* Hide the priming `placeholder=" "` value visually. */
body.monogo-auth-page:not(.page-monogo-customerauth-embed) .control > input::placeholder,
body.monogo-auth-page:not(.page-monogo-customerauth-embed) .control > textarea::placeholder {
    color: transparent;
    opacity: 1;
}

/* --------------------------------------------------------------------------
 * Choice rows (Remember me, marketing consent, Sign Up for Newsletter)
 * Kept as inline checkbox + label, no floating-label here.
 * -------------------------------------------------------------------------- */
/* Alignment: `align-items: flex-start` (not `center`) so a 2-line
   consent label keeps the checkbox visually anchored to the FIRST
   line of text instead of being centred against the full text block.
   The checkbox is nudged down by 2px via `margin-top` to compensate
   for the native control's optical baseline (the checkmark sits a
   couple of pixels below the box's geometric centre, so a strict
   geometric centre against text-line baseline reads as "checkbox is
   too high"). `flex-shrink: 0` prevents the box from squashing when
   the consent label wraps to a second line. Same rule the embed
   surface uses — see embed.css `.field.choice` block. */
body.monogo-auth-page:not(.page-monogo-customerauth-embed) .field.choice {
    display: flex;
    /* `flex-wrap: wrap` is REQUIRED for the `label.mage-error` placement
       block below. jQuery.validate is bootstrapped by
       vendor/magento/module-customer/view/frontend/templates/form/register.phtml
       line 327-352 with the default
       `errorPlacement(error, element) { error.insertAfter(element); }`
       (the file's custom errorPlacement only special-cases the DOB
       compound input). For a `.field.choice` checkbox that means the
       `<label class="mage-error">` lands as a sibling DIRECTLY AFTER
       the `<input type="checkbox">` inside this flex container, so
       without wrapping it stays on the same row as the consent text
       label - visually colliding with the consent copy. With
       `flex-wrap: wrap` the error label can re-flow onto a row of its
       own via `order: 99; flex-basis: 100%;` below. */
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 10px;
    margin: 6px 0 16px;
    padding: 0;
    line-height: 1.4;
}

body.monogo-auth-page:not(.page-monogo-customerauth-embed) .field.choice > input[type="checkbox"] {
    flex: 0 0 auto;
    top: 0;
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--muc-color-primary);
}

body.monogo-auth-page:not(.page-monogo-customerauth-embed) .field.choice > label,
body.monogo-auth-page:not(.page-monogo-customerauth-embed) .field.choice > label > span {
    margin: 0;
    padding: 0;
    font-size: var(--muc-font-size-sm);
    font-weight: 400;
    line-height: 1.4;
    color: var(--muc-color-text);
}

body.monogo-auth-page:not(.page-monogo-customerauth-embed) .field.choice > label {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
}

/* Park jQuery.validate's `<label class="mage-error">` (and the legacy
   `<div class="mage-error">` rendered by the Magento_Customer flow
   for compound widgets - see `register.phtml` line 337) on a dedicated
   row directly BELOW the checkbox + consent-text pair.
   `order: 99` slots the error label after every other flex child
   regardless of where jQuery.validate physically `insertAfter`-ed it
   in the DOM, and `flex-basis: 100%` forces the row break created by
   the parent's `flex-wrap: wrap` rule above.
   `margin-left: 26px` (16 px checkbox width + 10 px row gap) optically
   aligns the error label with the consent-text label that already sits
   to the right of the checkbox - matches the iframe surface
   (Monogo_UnilayerNewsletterAmastyBridge embed.css `label.mage-error`
   block) so register, login and the newsletter iframe all surface
   field-level errors with the same affordance.
   The selector deliberately does NOT cross the inner `<label>` text
   wrapper - jQuery.validate inserts the error label as a sibling of
   the input, never as a descendant of the consent-text label. */
body.monogo-auth-page:not(.page-monogo-customerauth-embed) .field.choice > label.mage-error,
body.monogo-auth-page:not(.page-monogo-customerauth-embed) .field.choice > div.mage-error {
    order: 99;
    flex-basis: 100%;
    margin: 4px 0 0 26px;
    color: var(--muc-color-error);
    font-size: var(--muc-font-size-xs);
    line-height: 1.4;
}

/* --------------------------------------------------------------------------
 * Amasty GDPR consent row on `/customer/account/create/`.
 *
 * DOM (rendered by `Amasty_Gdpr::agreement.phtml` on the register form):
 *
 *   <div class="amgdpr-checkbox field choice" data-amgdpr-content-from="registration">
 *     <input type="hidden" name="amgdpr_agreement[…]" value="0">
 *     <input type="checkbox" class="amgdpr-checkbox" …>
 *     <label class="label amgdpr-label">
 *       <span class="amgdpr-text">…długi consent-copy (EN loyalty
 *         programme opt-in ma ~150 znaków)…</span>
 *     </label>
 *   </div>
 *
 * Bug: the shared `.field.choice > label` rule above sets the label
 * to `display: inline-flex`. A flex ITEM (which the label is w/r/t
 * its `.field.choice` parent) defaults to `min-width: auto`, i.e.
 * `min-content`. For an inline-flex label with a long text child
 * that resolves to the intrinsic min-content width of the copy —
 * which on EN loyalty consent is wider than the row's remaining
 * space (row width − 16 px checkbox − 10 px gap). The label's
 * `flex-shrink: 1` (default) is therefore CLAMPED by the min-content
 * floor and cannot compress, so `flex-wrap: wrap` on the parent
 * wraps the label onto its own row BELOW the checkbox. Visual
 * result: checkbox sits alone on line 1, consent text sits alone
 * on line 2 — the layout the user reported.
 *
 * Fix: on the Amasty-flavoured `.field.choice` variant (identified
 * by the `.amgdpr-checkbox` container class), release the label's
 * intrinsic min-width via `min-width: 0` and let it fill the rest
 * of the row via `flex: 1 1 0`. The text then wraps INSIDE the
 * label (proper block-level word-wrap) with the checkbox pinned to
 * the left at the first text line — matching every other consent
 * row on the register form (newsletter opt-in, GDPR marketing) and
 * the peer loyalty-join form on the dashboard surface
 * (`Monogo_UnilayerLoyaltyBuilder::css/loyalty-builder.css`
 * `.monogo-loyalty-join__consent`, which uses the same pattern).
 *
 * The fix is deliberately scoped to `.amgdpr-checkbox.field.choice`
 * (NOT the generic `.field.choice > label`) so it does NOT alter
 * the layout of other choice rows on the same page — most notably
 * `.field.choice.persistent` (Remember Me + tooltip trigger) whose
 * inline-flex label anchors the `.monogo-rm-info` info-dot to the
 * text baseline and would be visually disrupted by an unconditional
 * `flex: 1 1 0` grow.
 * -------------------------------------------------------------------------- */
body.monogo-auth-page:not(.page-monogo-customerauth-embed)
    .amgdpr-checkbox.field.choice > label.amgdpr-label {
    flex: 1 1 0;
    min-width: 0;
}

/* Long consent copy inside the label wraps as normal block text —
   `display: block` on the inner `<span class="amgdpr-text">`
   overrides the shared `.field.choice > label > span` inline
   default so the text does NOT sit next to the checkbox as an
   inline chunk, matching the "checkbox left, text block right"
   pattern the user reported as broken. */
body.monogo-auth-page:not(.page-monogo-customerauth-embed)
    .amgdpr-checkbox.field.choice > label.amgdpr-label > .amgdpr-text {
    display: block;
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* The native Magento knockout show-password checkbox — replaced by
   our eye-icon toggle below, so hide the duplicate affordance. The
   binding stays in DOM so KO init doesn't throw. */
body.monogo-auth-page:not(.page-monogo-customerauth-embed) .field.choice[data-bind*="showPassword"],
body.monogo-auth-page:not(.page-monogo-customerauth-embed) .field[data-bind*="showPassword"] {
    display: none !important;
}

/* --------------------------------------------------------------------------
 * Show/hide-password toggle (eye icon).
 * Behavioural code: Monogo_UnilayerCustomerAuth js/embed/password-toggle.js
 * Loaded on every auth page via this module's layout XML files.
 * -------------------------------------------------------------------------- */
body.monogo-auth-page:not(.page-monogo-customerauth-embed) .control {
    position: relative;
}

body.monogo-auth-page:not(.page-monogo-customerauth-embed) .field.mca-field--has-pw-toggle .control input[type="password"],
body.monogo-auth-page:not(.page-monogo-customerauth-embed) .field.mca-field--has-pw-toggle .control input[type="text"] {
    padding-right: 44px;
}

/* Toggle is anchored to the half-height of the INPUT, not the half-
   height of `.control`. Magento renders the validation message as
   `<div class="mage-error">` SIBLING of the input INSIDE `.control`
   (most visibly on the password-confirmation field after a mismatch),
   which makes the wrapper grow vertically and a `top: 50%` rule would
   drift the eye icon downward toward the message. Anchoring to
   `var(--muc-input-height) / 2` keeps the toggle pinned to the input
   row regardless of whether an error message is rendered below. Same
   approach in Monogo_UnilayerCustomerAuth embed.css. */
body.monogo-auth-page:not(.page-monogo-customerauth-embed) .mca-pw-toggle {
    position: absolute;
    top: calc(var(--muc-input-height) / 2);
    right: 0;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: var(--muc-border-radius);
    color: var(--muc-color-text-muted);
    cursor: pointer;
    line-height: 0;
    transition: color var(--muc-transition-speed) ease-in-out;
    z-index: 2;
}

body.monogo-auth-page:not(.page-monogo-customerauth-embed) .mca-pw-toggle:hover,
body.monogo-auth-page:not(.page-monogo-customerauth-embed) .mca-pw-toggle:focus-visible {
    color: var(--muc-color-text);
}

body.monogo-auth-page:not(.page-monogo-customerauth-embed) .mca-pw-toggle:focus-visible {
    outline: 2px solid var(--muc-color-primary);
    outline-offset: 2px;
}

body.monogo-auth-page:not(.page-monogo-customerauth-embed) .mca-pw-toggle[aria-pressed="true"] {
    color: var(--muc-color-text);
}

body.monogo-auth-page:not(.page-monogo-customerauth-embed) .mca-pw-toggle svg {
    width: 20px;
    height: 20px;
    display: block;
    pointer-events: none;
}

/* --------------------------------------------------------------------------
 * Actions toolbar + primary / secondary buttons
 * -------------------------------------------------------------------------- */
body.monogo-auth-page:not(.page-monogo-customerauth-embed) .actions-toolbar {
    margin: 28px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

body.monogo-auth-page:not(.page-monogo-customerauth-embed) .actions-toolbar::before,
body.monogo-auth-page:not(.page-monogo-customerauth-embed) .actions-toolbar::after {
    display: none;
}

body.monogo-auth-page:not(.page-monogo-customerauth-embed) .actions-toolbar .primary {
    display: block;
    width: 100%;
}

body.monogo-auth-page:not(.page-monogo-customerauth-embed) .actions-toolbar .primary button,
body.monogo-auth-page:not(.page-monogo-customerauth-embed) .actions-toolbar .primary .action.primary,
body.monogo-auth-page:not(.page-monogo-customerauth-embed) .actions-toolbar .action.submit.primary,
body.monogo-auth-page:not(.page-monogo-customerauth-embed) .actions-toolbar .action.login.primary {
    box-sizing: border-box;
    display: block;
    width: 100%;
    height: var(--muc-button-height);
    padding: 0 24px;
    background: var(--muc-color-primary);
    border: 1px solid var(--muc-color-primary);
    border-radius: var(--muc-border-radius);
    color: var(--muc-color-bg);
    font-family: var(--muc-font-family);
    font-size: var(--muc-font-size-base);
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
    text-align: center;
    cursor: pointer;
    transition: opacity var(--muc-transition-speed) ease-in-out;
}

body.monogo-auth-page:not(.page-monogo-customerauth-embed) .actions-toolbar .primary button:hover,
body.monogo-auth-page:not(.page-monogo-customerauth-embed) .actions-toolbar .primary .action.primary:hover {
    background: var(--muc-color-primary);
    border-color: var(--muc-color-primary);
    color: var(--muc-color-bg);
    opacity: 0.85;
}

body.monogo-auth-page:not(.page-monogo-customerauth-embed) .actions-toolbar .primary button:disabled,
body.monogo-auth-page:not(.page-monogo-customerauth-embed) .actions-toolbar .primary button[disabled] {
    background: var(--muc-color-text-muted);
    border-color: var(--muc-color-text-muted);
    color: var(--muc-color-bg);
    cursor: not-allowed;
    opacity: 1;
}

body.monogo-auth-page:not(.page-monogo-customerauth-embed) .actions-toolbar .secondary {
    margin: 0;
    text-align: center;
}

body.monogo-auth-page:not(.page-monogo-customerauth-embed) .actions-toolbar .secondary .action {
    display: inline-block;
    padding: 0;
    color: var(--muc-color-text);
    font-family: var(--muc-font-family);
    font-size: var(--muc-font-size-sm);
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
    text-decoration: none;
}

body.monogo-auth-page:not(.page-monogo-customerauth-embed) .actions-toolbar .secondary .action:hover,
body.monogo-auth-page:not(.page-monogo-customerauth-embed) .actions-toolbar .secondary .action:focus {
    color: var(--muc-color-text);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* --------------------------------------------------------------------------
 * Native validation surface (mage/validation + jQuery validate).
 *
 * `validation-trigger.js` from Monogo_UnilayerCustomerAuth flips
 * on per-field validation on blur / input and rehydrates server-side
 * errors after a failed POST so messages render right away.
 * -------------------------------------------------------------------------- */
body.monogo-auth-page:not(.page-monogo-customerauth-embed) .mage-error,
body.monogo-auth-page:not(.page-monogo-customerauth-embed) div.mage-error {
    display: block;
    margin: 6px 0 0;
    padding: 0;
    color: var(--muc-color-error);
    font-family: var(--muc-font-family);
    font-size: var(--muc-font-size-sm);
    line-height: 1.4;
    background: transparent;
    border: 0;
}

body.monogo-auth-page:not(.page-monogo-customerauth-embed) .control > input.input-text.mage-error,
body.monogo-auth-page:not(.page-monogo-customerauth-embed) .control > input.input-text[aria-invalid="true"],
body.monogo-auth-page:not(.page-monogo-customerauth-embed) .control > input[type="email"].mage-error,
body.monogo-auth-page:not(.page-monogo-customerauth-embed) .control > input[type="password"].mage-error,
body.monogo-auth-page:not(.page-monogo-customerauth-embed) .control > input[type="text"].mage-error {
    border-bottom-color: var(--muc-color-error);
    border-bottom-width: 2px;
}

body.monogo-auth-page:not(.page-monogo-customerauth-embed) .control > input.input-text.mage-error:focus,
body.monogo-auth-page:not(.page-monogo-customerauth-embed) .control > input.input-text[aria-invalid="true"]:focus {
    border-bottom-color: var(--muc-color-error);
    border-bottom-width: 2px;
}

body.monogo-auth-page:not(.page-monogo-customerauth-embed) .field-error,
body.monogo-auth-page:not(.page-monogo-customerauth-embed) div.field-error {
    margin: 6px 0 0;
    color: var(--muc-color-error);
    font-size: var(--muc-font-size-sm);
}

/* `.page.messages` spans the full `.page-main` content box on every
 * auth surface (/login, /create, /forgotpassword). Luma's `.page-main`
 * already caps to 1280px and adds 20px horizontal padding, so we
 * intentionally drop our own left/right padding here and let the
 * outer wrapper take care of gutters. Width 100% so the message
 * stripes (success / error / notice) span the same column as the
 * form / two-column hero below them — no narrow centred "card" look. */
body.monogo-auth-page:not(.page-monogo-customerauth-embed) .page.messages {
    width: 100%;
    max-width: 100%;
    margin: 16px auto 0;
    padding: 0;
    font-family: var(--muc-font-family);
}

body.monogo-auth-page:not(.page-monogo-customerauth-embed) .page.messages .message {
    font-size: var(--muc-font-size-base);
    border-radius: var(--muc-border-radius);
}

/* --------------------------------------------------------------------------
 * /forgotpassword and /logoutSuccess page title.
 *
 * Native `page.main.title` block is kept in `columns.top` on both
 * pages (neither layout removes it). It renders BEFORE the page's
 * single content child:
 *   - /forgotpassword:  the `<form class="form password forget">`
 *   - /logoutSuccess:   the `<p>` rendered by Magento_Customer::logout.phtml
 * so it acts as the screen's headline in both cases. We centre it
 * horizontally over the content (same 480px max-width + auto margins
 * the forgot-password form uses, kept identical on /logoutSuccess so
 * the two screens share the same vertical rhythm) and upgrade the
 * typography to match the auth-page design tokens.
 *
 * Scope: `.customer-account-forgotpassword, .customer-account-logoutsuccess`
 * so the rules don't leak onto /create (which has its own full-width
 * hero overlay variant higher up in this file) or /login (where the
 * title is removed entirely via layout XML).
 * -------------------------------------------------------------------------- */
body.monogo-auth-page:not(.page-monogo-customerauth-embed).customer-account-forgotpassword .page-title-wrapper,
body.monogo-auth-page:not(.page-monogo-customerauth-embed).customer-account-logoutsuccess .page-title-wrapper {
    box-sizing: border-box;
    width: 100%;
    max-width: 480px;
    margin: 32px auto 0;
    padding: 0 24px;
    text-align: center;
}

body.monogo-auth-page:not(.page-monogo-customerauth-embed).customer-account-forgotpassword .page-title-wrapper .page-title,
body.monogo-auth-page:not(.page-monogo-customerauth-embed).customer-account-logoutsuccess .page-title-wrapper .page-title {
    margin: 0;
    padding: 0;
    font-family: var(--muc-font-family);
    font-size: var(--muc-font-size-heading);
    line-height: 1.15;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--muc-color-text);
    text-transform: none;
    text-align: center;
}

body.monogo-auth-page:not(.page-monogo-customerauth-embed).customer-account-forgotpassword .page-title-wrapper .page-title .base,
body.monogo-auth-page:not(.page-monogo-customerauth-embed).customer-account-logoutsuccess .page-title-wrapper .page-title .base {
    color: inherit;
    font: inherit;
}

@media (max-width: 768px) {
    body.monogo-auth-page:not(.page-monogo-customerauth-embed).customer-account-forgotpassword .page-title-wrapper,
    body.monogo-auth-page:not(.page-monogo-customerauth-embed).customer-account-logoutsuccess .page-title-wrapper {
        margin: 16px auto 0;
    }
    body.monogo-auth-page:not(.page-monogo-customerauth-embed).customer-account-forgotpassword .page-title-wrapper .page-title,
    body.monogo-auth-page:not(.page-monogo-customerauth-embed).customer-account-logoutsuccess .page-title-wrapper .page-title {
        font-size: 26px;
    }
}

/* --------------------------------------------------------------------------
 * /logoutSuccess confirmation paragraph.
 *
 * Native Magento renders a single <p> via Magento_Customer::logout.phtml
 * inside `content`:
 *
 *   <p>You have signed out and will go to our homepage in 5 seconds.</p>
 *
 * The block is named `customer_logout` and has no class hook of its own,
 * so we scope through `body.customer-account-logoutsuccess` + `.column.main p`
 * (the closest stable Magento wrapper on this surface). The same
 * `.column.main` scope is used by Luma everywhere, so we anchor on the
 * page-specific body class above it to avoid touching paragraphs on the
 * other auth screens.
 *
 * Visually: same horizontal rhythm as the forgot-password helper copy
 * (max-width: 480px + auto margins beneath the centred title) but with
 * a touch more vertical breathing room and the secondary text colour
 * — this matches `.field.note` on /forgotpassword so the two
 * confirmation-style screens read as a pair.
 *
 * We do NOT add an icon or status colouring: the auto-redirect timer
 * in Magento_Customer/js/logout-redirect already provides closure
 * (5 seconds → storefront homepage), and dressing this up would
 * compete with the page title for attention.
 * -------------------------------------------------------------------------- */
body.monogo-auth-page:not(.page-monogo-customerauth-embed).customer-account-logoutsuccess .column.main {
    box-sizing: border-box;
    width: 100%;
    max-width: 480px;
    margin: 16px auto 32px;
    padding: 0 24px;
    text-align: center;
}

body.monogo-auth-page:not(.page-monogo-customerauth-embed).customer-account-logoutsuccess .column.main p {
    margin: 0;
    padding: 0;
    color: var(--muc-color-text-secondary);
    font-family: var(--muc-font-family);
    font-size: var(--muc-font-size-base);
    line-height: var(--muc-line-height);
    text-align: center;
}

@media (max-width: 768px) {
    body.monogo-auth-page:not(.page-monogo-customerauth-embed).customer-account-logoutsuccess .column.main {
        margin: 12px auto 24px;
        padding: 0 16px;
    }
}

/* --------------------------------------------------------------------------
 * Inline `.field.note` on /forgotpassword and similar surfaces.
 * On /login this note is replaced with the `monogo_login_intro` CMS
 * block (see customer-account-login section below), so we hide it there.
 * Everywhere else we keep it visible as the canonical helper copy.
 * -------------------------------------------------------------------------- */
body.monogo-auth-page:not(.page-monogo-customerauth-embed) .field.note {
    margin: 0 0 16px;
    padding: 0;
    color: var(--muc-color-text-secondary);
    font-size: var(--muc-font-size-base);
    line-height: var(--muc-line-height);
}

/* --------------------------------------------------------------------------
 * Password-strength meter — hidden in favour of the per-rule checklist
 * (.mca-password-rules) injected by Monogo_UnilayerCustomerAuth's
 * js/embed/password-rules.js. The strength meter renders a fixed
 * "Password Strength: Weak/Medium/Strong" label which gives the user
 * no actionable hint about WHICH rule failed; the live checklist below
 * carries the same information per-rule with ✓ / ✕ glyphs and that
 * is what the iframe modal also shows, so we hide the duplicate.
 * -------------------------------------------------------------------------- */
body.monogo-auth-page:not(.page-monogo-customerauth-embed) #password-strength-meter-container,
body.monogo-auth-page:not(.page-monogo-customerauth-embed) #password-strength-meter,
body.monogo-auth-page:not(.page-monogo-customerauth-embed) .password-strength-meter {
    display: none !important;
}

/* Hide the catch-all #password-error text Magento appends to the
   password field on submit ("Minimum of different classes of
   characters in password is N. Classes of characters: …"). The
   live mca-password-rules checklist below the input already
   enumerates each requirement with per-rule ✓ / ✕ feedback, so the
   wall-of-text would duplicate copy. The red border-bottom on the
   input + the error colour on the checklist still gate the field
   in "error" state visually until the user satisfies the policy. */
body.monogo-auth-page:not(.page-monogo-customerauth-embed) #password-error,
body.monogo-auth-page:not(.page-monogo-customerauth-embed) div#password-error.mage-error {
    display: none !important;
}

/* --------------------------------------------------------------------------
 * Live per-rule password checklist injected by js/embed/password-rules.js
 * (loaded on /create via customer_account_create.xml).
 *
 * Markup (built in JS):
 *
 *   <ul class="mca-password-rules" role="list" aria-live="polite">
 *     <li class="mca-password-rules__item"
 *         data-rule="len|number|special|lower|upper"
 *         data-state="pending|ok|fail">
 *       <span class="mca-password-rules__icon"></span>
 *       <span class="mca-password-rules__label">…</span>
 *     </li>
 *   </ul>
 *
 * Three visual states — driven entirely by `data-state` so the JS
 * only flips an attribute and all colour / glyph swaps live here:
 *
 *   pending → muted "•" (user has not typed yet)
 *   ok      → success "✓" (rule satisfied)
 *   fail    → error  "✗" (rule unsatisfied after typing started)
 *
 * The list sits OUTSIDE the .control element on purpose so the
 * floating-label `:has(input:placeholder-shown)` selector keeps
 * resolving against the input itself, not the new sibling.
 * -------------------------------------------------------------------------- */
body.monogo-auth-page:not(.page-monogo-customerauth-embed) .mca-password-rules {
    list-style: none;
    margin: 8px 0 0;
    padding: 0;
    display: grid;
    /* Two-column layout on >= 768px so the five-rule checklist takes
       3 rows instead of 5 — keeps the create-account panel short
       enough to keep the submit button above the fold on a 14"
       laptop viewport. Stacks back to a single column on mobile so
       each rule label stays readable without truncation. Aligns with
       the same 768px breakpoint used by `.monogo-name-row`. */
    grid-template-columns: 1fr 1fr;
    column-gap: 16px;
    /* Tightened to 3px (was 4px) — keeps the standalone create page in
       sync with the iframe modal's compressed checklist spacing. */
    row-gap: 3px;
    font-size: var(--muc-font-size-sm);
    color: var(--muc-color-text-muted);
}

@media (max-width: 767.98px) {
    body.monogo-auth-page:not(.page-monogo-customerauth-embed) .mca-password-rules {
        grid-template-columns: 1fr;
    }
}

body.monogo-auth-page:not(.page-monogo-customerauth-embed) .mca-password-rules__item {
    display: flex;
    align-items: center;
    /* Icon-to-label gap shrunk from 8px to 3px so each row reads as one
       compact group instead of two loose tokens. */
    gap: 3px;
    margin: 0;
    line-height: 1.3;
    transition: color var(--muc-transition-speed) ease;
}

body.monogo-auth-page:not(.page-monogo-customerauth-embed) .mca-password-rules__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    font-weight: 700;
    line-height: 1;
}

body.monogo-auth-page:not(.page-monogo-customerauth-embed) .mca-password-rules__item[data-state="pending"] .mca-password-rules__icon::before {
    content: "•";
    font-size: 18px;
}

body.monogo-auth-page:not(.page-monogo-customerauth-embed) .mca-password-rules__item[data-state="ok"] {
    color: var(--muc-color-success);
}

body.monogo-auth-page:not(.page-monogo-customerauth-embed) .mca-password-rules__item[data-state="ok"] .mca-password-rules__icon::before {
    content: "\2713"; /* ✓ */
    font-size: 13px;
}

body.monogo-auth-page:not(.page-monogo-customerauth-embed) .mca-password-rules__item[data-state="fail"] {
    color: var(--muc-color-error);
}

body.monogo-auth-page:not(.page-monogo-customerauth-embed) .mca-password-rules__item[data-state="fail"] .mca-password-rules__icon::before {
    content: "\2715"; /* ✕ */
    font-size: 12px;
}

/* ==========================================================================
 * LOGIN-ONLY SECTION
 * Rules below are scoped to `body.customer-account-login:not(.page-monogo-customerauth-embed)` so the
 * two-column grid, marketing CMS copy and benefits list never leak to
 * /create or /forgotpassword.
 * ========================================================================== */

/* Two-column container (login | register).
 *
 * Outscores Luma's `.login-container .block.block-customer-login`
 * (0,3,0) with (0,4,0).
 *
 * `max-width: none` + `padding: 0` (was 1080px / 0 24px) — mirrors
 * the /create container so both auth pages span the FULL
 * `.page-main` content box. Luma's .page-main already caps width at
 * 1280px AND adds 20px horizontal padding, so a second inner cap
 * was making the grid columns narrower than the form's own input
 * baseline. Removing it keeps the form column aligned with the rest
 * of the page chrome (header, footer, breadcrumbs, …) and lets the
 * benefits aside breathe instead of crowding against a narrower
 * gutter. */
body.customer-account-login:not(.page-monogo-customerauth-embed) .login-container.monogo-login-container {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-auto-flow: row;
    column-gap: var(--muc-gutter);
    row-gap: 48px;
    align-items: start;

    box-sizing: border-box;
    width: 100%;
    max-width: none;
    margin: 48px auto 72px;
    padding: 0;

    font-family: var(--muc-font-family);
    font-size: var(--muc-font-size-base);
    line-height: var(--muc-line-height);
    color: var(--muc-color-text);
    background: var(--muc-color-bg);
}

@media (max-width: 768px) {
    body.customer-account-login:not(.page-monogo-customerauth-embed) .login-container.monogo-login-container {
        grid-template-columns: minmax(0, 1fr);
        column-gap: 0;
        row-gap: 48px;
        margin: 16px auto 48px;
        /* Mobile gutter: Luma's `.page-main` has its 20px horizontal
           padding ONLY at min-width 768px. Below that the page-main
           padding collapses to 0, so the form / register block would
           glue to the viewport edges without an explicit gutter
           somewhere down the cascade. 16px keeps fingertip-friendly
           breathing room without eating into the form's perceived
           width on narrow handsets. */
        padding: 0 16px;
    }

}

/* Reset Luma's float-based layout on both blocks so the grid can
   take over (Luma ships `float: right` on .block-new-customer at
   higher specificity than auto-positioning, which would otherwise
   leak past the grid). */
body.customer-account-login:not(.page-monogo-customerauth-embed) .login-container.monogo-login-container .block.block-customer-login,
body.customer-account-login:not(.page-monogo-customerauth-embed) .login-container.monogo-login-container .block.block-new-customer {
    float: none;
    clear: none;
    width: auto;
    max-width: none;
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
}

/* Pin the two semantic blocks to fixed grid cells on desktop.
 *
 * `.login-container` regularly contains more than two children at
 * runtime: in addition to `.block-customer-login` and
 * `.block-new-customer` (the two Luma standards), it carries a
 * `.widget.block.block-static-block` injected at the bottom by the
 * "Demo Customer Access" CMS widget on dev/staging, and may carry
 * further children from 3rd-party modules (e.g. Mageplaza social-
 * login `customer.form.login.extra` placeholder). Without explicit
 * placement, grid-auto-flow distributes children in DOM source order
 * starting at row 1 / col 1, so when a 3rd child slides in it shifts
 * the register block out of col 2 and the demo widget appears in row
 * 1 next to the login form, breaking the visual contract.
 *
 * Pinning both blocks to row 1 (login = col 1, register = col 2)
 * locks the layout against any extra children: the widget block and
 * any future 3rd-party additions are pushed to row 2 (which is what
 * we want for the demo-access disclosure) and the two primary blocks
 * always render side-by-side in the same order on desktop.
 *
 * Mobile override below collapses the pinning so the single-column
 * stack works as expected. */
body.customer-account-login:not(.page-monogo-customerauth-embed) .login-container.monogo-login-container .block.block-customer-login {
    grid-column: 1;
    grid-row: 1;
}

body.customer-account-login:not(.page-monogo-customerauth-embed) .login-container.monogo-login-container .block.block-new-customer {
    grid-column: 2;
    grid-row: 1;
}

@media (max-width: 768px) {
    /* On mobile the grid collapses to a single track. The desktop
       pins above (row 1 / col 1 and row 1 / col 2) would force both
       blocks onto row 1 of a single-column grid — Grid would create
       an implicit col 2 to honour the register pin and the two
       blocks would render side-by-side at half-width each. Resetting
       both axes to `auto` releases the pin and lets `grid-auto-flow:
       row` stack them top-down as login → register. */
    body.customer-account-login:not(.page-monogo-customerauth-embed) .login-container.monogo-login-container .block.block-customer-login,
    body.customer-account-login:not(.page-monogo-customerauth-embed) .login-container.monogo-login-container .block.block-new-customer {
        grid-column: auto;
        grid-row: auto;
    }
}

/* Section titles ("Zaloguj się" / "Utwórz konto") */
body.customer-account-login:not(.page-monogo-customerauth-embed) .login-container.monogo-login-container .block-title {
    margin: 0 0 24px;
    padding: 0;
    border-bottom: 0;
    text-align: left;
}

body.customer-account-login:not(.page-monogo-customerauth-embed) .login-container.monogo-login-container .block-title > strong {
    display: block;
    font-family: var(--muc-font-family);
    font-size: var(--muc-font-size-heading);
    line-height: 1.15;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--muc-color-text);
    text-transform: none;
}

@media (max-width: 768px) {
    body.customer-account-login:not(.page-monogo-customerauth-embed) .login-container.monogo-login-container .block-title > strong {
        font-size: 26px;
    }
}

body.customer-account-login:not(.page-monogo-customerauth-embed) .login-container.monogo-login-container .block-content {
    margin: 0;
    padding: 0;
}

/* CMS-driven copy (Polish marketing texts on login page only). */
body.customer-account-login:not(.page-monogo-customerauth-embed) .login-container.monogo-login-container .monogo-login-intro,
body.customer-account-login:not(.page-monogo-customerauth-embed) .login-container.monogo-login-container .monogo-login-intro p {
    margin: 0 0 18px;
    color: var(--muc-color-text-secondary);
    font-size: var(--muc-font-size-base);
    line-height: var(--muc-line-height);
}

body.customer-account-login:not(.page-monogo-customerauth-embed) .login-container.monogo-login-container .monogo-login-register-link,
body.customer-account-login:not(.page-monogo-customerauth-embed) .login-container.monogo-login-container .monogo-login-register-link p {
    margin: 0 0 28px;
    color: var(--muc-color-text);
    font-size: var(--muc-font-size-base);
    line-height: var(--muc-line-height);
}

body.customer-account-login:not(.page-monogo-customerauth-embed) .login-container.monogo-login-container .monogo-login-register-link a {
    color: var(--muc-color-primary);
    text-decoration: underline;
    text-underline-offset: 3px;
    font-weight: 600;
}

body.customer-account-login:not(.page-monogo-customerauth-embed) .login-container.monogo-login-container .monogo-login-register-link a:hover,
body.customer-account-login:not(.page-monogo-customerauth-embed) .login-container.monogo-login-container .monogo-login-register-link a:focus {
    color: var(--muc-color-primary);
    opacity: 0.75;
    text-decoration: underline;
}

/* CMS-driven register copy (intro paragraph + footnote about email).
   These rules used to be scoped to .customer-account-login because the
   right column on /login was the only surface rendering them — the
   /create page now mirrors the same marketing copy in its right-hand
   aside (see customer_account_create.xml's `monogo.register.aside`
   container), so we lift the scope to .monogo-auth-page so both
   surfaces inherit the same typography. */
body.monogo-auth-page:not(.page-monogo-customerauth-embed) .monogo-register-intro,
body.monogo-auth-page:not(.page-monogo-customerauth-embed) .monogo-register-intro p {
    margin: 0 0 22px;
    color: var(--muc-color-text-secondary);
    font-size: var(--muc-font-size-base);
    line-height: var(--muc-line-height);
}

body.monogo-auth-page:not(.page-monogo-customerauth-embed) .monogo-register-note,
body.monogo-auth-page:not(.page-monogo-customerauth-embed) .monogo-register-note p {
    margin: 18px 0 24px;
    color: var(--muc-color-text-secondary);
    font-size: var(--muc-font-size-sm);
    line-height: 1.5;
}

/* Sign-in actions row layout.
 *
 * Two visual states are supported, picked by `.monogo-rm-actions-row`
 * which `js/embed/remember-me-tooltip.js` adds to the `.actions-toolbar`
 * after relocating `#remember-me-box` into it:
 *
 *   1. Persistent module ENABLED (Stores → Configuration → Customers
 *      → Persistent Shopping Cart): the script tags the toolbar and
 *      the layout becomes a 2-row grid:
 *
 *         [ ☐ Remember Me [?] ]            [ Forgot Your Password? ]
 *         [                  Sign In (full width)                  ]
 *
 *   2. Persistent module DISABLED (no `#remember-me-box` rendered):
 *      the script never tags the toolbar; the toolbar stays a flex
 *      column with `secondary` ordered above `primary` so the
 *      "Forgot Your Password?" link sits ABOVE the Sign-In button
 *      and does NOT collide with the password input above (the
 *      previous negative-margin trick was rejected because it broke
 *      exactly this fallback case).
 */
body.customer-account-login:not(.page-monogo-customerauth-embed) .login-container.monogo-login-container .form-login .actions-toolbar {
    position: relative;
}

/* Fallback (Persistent disabled): stacked secondary -> primary. */
body.customer-account-login:not(.page-monogo-customerauth-embed) .login-container.monogo-login-container .form-login .actions-toolbar:not(.monogo-rm-actions-row) .secondary {
    order: -1;
    margin: 0;
    text-align: right;
}

/* Persistent enabled: 2-row grid. */
body.customer-account-login:not(.page-monogo-customerauth-embed) .login-container.monogo-login-container .form-login .actions-toolbar.monogo-rm-actions-row {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
        "remember forgot"
        "primary  primary";
    column-gap: 16px;
    row-gap: 16px;
    align-items: center;
}

body.customer-account-login:not(.page-monogo-customerauth-embed) .login-container.monogo-login-container .form-login .actions-toolbar.monogo-rm-actions-row > #remember-me-box {
    grid-area: remember;
    margin: 0;
}

body.customer-account-login:not(.page-monogo-customerauth-embed) .login-container.monogo-login-container .form-login .actions-toolbar.monogo-rm-actions-row > .secondary {
    grid-area: forgot;
    width: auto;
    margin: 0;
    text-align: right;
    justify-self: end;
}

body.customer-account-login:not(.page-monogo-customerauth-embed) .login-container.monogo-login-container .form-login .actions-toolbar.monogo-rm-actions-row > .primary {
    grid-area: primary;
}

/* Forgot-password link styling — applies in both states. */
body.customer-account-login:not(.page-monogo-customerauth-embed) .login-container.monogo-login-container .form-login .actions-toolbar .secondary .action.remind {
    background: none;
    border: 0;
    padding: 0;
    color: var(--muc-color-text);
    font-family: var(--muc-font-family);
    font-size: var(--muc-font-size-xs);
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
    text-decoration: none;
}

/* "Create an Account" outline button — login-only secondary CTA */
body.customer-account-login:not(.page-monogo-customerauth-embed) .login-container.monogo-login-container .action.create.primary {
    display: block;
    box-sizing: border-box;
    width: 100%;
    height: var(--muc-button-height);
    line-height: calc(var(--muc-button-height) - 2px);
    padding: 0 24px;
    background: transparent;
    border: 1px solid var(--muc-color-primary);
    border-radius: var(--muc-border-radius);
    color: var(--muc-color-primary);
    font-family: var(--muc-font-family);
    font-size: var(--muc-font-size-base);
    font-weight: 700;
    letter-spacing: 0;
    text-align: center;
    text-decoration: none;
    text-transform: none;
    transition: background-color var(--muc-transition-speed) ease-in-out,
                color var(--muc-transition-speed) ease-in-out;
}

body.customer-account-login:not(.page-monogo-customerauth-embed) .login-container.monogo-login-container .action.create.primary:hover,
body.customer-account-login:not(.page-monogo-customerauth-embed) .login-container.monogo-login-container .action.create.primary:focus {
    background: var(--muc-color-primary);
    color: var(--muc-color-bg);
    text-decoration: none;
}

/* Benefits list (CMS block `monogo_login_register_benefits`).
   Scoped to `.monogo-auth-page` so both /login (right column of the
   two-block container) and /create (right column of the
   `.monogo-register-aside` hero) pick up the same icon + label
   styling. The shared `.muls-*` class prefix keeps this rule from
   bleeding into other CMS blocks that happen to be rendered on the
   same page surface. */
body.monogo-auth-page:not(.page-monogo-customerauth-embed) .monogo-register-benefits .muls-benefits-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

body.monogo-auth-page:not(.page-monogo-customerauth-embed) .monogo-register-benefits .muls-benefit {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0;
    padding: 0;
    color: var(--muc-color-text);
    font-size: var(--muc-font-size-base);
    line-height: 1.4;
}

body.monogo-auth-page:not(.page-monogo-customerauth-embed) .monogo-register-benefits .muls-benefit-icon {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    background: var(--muc-color-surface);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--muc-color-text);
}

body.monogo-auth-page:not(.page-monogo-customerauth-embed) .monogo-register-benefits .muls-benefit-icon svg {
    display: block;
    width: 20px;
    height: 20px;
}

body.monogo-auth-page:not(.page-monogo-customerauth-embed) .monogo-register-benefits .muls-benefit-text {
    flex: 1 1 auto;
}

body.monogo-auth-page:not(.page-monogo-customerauth-embed) .monogo-register-benefits .muls-benefit-text strong {
    font-weight: 700;
}

/* On /login the `.field.note` and `.legend` are intentionally absent
   from the override templates (replaced by CMS copy) but legacy
   theme fall-back markup might leak through — hide as belt-and-braces. */
body.customer-account-login:not(.page-monogo-customerauth-embed) .login-container.monogo-login-container .field.note,
body.customer-account-login:not(.page-monogo-customerauth-embed) .login-container.monogo-login-container .fieldset.login > .field.note {
    display: none;
}

/* ==========================================================================
 * REGISTER-ONLY SECTION (/customer/account/create)
 *
 * Rules below are scoped to
 * `body.customer-account-create.monogo-register-page:not(.page-monogo-customerauth-embed)`
 * so the two-column hero grid + Converse-style marketing aside never
 * leak to /login (which has its own two-column layout) or
 * /forgotpassword (which keeps the single-column centred form).
 *
 * DOM produced by customer_account_create.xml's new container tree:
 *
 *   <div class="page-title-wrapper"> ... </div>     <- restored title
 *   <div class="columns"><main class="column main">
 *     <div class="monogo-register-container">
 *       <div class="monogo-register-form-column">
 *         <form class="form create account form-create-account"> ... </form>
 *       </div>
 *       <aside class="monogo-register-aside">
 *         <div class="monogo-register-aside__bg">
 *           <CMS monogo_register_background>          <- editable img
 *         </div>
 *         <div class="monogo-register-aside__content">
 *           <div class="monogo-register-intro">      <- CMS intro
 *           <div class="monogo-register-benefits">   <- CMS bullet list
 *           <div class="monogo-register-note">       <- CMS footnote
 *         </div>
 *       </aside>
 *     </div>
 *   </main></div>
 * ========================================================================== */

/* Suppress horizontal scrollbar caused by the full-width hero's
   `width: 100vw`. On platforms where the vertical scrollbar is
   reserved space (Windows, some Linux DEs), `100vw` resolves to the
   layout-viewport width INCLUDING the scrollbar gutter, so the hero
   element ends up ~15-17px wider than the visible area. Clipping the
   body x-axis is the canonical fix for this trade-off — and on a
   form-only page there is nothing sticky-positioned that would lose
   functionality from x-clipping. */
body.customer-account-create.monogo-register-page:not(.page-monogo-customerauth-embed) {
    overflow-x: hidden;
}

/* Full-width Converse-style hero.
 *
 * Layout XML re-parents the bg image container AND the
 * `page.main.title` block into `monogo.register.hero`, which
 * sits in `columns.top` (inside .page-main, BEFORE .columns).
 * Luma constrains .page-main to `max-width: 1280px` with
 * 20px horizontal padding, so to make the hero hit the actual
 * viewport edges we escape with the 100vw + negative-margin
 * trick (`margin-left: calc(-50vw + 50%)`).
 *
 * The hero is `position: relative` so the title overlay can
 * absolutely fill it without leaking back up to .page-main.
 * `overflow: hidden` clips the bg image at the hero edges so
 * the merchant can drop in any aspect-ratio image and the
 * layout stays predictable.
 *
 * Sizing: `height: 300px` (with `max-height: 300px` as a
 * defensive cap) gives a fixed, predictable hero strip across
 * every viewport. We dropped the earlier `aspect-ratio: 21 / 9`
 * approach because the resulting hero was 800-900px tall on
 * 1920px screens, swallowing the form below the fold. A fixed
 * 300px banner matches the Converse foundational reference and
 * keeps the form just one scroll-stop away. */
body.customer-account-create.monogo-register-page:not(.page-monogo-customerauth-embed) .monogo-register-hero {
    position: relative;
    box-sizing: border-box;
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-right: 0;
    margin-top: 0;
    margin-bottom: 32px;
    padding: 0;
    height: 300px;
    max-height: 300px;
    overflow: hidden;
    background: var(--muc-color-surface);
}

@media (max-width: 768px) {
    body.customer-account-create.monogo-register-page:not(.page-monogo-customerauth-embed) .monogo-register-hero {
        height: 180px;
        max-height: 180px;
        margin-bottom: 16px;
    }
}

/* Background image fills the hero. The CMS block default content
   is `<div class="monogo-register-aside__bg-inner"><img ...></div>`,
   and that wrapper carries our `.monogo-register-aside__bg` class
   from the layout XML container — both selectors below cover the
   case where a merchant edits the WYSIWYG and leaves only the bare
   <img> (CSS still fills it). */
body.customer-account-create.monogo-register-page:not(.page-monogo-customerauth-embed) .monogo-register-hero .monogo-register-aside__bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    margin: 0;
    background: none;
    border-radius: 0;
    aspect-ratio: auto; /* override the aside-aspect-ratio rule below */
}

body.customer-account-create.monogo-register-page:not(.page-monogo-customerauth-embed) .monogo-register-hero .monogo-register-aside__bg-inner,
body.customer-account-create.monogo-register-page:not(.page-monogo-customerauth-embed) .monogo-register-hero .monogo-register-aside__bg > img {
    width: 100%;
    height: 100%;
}

body.customer-account-create.monogo-register-page:not(.page-monogo-customerauth-embed) .monogo-register-hero .monogo-register-aside__bg-inner img,
body.customer-account-create.monogo-register-page:not(.page-monogo-customerauth-embed) .monogo-register-hero .monogo-register-aside__bg > img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Subtle dark overlay between the image and the title — pure
   text-shadow on the title only is unreliable when the image
   has bright highlights (Converse SU26 lifestyle photo is mostly
   light). A `linear-gradient(...)` pseudo gives a uniform
   contrast plane so the title stays legible regardless of the
   merchant-supplied image. */
body.customer-account-create.monogo-register-page:not(.page-monogo-customerauth-embed) .monogo-register-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.10) 0%, rgba(0, 0, 0, 0.45) 100%);
    pointer-events: none;
}

/* Page title overlay. The `.page-title-wrapper` div is the output
   of `Magento\Theme\Block\Html\Title` — we centre it both
   horizontally and vertically over the hero and recolour it white
   so the heading reads cleanly against the lifestyle photo. */
body.customer-account-create.monogo-register-page:not(.page-monogo-customerauth-embed) .monogo-register-hero .page-title-wrapper {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0 24px;
    max-width: none;
    text-align: center;
}

body.customer-account-create.monogo-register-page:not(.page-monogo-customerauth-embed) .monogo-register-hero .page-title-wrapper .page-title {
    margin: 0;
    padding: 0;
    font-family: var(--muc-font-family);
    font-size: 56px;
    line-height: 1.05;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #fff;
    text-transform: uppercase;
    text-align: center;
    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.35);
}

body.customer-account-create.monogo-register-page:not(.page-monogo-customerauth-embed) .monogo-register-hero .page-title-wrapper .page-title .base {
    color: inherit;
    font: inherit;
    text-shadow: inherit;
}

@media (max-width: 1024px) {
    body.customer-account-create.monogo-register-page:not(.page-monogo-customerauth-embed) .monogo-register-hero .page-title-wrapper .page-title {
        font-size: 44px;
    }
}

@media (max-width: 768px) {
    body.customer-account-create.monogo-register-page:not(.page-monogo-customerauth-embed) .monogo-register-hero .page-title-wrapper .page-title {
        font-size: 30px;
        letter-spacing: -0.01em;
    }
}

/* Two-column body grid (form + marketing aside).
 *
 * `max-width: none` (was 1080px) — Luma's `.page-main` already caps
 * width at 1280px AND adds 20px horizontal padding, so a second cap
 * on the inner container was clipping content unpredictably (the form
 * column rendered narrower than the form's own input baseline,
 * producing the "rozjedza się" misalignment between the form column
 * and the aside). Letting the container span the full `.page-main`
 * content box keeps the form column aligned with the page-title
 * baseline, the form's input grid, and the aside copy.
 *
 * `align-items: start` keeps the right aside anchored at the top of
 * the form column instead of stretching to match the (very tall)
 * address-fields fieldset on first paint. */
body.customer-account-create.monogo-register-page:not(.page-monogo-customerauth-embed) .monogo-register-container {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: var(--muc-gutter);
    row-gap: 48px;
    align-items: start;

    box-sizing: border-box;
    width: 100%;
    max-width: none;
    margin: 24px auto 72px;
    /* Horizontal gutter ON the inner container because `.page-main`
       padding is zeroed on /create (so the full-bleed hero above
       can run edge-to-edge). The 24px gutter here keeps the form
       and marketing aside from kissing the viewport edges on
       desktop; the mobile rule below tightens it to 16px so the
       single-column stack matches the rest of the storefront on
       phones. */
    padding: 0 24px;

    font-family: var(--muc-font-family);
    font-size: var(--muc-font-size-base);
    line-height: var(--muc-line-height);
    color: var(--muc-color-text);
    background: var(--muc-color-bg);
}

@media (max-width: 768px) {
    body.customer-account-create.monogo-register-page:not(.page-monogo-customerauth-embed) .monogo-register-container {
        grid-template-columns: minmax(0, 1fr);
        column-gap: 0;
        row-gap: 32px;
        margin: 16px auto 48px;
        padding: 0 16px;
    }
}

/* Form column: just owns `min-width: 0` so a long required-attribute
   label (e.g. localised "Numer identyfikacji podatkowej") can ellipsis
   instead of bursting the column and overflowing the grid track.
   Explicit `grid-column` / `grid-row` placement was removed for the
   same reason as on /login above — default `grid-auto-flow: row`
   places the two children correctly on every breakpoint without
   forcing them onto the same row, and removes the mobile overlap
   bug the explicit pinning was producing. */
body.customer-account-create.monogo-register-page:not(.page-monogo-customerauth-embed) .monogo-register-form-column {
    min-width: 0;
}

body.customer-account-create.monogo-register-page:not(.page-monogo-customerauth-embed) .monogo-register-aside {
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-width: 0;
}

/* On narrow viewports lift the marketing aside ABOVE the form so the
   user sees the value proposition BEFORE they encounter the long
   address fieldset; matches the brand-marketing-first scan pattern
   Converse uses on the mobile register screen. */
@media (max-width: 768px) {
    body.customer-account-create.monogo-register-page:not(.page-monogo-customerauth-embed) .monogo-register-aside {
        grid-column: 1;
        grid-row: 1;
        order: 1;
    }
    body.customer-account-create.monogo-register-page:not(.page-monogo-customerauth-embed) .monogo-register-form-column {
        grid-column: 1;
        grid-row: 2;
        order: 2;
    }
}

/*
 * NOTE: the hero background image rules used to live here when the bg
 * container was a child of `.monogo-register-aside`. After the
 * customer_account_create.xml `<move>` that re-parents the bg into
 * `monogo.register.hero` (the new full-width hero in `columns.top`),
 * all hero-related image rules live in the "Full-width Converse-style
 * hero" block higher up in this file. The bg container no longer
 * renders inside the aside, so nothing in the aside DOM would match
 * `.monogo-register-aside__bg` at all — keeping a dormant rule here
 * just invites confusion next time someone reads top-down.
 */

/* Right-column content (intro + benefits + note). The base typography
   for each block lives in the shared `.monogo-auth-page` scope above
   (so /login reuses the exact same styling); we only set the local
   stacking gap here. */
body.customer-account-create.monogo-register-page:not(.page-monogo-customerauth-embed) .monogo-register-aside__content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* --------------------------------------------------------------------------
 * DOB widget — calendar trigger inline on the right.
 *
 * Magento's `Magento\Framework\Data\Form\Element\Date` renders a single
 * `<input id="dob">` at template time; the jQuery UI datepicker plugin
 * later appends a sibling `<button class="ui-datepicker-trigger">` (with
 * `Magento_Theme::calendar.png` inside an `<img>`) to the same `.control`
 * wrapper. With the global rule that pins every input in the auth form
 * to `width: 100%`, the trigger has no horizontal room and wraps onto
 * the next line beneath the input.
 *
 * Fix: keep `.control.customer-dob` as the positioning context (the
 * generic `.control { position: relative }` higher up already gives us
 * that, but we re-assert it here for spec clarity), reserve right-side
 * padding inside the input so the value never collides with the trigger
 * glyph, and pin the trigger absolutely against the underline baseline.
 * Visual contract mirrors the in-input password eye toggle from §
 * "Show/hide-password toggle".
 * -------------------------------------------------------------------------- */
body.monogo-auth-page:not(.page-monogo-customerauth-embed) .field.field-dob .control.customer-dob {
    position: relative;
}

body.monogo-auth-page:not(.page-monogo-customerauth-embed) .field.field-dob .control.customer-dob input.input-text,
body.monogo-auth-page:not(.page-monogo-customerauth-embed) .field.field-dob .control.customer-dob input#dob {
    padding-right: 32px;
}

/* Descendant (not direct-child) on purpose: jQuery UI's datepicker
   plugin can place the `.ui-datepicker-trigger` button at three
   different positions depending on the version + the `mage/calendar`
   wrapper:
     1. Sibling of the input inside `.control.customer-dob` (default
        seen on the iframe modal — the stripped chrome path).
     2. Inside an extra wrapper element that the plugin injects between
        the input and the trigger (observed on Magento 2.4.7 with
        certain locale + jquery-ui patches).
     3. Outside `.control.customer-dob` altogether — appended directly
        to the surrounding `.field.field-dob` (rare, but the plugin
        falls back to this when `.control` lacks a positioning context
        at attach time).
   The previous `> .control.customer-dob > .ui-datepicker-trigger`
   selector matched only case (1) and silently dropped its style on
   (2) / (3), which made the trigger render as an unstyled native
   `<button>` glyph or get clipped to invisibility on the standalone
   `?_mca_unstrip=1` render even though the modal worked fine. The
   descendant scope below covers all three. */
body.monogo-auth-page:not(.page-monogo-customerauth-embed) .field.field-dob .ui-datepicker-trigger {
    position: absolute;
    right: 0;
    /* Anchor to the TOP of `.control` (input baseline) instead of the
       bottom edge: when jQuery validate appends `<div class="mage-error">`
       as a sibling of the input, `.control` grows vertically and a
       bottom-anchored trigger ends up trapped below the error message.
       `top: 7px` lines the icon up with the input row regardless of any
       follow-on validation chrome. Mirrors the same fix in
       Monogo_UnilayerCustomerAuth/view/frontend/web/css/embed.css. */
    top: 7px;
    width: 24px;
    height: 24px;
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--muc-color-text);
    line-height: 1;
    /* Belt-and-braces: native `<button>` defaults to display:inline-block
       baseline alignment which can shift the icon a couple of pixels
       depending on the surrounding font metrics. The flex centring above
       already handles internal alignment, but we re-assert visibility
       in case a high-specificity reset elsewhere zeroed the size. */
    z-index: 2;
    visibility: visible;
    opacity: 1;
}

body.monogo-auth-page:not(.page-monogo-customerauth-embed) .field.field-dob .ui-datepicker-trigger:focus-visible {
    outline: 2px solid var(--muc-color-primary);
    outline-offset: 2px;
    border-radius: 2px;
}

body.monogo-auth-page:not(.page-monogo-customerauth-embed) .field.field-dob .ui-datepicker-trigger > img {
    display: block;
    width: 18px;
    height: 18px;
    object-fit: contain;
}

/* The trigger sits inside `.customer-dob`, which is itself inside a
   `.field` that also hosts the optional `<div class="note">`. The note
   would otherwise collide with the absolutely positioned trigger; push
   it back below the input row to keep the underline baseline clean. */
body.monogo-auth-page:not(.page-monogo-customerauth-embed) .field.field-dob .control.customer-dob > .note {
    margin-top: 4px;
}

/* --------------------------------------------------------------------------
 * DOB "Why we ask?" info icon + tooltip
 *
 * Markup is injected by Monogo_UnilayerCustomerAuth's
 * js/embed/dob-newsletter-toggle.js (shared between the iframe modal
 * and this standalone page); see the doc-block there for the rationale
 * behind the in-label button + sibling tooltip split.
 *
 * The shared `.label` rule above sets `pointer-events: none` so the
 * absolute-positioned label never swallows clicks meant for the input.
 * The info button re-enables them locally so the icon stays clickable
 * regardless of label state (rest / floated / error).
 * -------------------------------------------------------------------------- */
body.monogo-auth-page:not(.page-monogo-customerauth-embed) .field.field-dob > .label .monogo-dob-info {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    margin: 0 0 0 6px;
    padding: 0;
    border: 1px solid currentColor;
    border-radius: 50%;
    background: transparent;
    color: var(--muc-color-text-muted);
    font-size: 10px;
    font-weight: 600;
    line-height: 1;
    cursor: help;
    pointer-events: auto;
    vertical-align: middle;
    flex: none;
    transition:
        color var(--muc-transition-speed) ease,
        border-color var(--muc-transition-speed) ease;
}

body.monogo-auth-page:not(.page-monogo-customerauth-embed) .field.field-dob > .label .monogo-dob-info:hover,
body.monogo-auth-page:not(.page-monogo-customerauth-embed) .field.field-dob > .label .monogo-dob-info:focus {
    color: var(--muc-color-text);
    outline: none;
}

body.monogo-auth-page:not(.page-monogo-customerauth-embed) .field.field-dob > .label .monogo-dob-info:focus-visible {
    outline: 2px solid var(--muc-color-primary);
    outline-offset: 2px;
}

body.monogo-auth-page:not(.page-monogo-customerauth-embed) .field.field-dob > .monogo-dob-info-tooltip {
    position: absolute;
    bottom: calc(100% - 4px);
    left: 0;
    width: max-content;
    max-width: min(280px, 100%);
    margin: 0;
    padding: 10px 14px;
    background: #fff;
    border: 1px solid var(--muc-color-border-input, #e0e0e0);
    border-radius: 12px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
    color: var(--muc-color-text);
    font-size: 12px;
    font-weight: 400;
    line-height: 1.4;
    text-align: left;
    white-space: normal;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(4px);
    transition:
        opacity var(--muc-transition-speed) ease,
        transform var(--muc-transition-speed) ease,
        visibility var(--muc-transition-speed) ease;
    z-index: 5;
}

body.monogo-auth-page:not(.page-monogo-customerauth-embed) .field.field-dob.monogo-dob-info-open > .monogo-dob-info-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Speech-bubble arrow at a static left offset (matches the icon's
   resting-state position). When the label scales down on float, the icon
   shifts; tracking it dynamically would jitter the arrow on every state
   transition, so we keep the arrow as a directional hint anchored to
   the field rather than the icon itself. */
body.monogo-auth-page:not(.page-monogo-customerauth-embed) .field.field-dob > .monogo-dob-info-tooltip::before,
body.monogo-auth-page:not(.page-monogo-customerauth-embed) .field.field-dob > .monogo-dob-info-tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 24px;
    width: 0;
    height: 0;
    border: 7px solid transparent;
}

body.monogo-auth-page:not(.page-monogo-customerauth-embed) .field.field-dob > .monogo-dob-info-tooltip::before {
    border-top-color: var(--muc-color-border-input, #e0e0e0);
}

body.monogo-auth-page:not(.page-monogo-customerauth-embed) .field.field-dob > .monogo-dob-info-tooltip::after {
    margin-top: -1px;
    border-top-color: #fff;
}

/* ==========================================================================
 * Persistent / "Remember Me" info tooltip
 * ==========================================================================
 *
 * Vendor (`vendor/magento/module-persistent/view/frontend/templates/
 * remember_me.phtml`) renders the tooltip as the legacy Luma pattern:
 *
 *     <div id="remember-me-box" class="field choice persistent">
 *       <input type="checkbox" name="persistent_remember_me" .../>
 *       <label class="label"><span>Remember Me</span></label>
 *       <span class="tooltip wrapper">
 *         <strong class="tooltip toggle">What's this?</strong>
 *         <span class="tooltip content">Check "Remember Me" to ...</span>
 *       </span>
 *     </div>
 *
 * That pattern is broken on our auth surface for two independent
 * reasons: (a) `.field.choice` becomes a flex row in our reskin so the
 * `.tooltip.content` ends up clipped by the form column's overflow,
 * and (b) the Luma JS that toggles `.active` on `.tooltip.toggle` is
 * not loaded on our pages anyway. So we hide the native wrapper and
 * let `Monogo_UnilayerCustomerAuth::js/embed/remember-me-tooltip.js`
 * re-inject our own `.monogo-rm-info` / `.monogo-rm-info-tooltip`
 * markup that mirrors the DOB info tooltip pattern (round `?` button
 * next to the label text + speech-bubble sibling positioned by the
 * field's `position: relative` context, toggled by the
 * `monogo-rm-info-open` class on hover/focus/click).
 * -------------------------------------------------------------------------- */
body.monogo-auth-page:not(.page-monogo-customerauth-embed) .field.choice.persistent > .tooltip.wrapper {
    display: none;
}

body.monogo-auth-page:not(.page-monogo-customerauth-embed) .field.choice.persistent .label .monogo-rm-info {
    position: relative; /* tooltip anchor — see doc-block above */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    margin: 0 0 0 6px;
    padding: 0;
    border: 1px solid currentColor;
    border-radius: 50%;
    background: transparent;
    color: var(--muc-color-text-muted);
    font-size: 10px;
    font-weight: 600;
    line-height: 1;
    cursor: help;
    pointer-events: auto;
    vertical-align: middle;
    flex: none;
    transition:
        color var(--muc-transition-speed) ease,
        border-color var(--muc-transition-speed) ease;
}

body.monogo-auth-page:not(.page-monogo-customerauth-embed) .field.choice.persistent .label .monogo-rm-info:hover,
body.monogo-auth-page:not(.page-monogo-customerauth-embed) .field.choice.persistent .label .monogo-rm-info:focus {
    color: var(--muc-color-text);
    outline: none;
}

body.monogo-auth-page:not(.page-monogo-customerauth-embed) .field.choice.persistent .label .monogo-rm-info:focus-visible {
    outline: 2px solid var(--muc-color-primary);
    outline-offset: 2px;
}

body.monogo-auth-page:not(.page-monogo-customerauth-embed) .field.choice.persistent .monogo-rm-info > .monogo-rm-info-tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    width: max-content;
    max-width: min(280px, 80vw);
    margin: 0;
    padding: 10px 14px;
    background: #fff;
    border: 1px solid var(--muc-color-border-input, #e0e0e0);
    border-radius: 12px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
    color: var(--muc-color-text);
    font-size: 12px;
    font-weight: 400;
    line-height: 1.4;
    text-align: left;
    white-space: normal;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(4px);
    transition:
        opacity var(--muc-transition-speed) ease,
        transform var(--muc-transition-speed) ease,
        visibility var(--muc-transition-speed) ease;
    z-index: 5;
}

body.monogo-auth-page:not(.page-monogo-customerauth-embed) .field.choice.persistent .monogo-rm-info.monogo-rm-info-open > .monogo-rm-info-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* Arrow centred under the tooltip body. Because the tooltip itself is
   centred on the `?` icon (left: 50% + translateX(-50%) on the icon),
   the arrow ends up directly under the icon — no per-locale drift,
   no manual anchor offset. */
body.monogo-auth-page:not(.page-monogo-customerauth-embed) .field.choice.persistent .monogo-rm-info > .monogo-rm-info-tooltip::before,
body.monogo-auth-page:not(.page-monogo-customerauth-embed) .field.choice.persistent .monogo-rm-info > .monogo-rm-info-tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -7px;
    width: 0;
    height: 0;
    border: 7px solid transparent;
}

body.monogo-auth-page:not(.page-monogo-customerauth-embed) .field.choice.persistent .monogo-rm-info > .monogo-rm-info-tooltip::before {
    border-top-color: var(--muc-color-border-input, #e0e0e0);
}

body.monogo-auth-page:not(.page-monogo-customerauth-embed) .field.choice.persistent .monogo-rm-info > .monogo-rm-info-tooltip::after {
    margin-top: -1px;
    border-top-color: #fff;
}

/* --------------------------------------------------------------------------
 * DOB field — dashboard-aligned skin (registration form)
 *
 * Vendor `Magento\Customer\Block\Widget\Dob::getFieldHtml()` renders
 * a plain `<input type="text">` inside `.control.customer-dob` and
 * appends a `<button class="ui-datepicker-trigger"><img></button>`
 * as a sibling for the calendar popup trigger. `dashboard.css` §
 * "Date of Birth field" already hides the button and paints an
 * inline SVG calendar glyph directly on the input for its
 * `body.uad-account` scope; we mirror the same visual contract here
 * for the register form so the DOB widget looks identical between
 * "My Account" edit and "Create account" screens.
 *
 * Kept as a trailing block (not an in-place rewrite of the earlier
 * `.field.field-dob .ui-datepicker-trigger` positioning rules
 * higher up in this file) so a single `git revert` of this hunk
 * restores the previous look without touching anything else.
 * -------------------------------------------------------------------------- */

body.monogo-auth-page:not(.page-monogo-customerauth-embed) .form-create-account .field.field-dob .control.customer-dob input.input-text,
body.monogo-auth-page:not(.page-monogo-customerauth-embed) .form-create-account .field.field-dob .control.customer-dob input#dob {
    cursor: pointer;
    padding-right: 44px;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23222222' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'><rect x='3' y='4' width='18' height='18' rx='2'/><line x1='16' y1='2' x2='16' y2='6'/><line x1='8' y1='2' x2='8' y2='6'/><line x1='3' y1='10' x2='21' y2='10'/></svg>");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 18px 18px;
}

/* Hide the jQuery UI datepicker's own trigger `<button>` (with its
   inner `<img class="ui-datepicker-trigger">` from Magento_Theme::
   calendar.png). The SVG glyph on the input above replaces the
   visual; `showOn: 'both'` in Magento's calendar config keeps the
   input-click behaviour so removing the button does not remove the
   popup trigger — the input itself is now the only trigger. */
body.monogo-auth-page:not(.page-monogo-customerauth-embed) .form-create-account .field.field-dob .ui-datepicker-trigger,
body.monogo-auth-page:not(.page-monogo-customerauth-embed) .form-create-account .field.field-dob img.ui-datepicker-trigger,
body.monogo-auth-page:not(.page-monogo-customerauth-embed) .form-create-account .field.field-dob button.ui-datepicker-trigger {
    display: none !important;
}

/* Suppress any generic `.control:has(input:user-valid)::after` /
   `:user-invalid)::after` ring — the DOB input's right padding
   hosts the SVG calendar glyph and a stacked ring would render on
   top of it. Mirrors `dashboard.css` line 2859-2862. */
body.monogo-auth-page:not(.page-monogo-customerauth-embed) .form-create-account .field.field-dob > .control:has(input:user-valid)::after,
body.monogo-auth-page:not(.page-monogo-customerauth-embed) .form-create-account .field.field-dob > .control:has(input:user-invalid)::after {
    display: none;
}

/* ==========================================================================
   Newsletter consent row on the create-account form
   ==========================================================================

   `Monogo_UnilayerCustomerAuth::form/register.phtml` renders the
   `is_subscribed` checkbox as a two-line affordance (mirroring the
   Privacy Settings page):

       <div class="field choice newsletter uad-newsletter-consent">
         <input class="checkbox uad-newsletter-consent__input" ...>
         <label class="label uad-newsletter-consent__label">
           <span class="uad-newsletter-consent__main">…marketing consent sentence…</span>
           <span class="uad-newsletter-consent__hint">…opt-out + %1 privacy link…</span>
         </label>
       </div>

   The shared `.field.choice` cascade above already gives the row
   (flex row, top-aligned checkbox, gap 10px, label inline-flex with
   `--muc-font-size-sm` + `--muc-color-text`). What the generic rules
   do NOT give us is the visual distinction between the main consent
   sentence and the small dusty-gray hint footnote: both spans inherit
   the same colour + size, so the hint reads as a second paragraph,
   not a footnote.

   We scope the override to `.uad-newsletter-consent` (the same class
   hook the dashboard uses in
   `Monogo_UnilayerAccountDashboard::css/dashboard.css` lines 8079-
   8122) so a future shared stylesheet can be extracted without
   renaming. Token bag is `--muc-*` so the colours track the rest of
   this stylesheet.

   Mirrors the iframe-surface rules in
   `Monogo_UnilayerCustomerAuth::css/embed.css` (end of file) — the
   two blocks are intentionally kept in lockstep so the consent row
   looks identical on `/customer/account/create/` and inside the
   `<monogo-customer-auth>` iframe modal.
*/
body.monogo-auth-page:not(.page-monogo-customerauth-embed) .field.choice.uad-newsletter-consent {
    align-items: flex-start !important;
    gap: 10px !important;
    padding: 0 !important;
}

body.monogo-auth-page:not(.page-monogo-customerauth-embed) .uad-newsletter-consent__input {
    flex: 0 0 auto !important;
    margin-top: 3px !important;
    order: 0 !important;
}

/* `flex: 1 1 0` (NOT `1 1 auto`): with the parent `.field.choice`
   carrying `flex-wrap: wrap`, a label sized on its intrinsic content
   width (`flex-basis: auto`) is treated as "too wide to fit next to
   the 16px checkbox" and wraps onto its OWN row BELOW the checkbox —
   the "checkbox alone on line 1, text on line 2" bug in the
   screenshot. `flex-basis: 0` makes the label purely grow-based so it
   always sits inline to the RIGHT of the checkbox and wraps its text
   INSIDE itself. Same fix the Amasty consent rows use (see the
   `.amgdpr-checkbox.field.choice > label.amgdpr-label` block above).
   `order: 1` keeps the label after the checkbox even if the DOM order
   ever changes. */
body.monogo-auth-page:not(.page-monogo-customerauth-embed) .uad-newsletter-consent__label {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 0 !important;
    min-width: 0 !important;
    order: 1 !important;
    align-items: flex-start !important;
    margin: 0 !important;
    padding: 0 !important;
    cursor: pointer !important;
    color: var(--muc-color-text, #000) !important;
    font-size: var(--muc-font-size-sm, 12px) !important;
    line-height: 1.5 !important;
    text-align: left !important;
    text-transform: none !important;
}

body.monogo-auth-page:not(.page-monogo-customerauth-embed) .uad-newsletter-consent__main {
    display: block;
    width: 100%;
    color: var(--muc-color-text, #000) !important;
    font-size: var(--muc-font-size-sm, 12px) !important;
    font-weight: 400 !important;
    line-height: 1.5 !important;
    text-align: left !important;
}

body.monogo-auth-page:not(.page-monogo-customerauth-embed) .uad-newsletter-consent__hint {
    display: block;
    width: 100%;
    margin-top: 4px !important;
    color: var(--muc-color-text-muted, #999) !important;
    font-size: 10px !important;
    line-height: 1.4 !important;
    text-align: left !important;
}

body.monogo-auth-page:not(.page-monogo-customerauth-embed) .uad-newsletter-consent__hint a {
    color: inherit !important;
    text-decoration: underline !important;
}

body.monogo-auth-page:not(.page-monogo-customerauth-embed) .uad-newsletter-consent__hint a:hover,
body.monogo-auth-page:not(.page-monogo-customerauth-embed) .uad-newsletter-consent__hint a:focus-visible {
    color: var(--muc-color-text, #000) !important;
}

