/*
 * Login-style pages: login, forgot password, reset password, logged in on another device
 * (Layout/loginLayout.ctp, Metronic's m-login--5). Loaded by the login layout only.
 */

/* The Croogo Users templates (vendor/croogo/croogo/Users/src/Template/Users/*.ctp) give the form column an inline
   width: 450px. On phones that stretched the page to 489px: sideways scrolling and the fields running off the right
   edge. max-width wins over the inline width, so the column now shrinks to the screen. */
.m-login.m-login--5 .m-login__signin,
.m-login.m-login--5 .m-login__forget-password {
    max-width: 100%;
}

/* Space above the form column on wide screens (was an inline style="padding-top: 10%" in the layout, moved here so
   the stacked layout below can change it; same selector strength as the theme's 13%, and later, so this wins) */
.m-login.m-login--5 .m-login__wrapper-2 {
    padding-top: 10%;
}

/* Up to 768px the theme stacks the two halves (phones in portrait and landscape, small tablets) */
@media (max-width: 768px) {
    /* The outer wrapper stays display: table, which grows to fit its widest content, so the 100% above would still
       mean 489px */
    .m-login.m-login--5 {
        display: block;
    }

    /* The theme's desktop spacing around the "Empire Realtors" panel pushed the form below the fold (in landscape,
       off the screen entirely) */
    .m-login.m-login--5 .m-login__wrapper-1 .m-login__wrapper-1-1 .m-login__contanier {
        padding-top: var(--app-space-4);
    }

    .m-login.m-login--5 .m-login__wrapper-1 .m-login__wrapper-1-1 .m-login__contanier .m-login__content .m-login__title {
        padding-top: var(--app-space-5);
    }

    .m-login.m-login--5 .m-login__wrapper-1 .m-login__wrapper-1-1 .m-login__contanier .m-login__content .m-login__form-action {
        margin: var(--app-space-5) 0;
    }

    .m-login.m-login--5 .m-login__wrapper-1 .m-login__wrapper-1-1 .m-login__border {
        margin-top: var(--app-space-5);
    }

    /* The divider bar keeps the desktop margin-top: -100px, which the theme's 150px gap above used to absorb */
    .m-login.m-login--5 .m-login__wrapper-1 .m-login__wrapper-1-1 .m-login__border > div {
        margin-top: 0;
    }

    .m-login.m-login--5 .m-login__wrapper-2 {
        padding-top: var(--app-space-4);
    }
}

/* Touch screens of any width (phones in landscape are wider than 768px, iPads): iOS Safari zooms the page in when a
   field under 16px gets focus (these were 13px) */
@media (pointer: coarse) {
    .m-login.m-login--5 .m-login__form .form-control {
        font-size: 16px;
    }
}
