:focus-visible {
    outline-color: var(--nv-primary-bla);
    outline-offset: 1px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

::after {
    font-family: bootstrap-icons !important;
    font-size: 0.8em;
}

[title]::after {
    content: "\F431";
    margin-left: 4px;
    color: var(--nv-primary-havsbla);
}

a {
    width: fit-content;
    color: var(--nv-primary-bla);
    text-decoration: none;
    text-wrap-style: balance;
}

    a:hover {
        text-decoration: underline;
    }

    a:not(.nav-link)::after {
        content: '\00a0\00a0\F285';
    }

    a[target=_blank]::after {
        content: '\00a0\00a0\F1C5';
        margin-top: -4px;
    }

    a[data-variant="outlined"],
    button[data-variant="outlined"] {
        background: transparent !important;
        border: 1px solid var(--nv-primary-havsbla) !important;
        color: var(--nv-primary-havsbla) !important;
    }

        a[data-variant="outlined"]:hover,
        button[data-variant="outlined"]:hover {
            box-shadow: 0px 0px 0px 1px;
            background: transparent;
        }

    a.unstyled {
        width: unset;
        color: unset;
        text-decoration: unset;
        text-wrap-style: unset;
    }

        a.unstyled::after {
            content: none;
        }

    button, a[data-variant] {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 8px;
        height: 44px;
        width: max-content;
        padding: 8px 24px;
        background: var(--nv-primary-bla);
        color: var(--nv-basic-vit);
        border: none;
        border-radius: 40px;
        text-decoration: none;
        cursor: pointer;
        transition: all 0.2s, font-weight 0s;
    }

        button:hover {
            background: color-mix(in srgb, var(--nv-primary-bla), black 30%);
        }

        button:focus {
            box-shadow: unset;
        }

        button:disabled {
            opacity: 0.5;
            pointer-events: none;
            cursor: default;
        }

        button[data-variant="text"] {
            background: transparent;
            color: var(--nv-basic-svart);
        }

        button[data-theme="success"] {
            background: var(--nv-secondary-grasgron);
            color: var(--nv-basic-vit);
        }

            button[data-theme="success"]:hover {
                background: color-mix(in srgb, var(--nv-secondary-grasgron), black 20%);
            }

        button[data-theme="error"] {
            background: var(--nv-misc-red);
            color: var(--nv-basic-vit);
        }

            button[data-theme="error"]:hover {
                background: color-mix(in srgb, var(--nv-misc-red), black 20%);
            }

        button[data-variant="outlined"][data-theme="error"] {
            background: transparent;
            border-color: var(--nv-misc-red);
            color: var(--nv-misc-red);
        }

fieldset {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

html, body {
    font-family: 'Akkurat Pro', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    scrollbar-color: var(--nv-stroke-neutralgrey) var(--nv-basic-vit);
}

h1 {
    font-family: 'Tiempos Fine';
    font-size: 2.5rem;
    font-weight: 500;
}

    h1:focus {
        outline: none;
    }

    h1 > i {
        color: var(--nv-primary-havsbla);
    }

h2 {
    font-family: 'Tiempos Fine';
    font-size: 1.5rem;
    font-weight: 500;
}

h3 {
    font-family: 'Akkurat Pro';
    font-size: 1.25rem;
    font-weight: 700;
}

h4 {
    font-family: 'Akkurat Pro';
    font-size: 1rem;
    font-weight: 700;
}

hr {
    color: var(--nv-basic-mellangra);
}

input, select {
    border-radius: 4px;
    border: 1px solid var(--nv-stroke-neutralgrey);
    padding: 10px 16px;
}

    input:disabled, select:disabled {
        background-color: field;
        color: var(--nv-basic-gra);
        cursor: default !important;
        filter: contrast(0.8);
    }

    input[type="checkbox"],
    input[type="radio"] {
        appearance: none;
        width: 24px;
        height: 24px;
        padding: 10px;
        background-color: var(--nv-background-vit);
        border: 1px solid var(--nv-stroke-neutralgrey);
        transition: 0.2s;
    }

    input[type="radio"] {
        border-radius: 50%;
    }

        input[type="checkbox"]:checked,
        input[type="radio"]:checked {
            background-color: var(--nv-primary-bla);
            position: relative;
        }

            input[type="checkbox"]:checked::after {
                content: '\F633';
                font-size: 1.5rem;
                color: var(--nv-basic-vit);
                position: absolute;
                top: -7px;
                left: -2px;
            }

        input[type="radio"]:checked {
            box-shadow: inset 0 0 0 3px var(--nv-background-vit);
        }


label:hover input[type="radio"] {
    border: 1px solid var(--nv-primary-bla);
}

legend {
    font-size: inherit;
    float: inherit;
}

.button-group {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 1rem;
}

.input-wrapper {
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: relative;
    width: 100%;
    max-width: 400px;
}

    .input-wrapper:has(input[type="checkbox"]) {
        flex-direction: row-reverse;
        justify-content: flex-end;
        gap: 8px;
    }

.nav-link {
    display: flex;
    align-items: center;
    height: 50px;
    width: unset;
    padding: 0 24px;
    color: var(--nv-basic-svart);
    text-decoration: none;
}

    .nav-link:focus, .nav-link:hover {
        color: unset;
    }

    .nav-link:hover {
        box-shadow: inset 6px 0 0 var(--nv-primary-bla);
        background-color: rgba(0, 58, 162, 0.1);
        text-decoration: none;
    }

    .nav-link i {
        margin-left: 12px;
        color: var(--nv-primary-bla);
    }

    .nav-link.active {
        box-shadow: inset 6px 0 0 var(--nv-primary-bla);
        background-color: rgba(0, 58, 162, 0.025);
    }

.page-header {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: -60px -60px 0;
    padding: 40px 60px;
    background-color: var(--nv-background-vit);
}

    .page-header > * {
        margin: 0;
    }

.required-mark {
    margin-right: 0.5rem;
    color: var(--nv-primary-bla);
}

/* Blazor template styling */

.btn-link {
    color: #0071c1;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

input.invalid {
    border: 1px solid var(--nv-misc-red);
}

.validation-message {
    color: var(--nv-misc-red);
    font-size: 0.85rem;
}

input ~ .validation-message {
    position: absolute;
    bottom: -1.25rem;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 10;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

#app:has(.loading-progress) {
    min-height: 100vh;
    background-color: var(--nv-background-grey);
}

.loading-progress {
    position: relative;
    top: 30vh;
    padding: 3vh;
    margin: auto;
    height: 300px;
    max-height: 30vh;
    aspect-ratio: 0.9;
    --c1: linear-gradient( 90deg, #0000 calc(100% / 3), #003466 0 calc(2 * 100% / 3), #0000 0 );
    --c2: linear-gradient( 0deg, #0000 calc(100% / 3), #003466 0 calc(2 * 100% / 3), #0000 0 );
    background: var(--c1), var(--c2), var(--c1), var(--c2);
    background-size: 300% 2px, 2px 300%;
    background-repeat: no-repeat;
    animation: loading-frame 3s infinite;
}

    .loading-progress img {
        width: 100%;
        animation: pulse 3s ease-in-out infinite alternate both;
    }

@keyframes loading-frame {
    0% {
        background-position: 50% 0, 100% 100%, 0 100%, 0 0;
    }

    25% {
        background-position: 0 0, 100% 50%, 0 100%, 0 0;
    }

    50% {
        background-position: 0 0, 100% 0, 50% 100%, 0 0;
    }

    75% {
        background-position: 0 0, 100% 0, 100% 100%, 0 50%;
    }

    75.01% {
        background-position: 100% 0, 100% 0, 100% 100%, 0 50%;
    }

    100% {
        background-position: 50% 0, 100% 0, 100% 100%, 0 100%;
    }
}

@keyframes pulse {
    100% {
        opacity: 0;
        scale: 0.95;
    }
}

code {
    color: #c02d76;
}

@media (max-width: 992px) {
    .page-header {
        margin: -60px -40px 0;
        padding: 40px;
    }
}

@media (max-width: 576px) {
    button {
        flex: auto;
    }

    .page-header {
        margin: -40px -24px 0;
        padding: 24px;
    }
}
