/**
 * MCI Custom Login Page Styles
 *
 * Replaces the default WP login layout with a centered card on a soft
 * gradient background. Targets the standard WP login DOM so all features
 * (errors, password reset, remember-me) keep working.
 */

/* ── Design tokens ───────────────────────────────────────────────────── */
:root {
    --mci-primary: #1e3a5f;          /* deep professional blue */
    --mci-primary-hover: #16294a;
    --mci-accent:  #2563eb;          /* lively blue for focus rings */
    --mci-bg:      #f5f7fb;
    --mci-card-bg: #ffffff;
    --mci-text:    #1f2937;
    --mci-muted:   #6b7280;
    --mci-border:  #e5e7eb;
    --mci-radius:  10px;
    --mci-shadow:  0 10px 40px rgba(15, 23, 42, 0.08), 0 2px 8px rgba(15, 23, 42, 0.04);
    --mci-font:    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ── Page background ─────────────────────────────────────────────────── */
body.login {
    background: linear-gradient(135deg, #eef2ff 0%, #f5f7fb 50%, #ecfdf5 100%);
    background-attachment: fixed;
    font-family: var(--mci-font);
    color: var(--mci-text);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* WP injects a #login wrapper holding everything. Center it nicely. */
#login {
    width: 100%;
    max-width: 420px;
    padding: 24px 16px;
    margin: 0;
}

/* ── Header / logo ───────────────────────────────────────────────────── */
.login h1 {
    margin: 0 0 24px 0;
    text-align: center;
}

.login h1 a {
    background-image: none !important;
    width: auto !important;
    height: auto !important;
    padding: 0 !important;
    margin: 0 !important;
    text-indent: 0 !important;
    overflow: visible !important;
    color: var(--mci-primary) !important;
    font-size: 22px !important;
    font-weight: 600 !important;
    letter-spacing: -0.01em;
    line-height: 1.2 !important;
    display: inline-block;
    outline: none;
    box-shadow: none;
}
.login h1 a:focus {
    box-shadow: none;
}

/* When a real logo image is rendered into h1, hide the generated WP "Powered by WordPress" treatment. */
.login h1 img.mci-login-logo {
    max-width: 200px;
    max-height: 80px;
    height: auto;
    display: block;
    margin: 0 auto 0;
}

/* Optional tagline under the logo */
.mci-login-tagline {
    text-align: center;
    color: var(--mci-muted);
    font-size: 13px;
    margin: -8px 0 24px 0;
}

/* ── Card ────────────────────────────────────────────────────────────── */
#loginform,
#registerform,
#lostpasswordform,
#resetpassform {
    background: var(--mci-card-bg);
    border: 1px solid var(--mci-border);
    border-radius: var(--mci-radius);
    box-shadow: var(--mci-shadow);
    padding: 32px 28px 28px;
    margin: 0;
    overflow: visible;
}

/* Labels */
.login form label {
    color: var(--mci-text);
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 6px;
    display: block;
}
.login form .input,
.login form input[type="text"],
.login form input[type="email"],
.login form input[type="password"] {
    background: #fbfcfe;
    border: 1px solid var(--mci-border);
    border-radius: 8px;
    padding: 11px 14px;
    font-size: 14px;
    width: 100%;
    box-sizing: border-box;
    color: var(--mci-text);
    transition: border-color .15s, box-shadow .15s, background .15s;
    box-shadow: none;
    margin: 0 0 18px 0;
    line-height: 1.4;
    height: auto;
}
.login form .input:focus,
.login form input:focus {
    background: #fff;
    border-color: var(--mci-accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
    outline: none;
}

/* Remember me */
.login .forgetmenot {
    margin: -4px 0 18px 0;
    font-size: 13px;
    color: var(--mci-muted);
    float: none;
    display: flex;
    align-items: center;
    gap: 6px;
}
.login .forgetmenot input[type="checkbox"] {
    margin: 0;
    accent-color: var(--mci-accent);
}
.login .forgetmenot label {
    font-weight: 400;
    margin: 0;
    cursor: pointer;
}

/* Primary button */
.login form .submit {
    margin: 0;
    text-align: center;
}
.login .button-primary,
.login input[type="submit"].button-primary {
    background: var(--mci-primary) !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 12px 16px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #ffffff !important;
    width: 100% !important;
    height: auto !important;
    line-height: 1.4 !important;
    text-shadow: none !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05) !important;
    cursor: pointer;
    transition: background .15s, transform .05s;
    float: none !important;
}
.login .button-primary:hover,
.login input[type="submit"].button-primary:hover {
    background: var(--mci-primary-hover) !important;
}
.login .button-primary:active {
    transform: translateY(1px);
}
.login .button-primary:focus {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.3) !important;
    outline: none;
}

/* ── Links below the card ────────────────────────────────────────────── */
#nav, #backtoblog {
    text-align: center;
    margin: 18px 0 0 0 !important;
    padding: 0 !important;
    font-size: 13px;
}
#nav a, #backtoblog a {
    color: var(--mci-muted) !important;
    text-decoration: none;
    transition: color .15s;
}
#nav a:hover, #backtoblog a:hover {
    color: var(--mci-accent) !important;
    text-decoration: none;
}
#nav {
    margin-top: 22px !important;
}

/* Hide the WP language switcher footer (rarely useful on a branded login) */
.language-switcher {
    display: none !important;
}

/* ── Notices: errors, success, info ──────────────────────────────────── */
.login .message,
.login #login_error,
.login .notice {
    background: #fff8f6;
    border: 1px solid #fecaca;
    border-left: 4px solid #ef4444;
    color: #7f1d1d;
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 13px;
    box-shadow: none;
    margin-bottom: 16px;
}
.login .message {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-left-color: #22c55e;
    color: #14532d;
}
.login .notice-info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-left-color: var(--mci-accent);
    color: #1e3a8a;
}

/* ── Mobile ──────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
    #login {
        padding: 16px 12px;
    }
    #loginform,
    #registerform,
    #lostpasswordform,
    #resetpassform {
        padding: 24px 20px 20px;
    }
}
