/**
 * LP-native styling for the wp-login.php page.
 *
 * Design tokens lifted from the LatePoint customer dashboard so the login
 * page feels like part of the same product, not a stock WordPress screen.
 *   - font:    "latepoint" with system fallbacks
 *   - primary: var(--latepoint-brand-primary, #14161d)
 *   - card:    8px radius, subtle shadow
 *   - bg:      #f7f7f7 (matches /portal/)
 *
 * Site logo (Settings → Appearance → Customize → Site Identity → Logo) is
 * exposed by class-login-styler.php as the CSS variable `--clls-logo-url`.
 */

:root {
    --clls-bg:           #f5f6fa;
    --clls-card-bg:      #ffffff;
    --clls-fg:           #14161d;
    --clls-muted:        #7c85a3;
    --clls-border:       rgba(0, 0, 0, 0.08);
    --clls-input-border: rgba(0, 0, 0, 0.12);
    --clls-primary:      #3366ff;  /* LP blue — matches transactional emails */
    --clls-primary-hover: #2856e0;
    --clls-primary-fg:   #ffffff;
    --clls-info-bg:      #eef3ff;
    --clls-info-border:  #3366ff;
    --clls-radius:       10px;
}

html, body.login {
    background: var(--clls-bg) !important;
    color: var(--clls-fg);
    font-family: "latepoint", -apple-system, system-ui, BlinkMacSystemFont,
                 "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.4;
}

/* WP's default #login container is 320px — widen so the form has more
   breathing room and the logo (which sizes to container width) feels
   right. NOTE: must target #login (the centered inner container), NOT
   .login (which is the body element — overriding its width breaks the
   whole page layout). */
#login {
    width: 380px !important;
    max-width: 92vw !important;
    margin: 0 auto !important;
    padding-top: 6% !important;
}

/* === Logo ===
   wp-login renders the site name as text inside the H1 anchor and sets a
   background-image (WP's blue logo) on top. We override the background-image
   with the site's custom logo (CSS variable set by class-login-styler.php)
   and ALWAYS hide the text — never fall back to showing the raw site name. */
.login h1,
.login h1.wp-login-logo {
    margin: 0 0 24px !important;
    padding: 0 !important;
}
.login h1 a,
.login h1.wp-login-logo a {
    background-image: var(--clls-logo-url, none) !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center center !important;
    width: 100% !important;
    max-width: none !important;     /* match the form container width */
    height: 88px !important;
    margin: 0 auto !important;
    padding: 0 !important;
    /* Hide the site-name text the H1 contains. Multiple techniques to defeat
       any third-party CSS that might try to undo any single one. */
    text-indent: -9999px !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    color: transparent !important;
    font-size: 0 !important;
    line-height: 0 !important;
    text-decoration: none !important;
    display: block !important;
}

/* === Form card === */
.login form {
    background: var(--clls-card-bg);
    border: 1px solid var(--clls-border);
    border-radius: var(--clls-radius);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    margin-top: 16px;
    padding: 28px 24px;
}

/* === Labels === */
.login label {
    color: var(--clls-fg);
    font-size: 13px;
    font-weight: 600;
}

/* === Inputs === */
.login input[type="text"],
.login input[type="email"],
.login input[type="password"],
.login form .input {
    background: #fff !important;
    border: 1px solid var(--clls-input-border) !important;
    border-radius: var(--clls-radius) !important;
    color: var(--clls-fg) !important;
    font-size: 14px !important;
    font-family: inherit !important;
    padding: 10px 12px !important;
    height: auto !important;
    line-height: 1.4 !important;
    box-shadow: none !important;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.login input[type="text"]:focus,
.login input[type="email"]:focus,
.login input[type="password"]:focus,
.login form .input:focus {
    border-color: var(--clls-primary) !important;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05) !important;
    outline: none !important;
}

/* === Primary submit button === */
.wp-core-ui .button-primary,
.login .button-primary {
    background: var(--clls-primary) !important;
    border: 1px solid var(--clls-primary) !important;
    color: var(--clls-primary-fg) !important;
    border-radius: var(--clls-radius) !important;
    font-family: inherit !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    text-transform: capitalize !important;
    padding: 12px 18px !important;
    height: auto !important;
    line-height: 1.4 !important;
    box-shadow: none !important;
    text-shadow: none !important;
    transition: opacity 0.15s, transform 0.05s;
}
.wp-core-ui .button-primary:hover,
.wp-core-ui .button-primary:focus,
.login .button-primary:hover,
.login .button-primary:focus {
    background: var(--clls-primary-hover) !important;
    border-color: var(--clls-primary-hover) !important;
    color: var(--clls-primary-fg) !important;
    box-shadow: 0 2px 6px rgba(51, 102, 255, 0.25) !important;
}
.wp-core-ui .button-primary:active,
.login .button-primary:active {
    transform: translateY(1px);
}

/* === Secondary buttons (e.g., Magic Login's "Send me a login link") === */
.wp-core-ui .button:not(.button-primary),
.login .button:not(.button-primary) {
    background: #fff !important;
    border: 1px solid var(--clls-input-border) !important;
    color: var(--clls-fg) !important;
    border-radius: var(--clls-radius) !important;
    font-family: inherit !important;
    font-weight: 500 !important;
    box-shadow: none !important;
    text-shadow: none !important;
}
.wp-core-ui .button:not(.button-primary):hover,
.login .button:not(.button-primary):hover {
    border-color: var(--clls-primary) !important;
    color: var(--clls-primary) !important;
}

/* === Magic Login Pro button container === */
.login .magic-login-button-wrap,
.login form + .magic-login-button-wrap,
.login .magic-login-or-divider {
    margin: 12px 0;
    text-align: center;
}
.login .magic-login-or-divider {
    color: var(--clls-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* === "Remember Me" checkbox === */
.login .forgetmenot {
    font-size: 13px;
    color: var(--clls-muted);
}
.login .forgetmenot label {
    font-weight: 400;
}

/* === Links below the form (Lost password / Back to site) === */
.login #nav {
    text-align: center;
    padding: 16px 0 0;
    margin: 0;
}
.login #nav a {
    color: var(--clls-muted) !important;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.15s;
}
.login #nav a:hover {
    color: var(--clls-primary) !important;
    text-decoration: none;
}

/* "← Go to Achieve Vitality" — user requested removal */
.login #backtoblog {
    display: none !important;
}

/* === Notices / errors ===
   The "Please enter your username or email…" info banner is .message.
   The login-failed error banner is #login_error. */
.login .notice,
.login .message,
.login #login_error {
    background: var(--clls-info-bg) !important;
    border: none !important;
    border-left: 3px solid var(--clls-info-border) !important;
    border-radius: var(--clls-radius);
    color: var(--clls-fg);
    font-size: 13px;
    line-height: 1.5;
    padding: 12px 16px;
    margin: 0 auto 16px !important;
    max-width: 320px;
    box-shadow: none !important;
    text-align: left;
}
.login #login_error {
    background: #fdecea !important;
    border-left-color: #c0392b !important;
    color: #7a2218;
}
.login .message strong {
    color: var(--clls-fg);
    font-weight: 600;
}

/* === Top bar / language switcher === */
.login .language-switcher {
    margin: 16px 0;
}

/* === Privacy policy footer link === */
.login .privacy-policy-page-link {
    margin-top: 16px;
    text-align: center;
    font-size: 12px;
}
.login .privacy-policy-page-link a {
    color: var(--clls-muted);
    text-decoration: none;
}

/* === Mobile === */
@media (max-width: 480px) {
    .login form { padding: 20px 16px; }
    .login h1 a { height: 72px !important; }
}
