/*!
 * Copyright © Monogo. All rights reserved.
 * Monogo_UnilayerLoginStyles — CAT Footwear theme.
 *
 * Scope-bounded override of `--muc-*` tokens — see mer-login.css for
 * the full rationale. CAT-aligned: yellow primary, square corners,
 * Inter typeface.
 */

@import url("./login.css");

@font-face {
    font-family: 'Inter';
    src: url('https://fonts.gstatic.com/s/inter/v13/UcCO3FwrK3iLTeHuS_fvQtMwCp50KnMw2boKoduKmMEVuLyfMZhrib2Bg-4.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('https://fonts.gstatic.com/s/inter/v13/UcCO3FwrK3iLTeHuS_fvQtMwCp50KnMw2boKoduKmMEVuGKYMZhrib2Bg-4.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('https://fonts.gstatic.com/s/inter/v13/UcCO3FwrK3iLTeHuS_fvQtMwCp50KnMw2boKoduKmMEVuFuYMZhrib2Bg-4.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* Token contract — selector matches the base login.css token block
   verbatim (`body.monogo-auth-page:not(.page-monogo-customerauth-embed)`,
   specificity 0,2,1). See mer-login.css for the full rationale. */
:root,
html,
body,
body.monogo-auth-page:not(.page-monogo-customerauth-embed) {
    --muc-color-primary:        #FFCC00;
    --muc-color-primary-hover:  #BCBEC0;
    --muc-color-bg:             #ffffff;
    --muc-color-surface:        #F3F3F3;
    --muc-color-border:         #9B9B9B;
    /* Input border deliberately darker than --muc-color-border so the
       form fields keep readable contrast WITHOUT picking up the yellow
       primary fill — matches the user-requested behaviour ("inputy
       tylko ciemniejszy border"). */
    --muc-color-border-input:   #545859;
    --muc-color-text:           #000000;
    --muc-color-text-secondary: #545859;
    --muc-color-text-muted:     #757575;
    --muc-color-success:        #7ED321;
    --muc-color-error:          #E24D25;
    --muc-color-link:           #000000;

    --muc-font-family: 'Inter', -apple-system, BlinkMacSystemFont,
        'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

    /* CAT brand language is uncompromisingly square. */
    --muc-border-radius: 0;
    --muc-checkbox-radius: 0;
}

/* ==========================================================================
   Boxed inputs (4-side dark border, square — CAT)
   ==========================================================================

   Same selector list + cascade strategy as mer-login.css. The visual
   diff is fully token-driven (`--muc-border-radius: 0`,
   `--muc-color-border-input: #545859`).
   ========================================================================== */

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 {
    border: 1px solid var(--muc-color-border-input);
    border-radius: var(--muc-border-radius);
    padding: 0 16px;
    background: var(--muc-color-bg);
}

body.monogo-auth-page:not(.page-monogo-customerauth-embed) .control > textarea {
    padding: 8px 16px;
}

/* CAT focus state — use black border (NOT yellow primary, which would
   blur into the surrounding white) so the focused field is visually
   distinct against the page. The 2 px width matches the focus ring on
   the dashboard so both surfaces feel consistent. */
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 {
    border-color: #000000;
    border-width: 2px;
    border-bottom-width: 2px;
    padding: 0 15px;
}

body.monogo-auth-page:not(.page-monogo-customerauth-embed) .control > textarea:focus {
    padding: 7px 15px;
}

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-color: var(--muc-color-error);
    border-bottom-color: var(--muc-color-error);
}

/* Floating label — shift right by horizontal padding (same trick as
   Merrell). Material Outlined cut-through. */
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) {
    left: 16px;
    padding: 0 4px;
}

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) {
    background: var(--muc-color-bg);
}

/* ==========================================================================
   Custom checkbox (square — CAT)
   ========================================================================== */

body.monogo-auth-page:not(.page-monogo-customerauth-embed) .field.choice > input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    margin: 0;
    border: 1.5px solid var(--muc-color-border-input);
    border-radius: var(--muc-checkbox-radius);
    background: var(--muc-color-bg);
    position: relative;
    cursor: pointer;
    flex: 0 0 auto;
    transition: background 200ms ease, border-color 200ms ease;
}

body.monogo-auth-page:not(.page-monogo-customerauth-embed) .field.choice > input[type="checkbox"]:hover {
    border-color: #000000;
}

body.monogo-auth-page:not(.page-monogo-customerauth-embed) .field.choice > input[type="checkbox"]:checked {
    background: var(--muc-color-primary);
    border-color: var(--muc-color-primary);
}

/* Checkmark — BLACK on yellow fill (vs Merrell's white on dark fill)
   so the checked state stays readable. */
body.monogo-auth-page:not(.page-monogo-customerauth-embed) .field.choice > input[type="checkbox"]:checked::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 1px;
    width: 4px;
    height: 9px;
    border: solid #000000;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

body.monogo-auth-page:not(.page-monogo-customerauth-embed) .field.choice > input[type="checkbox"]:focus-visible {
    outline: 2px solid #000000;
    outline-offset: 2px;
}

/* ==========================================================================
   Submit button — CAT yellow with BLACK label
   ==========================================================================

   Base login.css §742 paints the primary button with
   `color: var(--muc-color-bg)` (white). On CAT yellow (#FFCC00) that
   collapses contrast to ~1.2:1 (WCAG fail). Override to black for
   ~17:1 contrast — same treatment as cat-dashboard.css.

   Hover state in the base only changes opacity (preserving yellow);
   we flip to black background + yellow text on hover so the button
   reads as an inverse pair — same affordance as the dashboard.
   ========================================================================== */

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 {
    color: #000000;
}

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: #000000;
    border-color: #000000;
    color: #FFCC00;
    opacity: 1;
}
