/* =========================================================
   LEANS.AI ACCOUNT GATEWAY
   Shortcode: [leans_account_gateway]
   ========================================================= */

.leans-account-gateway {
    box-sizing: border-box;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

.leans-account-gateway *,
.leans-account-gateway *::before,
.leans-account-gateway *::after {
    box-sizing: border-box;
}

/* Logged-in users keep the normal WooCommerce My Account experience. */
.leans-account-gateway--logged-in {
    display: block;
    width: 100%;
    max-width: none;
    margin: 0;
}

/* -------------------------
   LOGGED-OUT TWO-CARD LAYOUT
   ------------------------- */

.leans-account-gateway--logged-out {
    width: min(1080px, 100%);
    margin: 46px auto 64px;
    display: grid;
    grid-template-columns: minmax(0, 1.06fr) minmax(0, .94fr);
    gap: 18px;
    align-items: stretch;
}

.leans-auth-card {
    min-width: 0;
    border-radius: 16px;
    padding: 38px;
}

.leans-auth-login-card {
    background: #ffffff;
    border: 1px solid #e1e6df;
    box-shadow: 0 10px 32px rgba(0, 0, 0, .065);
}

.leans-auth-signup-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: #ffffff;
    background:
        radial-gradient(circle at 85% 10%, rgba(98, 181, 81, .14), transparent 34%),
        linear-gradient(145deg, #171a18 0%, #242b25 100%);
    border: 1px solid #303830;
    box-shadow: 0 12px 34px rgba(0, 0, 0, .14);
}

/* -------------------------
   TYPOGRAPHY
   ------------------------- */

.leans-auth-eyebrow {
    margin: 0 0 8px;
    color: #5da74e;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: 1.35px;
    text-transform: uppercase;
}

.leans-auth-title {
    margin: 0 0 10px;
    font-family: inherit;
    font-size: clamp(27px, 3vw, 32px);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -.65px;
}

.leans-auth-login-card .leans-auth-title {
    color: #1d221e;
}

.leans-auth-signup-card .leans-auth-title {
    color: #ffffff;
}

.leans-auth-copy {
    margin: 0 0 26px;
    font-size: 14px;
    line-height: 1.6;
}

.leans-auth-login-card .leans-auth-copy {
    color: #687068;
}

.leans-auth-signup-card .leans-auth-copy {
    color: rgba(255, 255, 255, .72);
}

/* -------------------------
   WOODMART / WOOCOMMERCE LOGIN
   ------------------------- */

.leans-auth-login-card .woocommerce,
.leans-auth-login-card .wd-registration-page,
.leans-auth-login-card .woocommerce-form-login {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
}

.leans-auth-login-card .wd-registration-page,
.leans-auth-login-card .woocommerce-form-login {
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

/* Our component supplies the heading. */
.leans-auth-login-card .wd-login-title {
    display: none !important;
}

/* Woodmart may apply its hidden-form class; keep the login form visible here. */
.leans-auth-login-card .woocommerce-form-login.hidden-form,
.leans-auth-login-card form.woocommerce-form-login {
    display: block !important;
}

.leans-auth-login-card .woocommerce-form-login .form-row {
    margin: 0 0 17px !important;
    padding: 0 !important;
}

.leans-auth-login-card .woocommerce-form-login label {
    display: block;
    margin: 0 0 7px;
    color: #292e2a;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.35;
}

.leans-auth-login-card .woocommerce-form-login input.input-text {
    width: 100%;
    height: 50px;
    padding: 0 14px !important;
    border: 1px solid #d8ded6 !important;
    border-radius: 8px !important;
    background: #f8faf7 !important;
    color: #171a18 !important;
    font-family: inherit;
    font-size: 15px;
    box-shadow: none !important;
    outline: none;
    transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.leans-auth-login-card .woocommerce-form-login input.input-text:focus {
    border-color: #62ad52 !important;
    background: #ffffff !important;
    box-shadow: 0 0 0 3px rgba(98, 173, 82, .12) !important;
}

.leans-auth-login-card .password-input {
    width: 100%;
}

/* Login is intentionally neutral/dark; account creation remains the green CTA. */
.leans-auth-login-card .woocommerce-form-login__submit {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 48px;
    margin: 5px 0 0 !important;
    padding: 13px 22px !important;
    border: 1px solid #1d221e !important;
    border-radius: 7px !important;
    background: linear-gradient(180deg, #272d28 0%, #171b18 100%) !important;
    color: #ffffff !important;
    font-family: inherit !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    letter-spacing: .45px !important;
    text-transform: uppercase;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 3px 8px rgba(0,0,0,.12) !important;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.leans-auth-login-card .woocommerce-form-login__submit:hover,
.leans-auth-login-card .woocommerce-form-login__submit:focus {
    background: linear-gradient(180deg, #333a34 0%, #202521 100%) !important;
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.10), 0 5px 12px rgba(0,0,0,.16) !important;
}

.leans-auth-login-card .woocommerce-form-login__submit:focus-visible {
    outline: 2px solid rgba(98, 181, 81, .45) !important;
    outline-offset: 3px;
}

.leans-auth-login-card .login-form-footer {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 18px 0 0 !important;
    padding: 0 !important;
    font-size: 12px;
}

.leans-auth-login-card .lost_password {
    color: #579d49 !important;
    font-weight: 700;
    text-decoration: none;
}

.leans-auth-login-card .lost_password:hover,
.leans-auth-login-card .lost_password:focus {
    color: #43813a !important;
    text-decoration: underline;
}

.leans-auth-login-card .woocommerce-form-login__rememberme {
    margin: 0;
    color: #626a63;
    font-size: 12px;
    font-weight: 600;
}

/* -------------------------
   LOGIN ERRORS / NOTICES

   The main site currently hides .woocommerce-notices-wrapper globally.
   Restore it only inside this account gateway so login failures are visible.
   ------------------------- */

.leans-account-gateway .woocommerce-notices-wrapper {
    display: block !important;
}

.leans-account-gateway .woocommerce-error,
.leans-account-gateway .woocommerce-message,
.leans-account-gateway .woocommerce-info {
    margin: 0 0 20px !important;
    padding: 13px 15px !important;
    border-radius: 8px !important;
    font-size: 13px;
    line-height: 1.45;
    box-shadow: none !important;
}

.leans-account-gateway .woocommerce-error {
    border: 1px solid #e3b3b3 !important;
    background: #fff5f5 !important;
    color: #7f2929 !important;
}

.leans-account-gateway .woocommerce-message,
.leans-account-gateway .woocommerce-info {
    border: 1px solid #cfdcc9 !important;
    background: #f4f8f2 !important;
    color: #33472f !important;
}

/* -------------------------
   SIGNUP CARD
   ------------------------- */

.leans-auth-benefits {
    display: grid;
    gap: 10px;
    margin: 0 0 25px;
    padding: 0;
    list-style: none;
}

.leans-auth-benefits li {
    position: relative;
    margin: 0;
    padding-left: 23px;
    color: rgba(255, 255, 255, .90);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.45;
}

.leans-auth-benefits li::before {
    content: "\2713";
    position: absolute;
    top: 0;
    left: 0;
    color: #70bd5e;
    font-weight: 900;
}

/* Works with the site's canonical .leans-button-primary class but also
   supplies complete styling so this component remains self-contained. */
.leans-auth-signup-card .leans-auth-signup-button {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 48px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    margin: 0 !important;
    padding: 13px 20px !important;
    border: 1px solid #6cbd59 !important;
    border-radius: 7px !important;
    background: linear-gradient(180deg, #62b551 0%, #4b963f 100%) !important;
    color: #ffffff !important;
    font-family: inherit !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    line-height: 1.15 !important;
    letter-spacing: .45px !important;
    text-align: center;
    text-decoration: none !important;
    text-transform: uppercase;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.10), 0 3px 8px rgba(0,0,0,.14) !important;
    cursor: pointer;
    transition: background .18s ease, transform .18s ease, box-shadow .18s ease;
}

.leans-auth-signup-card .leans-auth-signup-button:hover,
.leans-auth-signup-card .leans-auth-signup-button:focus {
    background: linear-gradient(180deg, #6abe58 0%, #519e44 100%) !important;
    color: #ffffff !important;
    text-decoration: none !important;
    transform: translateY(-1px);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 5px 12px rgba(0,0,0,.18) !important;
}

.leans-auth-signup-card .leans-auth-signup-button:focus-visible {
    outline: 2px solid rgba(108, 189, 89, .55);
    outline-offset: 3px;
}

.leans-auth-microcopy {
    margin-top: 12px;
    color: rgba(255, 255, 255, .48);
    font-size: 10px;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: .2px;
    text-align: center;
}

.leans-account-gateway-error {
    padding: 16px;
    border: 1px solid #e3b3b3;
    border-radius: 8px;
    background: #fff5f5;
    color: #7f2929;
}

/* -------------------------
   TABLET / MOBILE
   ------------------------- */

@media screen and (max-width: 860px) {
    .leans-account-gateway--logged-out {
        width: min(620px, 100%);
        margin: 28px auto 48px;
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .leans-auth-card {
        padding: 30px;
    }
}

@media screen and (max-width: 520px) {
    .leans-account-gateway--logged-out {
        margin-top: 20px;
        margin-bottom: 38px;
    }

    .leans-auth-card {
        padding: 25px 20px;
        border-radius: 13px;
    }

    .leans-auth-title {
        font-size: 26px;
    }

    .leans-auth-copy {
        margin-bottom: 22px;
    }

    .leans-auth-login-card .login-form-footer {
        align-items: flex-start;
        flex-direction: column;
        gap: 9px;
    }
}
