/*
 * Log-in and sign-up pages (Product-0810E): account/login.liquid, account/register.liquid,
 * after LaRecup's (themes/ressources/assets/auth.css).
 *
 * Everything is scoped under .kz-auth. The forms themselves are printed by the platform
 * (Kreezalid/Users login_form and register_form elements), so the rules below restyle
 * their markup rather than replace it: field names, CSRF and form-protection tokens stay
 * the platform's. Unlike LaRecup's, the palette is neutral and the buttons and links keep
 * the marketplace's own colours (its .btn-primary and link rules): only their shape is set.
 *
 * The text keeps the page's colour, and greys and hairlines are mixed from it: some
 * marketplaces draw these pages on a dark background. Only what sits on white (fields,
 * social buttons) has a fixed ink.
 */
.kz-auth {
    --kz-auth-ink: #1f2328;
    --kz-auth-field-line: #d5dce4;
    --kz-auth-soft: #f1f4f8;
    /* An unregistered custom property is substituted as written, so currentColor is the
       colour of the element that uses it. */
    --kz-auth-muted: color-mix(in srgb, currentColor 72%, transparent);
    --kz-auth-line: color-mix(in srgb, currentColor 22%, transparent);
    max-width: 480px;
    margin: 0 auto;
    padding: 48px 20px 72px;
    text-align: left;
}
.kz-auth h1 {
    margin: 0 0 16px;
    font-size: 34px;
    font-weight: 700;
    line-height: 1.15;
    color: inherit;
    text-align: left;
    text-transform: none;
}
.kz-auth__switch {
    margin: 0 0 28px;
    font-size: 16px;
}
.kz-auth__switch a,
.kz-auth__footer a {
    font-weight: 700;
}

/* Choice screen */
.kz-auth .kz-auth__choice,
.kz-auth .kz-auth__choice h1 {
    text-align: center;
}
.kz-auth .kz-auth__choice h1 {
    margin-bottom: 10px;
}
.kz-auth__intro {
    margin: 0 auto 32px;
    max-width: 380px;
    color: var(--kz-auth-muted);
    font-size: 15px;
    line-height: 1.5;
}
.kz-auth__footer {
    margin: 28px 0 0;
    color: var(--kz-auth-muted);
    font-weight: 600;
    font-size: 16px;
}

/* Social buttons: the choice screen's own and the platform's block on the login page */
.kz-auth .kz-auth__social,
.kz-auth .social-login-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 52px;
    margin: 0 0 14px;
    padding: 12px 56px;
    border: 1px solid var(--kz-auth-field-line);
    border-radius: 999px;
    background: #fff;
    color: var(--kz-auth-ink) !important;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none !important;
    transition: background-color .15s ease;
}
.kz-auth .kz-auth__social:hover,
.kz-auth .social-login-btn:hover {
    background: var(--kz-auth-soft);
}
.kz-auth .kz-auth__social svg,
.kz-auth .social-login-btn svg {
    position: absolute;
    left: 22px;
    top: 50%;
    width: 24px;
    height: 24px;
    transform: translateY(-50%);
}
.kz-auth .kz-auth__separator,
.kz-auth .social-login-separator {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 26px 0;
    color: var(--kz-auth-muted);
    font-size: 16px;
    font-weight: 700;
    text-transform: lowercase;
}
.kz-auth .kz-auth__separator::before,
.kz-auth .kz-auth__separator::after,
.kz-auth .social-login-separator::before,
.kz-auth .social-login-separator::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--kz-auth-line);
}
.kz-auth .social-login-separator span {
    padding: 0;
}
.kz-auth .social-login {
    margin: 0;
}

/* "Sign up with e-mail": a .btn-primary, so the marketplace's colours */
.kz-auth .btn.kz-auth__email {
    display: block;
    width: 100%;
    min-height: 52px;
    padding: 12px 24px;
    border-radius: 999px;
    font-size: 17px;
    font-weight: 700;
    white-space: normal;
}

/* Two steps: the script adds .is-choice until "Sign up with e-mail" is pressed. Without
   the script both stay visible, so the form is always reachable. */
.kz-auth.is-choice .kz-auth__form,
.kz-auth.is-form .kz-auth__choice {
    display: none;
}
.kz-auth.is-form .kz-auth__form {
    animation: kz-auth-in .25s ease both;
}
@keyframes kz-auth-in {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: none; }
}
.kz-auth__choice + .kz-auth__form {
    margin-top: 56px;
}
.kz-auth.is-form .kz-auth__form {
    margin-top: 0;
}
/* The choice screen already offers the social buttons. */
.kz-auth--register .kz-auth__choice + .kz-auth__form .social-login {
    display: none;
}

/* Fields */
.kz-auth form .form-group {
    margin: 0 0 20px;
}
.kz-auth form label,
.kz-auth form .form-label,
.kz-auth form .control-label {
    display: block;
    margin: 0 0 8px;
    color: inherit;
    font-size: 16px;
    font-weight: 700;
    text-align: left;
}
.kz-auth form .form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--kz-auth-field-line);
    border-radius: 8px;
    background-color: #fff;
    box-shadow: none;
    color: var(--kz-auth-ink);
    font-size: 16px;
}
/* kindshare's icons drawn inside the name, e-mail and password fields: the labels say it. */
.kz-auth form .form-control.login-email,
.kz-auth form .form-control.login-password,
.kz-auth form .form-control.signup-email,
.kz-auth form .form-control.signup-password,
.kz-auth form .form-control.signup-fname,
.kz-auth form .form-control.signup-name {
    background-image: none;
}
/* kindshare squares every list and pads it with !important; its arrow stays. Zero
   specificity past the element, like kindshare's own rule (this sheet comes later, so it
   wins): a marketplace whose CSS shapes its fields keeps its lists in the same shape. */
:where(.kz-auth form) select {
    padding: 0 40px 0 16px !important;
    border-radius: 8px !important;
    color: var(--kz-auth-ink);
}
/* One-line fields only: a text area or a multiple list keeps its own height. */
.kz-auth form input.form-control,
.kz-auth form select.form-control:not([multiple]):not([size]) {
    height: 52px;
}
.kz-auth form .form-control::placeholder {
    color: #94a0b0;
}
.kz-auth form .form-control:focus {
    border-color: var(--kz-auth-ink);
    outline: 3px solid rgba(31, 35, 40, .12);
    outline-offset: 0;
}
.kz-auth form .error-message,
.kz-auth form .help-block,
.kz-auth form .invalid-feedback {
    margin-top: 6px;
    font-size: 14px;
}
/* The form's own messages (a refused log-in, the auth flash): kindshare floats every
   notification over the top of the page, which here would cover the title. Set in the
   flow, above the fields. */
.kz-auth .notification {
    position: static;
    width: auto;
    min-width: 0;
    max-width: none;
    margin: 0 0 20px;
    border-radius: 8px;
    animation: none;
}

/* Password visibility */
.kz-auth__password {
    position: relative;
}
.kz-auth__password .form-control {
    padding-right: 52px;
}
.kz-auth__eye {
    position: absolute;
    top: 50%;
    right: 6px;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #5b6573;
    cursor: pointer;
}
.kz-auth__eye:hover {
    background: var(--kz-auth-soft);
}
.kz-auth__eye svg {
    width: 22px;
    height: 22px;
}
.kz-auth__eye .kz-auth__eye-open,
.kz-auth__eye.is-shown .kz-auth__eye-closed {
    display: none;
}
.kz-auth__eye.is-shown .kz-auth__eye-open {
    display: block;
}

/* Consent checkboxes */
.kz-auth form .checkbox label {
    font-weight: 400;
    font-size: 15px;
    line-height: 1.45;
}
.kz-auth form input[type=checkbox] {
    width: 18px;
    height: 18px;
}

/* reCAPTCHA: Google's box is 304px wide and cannot be resized, so it is scaled down on
   the narrowest phones rather than overflow the page. */
.kz-auth .g-recaptcha {
    margin: 4px 0 20px;
}
@media (max-width: 359px) {
    .kz-auth .g-recaptcha {
        transform: scale(.88);
        transform-origin: 0 0;
    }
}

/* Submit: the marketplace's .btn-primary, shaped */
.kz-auth form .btn.btn-primary {
    min-height: 54px;
    padding: 12px 36px;
    border-radius: 999px;
    font-size: 17px;
    font-weight: 700;
    box-shadow: none;
    white-space: normal;
}
.kz-auth--register form .btn.btn-primary {
    width: 100%;
    margin-top: 12px;
}

/* Login: the button with "forgotten password" on its right, then "remember me" */
.kz-auth--login .login-form .text-right {
    text-align: left;
}
.kz-auth__actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 8px;
}
.kz-auth--login form .btn.btn-primary.full-width {
    width: auto;
}
.kz-auth__forgot {
    color: var(--kz-auth-muted) !important;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none !important;
}
.kz-auth__forgot:hover {
    color: inherit !important;
}
/* Before the script moves it beside the button (and without the script). */
.kz-auth > .kz-auth__forgot {
    display: inline-block;
    margin-top: 16px;
}
.kz-auth--login .remember_me_option {
    margin-top: 18px;
}
.kz-auth--login .remember_me_option .form-group,
.kz-auth--login .remember_me_option .checkbox {
    margin: 0;
}
.kz-auth--login .remember_me_option .form-check {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-left: 0;
}
.kz-auth--login .remember_me_option label {
    margin: 0;
    padding-left: 0;
    font-weight: 400;
}
.kz-auth--login .remember_me_option input[type=checkbox] {
    position: static;
    margin: 0;
}
.kz-auth--login .social-login {
    margin-top: 8px;
}

@media (max-width: 575px) {
    .kz-auth {
        padding: 32px 18px 56px;
    }
    .kz-auth h1 {
        font-size: 28px;
    }
    .kz-auth__actions .btn.btn-primary {
        width: 100% !important;
    }
    .kz-auth--login .login-form .kz-auth__actions {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
}
