/*
 * public-login.css
 * Self-contained styles for the public login / landing pages:
 *   default.php (admin login landing) and login-old.php (full login form).
 *
 * Replaces the former external https://app.neonsso.com/css/app.css, which was
 * removed when the SSO app was rebuilt. Only the selectors actually used by
 * those two pages are defined here. Palette/typography mirror friendly_error.php
 * and maintenance.php so all public pages share one look.
 *
 * Hand-authored — not part of the Grunt/min pipeline. Linked directly.
 */

@import url('https://fonts.googleapis.com/css2?family=Lato:wght@400;500;700&display=swap');

:root {
    color-scheme: light;
    --ap-bg: #f5f7fa;
    --ap-ink: #1c2023;
    --ap-muted: #5b6063;
    --ap-primary: #0074d9;
    --ap-border: rgba(28, 32, 35, 0.12);
    --ap-field-border: #c5ccd2;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body.public {
    margin: 0;
    background: var(--ap-bg);
    color: var(--ap-ink);
    font-family: 'Lato', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
}

/* ---- Layout scaffold: full-height centering ---- */
#app-public {
    min-height: 100vh;
}

#app-public .viewport {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

#route-view.new-login-view {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: clamp(1.5rem, 5vw, 3.5rem);
    width: 100%;
}

#app-public .container {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
}

#app-public .container-fluid {
    width: 100%;
}

/* ---- Grid hooks (flexbox, not a full bootstrap grid) ---- */
#app-public .row {
    display: flex;
    flex-wrap: wrap;
}

#app-public .row.justify-content-center {
    justify-content: center;
}

#app-public .col,
#app-public .col-12 {
    flex: 1 1 100%;
    width: 100%;
}

#app-public .col {
    flex: 1 1 0;
}

#app-public .mx-auto {
    margin-left: auto;
    margin-right: auto;
}

#app-public .text-center {
    text-align: center;
}

#app-public .float-right {
    margin-left: auto;
}

#app-public .p-0 {
    padding: 0 !important;
}

#app-public .mb-2 {
    margin-bottom: 0.5rem;
}

#app-public .mb-4 {
    margin-bottom: 1.5rem;
}

#app-public .mb-5 {
    margin-bottom: 3rem;
}

#app-public .ml-2 {
    margin-left: 0.5rem;
}

#app-public .my-5 {
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}

/* ---- Card ---- */
#app-public form {
    width: 100%;
}

#app-public .modal-content.login-form {
    background: #ffffff;
    border: 1px solid var(--ap-border);
    border-radius: 14px;
    box-shadow: 0 2px 4px -2px rgba(0, 0, 0, 0.1), 0 10px 24px rgba(16, 32, 55, 0.08);
    overflow: hidden;
}

#app-public .modal-body {
    padding: clamp(1.75rem, 4vw, 2.5rem);
}

/* ---- Branding ---- */
#app-public .row.company {
    justify-content: center;
    margin-bottom: 1.25rem;
}

#app-public .brand-img-logo {
    max-height: 40px;
    width: auto;
}

#app-public .secondary-brand-img-logo {
    width: auto;
    max-width: 200px;
}

/* ---- Headings / copy ---- */
#app-public .titan__heading {
    margin: 0 0 1rem;
    text-align: center;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--ap-ink);
}

#app-public p {
    color: var(--ap-ink);
}

/* ---- Form fields ---- */
#app-public .form-group {
    margin-bottom: 1rem;
}

#app-public .titan__form-label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--ap-ink);
}

#app-public .titan__form-field input,
#app-public .titan__form-field {
    width: 100%;
}

#app-public .titan__form-field input {
    display: block;
    padding: 0.625rem 0.75rem;
    font-size: 1rem;
    line-height: 1.4;
    color: var(--ap-ink);
    background: #ffffff;
    border: 1px solid var(--ap-field-border);
    border-radius: 6px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

#app-public .titan__form-field input:focus {
    outline: none;
    border-color: var(--ap-primary);
    box-shadow: 0 0 0 3px rgba(0, 116, 217, 0.18);
}

#app-public .titan__form-errormsg {
    color: #b00020;
    text-align: center;
}

#app-public .display-error {
    color: #b00020;
}

#app-public .side-text {
    display: flex;
    align-items: center;
}

/* ---- Org list (org-select page) ---- */
#app-public .org-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

#app-public .org-list li {
    padding-left: 0;
}

#app-public .org-list a {
    display: block;
    padding: 0.75rem 1rem;
    border: 1px solid var(--ap-border);
    border-radius: 8px;
    color: var(--ap-primary);
    font-size: 1.0625rem;
    text-decoration: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

#app-public .org-list a:hover,
#app-public .org-list a:focus {
    border-color: var(--ap-primary);
    background: rgba(0, 116, 217, 0.04);
    box-shadow: 0 4px 12px rgba(16, 32, 55, 0.08);
}

/* ---- Buttons ---- */
#app-public .titan__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
    text-decoration: none;
    color: #ffffff;
    background: var(--ap-primary);
    border: 1px solid var(--ap-primary);
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

#app-public .titan__button:hover,
#app-public .titan__button:focus {
    color: #ffffff;
    text-decoration: none;
    box-shadow: 0 6px 16px rgba(0, 116, 217, 0.25);
}

#app-public .titan__button:focus-visible {
    outline: 3px solid rgba(0, 116, 217, 0.35);
    outline-offset: 2px;
}

#app-public .titan__button.btn-block {
    display: flex;
    width: 100%;
}

#app-public .titan__button--clear {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 0;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--ap-primary);
    background: transparent;
    border: none;
    text-decoration: none;
    cursor: pointer;
}

#app-public .titan__button--clear:hover,
#app-public .titan__button--clear:focus {
    text-decoration: underline;
}

/* ---- Footer / copyright ---- */
#app-public .copyright {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.875rem;
    color: var(--ap-muted);
}

#app-public .copyright a {
    color: inherit;
    text-decoration: none;
}

#app-public .copyright a:hover {
    text-decoration: underline;
}

#app-public .footer {
    justify-content: center;
}

@media (max-width: 640px) {
    #app-public .form-group.row.justify-content-center {
        flex-direction: column-reverse;
        gap: 0.5rem;
    }

    #app-public .float-right {
        margin-left: 0;
    }
}
