/* Login page (public, standalone — does not extend base.html).
 *
 * Page-specific layer on top of the kit stack:
 *   vendor/css/bootstrap.min.css + unifi-ui.css
 *   css/portal-theme-override.css + css/app.css + css/redesign.css
 *
 * Everything the old login.html carried in an inline <style> block lives
 * here now (the CSP keeps inline scripts out; styles moved out with it),
 * re-expressed on kit tokens (--uf-*) because the retired
 * base/layout/components CSS variables are no longer loaded on this page.
 */

/* --------------------------------------------------------------------------
   Brand — our white full lockup on a charcoal chip
   -------------------------------------------------------------------------- */

/* The asset is white-on-transparent (D-08): invisible on the light form
   panel. The chip reuses the visual panel's charcoal gradient so the brand
   stays legible in both colour modes, in the slot VPP gives the brand. */
.login-brand-lockup {
    display: inline-flex;
    align-items: center;
    padding: 0.625rem 0.875rem;
    border-radius: 0.875rem;
    background: var(--uf-auth-visual);
}

.login-brand-lockup img {
    display: block;
    height: 1.25rem;
    width: auto;
}

/* --------------------------------------------------------------------------
   Inline login error (static/js/auth.js)
   -------------------------------------------------------------------------- */

/* auth.js shows/hides the element by toggling el.style.display between
 * "none" and "block". Bootstrap's d-none utility uses !important and would
 * win over the inline style, so the initial hidden state is an inline
 * style attribute in the markup — nothing to do here but sizing. */
#login-error {
    font-size: 0.875rem;
}

/* --------------------------------------------------------------------------
   Password visibility toggle (static/js/auth.js)
   -------------------------------------------------------------------------- */

/* The toggle button now rides the BS6 input-group pattern
   (.btn-outline.theme-secondary.input-group-btn addon); BS6 core and
   portal-theme-override.css own its styling — no page rule needed here. */

/* --------------------------------------------------------------------------
   Live stats collapsible (static/js/login-stats.js)
   -------------------------------------------------------------------------- */

/* Contract with login-stats.js: the element carrying
 * data-action="toggle-stats-panel" must be immediately followed by the
 * content element, and the chevron is found via .login-stats-toggle-icon;
 * both get .collapsed toggled. Sits on the dark visual panel, so white-ish
 * text reads in light mode (charcoal gradient) and dark mode (dark
 * neutrals) alike. */
.login-stats-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.75rem 0 0.5rem;
    user-select: none;
    border-top: 1px solid rgba(255, 255, 255, 0.24);
}

.login-stats-toggle-text {
    font-size: 0.7rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.75);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.login-stats-toggle-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.75);
    transition: transform 0.2s ease-in-out;
    transform: rotate(90deg); /* expanded: chevron points down */
}

.login-stats-toggle-icon.collapsed {
    transform: rotate(0deg); /* collapsed: chevron points right */
}

.login-stats-content {
    max-height: 300px;
    overflow: hidden;
    transition: max-height 0.25s ease-in-out, opacity 0.25s ease-in-out;
}

.login-stats-content.collapsed {
    max-height: 0;
    opacity: 0;
}

.login-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    padding: 0.5rem 0 0.75rem;
}

.login-stat {
    text-align: center;
    padding: 0.6rem 0.5rem;
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.login-stat-value {
    font-size: 1.05rem;
    font-weight: 700;
    color: #ffffff;
    font-family: var(--bs-font-monospace);
    margin-bottom: 2px;
}

.login-stat-label {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.65);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* --------------------------------------------------------------------------
   Footer utility row (language + colour mode + copyright)
   -------------------------------------------------------------------------- */

.login-footer-copyright {
    padding: 0 1rem 0.5rem;
}

.login-footer-copyright span {
    font-size: 0.75rem;
    color: var(--uf-text-3);
}

/* --------------------------------------------------------------------------
   Reduced motion
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
    .login-stats-toggle-icon,
    .login-stats-content {
        transition: none;
    }
}
