/* =====================================================
   MYLIFEFACTORY - LOGIN PAGE
   Version: 1.0.0
   Joomla 5.4.10 / JoomShaper Eleva
   ===================================================== */

/* Main layout */

body.com-users.view-login .mlf-login {
    --mlf-login-black: #101010;
    --mlf-login-border: #e8e8e8;
    --mlf-login-muted: #777777;
    --mlf-login-surface: #ffffff;

    width: 100%;
    min-width: 0;
    min-height: max(560px, calc(100dvh - 110px));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px 20px;
    background: #fafafa;
    color: var(--mlf-login-black);
    font-family: inherit;
}

body.com-users.view-login .mlf-login,
body.com-users.view-login .mlf-login *,
body.com-users.view-login .mlf-login *::before,
body.com-users.view-login .mlf-login *::after {
    box-sizing: border-box;
}

/* Centered container */

.mlf-login__container {
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
}

/* White login card */

.mlf-login__card {
    width: 100%;
    padding: 34px 38px 30px;
    background: var(--mlf-login-surface, #fff);
    border: 1px solid var(--mlf-login-border, #e8e8e8);
    border-radius: 22px;
    box-shadow: 0 6px 28px rgba(0, 0, 0, .025);
}

/* Heading */

.mlf-login__header {
    text-align: center;
    margin-bottom: 25px;
}

.mlf-login__eyebrow {
    display: block;
    margin-bottom: 8px;
    color: #888;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1.7px;
    line-height: 1.4;
}

.mlf-login__title {
    margin: 0 0 7px;
    color: #101010;
    font-size: 28px !important;
    font-weight: 600;
    letter-spacing: -.8px;
    line-height: 1.2;
}

.mlf-login__subtitle {
    margin: 0;
    color: #777;
    font-size: 13px;
    line-height: 1.5;
}

/* Form */

.mlf-login__form {
    width: 100%;
    margin: 0;
    padding: 0;
}

.mlf-login__fields {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.mlf-login__field {
    min-width: 0;
    margin: 0;
}

.mlf-login__field-label {
    margin-bottom: 8px;
}

.mlf-login__field-label label {
    display: inline-block;
    margin: 0;
    color: #252525;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
}

/* Login inputs */

.mlf-login .mlf-login__field-control input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.mlf-login .mlf-login__field-control select {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: 44px;
    min-height: 44px;
    margin: 0;
    padding: 10px 14px;
    background: #fafafa;
    border: 1px solid #e4e4e4;
    border-radius: 10px;
    color: #101010;
    font-family: inherit;
    font-size: 13px;
    line-height: 1.4;
    box-shadow: none;
    transition:
        border-color .2s ease,
        background-color .2s ease,
        box-shadow .2s ease;
}

.mlf-login .mlf-login__field-control input:focus,
.mlf-login .mlf-login__field-control select:focus {
    outline: none;
    background: #fff;
    border-color: #101010;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, .06);
}

.mlf-login .mlf-login__field-control input::placeholder {
    color: #999;
}

/* Password input group */

.mlf-login .mlf-login__field-control .input-group {
    display: flex;
    align-items: stretch;
    flex-wrap: nowrap;
    width: 100%;
    min-width: 0;
}

.mlf-login .mlf-login__field-control .input-group > input.form-control {
    flex: 1 1 0%;
    width: 1% !important;
    min-width: 0;
    border-radius: 10px 0 0 10px;
}

.mlf-login .mlf-login__field-control .input-group > .btn,
.mlf-login .mlf-login__field-control .input-group > button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    min-height: 44px;
    margin: 0;
    padding: 0;
    border: 1px solid #e4e4e4;
    border-left: 0;
    border-radius: 0 10px 10px 0;
    background: #fafafa;
    color: #101010;
    box-shadow: none;
    transform: none;
    inset: auto;
}

.mlf-login .mlf-login__field-control .input-group > .btn:hover,
.mlf-login .mlf-login__field-control .input-group > button:hover {
    background: #f0f0f0;
}

/* Remember me */

.mlf-login__remember {
    margin: 17px 0 20px;
}

.mlf-login__remember-label {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin: 0;
    color: #333;
    font-size: 12px;
    font-weight: 400;
    cursor: pointer;
}

.mlf-login__remember-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: #101010;
    cursor: pointer;
}

/* Login button */

.mlf-login__submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 44px;
    padding: 11px 18px;
    margin: 0;
    border: 1px solid #101010;
    border-radius: 100px;
    background: #101010;
    color: #fff;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    text-align: center;
    cursor: pointer;
    box-shadow: none;
    transition: background .2s ease, border-color .2s ease;
}

.mlf-login__submit:hover {
    background: #333;
    border-color: #333;
    color: #fff;
}

.mlf-login__submit:focus-visible,
.mlf-login a:focus-visible,
.mlf-login__social-button:focus-visible {
    outline: 2px solid #101010;
    outline-offset: 3px;
}

/* Social login buttons */

.mlf-login__social {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 18px;
}

.mlf-login__social-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 44px;
    padding: 9px 15px;
    border: 1px solid #e4e4e4;
    border-radius: 100px;
    background: #fff;
    color: #101010;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    cursor: pointer;
    box-shadow: none;
    transition: border-color .2s ease, background .2s ease;
}

.mlf-login__social-button:hover {
    background: #fafafa;
    border-color: #ccc;
    color: #101010;
}

.mlf-login__social-icon,
.mlf-login__social-button svg {
    width: 19px;
    height: 19px;
    flex-shrink: 0;
}

/* OR divider */

.mlf-login__divider {
    display: flex;
    align-items: center;
    gap: 13px;
    margin: 0 0 18px;
    color: #888;
    font-size: 12px;
    text-align: center;
}

.mlf-login__divider::before,
.mlf-login__divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #e8e8e8;
}

/* Recovery links */

.mlf-login__links {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 7px 16px;
    margin-top: 18px;
}

.mlf-login__links a {
    color: #666;
    font-size: 11px;
    font-weight: 400;
    text-decoration: none;
    line-height: 1.5;
}

.mlf-login__links a:hover {
    color: #101010;
    text-decoration: underline;
}

/* Registration below the card */

.mlf-login__register {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 20px;
    color: #777;
    font-size: 12px;
    line-height: 1.5;
    text-align: center;
}

.mlf-login__register a {
    color: #101010;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
}

.mlf-login__register a:hover {
    text-decoration: underline;
}

/* =====================================================
   COMPACT HEIGHT - LAPTOP DISPLAYS
   ===================================================== */

@media (max-height: 780px) and (min-width: 768px) {
    body.com-users.view-login .mlf-login {
        min-height: 0;
        padding-top: 20px;
        padding-bottom: 20px;
    }

    .mlf-login__card {
        padding: 25px 32px 23px;
        border-radius: 18px;
    }

    .mlf-login__header {
        margin-bottom: 19px;
    }

    .mlf-login__title {
        font-size: 25px !important;
    }

    .mlf-login__fields {
        gap: 12px;
    }

    .mlf-login__remember {
        margin: 13px 0 16px;
    }

    .mlf-login__register {
        margin-top: 14px;
    }
}

/* =====================================================
   TABLET
   ===================================================== */

@media (max-width: 991px) {
    body.com-users.view-login .mlf-login {
        padding-left: 18px;
        padding-right: 18px;
    }

    .mlf-login__container {
        max-width: 420px;
    }
}

/* =====================================================
   MOBILE
   ===================================================== */

@media (max-width: 767px) {
    body.com-users.view-login .mlf-login {
        min-height: 0;
        padding: 24px 15px 32px;
        align-items: flex-start;
        background: #fff;
    }

    .mlf-login__container {
        max-width: 440px;
    }

    .mlf-login__card {
        padding: 23px 19px 24px;
        border-radius: 16px;
    }

    .mlf-login__header {
        margin-bottom: 22px;
    }

    .mlf-login__title {
        font-size: 26px !important;
    }

    .mlf-login__fields {
        gap: 15px;
    }

    .mlf-login__register {
        margin-top: 17px;
    }
}

/* =====================================================
   VERY SMALL MOBILE
   ===================================================== */

@media (max-width: 380px) {
    body.com-users.view-login .mlf-login {
        padding: 17px 10px 24px;
    }

    .mlf-login__card {
        padding: 20px 15px;
    }

    .mlf-login__title {
        font-size: 24px !important;
    }

    .mlf-login__links {
        gap: 6px 12px;
    }
}

/* Reduced motion */

@media (prefers-reduced-motion: reduce) {
    .mlf-login *,
    .mlf-login *::before,
    .mlf-login *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}

/* ==========================================
   MYLIFEFACTORY - LOGIN BACKGROUND FIX
   Eleva / Helix Ultimate
   ========================================== */

/* Remove original Eleva login background */

body.com-users.view-login {
    background: #fafafa !important;
    background-image: none !important;
}

/* Main page containers */

body.com-users.view-login #sp-main-body,
body.com-users.view-login #sp-main-body .container,
body.com-users.view-login #sp-main-body .container-inner,
body.com-users.view-login #sp-main-body .row,
body.com-users.view-login #sp-component,
body.com-users.view-login #sp-component .sp-column {
    background: transparent !important;
    background-image: none !important;
}

/* Remove background from legacy login wrappers */

body.com-users.view-login .login,
body.com-users.view-login .login-left,
body.com-users.view-login .login-right {
    background: transparent !important;
    background-image: none !important;
}

/* Remove possible decorative pseudo-elements */

body.com-users.view-login #sp-main-body::before,
body.com-users.view-login #sp-main-body::after,
body.com-users.view-login #sp-component::before,
body.com-users.view-login #sp-component::after {
    background-image: none !important;
}

/* Clean login area */

body.com-users.view-login .mlf-login {
    background: transparent !important;
    background-image: none !important;
}

/* Keep the login card white */

body.com-users.view-login .mlf-login__card {
    background: #ffffff !important;
}

/* Desktop vertical positioning */

@media (min-width: 992px) {
    body.com-users.view-login #sp-main-body {
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }

    body.com-users.view-login .mlf-login {
        min-height: calc(100dvh - 110px);
        padding: 20px;
    }
}

/* Mobile */

@media (max-width: 767px) {
    body.com-users.view-login .mlf-login {
        min-height: 0;
        padding: 24px 15px 32px;
    }
}
