/*
 * remitza v4 theme: customer login, register and forgot password (spec 8.2).
 * CSS only. These pages' scripts use $("form") / $('form')[0], so nothing here adds elements.
 */

body.rz-theme .login-main {
    background: var(--background); /* the template paints it white */
}

/* The form column is a v4 card surface at every width, in both themes */
body.rz-theme .login-main > .login-page-left {
    background-color: var(--card) !important; /* .bg-white is !important */
}

body.rz-theme .login-main .login-page {
    padding: 32px 28px;
    background-color: transparent;
}

/* Desktop: the template's split, the form column on the left and the big logo panel on the right, in v4 surfaces.
   The template sets the column widths per breakpoint (50/50 up to 1150px, then 40/60, 35/65, and 25/75 above 1700px). */
@media (min-width: 1000px) {
    body.rz-theme .login-main > .login-page-left {
        height: auto !important; /* .h-100 is !important; an auto height lets the row stretch the column to the full window */
        border-right: 1px solid var(--border);
    }

    body.rz-theme .login-main > .login-page-right .content-front {
        display: none; /* the template's grey overlay on the logo */
    }

    body.rz-theme .login-main > .login-page-right .login-description {
        color: var(--text-2); /* the template's white text */
        font-size: 13px;
    }
}

/* Phones and tablets: one centred v4 card. The template floats the column with position:absolute + translate below
   1000px, which cuts tall content (register step 2, an open keyboard); in the page flow it scrolls instead. */
@media (max-width: 999px) {
    body.rz-theme .login-main {
        align-items: flex-start;
        justify-content: center;
        padding: 24px 12px;
    }

    body.rz-theme .login-main > .login-page-right {
        display: none; /* the big logo panel */
    }

    body.rz-theme .login-main > .login-page-left {
        position: static;
        top: auto;
        left: auto;
        flex: 0 0 auto;
        width: 100%;
        max-width: 420px;
        height: auto !important; /* .h-100 is !important */
        margin: auto; /* centred both ways; at the top when it is taller than the window */
        border: 1px solid var(--border);
        border-radius: var(--radius-card); /* with --shadow-card: every card's shape (Part 2 spec 5.6) */
        box-shadow: var(--shadow-card);
        transform: none;
    }
}

body.rz-theme .login-main .auth-brand {
    width: 100%; /* AdminLTE's .login-page is an align-items: center column, so auto shrinks the row */
    align-items: center;
    margin: 0 0 24px !important; /* the template sets margin with !important below 1000px */
    font-size: 14px;
}

/* The language menu opens from the right-hand switch, so align it to the switch's right edge */
body.rz-theme .login-main .auth-brand .dropdown-menu {
    right: 0 !important;
    left: auto !important; /* inline style: left: 0px; right: inherit */
}

body.rz-theme .login-main .auth-brand img {
    width: 48px !important; /* .w-25 is !important */
    height: auto;
}

/* Language switch: v4 outline button */
body.rz-theme .login-main .auth-brand .dropdown-toggle {
    display: inline-flex;
    align-items: center;
    height: 32px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background-color: var(--card);
    color: var(--text-2) !important; /* inline style: black */
}

body.rz-theme .login-main .auth-brand .dropdown-toggle:hover,
body.rz-theme .login-main .auth-brand .show > .dropdown-toggle {
    border-color: var(--brand);
    background-color: var(--brand-soft);
}

body.rz-theme .login-main .auth-brand .dropdown-toggle::after {
    left: 0; /* AdminLTE shifts the caret with position: relative; left: .714rem */
    margin-left: 6px;
}

body.rz-theme .login-main .dropdown-menu {
    padding: 6px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background-color: var(--popover);
    box-shadow: var(--shadow-xl);
}

body.rz-theme .login-main .dropdown-menu .dropdown-item {
    padding: 0;
    border-radius: 12px;
}

body.rz-theme .login-main .dropdown-menu .dropdown-item a {
    display: block;
    padding: 8px 12px;
    color: var(--foreground);
    font-size: 13px;
}

body.rz-theme .login-main .dropdown-menu .dropdown-item:hover {
    background-color: var(--hover);
}

body.rz-theme .login-main .login-box {
    width: 100%; /* AdminLTE: 360px, and 90% below 576px */
    margin-top: 0; /* AdminLTE: .5rem below 576px */
}

body.rz-theme .login-main .login-logo {
    margin-left: 0;
    text-align: left;
}

body.rz-theme .login-main .login-logo h1 {
    margin: 0 0 6px;
    color: var(--foreground);
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 600;
    letter-spacing: -0.025em;
}

body.rz-theme .login-main .login-box-msg {
    color: var(--text-2);
    font-size: 13px;
}

/* The inner card: the outer column is now the card */
body.rz-theme .login-main .card {
    margin-bottom: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

body.rz-theme .login-main .login-card-body {
    padding: 0;
    background: transparent;
    color: var(--foreground);
}

body.rz-theme .login-main .form-control {
    height: 36px;
    border: 1px solid var(--input);
    border-radius: 12px;
    background-color: var(--card);
    color: var(--foreground);
    font-size: 14px;
}

/* The code field and its "get code" button read as one control: the button squares its own left corners inline */
body.rz-theme .login-main .form-control:has(+ .get-code-btn) {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

body.rz-theme .login-main .form-control:focus {
    border-color: var(--brand-text); /* the same focus as every form (Part 2 spec 5.6) */
    box-shadow: 0 0 0 3px var(--ring-halo), var(--shadow-xs);
}

/* These pages never get body.dark-mode (no navbar, so no Dcat switcher), so dark.css's placeholder and
   has-error colours never reach them; these token colours suit both themes */
body.rz-theme .login-main .form-control::placeholder {
    color: var(--text-3); /* spec 6.1 placeholder token; Dcat: rgba(34,41,47,.4) */
}

body.rz-theme .login-main .form-label-group > input:not(:focus):not(:placeholder-shown) ~ label {
    color: var(--text-2) !important; /* adminlte-primary.css sets rgba(34,41,47,.4) !important on the filled, unfocused label */
}

body.rz-theme .login-main .has-error .help-block,
body.rz-theme .login-main .has-error .control-label,
body.rz-theme .login-main .has-error .form-control-position i {
    color: var(--err); /* dcat-app-primary.css: #bd4147; Form.js prints the message as label.control-label */
}

body.rz-theme .login-main .has-icon-left .form-control {
    padding-left: 36px;
}

body.rz-theme .login-main .has-icon-left .form-control-position {
    top: 0;
    width: 36px;
    height: 36px;
    color: var(--text-2);
    line-height: 36px;
}

/* Login's Email | Phone Number switch marks the unselected option with .text-muted */
body.rz-theme .login-main .change-password-type.text-muted {
    color: var(--text-2) !important; /* beats .text-muted and base.css's .text-primary, both !important */
}

body.rz-theme .login-main .change-password-type.text-muted:hover {
    color: var(--brand-text) !important; /* the rule above is !important; theme off, a.text-muted:hover turns it orange too */
}

body.rz-theme .login-main .btn-primary {
    height: 36px;
    border-radius: 12px;
    font-weight: 600;
}

/* "Get verification code" (.btn.btn-primary.get-code-btn): v4 outline button. The selectors mirror
   base.css's primary-button states so this file, loaded later, wins each one. Its label grows during the countdown. */
body.rz-theme .login-main .btn.get-code-btn,
body.rz-theme .login-main .btn.get-code-btn:focus,
body.rz-theme .login-main .btn.get-code-btn:disabled,
body.rz-theme .login-main .btn.get-code-btn.disabled {
    border: 1px solid var(--border);
    background-color: var(--card);
    color: var(--foreground);
    white-space: nowrap;
}

body.rz-theme .login-main .btn.get-code-btn:hover,
body.rz-theme .login-main .btn.get-code-btn:not(:disabled):not(.disabled):active {
    border-color: var(--brand);
    background-color: var(--brand-soft);
    color: var(--foreground);
}

/* The customer site's global CSS colours these two outline buttons in dark mode with !important (spec 6.6) */
body.rz-theme.dark-mode .btn-outline-success {
    color: var(--ok) !important;
}

body.rz-theme.dark-mode .btn-outline-danger {
    color: var(--err) !important;
}
