/* === FONTS === */
/*
 * Source Sans 3 - https://fonts.google.com/specimen/Source+Sans+3
 * Copyright 2010-2020 Adobe (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved.
 * Source is a trademark of Adobe in the United States and/or other countries.
 * Licensed under the SIL Open Font License, Version 1.1.
 * Downloaded from https://fonts.googleapis.com/css2?family=Source+Sans+3:ital,wght@0,200..900;1,200..900&display=swap on 17 Feb 2024
 */

/* cyrillic-ext */
@font-face {
    font-family: 'Source Sans 3';
    font-style: italic;
    font-weight: 200 900;
    font-display: swap;
    src: url(../fonts/nwpMtKy2OAdR1K-IwhWudF-R3woqauLYxnN18YRxkHA.woff2) format('woff2');
    unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}

/* cyrillic */
@font-face {
    font-family: 'Source Sans 3';
    font-style: italic;
    font-weight: 200 900;
    font-display: swap;
    src: url(../fonts/nwpMtKy2OAdR1K-IwhWudF-R3woqY-LYxnN18YRxkHA.woff2) format('woff2');
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

/* greek-ext */
@font-face {
    font-family: 'Source Sans 3';
    font-style: italic;
    font-weight: 200 900;
    font-display: swap;
    src: url(../fonts/nwpMtKy2OAdR1K-IwhWudF-R3woqa-LYxnN18YRxkHA.woff2) format('woff2');
    unicode-range: U+1F00-1FFF;
}

/* greek */
@font-face {
    font-family: 'Source Sans 3';
    font-style: italic;
    font-weight: 200 900;
    font-display: swap;
    src: url(../fonts/nwpMtKy2OAdR1K-IwhWudF-R3woqZOLYxnN18YRxkHA.woff2) format('woff2');
    unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}

/* vietnamese */
@font-face {
    font-family: 'Source Sans 3';
    font-style: italic;
    font-weight: 200 900;
    font-display: swap;
    src: url(../fonts/nwpMtKy2OAdR1K-IwhWudF-R3woqaOLYxnN18YRxkHA.woff2) format('woff2');
    unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}

/* latin-ext */
@font-face {
    font-family: 'Source Sans 3';
    font-style: italic;
    font-weight: 200 900;
    font-display: swap;
    src: url(../fonts/nwpMtKy2OAdR1K-IwhWudF-R3woqaeLYxnN18YRxkHA.woff2) format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* latin */
@font-face {
    font-family: 'Source Sans 3';
    font-style: italic;
    font-weight: 200 900;
    font-display: swap;
    src: url(../fonts/nwpMtKy2OAdR1K-IwhWudF-R3woqZ-LYxnN18YRx.woff2) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* cyrillic-ext */
@font-face {
    font-family: 'Source Sans 3';
    font-style: normal;
    font-weight: 200 900;
    font-display: swap;
    src: url(../fonts/nwpStKy2OAdR1K-IwhWudF-R3wIaZejZ5HZV8ZRx.woff2) format('woff2');
    unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}

/* cyrillic */
@font-face {
    font-family: 'Source Sans 3';
    font-style: normal;
    font-weight: 200 900;
    font-display: swap;
    src: url(../fonts/nwpStKy2OAdR1K-IwhWudF-R3wsaZejZ5HZV8ZRx.woff2) format('woff2');
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

/* greek-ext */
@font-face {
    font-family: 'Source Sans 3';
    font-style: normal;
    font-weight: 200 900;
    font-display: swap;
    src: url(../fonts/nwpStKy2OAdR1K-IwhWudF-R3wMaZejZ5HZV8ZRx.woff2) format('woff2');
    unicode-range: U+1F00-1FFF;
}

/* greek */
@font-face {
    font-family: 'Source Sans 3';
    font-style: normal;
    font-weight: 200 900;
    font-display: swap;
    src: url(../fonts/nwpStKy2OAdR1K-IwhWudF-R3wwaZejZ5HZV8ZRx.woff2) format('woff2');
    unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}

/* vietnamese */
@font-face {
    font-family: 'Source Sans 3';
    font-style: normal;
    font-weight: 200 900;
    font-display: swap;
    src: url(../fonts/nwpStKy2OAdR1K-IwhWudF-R3wAaZejZ5HZV8ZRx.woff2) format('woff2');
    unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}

/* latin-ext */
@font-face {
    font-family: 'Source Sans 3';
    font-style: normal;
    font-weight: 200 900;
    font-display: swap;
    src: url(../fonts/nwpStKy2OAdR1K-IwhWudF-R3wEaZejZ5HZV8ZRx.woff2) format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* latin */
@font-face {
    font-family: 'Source Sans 3';
    font-style: normal;
    font-weight: 200 900;
    font-display: swap;
    src: url(../fonts/nwpStKy2OAdR1K-IwhWudF-R3w8aZejZ5HZV8Q.woff2) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* === GENERAL === */

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

html, body {
    margin: 0;
    padding: 0;
}

html {
    font-size: 18px;
}

body {
    background: #f3f1ee;
    color: #000;
    height: 100vh;
    line-height: 1.4;
}

body, button, input {
    font-family: 'Source Sans 3', sans-serif;
}

hr {
    margin: 1.25rem 0;
    border: none;
    border-top: 1px solid #ccc;
}

a {
    color: #245780;
    text-underline-offset: 2px;
}

a:active,
a:focus,
a:hover {
    color: #be0f34;
    outline: none;
}

code {
    background-color: #f5f5f5;
    border-radius: 4px;
    color: #333;
    font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;
    font-size: 90%;
    padding: 2px 4px;
}

abbr {
    cursor: help;
    text-underline: dotted;
    text-underline-offset: 3px;
}

.hide {
    display: none;
}

small,
.small {
    font-size: 0.85em;
}

.muted {
    color: rgba(33, 37, 41, 0.5);
}

/* === LAYOUT === */

.content-wrapper {
    align-items: center;
    display: flex;
    justify-content: center;
    min-height: 85vh; /* Slightly above centre */
}

.content {
    background: #fff url(../img/background-white.svg) no-repeat;
    border-radius: min(1.5rem, 4vw);
    box-shadow: 0 0 3px rgba(0, 0, 0, 0.2);
    max-width: 28rem;
    margin: min(2rem, 4vw);
    padding: min(2rem, 4vw);
}

.content-wide {
    max-width: 45rem;
}

/* === HEADER === */

.logos {
    display: flex;
    max-width: 24rem;
}

.logo-oxford {
    flex-basis: 25%;
}

.logo-oxford img {
    background: #002147;
    display: block;
    height: auto;
    width: 100%;
}

.logo-maths {
    flex-basis: 75%;
    padding-left: 4%;
    padding-right: 4%;
    padding-top: 2%;
}

.logo-maths img {
    height: auto;
    width: 100%;
}

.logo-maths-blue {
    display: block;
}

.logo-maths-white {
    display: none;
}

/* === ERRORS & WARNINGS === */

.error-message {
    background: #be0f34;
    border-radius: 0.2rem;
    color: #fff;
    line-height: 1.3;
    margin: 0.8rem 0;
    padding: 0.3rem 0.6rem;
}

.warning-message {
    background: #e2c044;
    border-radius: 0.2rem;
    color: #000;
    line-height: 1.3;
    margin: 0.8rem 0;
    padding: 0.3rem 0.6rem;
}

/* === EXTERNAL LOGIN LINK === */

.external-login-link {
    background: #f3f1ee;
    border: 1px solid #f3f1ee;
    border-radius: 0.2rem;
    font-size: 0.86rem;
    padding: 0.3rem 0.6rem;
    margin: 1rem 0;
}

.external-login-link a::after {
    content: ' \00bb'; /* &raquo; */
    font-weight: 600;
}

/* === FORMS === */

.form-field {
    margin: 1rem 0;
}

.form-label {
    display: block;
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 0.3rem;
}

.form-input {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 0.2rem;
    box-shadow: 0 0 3px rgba(0, 0, 0, 0.2);
    color: #000;
    display: block;
    padding: 0.5rem;
    width: 100%;
}

.form-input:focus {
    border-color: #be0f34;
    box-shadow: 0 0 3px rgb(190, 15, 52, 0.7);
    outline: none;
}

.form-checkbox {
    line-height: 1.2;
    padding-left: 1.4em;
}

.form-checkbox > input {
    appearance: none;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 0.2rem;
    box-shadow: 0 0 1px rgba(0, 0, 0, 0.4);
    height: 1em;
    float: left;
    font-size: 1em;
    margin: 0.1em 0 0 -1.4em;
    width: 1em;
}

.form-checkbox > input:focus {
    border-color: #be0f34;
    box-shadow: 0 0 3px rgb(190, 15, 52, 0.7);
    outline: none;
}

.form-checkbox > input:checked {
    /* SVG copied from Bootstrap 5 - MIT License (https://github.com/twbs/bootstrap/blob/v5.3.3/LICENSE) */
    background: #fff url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23002147' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e") no-repeat center;
    background-size: contain;
}

.form-help {
    color: rgba(0, 0, 0, 0.75);
    font-size: 0.8rem;
    margin-top: 0.2rem;
}

.form-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 1rem;
}

.form-button,
.form-button:any-link {
    border: none;
    border-radius: 0.2rem;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    text-decoration: none;
}

.form-button-primary,
.form-button-primary:any-link {
    background: #002147;
    color: #fff;
    font-weight: 700;
}

.form-button-primary:active,
.form-button-primary:focus,
.form-button-primary:hover {
    background: #be0f34;
    box-shadow: 0 0 3px rgb(190, 15, 52, 0.5);
    outline: none;
}

.form-button-primary:disabled {
    background: #61615f;
    box-shadow: none;
    color: #eee;
    cursor: default;
}

.form-button-secondary,
.form-button-secondary:any-link {
    background: #61615f;
    color: #fff;
}

.form-button-secondary:active,
.form-button-secondary:focus,
.form-button-secondary:hover {
    background: #be0f34;
    box-shadow: 0 0 3px rgb(190, 15, 52, 0.5);
    outline: none;
}

.form-button-secondary:disabled {
    background: #61615f;
    box-shadow: none;
    color: #eee;
    cursor: default;
}

.form-footer-links {
    display: flex;
    font-size: 0.8rem;
    list-style: none;
    margin: 1rem 0 0 0;
    padding: 0;
}

.form-footer-links > li:not(:last-child)::after {
    color: rgba(0, 0, 0, 0.25);
    content: '·';
    font-weight: 700;
    padding: 0 0.7ex;
}

.form-footer-links a {
    text-decoration: none;
}

.form-footer-links a:active,
.form-footer-links a:focus,
.form-footer-links a:hover {
    text-decoration: underline;
}

/* === FONT AWESOME (FOR IFRAME-BASED LOGOUT) === */
/* Copied from public/assets/base/css/stylesheet.css and simplified */

/*!
 * Font Awesome Free 6.7.1 by @fontawesome - https://fontawesome.com
 * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
 * Copyright 2024 Fonticons, Inc.
 */

@font-face {
    font-family: 'Font Awesome 6 Free';
    font-style: normal;
    font-weight: 900;
    font-display: block;
    src: url(../fonts/fa-solid-900.woff2) format('woff2'), url(../fonts/fa-solid-900.ttf) format('truetype');
}

.fa {
    -moz-osx-font-smoothing: grayscale;
    -webkit-font-smoothing: antialiased;
    display: inline-block;
    font-family: 'Font Awesome 6 Free';
    font-style: normal;
    font-variant: normal;
    font-weight: 900;
    line-height: 1;
    text-rendering: auto
}

.fa::before {
    content: var(--fa);
}

.fa-circle-notch,
/* logout.js still seems to refer to this as .fa-circle-o-notch - I think that's a bug, so have added both here (Mar 2025) */
.fa-circle-o-notch {
    /* Somewhat hacky - change to a different icon until the user clicks 'Yes' */
    --fa:""; /* .fa-chevron-circle-right */
}

.fa-circle-notch.fa-spin,
.fa-circle-o-notch.fa-spin {
    --fa: ""; /* .fa-circle-notch icon */
}

.fa-check-circle {
    --fa: "";
}

.fa-exclamation-circle {
    --fa: "";
}

@keyframes fa-spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.fa-spin {
    animation-delay: 0s;
    animation-direction: normal;
    animation-duration: 2s;
    animation-iteration-count: infinite;
    animation-name: fa-spin;
    animation-timing-function: linear;
}

.fa-ul {
    list-style-type: none;
    margin-left: 2.5em;
    padding-left: 0
}

.fa-ul > li {
    position: relative
}

.fa-li {
    left: -2em;
    position: absolute;
    text-align: center;
    width: 2em;
    line-height: inherit
}

/* === REGULAR CONTENT === */

.markup h2 {
    margin: 1.3rem 0 0 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.markup p {
    margin: 0 0 1rem 0;
}

.markup > :last-child {
    margin-bottom: 0;
}

/* === HELPERS === */

.hidden {
    display: none !important;
}

.block {
    display: block !important;
}

.inline-block {
    display: inline-block !important;
}

.sr-only {
    /* https://webaim.org/techniques/css/invisiblecontent/ */
    height: 1px;
    left: -10000px;
    overflow: hidden;
    position: absolute;
    top: auto;
    width: 1px;
}

/* === DARK THEME OVERRIDES === */

@media (prefers-color-scheme: dark) {

    body {
        background: #353c47;
        color: #fff;
    }

    a {
        color: #b9d6f2;
    }

    a:focus,
    a:hover {
        color: #dae9f8;
    }

    code {
        background-color: #434c59;
        color: #f5f5f5;
    }

    .content {
        background: #002147 url(../img/background-blue.svg) no-repeat;
        box-shadow: 0 0 3px rgba(0, 0, 0, 0.8);
    }

    .logo-maths-blue {
        display: none;
    }

    .logo-maths-white {
        display: block;
    }

    .external-login-link {
        background: transparent;
        border-color: rgba(255, 255, 255, 0.4);
    }

    .form-input {
        background: #334d6c;
        border-color: transparent;
        box-shadow: none;
        color: #fff;
    }

    .form-input:focus {
        border-color: #b9d6f2;
        box-shadow: 0 0 3px rgba(185, 214, 242, 0.7);
    }

    .form-checkbox > input {
        background: #334d6c;
        border-color: transparent;
    }

    .form-checkbox > input:focus {
        border-color: #b9d6f2;
        box-shadow: 0 0 3px rgba(185, 214, 242, 0.7);
    }

    .form-checkbox > input:checked {
        /* SVG copied from Bootstrap 5 - MIT License (https://github.com/twbs/bootstrap/blob/v5.3.3/LICENSE) */
        background: #334d6c url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e") no-repeat center;
        background-size: contain;
    }

    .form-help {
        color: rgba(255, 255, 255, 0.75);
    }

    .form-button-primary {
        background: #2f72a8;
        color: #fff;
    }

    .form-button-primary:active,
    .form-button-primary:focus,
    .form-button-primary:hover {
        background: #4599dc;
        box-shadow: 0 0 3px rgba(185, 214, 242, 0.7);
        outline: none;
    }

    .form-button-primary:disabled {
        background: #353c47;
        box-shadow: none;
        color: #eee;
    }

    .form-button-secondary {
        background: #61615f;
        color: #fff;
    }

    .form-button-secondary:active,
    .form-button-secondary:focus,
    .form-button-secondary:hover {
        background: #4599dc;
        box-shadow: 0 0 3px rgba(185, 214, 242, 0.7);
        outline: none;
    }

    .form-button-secondary:disabled {
        background: #353c47;
        box-shadow: none;
        color: #eee;
    }

    .form-footer-links > li:not(:last-child)::after {
        color: rgba(255, 255, 255, 0.6);
    }
}
