/* Shared chrome for every page using the _Login layout: student/staff sign-in and the two
   parent one-time-code screens. These rules used to live in a <style> block inside
   Login.cshtml, which meant the parent screens referenced classes that did not exist for
   them and rendered unstyled. */

html, body {
    height: 100%;
    margin: 0;
    overflow: hidden;
    background-image: url('/images/bg-login.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.login-wrapper {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 16px;
}

.login-card {
    background-color: var(--color-surface);
    border: 3px solid var(--color-primary);
    border-radius: var(--radius-xl);
    box-shadow: 0 12px 40px rgba(0, 32, 96, 0.25);
    width: 560px;
    max-width: 100%;
    padding: 44px 52px;
    text-align: center;
}

.login-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-bottom: 30px;
    text-align: left;
}

.login-logo {
    height: 72px;
    width: auto;
}

.login-brand-college {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--color-primary);
    text-transform: uppercase;
    line-height: 1.15;
    margin: 0;
}

.login-brand-product {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 0.02em;
    margin: 0;
}

.login-welcome {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--color-primary);
    text-transform: uppercase;
    margin-bottom: 26px;
}

.error-message {
    font-size: 0.85rem;
    color: var(--color-danger);
    margin-bottom: 14px;
}

/* The primary call to action on every login screen — the gold pill. Shared so the parent
   screens are visually identical to "Sign in with Microsoft" rather than merely similar. */
.btn-login-action {
    background-color: var(--color-uac-gold);
    color: var(--color-text);
    border: none;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 1rem;
    font-weight: 700;
    padding: 12px 16px;
    width: 100%;
    text-decoration: none;
    transition: background-color 0.15s ease;
}

    .btn-login-action:hover {
        background-color: var(--color-uac-gold-dark);
        color: var(--color-text);
    }

    .btn-login-action:focus-visible {
        outline: 3px solid var(--color-primary);
        outline-offset: 2px;
    }

/* The alternate way in — parent sign-in from the student page, and student sign-in from the
   parent page. Outlined rather than filled so it reads as the secondary path and does not
   compete with the gold call to action above it. Geometry matches .btn-login-action exactly:
   the 2px border plus 10px padding lands on the same height as that button's 12px padding. */
.btn-login-secondary {
    background-color: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 1rem;
    font-weight: 700;
    padding: 10px 16px;
    width: 100%;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

    .btn-login-secondary:hover {
        background-color: var(--color-primary);
        color: var(--color-primary-contrast);
    }

    .btn-login-secondary:focus-visible {
        outline: 3px solid var(--color-primary);
        outline-offset: 2px;
    }

/* Separates the two sign-in routes so they read as a choice rather than a stack of buttons. */
.login-or {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 18px 0;
    color: var(--color-text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

    .login-or::before,
    .login-or::after {
        content: "";
        flex: 1;
        height: 1px;
        background-color: var(--color-border);
    }

/* ---- Child picker ---- */

.login-child-list {
    display: grid;
    gap: 12px;
}

.login-child {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 14px 18px;
    background-color: var(--color-surface);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-lg);
    text-align: left;
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

    .login-child:hover {
        border-color: var(--color-primary);
        background-color: var(--color-surface-muted);
    }

    .login-child:focus-visible {
        outline: 3px solid var(--color-primary);
        outline-offset: 2px;
    }

.login-child-avatar {
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: var(--color-primary);
    color: var(--color-primary-contrast);
}

.login-child-name {
    display: block;
    font-weight: 700;
    color: var(--color-text);
    line-height: 1.25;
}

.login-child-number {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.login-footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--color-surface);
    display: flex;
    justify-content: center;
    gap: 48px;
    padding: 14px 16px;
}

    .login-footer a {
        color: var(--color-text-muted);
        text-decoration: none;
        font-size: 0.9rem;
    }

        .login-footer a:hover {
            color: var(--color-primary);
            text-decoration: underline;
        }

/* ---- Parent one-time-code screens ---- */

.login-lead {
    font-size: 0.95rem;
    color: var(--color-text-muted);
    margin-bottom: 24px;
}

.login-form {
    text-align: left;
}

    .login-form .form-label {
        font-weight: 600;
        font-size: 0.9rem;
        color: var(--color-text);
        margin-bottom: 6px;
    }

    .login-form .form-control {
        border: 1px solid var(--color-border);
        border-radius: var(--radius-md);
        padding: 12px 14px;
        font-size: 1rem;
    }

        .login-form .form-control:focus {
            border-color: var(--color-primary);
            box-shadow: 0 0 0 3px rgba(21, 88, 192, 0.15);
        }

/* The address the code was sent to. Shown so a mistyped address is visible rather than
   leaving the parent waiting for mail that will never arrive. */
.login-sent-to {
    background-color: var(--color-surface-muted);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: var(--color-text-muted);
    word-break: break-all;
}

    .login-sent-to strong {
        color: var(--color-text);
    }

/* Selector is qualified to out-specify `.login-form .form-control` above, which would
   otherwise win on font-size and render the code as an ordinary text box. */
.login-form .form-control.login-code-input {
    text-align: center;
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 0.5rem;
    /* Offsets the trailing letter-space so the digits sit optically centred. */
    text-indent: 0.5rem;
}

.login-alt {
    margin-top: 22px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.login-alt-link {
    background: none;
    border: none;
    padding: 0;
    font-size: 0.9rem;
    color: var(--color-text-muted);
    text-decoration: underline;
    cursor: pointer;
}

    .login-alt-link:hover,
    .login-alt-link:focus-visible {
        color: var(--color-primary);
    }

@media (max-width: 575.98px) {
    .login-card {
        padding: 32px 24px;
    }

    .login-brand {
        flex-direction: column;
        text-align: center;
    }
}
