/* MOTSafe Login Page Styles — Split Layout */

body.login {
    background: #f5f7fb;
    margin: 0;
    padding: 0;
}

/* Two-column wrapper */
.motsafe-login-wrapper {
    display: flex;
    min-height: 100vh;
}

/* ==============================
   LEFT panel — login form
   ============================== */
.motsafe-login-form-panel {
    flex: 0 0 480px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: #fff;
    border-right: 1px solid #e6e7e9;
}

body.login div#login {
    width: 100%;
    max-width: 380px;
    padding: 0;
    margin: 0;
}

/* Logo */
body.login div#login h1 {
    margin-bottom: 0;
}

body.login div#login h1 a {
    background-image: url('../images/logo-motsafe.svg') !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    width: 280px !important;
    height: 70px !important;
    text-indent: -9999px;
    display: block;
    margin: 0 auto 8px;
}

body.login div#login h1 a::before,
body.login div#login h1 a::after {
    display: none;
}

/* Subtitle */
.motsafe-login-subtitle {
    text-align: center;
    color: #667085;
    font-size: 15px;
    margin: 0 0 28px;
}

/* Form card */
#login form {
    background: #fff;
    border: none;
    border-top: 1px solid #e6e7e9;
    border-radius: 0;
    box-shadow: none;
    padding: 24px 0 0;
    margin-top: 0;
}

/* Uppercase labels */
.login label {
    font-size: 12px;
    font-weight: 600;
    color: #667085;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
    display: block;
}

/* Inputs */
.login form .input,
.login input[type="text"],
.login input[type="password"] {
    background: #fff;
    border: 1px solid #dfe4ea;
    border-radius: 6px;
    padding: 12px 14px;
    font-size: 15px;
    transition: all 0.2s;
    box-shadow: none;
    width: 100%;
}

.login form .input:focus,
.login input[type="text"]:focus,
.login input[type="password"]:focus {
    background: #fff;
    border-color: #206bc4;
    box-shadow: 0 0 0 3px rgba(32, 107, 196, 0.1);
    outline: none;
}

/* Meta row — remember me + forgot password inline */
.motsafe-login-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 16px 0;
}

.motsafe-login-meta-row .forgetmenot {
    margin: 0;
    float: none;
}

.motsafe-login-meta-row .forgetmenot label {
    text-transform: none;
    font-size: 13px;
    font-weight: 400;
    color: #1d2327;
    letter-spacing: 0;
    display: inline;
}

.motsafe-forgot-link {
    font-size: 13px;
    color: #206bc4 !important;
    text-decoration: none;
    white-space: nowrap;
}

.motsafe-forgot-link:hover {
    color: #1a569d !important;
}

/* Sign-in code step: "Resend code" (a form button) + "Use a different email", styled as one row of links */
#login form.motsafe-lc-resend {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: none;
    padding: 0;
    margin: 16px 0 0;
}

#login form.motsafe-lc-resend button.motsafe-forgot-link {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    font-size: 13px;
    cursor: pointer;
}

#login form.motsafe-lc-resend .motsafe-forgot-link:hover,
#login form.motsafe-lc-resend .motsafe-forgot-link:focus-visible {
    text-decoration: underline;
}

/* Sign in button — full width */
.login .button.button-primary {
    background: #1d2327;
    border: 1px solid #1d2327;
    border-radius: 6px;
    box-shadow: none;
    text-shadow: none;
    font-weight: 600;
    padding: 12px 16px;
    height: auto;
    font-size: 15px;
    transition: all 0.2s;
    width: 100%;
    margin-top: 4px;
}

.login .button.button-primary:hover,
.login .button.button-primary:focus {
    background: #2c3338;
    border-color: #2c3338;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.login .button.button-primary:active {
    background: #000;
    border-color: #000;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Hide the default submit wrapper float */
.login .submit {
    clear: both;
}

/* Microsoft SSO */
.motsafe-sso-block {
    margin-top: 16px;
}

.motsafe-sso-divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: #98a2b3;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 16px 0;
}

.motsafe-sso-divider::before,
.motsafe-sso-divider::after {
    content: "";
    flex: 1;
    border-bottom: 1px solid #e6e7e9;
}

.motsafe-sso-divider span {
    padding: 0 12px;
}

.motsafe-sso-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    background: #fff;
    color: #1d2327;
    border: 1px solid #dfe4ea;
    border-radius: 6px;
    padding: 11px 16px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.motsafe-sso-btn:hover {
    background: #f7f8fa;
    border-color: #c9cfd8;
    color: #1d2327;
    text-decoration: none;
}

.motsafe-sso-btn svg {
    flex-shrink: 0;
}

/* Error / success messages */
.login #login_error,
.login .message,
.login .success {
    border-left: 4px solid #206bc4;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    padding: 12px 16px;
    margin-bottom: 16px;
}

.login #login_error {
    border-left-color: #d63939;
    background: #fff5f5;
}

.login .success,
.login .message {
    border-left-color: #2fb344;
    background: #f0fdf4;
}

/* Hide back-to-blog link */
.login #backtoblog {
    display: none;
}

.login #nav a {
    color: #206bc4;
    text-decoration: none;
}

.login #nav a:hover {
    color: #1a569d;
}

.login #nav {
    text-align: center;
    margin-top: 16px;
}

.login .privacy-policy-page-link {
    text-align: center;
    margin-top: 16px;
}

.login .privacy-policy-page-link a {
    color: #667085;
    text-decoration: none;
}

.login .privacy-policy-page-link a:hover {
    color: #206bc4;
}

/* Checkbox */
.login input[type="checkbox"] {
    border-radius: 4px;
    border: 1px solid #dfe4ea;
}

.login input[type="checkbox"]:checked {
    background: #206bc4;
    border-color: #206bc4;
}

/* Branding footer under form */
.login #login::after {
    content: "Secure MOT Testing Platform";
    display: block;
    text-align: center;
    color: #667085;
    font-size: 13px;
    margin-top: 24px;
}

/* Loading State */
.login .button-primary.loading::after {
    content: "";
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-left: 8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ==============================
   RIGHT panel — features
   ============================== */
.motsafe-login-features-panel {
    flex: 1;
    background: #f5f7fb;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 40px;
}

.motsafe-features-inner {
    max-width: 560px;
    width: 100%;
}

.motsafe-features-inner h2 {
    font-size: 26px;
    font-weight: 700;
    color: #1d2327;
    margin: 0 0 8px;
}

.motsafe-features-subtitle {
    font-size: 15px;
    color: #667085;
    margin: 0 0 32px;
    line-height: 1.5;
}

/* Feature cards — 2x2 grid */
.motsafe-feature-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 32px;
}

.motsafe-feature-card {
    background: #fff;
    border: 1px solid #e6e7e9;
    border-radius: 8px;
    padding: 24px 20px;
    transition: box-shadow 0.2s, border-color 0.2s;
}

.motsafe-feature-card:hover {
    border-color: #206bc4;
    box-shadow: 0 4px 12px rgba(32, 107, 196, 0.1);
}

.motsafe-feature-card-icon {
    width: 44px;
    height: 44px;
    background: rgba(32, 107, 196, 0.08);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #206bc4;
    margin-bottom: 14px;
}

.motsafe-feature-card h3 {
    font-size: 15px;
    font-weight: 600;
    color: #1d2327;
    margin: 0 0 6px;
}

.motsafe-feature-card p {
    font-size: 13px;
    color: #667085;
    margin: 0;
    line-height: 1.5;
}

/* Demo CTA */
.motsafe-demo-cta {
    background: linear-gradient(135deg, #1a3a5c 0%, #206bc4 100%);
    border-radius: 10px;
    padding: 28px 24px;
    text-align: center;
}

.motsafe-demo-cta p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 15px;
    margin: 0 0 16px;
}

.motsafe-demo-btn {
    display: inline-block;
    background: #fff;
    color: #206bc4;
    font-weight: 600;
    font-size: 15px;
    padding: 10px 32px;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s;
}

.motsafe-demo-btn:hover {
    background: #f0f6ff;
    color: #1a569d;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    text-decoration: none;
}

/* ==============================
   Responsive
   ============================== */
@media screen and (max-width: 960px) {
    .motsafe-login-wrapper {
        flex-direction: column;
    }

    .motsafe-login-form-panel {
        flex: none;
        padding: 32px 24px;
        border-right: none;
        border-bottom: 1px solid #e6e7e9;
    }

    .motsafe-login-features-panel {
        padding: 32px 24px;
    }

    .motsafe-features-inner h2 {
        font-size: 22px;
    }
}

@media screen and (max-width: 560px) {
    body.login div#login {
        width: 100%;
    }

    .motsafe-feature-cards {
        grid-template-columns: 1fr;
    }

    .motsafe-login-form-panel {
        padding: 24px 20px;
    }

    .motsafe-login-features-panel {
        padding: 24px 20px;
    }
}
