/*
 * Login page (/login).
 *
 * Extracted from the inline <style> that used to live in
 * frontend::auth.login. The module chooser has its own stylesheet,
 * assets/frontend/auth/login-modules.css.
 */

/* -------------------------------------------------------------------------
   SWEETALERT — the location prompt renders over the login card
   ------------------------------------------------------------------------- */

.swal2-container {
    z-index: 100 !important;
}

.swal2-popup .swal2-title {
    font-size: 1.2em;
}

.swal2-popup .swal2-content {
    font-size: 0.875rem !important;
}

.swal2-validation-message {
    margin-top: 4px;
}

/* -------------------------------------------------------------------------
   FORM
   ------------------------------------------------------------------------- */

.focused .input-group {
    box-shadow: none;
}

.focused .form-control {
    box-shadow:
        0 3px 9px rgba(50, 50, 9, 0),
        3px 4px 8px rgba(94, 114, 228, 0.1) !important;
}

/* -------------------------------------------------------------------------
   BRAND BLOCK

   Same class names the login dashboard uses, so the two screens read alike.
   ------------------------------------------------------------------------- */

.login-brand-title {
    font-weight: 500;
    font-size: 24px;
    padding: 0;
    margin: 0;
}

.login-brand-subtitle {
    margin: 0;
    font-weight: 100;
}

/* -------------------------------------------------------------------------
   CARD

   These were inline style attributes on the markup until this view was
   extracted; they are unchanged, only moved.
   ------------------------------------------------------------------------- */

.login-wrap {
    padding-top: 58px !important;
}

/*
 * Selector weight is deliberate on the next two rules.
 *
 * Both were `style=""` attributes before this view was extracted, and an inline
 * style outranks every stylesheet. Moving them to a plain class lost fights they
 * used to win: `.login-wrap .icon` in login_style.css (0,2,0) sizes the badge
 * 80x80, and `.btn.btn-primary` there paints a flat background with !important.
 * Matching their shape is what keeps the card looking as it did.
 */
.login-wrap .icon.login-icon-top {
    width: 120px;
    height: 58px;
    border-radius: 30px;
    overflow: hidden;
    box-shadow:
        0 4px 6px rgb(50 50 93 / 11%),
        0 1px 3px rgb(0 0 0 / 8%);
    background: linear-gradient(357deg, #3949ab, rgb(30, 136, 229));
}

.input-group-text.login-addon {
    padding: 10px 14px;
}

.login-toggle-label {
    float: left;
    font-weight: 600;
    font-size: 12px;
}

.login-remember-label {
    font-weight: 600;
    font-size: 12px;
}

.login-remember-label .fa-bookmark {
    font-size: 10px;
}

/*
 * The submit sits below the floated toggle row, so the float is cleared here.
 *
 * `position: inherit` is deliberate and was on the original markup: it takes
 * this wrapper out of being a positioning context, so the absolutely-positioned
 * button from `.form-group .submit` (login_style.css) resolves against
 * `.login-wrap` instead and can hang off the bottom edge of the card.
 */
.login-submit-row {
    clear: both;
    position: inherit !important;
}

.btn.btn-primary.login_submit {
    width: 50%;
    overflow: hidden;
    font-size: 15px;
    background: linear-gradient(357deg, #3949ab, rgb(30, 136, 229)) !important;
}

/* -------------------------------------------------------------------------
   LAYOUT
   ------------------------------------------------------------------------- */

.app_logo {
    max-width: 100%;
    width: 380px;
}

.loginContainer {
    display: flex;
    justify-content: center;
    flex-direction: column;
    align-items: center;
    justify-items: center;
}

.main-content {
    min-height: inherit;
    margin-top: -20px !important;
}

/*
 * FOOTER
 *
 * Geometry is the same at every width. It used to start at min-width:792px, and
 * below it the fixed footer was left with no `width` at all — a fixed box
 * shrinks to its content, so on a phone it collapsed to a narrow column pinned
 * to the left edge instead of spanning the viewport, and the centring inside it
 * centred against that narrow box rather than the screen.
 */
.footer_container {
    position: fixed;
    bottom: 10px;
    left: 0;
    width: 100%;
    z-index: 1000;
}

.footer_container .footer {
    padding: 0 !important;
}

/*
 * Colour, however, cannot be the same at every width, because the ground under
 * the footer is not.
 *
 * The white wave crest is tall enough to sit behind the whole footer on a
 * tablet or desktop, where flat grey reads cleanly. On a phone the crest is a
 * thin sliver and the footer straddles it — the links land on the purple
 * gradient and the copyright on the white. Flat grey there left the links
 * effectively invisible, so small screens keep the layout's white-on-shadow
 * treatment, which is legible against both halves.
 */
@media (min-width: 792px) {
    .footer_container .footer .nav .nav-item .nav-link,
    .footer_container .footer .copyright {
        text-shadow: none !important;
        color: #5f656c !important;
    }
}

/* -------------------------------------------------------------------------
   SMALL SCREENS

   The brand block above the card is the first thing to give up room.
   ------------------------------------------------------------------------- */

@media (max-width: 540px) {
    .ERPTitle h1 {
        font-size: 20px !important;
    }

    .ERPTitle h3 {
        font-size: 13px !important;
    }

    .app_logo {
        max-width: 80%;
    }
}

.login-background-wrapper {
    position: fixed;
    height: 100%;
    width: 100%;
}

.login-background {
    height: 280px;
    width: auto;
}

/* Mobile */
@media (max-width: 767.98px) {
    .login-background {
        height: 180px;
    }
}

/* Tablet */
@media (min-width: 768px) and (max-width: 991.98px) {
    .login-background {
        height: 220px;
    }
}

/* Desktop */
@media (min-width: 992px) {
    .login-background {
        height: 280px;
    }
}
