@font-face {
    font-family: "Myriad Pro";
    font-weight: 400;
    src: url(asset.f71a6e7edf8833823ee4.woff2) format("woff2");
}

@font-face {
    font-family: "Myriad Pro";
    font-weight: 600;
    src: url(asset.b4f412725ffb46f181f0.woff2)
        format("woff2");
}

@keyframes fade-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

body {
    margin: 0;

    font-family: "Myriad Pro", sans;
    background-color: #f8f8f9;

    height: 100vh;
    height: 100dvh;

    animation: fade-in;
    animation-duration: 1.25s;
    animation-timing-function: ease;
}

:focus-visible {
    outline: 3px solid #008eff;
    outline-offset: 2px;
}

.error-page {
    margin-top: 5vw;
    margin-left: 16px;
    margin-right: 16px;
}

@media (min-width: 632px) {
    .error-page {
        margin-left: auto;
        margin-right: auto;

        max-width: 600px;
    }
}

.registration-form {
    height: 100%;

    overflow-y: scroll;
    -webkit-overflow-scrolling: touch;

    scroll-snap-type: y mandatory;
}

fieldset.slide {
    min-width: 0;
    border: 0;
    margin: 0;
}

fieldset.slide > legend {
    float: left; /* "kicks" the legend in place inside the flex context */
}

.slide {
    height: 100%;
    scroll-snap-align: center;

    position: relative;

    display: flex;
    flex-direction: column;

    align-items: center;
    justify-content: center;

    box-sizing: border-box;
    padding: 70px 8px 100px;
}

@media (max-height: 560px) {
    .slide {
        padding: 30px 20px;
    }
}

.registration-form.submitted .slide:not(.done),
.registration-form.error:not(.submitted) .slide:not(.error),
.registration-form:not(.error):not(.submitted) .slide:not(.ready) ~ .slide {
    scroll-snap-align: none;

    visibility: hidden;
    overflow: hidden;

    max-height: 0%;

    padding-top: 0;
    padding-bottom: 0;
}

.slide::before {
    content: "Tilbake";
    top: 0;
    padding-top: 48px;
}

.slide::after {
    content: "Neste";
    bottom: 0;
    padding-bottom: 48px;
    background-position-y: bottom;
}

.slide.intro::after {
    content: "Scroll for neste";
}

.slide.intro::before,
.slide.error::before,
.slide.submit::after,
.slide.done::before,
.slide.done::after {
    display: none;
}

.slide::before,
.slide::after {
    z-index: -1;

    position: absolute;
    right: 0;
    left: 0;

    color: #767676;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 1px;
    text-align: center;
    text-transform: uppercase;

    background-image: linear-gradient(#b0b0b0, #b0b0b0);
    background-position-x: center;
    background-repeat: no-repeat;
    background-size: 2px 35px;

    opacity: 0;
    transition: opacity 0.5s;
}

.slide[data-active]::before,
.slide[data-active].ready::after {
    opacity: 1;
}

@media (max-height: 680px) {
    .slide::before {
        padding-top: 24px;
    }

    .slide::after {
        padding-bottom: 24px;
    }

    .slide::before,
    .slide::after {
        background-size: 2px 20px;
    }
}

@media (max-height: 620px) {
    .slide::before {
        padding-top: 20px;
    }

    .slide::after {
        padding-bottom: 20px;
    }

    .slide::before,
    .slide::after {
        background-size: 2px 16px;
    }
}

@media (max-height: 550px) {
    .slide::before {
        padding-top: 12px;
    }

    .slide::after {
        padding-bottom: 12px;
    }

    .slide::before,
    .slide::after {
        font-size: 10px;
        background-size: 2px 10px;
    }
}

@media (max-height: 500px) {
    .slide::before,
    .slide::after {
        display: none;
    }
}

legend.title {
    padding: 0;
}

.title {
    margin: 0;
    line-height: 1;
    font-size: 30px;
    font-weight: 600;
}

.title.small {
    font-size: 18px;
}

.title.compact {
    font-size: 14px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.slide.intro .title {
    margin-top: -35px;
}

.slide > .title {
    text-align: center;
}

span.text,
small.text {
    display: block;
}

p.text {
    margin: 0;
}

legend.text {
    padding: 0;
}

.text {
    color: #494949;
    font-size: 14px;
    font-weight: 400;
    line-height: 18px;
    text-wrap: balance;
}

.text.light {
    color: #767676;
}

.text.strong {
    color: #000000;
    font-size: 16px;
    line-height: 21px;
}

.text.compact {
    line-height: 16px;
}

.text.multi-line {
    white-space: pre-line;
}

.slide > .text {
    max-width: 380px;
    text-align: center;
}

.card > .text {
    text-align: center;
}

.title + .text {
    margin-top: 10px;
}

.title + .text.strong,
.title.small + .text,
.list + .text {
    margin-top: 33px;
}

.text + .text {
    margin-top: 20px;
}

.text.compact + .text.compact {
    margin-top: 16px;
}

.text.compact + .text.combine,
.text + .text.combine {
    margin-top: 0;
}

.slide.submit .title + .text,
.slide.error .title + .text,
.slide.done .title + .text {
    margin-top: 33px;
}

.logo {
    display: block;
    height: 26px;
}

.slide.intro .logo {
    position: absolute;
    top: 57px;
    left: 0;
    right: 0;
    margin: 0 auto;
}

.slide.done .logo {
    margin-top: 34px;
}

ul.list {
    list-style: none;
}

ul.list,
ol.list {
    padding: 0;
}

.list {
    margin: 0 6px;
}

.list.bullets {
    list-style: disc;
}

.list > li {
    color: #282828;
    line-height: 1;
    font-size: 14px;
    font-weight: 600;
}

.list:not(.bullets) > li {
    border-bottom: 1px solid #f0f0f0;
}

.list > li + li {
    margin-top: 12px;
}

.text + .list {
    margin-top: 16px;
}

.language-select .list {
    width: 100%;
    height: 157px;
    overflow-y: auto;
    margin-bottom: 10px;
}

.language-select .list > li {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.prioritize-activities .list {
    counter-reset: activity-count;
}

.prioritize-activities .list > li {
    display: flex;
    align-items: center;
}

.prioritize-activities .list > li + li {
    margin-top: 4px;
}

.prioritize-activities .list > li::before {
    content: counter(activity-count) ".\00a0";
    counter-increment: activity-count;
}

.prioritize-activities .list > li .star-icon {
    margin-left: auto;

    margin-top: 10px;
    margin-bottom: 10px;
    margin-right: 8px;
}

.prioritize-activities .list > li .sort-button {
    margin-left: auto;
}

fieldset.card {
    display: flex;
    flex-wrap: wrap;

    min-width: 0;
    border: 0;
    margin: 0;
}

fieldset.card > legend {
    float: left; /* "kicks" the legend in place inside the flex context */
}

fieldset.card .selection-label {
    width: 100%;
}

.card {
    max-width: 360px;

    box-sizing: border-box;
    padding: 16px;

    border-radius: 8px;
    background-color: white;

    box-shadow: 0 2px 11px 0 rgba(0, 0, 0, 0.14);
}

.slide > .card {
    width: 100%;
}

.title + .card {
    margin-top: 40px;
}

.text + .card {
    margin-top: 24px;
}

.language-select .card {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.text-field {
    box-shadow: none;
    font-family: inherit;
    border: 0px;
    border-radius: 0;
    background-color: inherit;

    display: block;
    width: 100%;

    color: #282828;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;

    padding: 10px 0 8px;
    border-bottom: 1px solid #f0f0f0;

    transition-property: border, color;
    transition-duration: 0.2s;
}

/* removes the autofill background color */
.text-field:-webkit-autofill {
    -webkit-background-clip: text;
}

.text-field:focus {
    outline: none;
    border-bottom: 1px solid #1d1e37;
}

.text-field::placeholder {
    opacity: 1;
    color: #c4c4c4;
}

.text-field:invalid:not(:placeholder-shown):not(:focus) {
    color: red;
    border-bottom-color: red;
}

.text-field + .text-field,
.text-field + .dropdown {
    margin-top: 20px;
}

.text + .text-field {
    margin-top: 34px;
}

.selection-label {
    display: flex;
    flex-wrap: wrap;

    align-items: center;

    color: #282828;
    line-height: 1;
    font-size: 14px;
    font-weight: 600;

    padding: 10px 0 6px;
    border-bottom: 1px solid #f0f0f0;

    transition: color 0.2s;
}

.selection-label:last-of-type {
    border-bottom: none;
    padding-bottom: 0;
}

.selection-label.disabled {
    color: #767676;
}

.selection-label + .selection-label {
    margin-top: 6px;
}

.title.compact + .selection-label {
    margin-top: 8px;
}

.selection-label .text {
    order: 2;
    width: 100%;
}

.selection-label .text.multi-line {
    margin-top: 4px;
}

input.selection-control {
    margin: 0;
    transform: translate(0, -1px);
}

.selection-control {
    transition: opacity 0.2s;
}

.selection-control:invalid {
    box-shadow: none;
}

.selection-control:disabled {
    opacity: 0.7;
}

.selection-label .selection-control {
    margin-left: auto;
}

.dropdown {
    cursor: pointer;

    appearance: none;
    border: none;
    border-radius: 0;
    background-color: inherit;

    font-family: inherit;

    color: #282828;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;

    padding: 10px 18px 8px 2px;
    border-bottom: 1px solid #f0f0f0;

    background-image: url(asset.b1f097455db9dd454e51.svg);
    background-size: 13px;
    background-repeat: no-repeat;
    background-position: right;

    transition: border 0.2s;
}

.dropdown:focus {
    outline: none;
    border-bottom: 1px solid #1d1e37;
}

.remove-button {
    position: relative;
    cursor: pointer;

    appearance: none;
    border: none;
    padding: 0;

    height: 20px;
    width: 20px;

    margin: 10px;

    border-radius: 50%;
    background-color: #dd232d;

    background-image: url(asset.ce0724443adcf5b623ca.svg);
    background-position: center;
    background-repeat: no-repeat;
    background-size: 10px;
}

/* increases the clickable area */
.remove-button::after {
    content: "";

    position: absolute;
    left: -10px;
    top: -10px;

    width: 40px;
    height: 40px;

    border-radius: 50%;
}

.selection-info {
    display: contents;
}

.selection-info summary {
    -webkit-user-select: none;
    user-select: none;

    color: transparent;

    display: block;

    position: relative;
    cursor: pointer;

    height: 15px;
    width: 15px;

    margin-left: 6px;

    background-image: url(asset.b1f097455db9dd454e51.svg);
    background-size: 11px;
    background-repeat: no-repeat;
    background-position: center;
}

.selection-info[open] summary {
    rotate: x 180deg;
}

/* increases the clickable area */
.selection-info summary::after {
    content: "";

    position: absolute;
    left: -8px;
    top: -10px;
    width: 34px;
    height: 34px;

    border-radius: 35%;
}

.selection-info:not([open]) .text {
    display: none;
}

.sort-button {
    position: relative;
    cursor: pointer;

    appearance: none;
    border: none;
    padding: 0;

    height: 20px;
    width: 20px;

    margin: 10px;

    border-radius: 50%;
    background-color: #dd232d;

    background-image: url(asset.9ef4602d63fd2d0f3410.svg);
    background-position: center;
    background-repeat: no-repeat;
    background-size: 10px;
}

/* increases the clickable area */
.sort-button::after {
    content: "";

    position: absolute;
    left: -10px;
    top: -10px;

    width: 40px;
    height: 40px;

    border-radius: 50%;
}

.submit-button {
    cursor: pointer;

    appearance: none;
    font-family: inherit;

    color: white;
    line-height: 1;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;

    padding: 11px 28px 10px;

    border: 2px solid transparent;
    border-radius: 35px;
    background-color: #dd232d;

    transition-property: background-color, border, color;
    transition-duration: 0.2s;
}

.submit-button:disabled {
    cursor: not-allowed;
    background-color: inherit;

    border: 2px solid #f0f0f0;
    color: #767676;
}

.text + .submit-button {
    margin-top: 30px;
}

/* inspired by https://css-tricks.com/the-cleanest-trick-for-autogrowing-textareas */
.auto-growing-textarea {
    display: grid;

    border-bottom: 1px solid #f0f0f0;

    transition: border 0.2s;
}

.auto-growing-textarea textarea,
.auto-growing-textarea::after {
    grid-row: 1;
    grid-column: 1;

    max-height: 46px; /* three lines (line-height * 3) - padding-bottom */
}

.auto-growing-textarea::after {
    content: attr(data-replica-content) " ";
    visibility: hidden;

    white-space: pre-wrap;
    word-wrap: anywhere;
}

.auto-growing-textarea textarea,
.auto-growing-textarea::after {
    resize: none;
    width: 100%;

    margin: 0;
    padding: 0;
    border: none;
    outline: none;

    font-family: inherit;

    color: #282828;
    font-size: 14px;
    font-weight: 600;
    line-height: 18px;

    /* oh Firefox...
       "Firefox adds height to the TextArea to reserve place for scroll-bars.",
       adding "overflow-x: hidden;" removes it
        - https://stackoverflow.com/a/22700700/3436707
        - https://bugzilla.mozilla.org/show_bug.cgi?id=33654 */
    overflow-x: hidden;

    /* Firefox also has weird scrollbar issues with short scrollbars,
       which are common on textareas,
       unless it is thin! */
    scrollbar-width: thin;

    margin-top: 10px;

    padding-bottom: 8px;
    background-color: white;
}

.auto-growing-textarea textarea::placeholder {
    opacity: 1;
    color: #c4c4c4;
}

.auto-growing-textarea:focus-within {
    border-bottom: 1px solid #1d1e37;
}

.error-message {
    background-color: white;
    padding: 10px;
}

.rc-dropdown {
    display: flex;
    justify-content: space-between;

    padding-block-end: 6px;

    transition: border 0.2s;
    border-bottom: 1px solid #f0f0f0;

    &:focus-within {
        border-bottom: 1px solid #1d1e37;
    }

    .label {
        color: #2b2b2b;
        font-size: 14px;
        text-wrap: balance;
    }

    .select {
        cursor: pointer;

        appearance: none;
        border: none;
        border-radius: 0;
        background-color: inherit;

        font-family: inherit;

        color: #282828;
        font-size: 14px;
        font-weight: 600;
        line-height: 1;

        padding-block: 6px;
        padding-inline: 6px 18px;

        background-image: url(asset.b1f097455db9dd454e51.svg);
        background-size: 13px;
        background-repeat: no-repeat;
        background-position: right;
    }
}

.rc-dropdown + .rc-dropdown {
    margin-top: 18px;
}

