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

html {
    background: #fef9f2;
}

body {
    background: linear-gradient(#fbf3e6,#fef9f2);
}

.page-container {
    height: 100%;
    background: #fbf3e6;
}

/*
html { 
    min-height: 100%;
    background: #fef9f2; /* Color above/below viewport, revealed on iOS when scrolling past the edge, before snapping back  * /
}*/

body {
    background: linear-gradient(#fbf3e6,#fef9f2);
    font-family: 'Asap', sans-serif;
    font-size: 18px;
}

h1, h2 {
    font-family: 'Source Serif Pro', serif;
    text-align: center;
    color: #333333;
}

h1 {
    font-size: 30px;
    margin-top: 0px;
    margin-bottom: 16px;
}

h2 {
    font-size: 24px;
    margin-top: 0;
    margin-bottom: 4px;
}

.headline-highlight {
    color: #20386e;
}

header {
    background: #fef9f2;
    height: 80px;
    border-bottom: 1px solid #dfd1bc;
    display: flex;
    justify-content: space-between;
    padding: 0 50px;
}

header > * {
    z-index: 1;
    display: flex;
    align-items: center;
}

header > a {
    text-decoration: none;
}

.loader-overlay {
    z-index: 4;
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
    background: #fbf3e6;
    display: grid;
    place-items: center center;
    -webkit-align-content: center;
}

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

.loader-overlay:before {
    content: '';
}

.loader-overlay:before,
.loader {
    border-radius: 50%;
    width: 24px;
    height: 24px;
    border: 3px solid rgb(254 249 242);
    border-top-color: rgb(51 51 51);
    animation: spin 1s infinite linear;
}

.dialog {
    z-index: 3;
    display: none;
    flex-direction: column;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 40px;
    text-align: center;
    width: 560px;
    max-width: 100%;
    box-sizing: border-box;
}

.dialog-overlay {
    display: none;
    z-index: 2;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0,0,0,0.7);
}

.dialog-paragraph {
    max-width: 400px;
    margin: auto;
    text-align: center;
    margin-bottom: 30px;
}

.dialog-button-row {
    display: flex;
    width: 340px;
    max-width: 100%;
    margin: auto;
    justify-content: space-between;
}

.dialog-close {
    position: absolute;
    top: 20px;
    right: 20px;
}

#user-section img {
    display: none;
}

header.is-logged-in #user-section img {
    display: inline-block;
}

header.is-logged-in .user-image:last-of-type {
    display: inline-block;
}

main {
    z-index: 1;
    margin: auto;
    /*max-width: 768px;*/
    max-width: 640px;
    position: relative;
    min-height: calc(100vh - 81px - 30px); /* 81px is height of header including border. 30px is height of the footer */
    box-sizing: border-box;
    padding-top: 40px;
    padding-bottom: 20px;
}

.logo {
    width: 239px;
    height: 53px;
}

footer {
    text-align: right;
    padding-bottom: 10px;
    padding-right: 10px;
    height: 30px;
    box-sizing: border-box;
}

.button-as-link.cookie-preferences {
    font-size: 12px;
    text-decoration: none;
    color: #666666;
}

.button-as-link.cookie-preferences:hover,
.button-as-link.cookie-preferences:active {
    color: #333333;
}

.cookie-icon {
    width: 24px;
    height: 24px;
    vertical-align: middle;
    margin-bottom: 4px;
    margin-right: 2px;
}

.card {
    background: white;
    width: 100%;
    max-width: 640px;
    margin: auto;
}

.text-card {
    background: white;
    width: 100%;
    max-width: 96vw;
    margin: auto;
    padding: 40px;
    line-height: 1.5;
    box-sizing: border-box;
}

a:focus {
    outline: 2px solid darkorange;
}

.link-as-button,
.button {
    padding: 12px 28px;
    border-radius: 25px;
    background-color: #333333;
    border: 2px solid #333333;
    color: white;
    font-size: 18px;
    box-sizing: border-box;
    cursor: pointer;
}

.link-as-button {
    text-decoration: none;
    font-size: 20px;
    display: inline-block;
}

.primary-button {
    background-color: #20386e;
    border: 2px solid #20386e;
}

.primary-button:disabled {
    opacity: 0.4;
}

.button:focus,
.link-as-button:focus {
    padding: 12px 28px;
    outline: 0;
    /* Fallback style for browsers that don't support :focus-visible */
    border: 2px solid darkorange;
}

.button:focus:not(:focus-visible),
.link-as-button:focus:not(:focus-visible) {
    padding: 14px 30px;
    /* Remove the focus indicator on mouse-focus for browsers that do support :focus-visible */
    border: 0;
}

.button:focus-visible,
.link-as-button:focus-visible {
    /* Focus style for keyboard-focus on browsers that do support :focus-visible */
    border: 2px solid darkorange;
    padding: 12px 28px;
}

.button-secondary {
    background: white;
    color: #333333;
    border: 2px solid #333333;
    padding: 12px 28px;
}

.button-as-link {
    border: 0;
    padding: 0;
    border-radius: 0;
    background: none;
    font-size: 18px;
    color: #1f53ad; /*#4384f4;*/
    text-decoration: underline;
    cursor: pointer;
}

.button-as-link:focus {
    /* Fallback style for browsers that don't support :focus-visible */
    outline: 2px solid darkorange;
}

.button-as-link:focus:not(:focus-visible) {
    /* Remove the focus indicator on mouse-focus for browsers that do support :focus-visible */
    outline: 0;
}

.button-as-link:focus-visible {
    /* Focus style for keyboard-focus on browsers that do support :focus-visible */
    outline: 2px solid darkorange;
}

.button-as-link:hover {
    text-decoration: none;
}

.subtle-button {
    background: white;
    border: 1px solid #333333;
    color: #333333;
    font-weight: bold;
    font-size: 16px;
}

.subtle-link {
    color: #333333;
}

.user-image {
    width: 38px;
    height: 38px;
    border-radius: 100%;
}

input[type='text'] {
    border: 1px solid #c9c9c9;
    font-size:18px;
    height:40px;
    box-sizing: border-box;
    line-height: 38px;
    padding: 0 8px;
    border-radius: 4px;
}

textarea:focus,
input[type='text']:focus {
    outline: 0;
    border: 1px solid darkorange;
}

@media only screen and (max-width: 480px) {
    header {
        padding: 0 16px;
    }

    h1 {
        font-size: 24px;
    }

    main {
        min-height: calc(100vh - 81px); /* 81px is height of header including border. Don't include the footer, on mobile we want it outside the viewport */
    }

    footer {
        text-align: center;
        padding-right: 0px;
    }

    .cookie-icon {
        display: none;
    }

    .dialog {
        height: 80vh;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        transform: none;
        width: 100%;
        padding: 20px;
        padding-top: 40px;
    }

    .dialog-button-row {
        flex: 1;
        align-items: flex-end;
    }

    header {
        height: 70px;
        padding: 0 20px;
    }

    main {
        min-height: calc(100vh - 71px); /* 81px is height of header including border. Don't include the footer, on mobile we want it outside the viewport */
        padding-top: 20px;
    }

    .logo {
        width: 180px;
        height: 40px;
    }

    .text-card {
        padding: 20px;
        background: none;
        padding-top: 0;
    }

    .link-as-button {
        padding: 14px 30px;
    }
}