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

button,
input,
select,
textarea {
    font: inherit;
}

body {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    background-color: var(--ds-surface, #ffffff);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Ubuntu', sans-serif;
    color: var(--ds-text, #172b4d);

    > .container {
        display: flex;
        flex-direction: column;
        width: min(95%, 400px);
        margin: max(10vh, 60px) auto 0;

        @media (width >= 576px) {
            width: 400px;
            margin-block-start: 20vh;

            &.container-wide {
                width: 475px;
            }
        }
    }

    &:has(#mobile-top-bar) {
        padding-block-start: 0;
    }
}

a {
    text-decoration: underline;
    color: var(--ds-link, #1868db);

    &:visited {
        color: var(--ds-link-visited, #803fa5);
    }

    &:hover {
        text-decoration: none;
    }

    &:active {
        color: var(--ds-link-pressed, #1558bc);
    }

    &:focus-visible {
        outline: 2px solid var(--ds-border-focused, #2684ff);
        outline-offset: 2px;
    }
}

main {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 32px 40px;
    border-radius: 8px;
    background-color: var(--ds-surface-overlay, #fff);
    color: var(--ds-text, #292a2e);

    @media (width >= 576px) {
        box-shadow: var(--ds-shadow-overlay, 0 8px 9pt #1e1f2126, 0 0 1px #1e1f214f);
    }
}

h3 {
    margin: 5px;
    font-size: 16px;
    font-weight: 400;
    color: var(--ds-text-subtle, #505258);
}

.main-header {
    display: flex;
    justify-content: center;
    margin-bottom: 0;
    font-weight: 650;
    color: var(--ds-text, #292a2e);

    h1 {
        font-size: 24px;
    }
}

.auth-message {
    flex-direction: column;
    align-items: center;
    justify-content: initial;
    gap: 12px;
    font-weight: 400;
    text-align: center;

    p {
        margin: 0;
    }
}

.auth-status {
    max-inline-size: 320px;
    margin-inline: auto;
    text-align: center;

    ul {
        text-align: start;
    }
}

.auth-status-success {
    color: var(--ds-text-success, #4c6b1f);
}

.auth-status-error {
    color: var(--ds-text-danger, #ae2e24);
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 20px 0;

    .radio-option {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 12px 16px;
        cursor: pointer;

        input[type='radio'] {
            margin: 0;
        }
    }
}

.form-actions {
    display: flex;
    flex-direction: column-reverse;
    justify-content: center;
    margin-top: 24px;

    a:not(.button) {
        color: var(--ds-text-subtle, #505258);
    }
}

.submit-alternative {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
    margin-top: 24px;
    padding-top: 24px;
    border-block-start: 1px solid var(--ds-border, #0b120e24);

    a:not(.button) {
        color: var(--ds-text-subtle, #505258);
    }
}

.if-column-reverse {
    margin-bottom: 10px;
}

.auth-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
    margin-top: 24px;
    padding: 16px;
    border-block-start: 1px solid var(--ds-border, #0b120e24);
    font-size: 14px;
    line-height: 20px;
    color: var(--ds-text-subtle, #505258);
}
