:root {
    /*---global breakpoints---*/
    /* x <= 600px
    /* 600px < x <= 900px
    /* 900px < x <= 1200px
    /* 1200px < x <= 1920px
    /* x > 1920px

    /*---color---*/
    --c-primaryDarker: #61050e;
    --c-primaryDark: #9c0716;
    --c-primary: #cd0a1e;
    --c-primaryLight: #f63c4f;
    --c-primaryLighter: #fa9ea7;
    --c-primaryLightest: #faf2f3;

    --c-black: #1e1c1c;
    --c-greyDarker: #292929;
    --c-greyDark: #474747;
    --c-grey: #575757;
    --c-greyLight: #c2c2c2;
    --c-greyLighter: #f5f5f5;
    --c-white: #ffffff;

    --c-secondaryDarker: #005566;
    --c-secondaryDark: #0088a3;
    --c-secondary: #00afd4;
    --c-secondaryLight: #47e0ff;
    --c-secondaryLighter: #99eeff;
    --c-secondaryLightest: #ebf7fa;

    --c-signal-validDark: #1B4332;
    --c-signal-valid: #296148;
    --c-signal-validLight: #95D5B2;
    --c-signal-validLightest: #EDFFF5;

    --c-signal-errorDark: var(--c-primaryDark);
    --c-signal-error: var(--c-primary);
    --c-signal-errorLight: var(--c-primaryLighter);

    /*---typo---*/
    --f-family: "Lato", sans-serif;
    font-size: 18px;

    /*---sizes---*/
    /*TODO: adapt from figma*/
    --mw-container: 1520px;
    --outer-distance: 16px;
    --w-paragraph: 100ch;

    /*---border---*/
    --b-radius-button: 8px;
    --b-radius-image: 16px 16px 0 0;
    --b-radius-image--reverse: 0 16px 0 16px;
    --b-radius-image--round: 16px 16px 16px 16px;
    --b-radius-input: 8px;
    --b-radius-small: 8px;
    --b-radius: 16px;
    --b-radius--big: 24px;

    /*---shadow---*/
    /*TODO: adapt shadows from figma*/
    --shadow-dark: 1px 1px 5px #c2c2c2;
    --shadow: 1px 1px 5px #dfdfdf;
    --shadow-light: 2px 2px 7px #e9e9e9;
}



/*---font faces---*/
@font-face {
    font-family: "Lato";
    font-weight: 700;
    font-style: normal;
    src: url("../fonts/Lato-Bold.woff2") format("woff2");
    font-display: swap;
}

@font-face {
    font-family: "Lato";
    font-weight: 400;
    font-style: normal;
    src: url("../fonts/Lato-Regular.woff2") format("woff2");
    font-display: swap;
}

@font-face {
    font-family: "Lato";
    font-weight: 400;
    font-style: italic;
    src: url("../fonts/Lato-Italic.woff2") format("woff2");
    font-display: swap;
}

@font-face {
    font-family: "Lato";
    font-weight: 300;
    font-style: normal;
    src: url("../fonts/Lato-Light.woff2") format("woff2");
    font-display: swap;
}

@font-face {
    font-family: "Lato";
    font-weight: 100;
    font-style: normal;
    src: url("../fonts/Lato-Thin.woff2") format("woff2");
    font-display: swap;
}

/*---general---*/
html,
body {
    /* TODO: overflow-x is just a workaround for white space on the right side of the webpage, that is produced by the tooltips on the formular
    overflow-x: hidden; */
    min-height: 100vh;
}

* {
    font-family: "Lato", sans-serif;
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    color: var(--c-greyDark);
}

h1,
h2,
h3,
h4,
h5,
.h1,
.h2,
.h3,
.h4,
.h5 {
    margin: 0;
    color: var(--c-greyDarker);
    word-break: break-word;
}

/*---Logout confirmation ---*/
/** TODO: switch to custom components */
.notification {
	padding: 8px 32px 8px 48px;
	border-radius: var(--b-radius-small);
	width: fit-content;
    margin: 0;

    &::before {
        height: 24px;
        width: 24px;
        display: inline-block;
        margin-right: 8px;
        margin-left: -32px;
        vertical-align: middle;
    }

    a {
        text-decoration: underline;
        text-decoration-style: dotted;
        padding-left: 8px;
    }

    &.notification--floating {
        position: fixed;
        top: 130px;
        right: 0;
        left: 0;
	    margin: auto;
    }

    &.notification--success {
        background-color: var(--c-signal-validLightest);
        color: var(--c-signal-valid);

        &::before {
            content: url('../icon/check-circle--green.svg');
        }

        a {
	        color: var(--c-signal-valid);
        }
    }

    &.notification--info {
        background-color: var(--c-secondaryLightest);
        color: var(--c-secondaryDark);

        &::before {
            content: url('../icon/info--blue.svg');
        }

        a {
	        color: var(--c-secondaryDark);
        }
    }

    &.notification--error {
        background-color: var(--c-primaryLightest);
        color: var(--c-primary);

        &::before {
            content: url('../icon/info--red.svg');
        }

        a {
	        color: var(--c-primary);
        }
    }
}

.loggedOut__success {
	background-color: var(--c-signal-validLightest);
	color: var(--c-signal-valid);
	padding: 8px 40px;
	border-radius: var(--b-radius-small);
	position: fixed;
	top: 130px;
	right: 0;
	left: 0;
	margin: auto;
	width: fit-content;
}

.loggedOut__success a {
	color: var(--c-signal-valid);
	text-decoration: underline;
	text-decoration-style: dotted;
}

.loggedOut__success::before {
	content: url('../icon/check-circle--green.svg');
	height: 24px;
	width: 24px;
	display: inline-block;
	margin-right: 8px;
	margin-left: -32px;
	vertical-align: middle;
}

/*---Service and error messages across pages ---*/

.div_service_messages {
    width:100%;
    background-color: lightgoldenrodyellow;
    padding:30px;
}

.div_service_messages p {
    font-size: 1.4em;
    margin-bottom: 0;
}

.div_service_messages p a {
    font-size: 1em;
    margin-bottom: 0;
}

/*---typo---*/
h1,
.h1 {
    font-size: 3.33rem;
    font-weight: 700;
    line-height: 1.2;

    margin-top: 64px;
    margin-bottom: 16px;
}

.h1--redBg {
    background-color: var(--c-primary);
    color: var(--c-white);
    padding: 10px;
    width: fit-content;
}

h2,
.h2 {
    font-size: 2.22rem;
    font-weight: 700;
    line-height: 1.6;

    margin-top: 32px;
    margin-bottom: 8px;
}

h3,
.h3 {
    font-size: 1.56rem;
    font-weight: 400;
    line-height: 1.2;

    margin-top: 0;
    margin-bottom: 8px;
}

h4,
.h4 {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.4;

    margin-top: 0;
    margin-bottom: 8px;
}

h5,
.h5 {
    font-size: 0.89rem;
    font-weight: 700;
    line-height: 1.4;

    margin-top: 0;
    margin-bottom: 4px;
}

p.p-f--smaller, span.p-f--smaller, .p-f--smaller {
    font-size: 0.89rem;
    font-weight: 400;
    line-height: 1.4;
}

p,
span:not([slot]):not(.caption):not(.h5):not(.h4):not(.h3):not(.p-f--smaller),
div {
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.6;
    word-wrap: break-word;
}

p {
    margin-top: 0;
    margin-bottom: 16px;
}

p,
span:not([slot]) {
    color: var(--c-greyDark);
    max-width: var(--w-paragraph);
}

label {
    color: var(--c-grey);
}

#sizecontainer,
.main {
    /*flex: 1;*/
    /*there is a flex issue due to the iframe implementation to have a sticky footer on bottom and center the content in e.g. the error page*/
    /*120px ~ height of header; 260px ~ height of footer*/
    min-height: calc(100vh - 120px - 270px);
    padding: 0 var(--outer-distance);
}



/*---buttons and links---*/
.button--primary,
.button--secondary,
.button--ghost,
.button--ghost--onGrey {
    font-size: 0.89rem;
    font-weight: 700;
    padding: 8px 24px;
    border-radius: var(--b-radius-button);
    transition: all 0.3s;
    text-decoration: none;
    line-height: 1.4;
    min-width: 64px;
    flex-shrink: 0;
}

.button--primary {
    background-color: var(--c-primary);
    border: 2px solid var(--c-primary);
    color: var(--c-white);
}

.button--primary:hover {
    background-color: var(--c-primaryLight);
    border-color: var(--c-primaryLight);
    text-decoration: none;
}

.button--primary:active {
    background-color: var(--c-primaryDarker);
    border-color: var(--c-primaryDarker);
    color: var(--c-white);
}

.button--primary:focus-visible {
    background-color: var(--c-primary);
    border-color: var(--c-black);
    color: var(--c-white);
    outline: none;
}

.button--primary:disabled {
    background-color: var(--c-greyLighter);
    border-color: var(--c-greyLighter);
    color: var(--c-greyLight);
    cursor: not-allowed;
}

.button--secondary {
    background-color: transparent;
    border: 2px solid var(--c-greyDark);
    color: var(--c-greyDark);
}

.button--secondary:hover {
    text-decoration: none;
    color: var(--c-black);
    border-color: var(--c-black);
}

.button--secondary:active {
    background-color: var(--c-greyLight);
    border-color: var(--c-black);
    color: var(--c-black);
}

.button--secondary:focus-visible {
    background-color: transparent;
    border-color: var(--c-black);
    color: var(--c-black);
    outline: 2px solid var(--c-primary);
}

.button--secondary:disabled {
    background-color: transparent;
    border-color: var(--c-greyLight);
    color: var(--c-greyLight);
    cursor: not-allowed;
}

.button--ghost {
    background-color: transparent;
    border: 2px solid transparent;
    color: var(--c-greyDark);
    border-radius: var(--b-radius-button);
    text-decoration: none;
}

.button--ghost:hover {
    background-color: var(--c-greyLighter);
    border-color: var(--c-greyLighter);
}

.button--ghost:active {
    background-color: var(--c-greyLight);
    border-color: var(--c-greyLight);
}

.button--ghost:focus-visible {
    background-color: var(--c-greyLighter);
    border-color: var(--c-greyLighter);
    outline: 2px solid var(--c-primary);
}

.button--ghost:disabled {
    background-color: transparent;
    color: var(--c-greyLight);
    border-color: transparent;
    cursor: not-allowed;
}

.button--ghost--onGrey {
    background-color: transparent;
    border: 2px solid transparent;
    color: var(--c-greyDark);
    border-radius: var(--b-radius-button);
    text-decoration: none;
}

.button--ghost--onGrey:hover {
    background-color: var(--c-white);
    border-color: var(--c-greyLighter);
}

.button--ghost--onGrey:active {
    background-color: var(--c-greyLight);
    border-color: var(--c-greyLight);
}

.button--ghost--onGrey:focus-visible {
    background-color: var(--c-white);
    border-color: var(--c-greyLighter);
    outline: 2px solid var(--c-primary);
}

.button--ghost--onGrey:disabled {
    background-color: transparent;
    color: var(--c-greyLight);
    border-color: transparent;
    cursor: not-allowed;
}

.button--icon {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    column-gap: 8px;
}

.button--icon svg {
    height: 20px;
    width: 20px;
}

.link {
    color: #493CDD;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.5;
    transition: all 0.3s;
    text-decoration: underline;
    padding: 8px;
    border-radius: var(--b-radius-button);
    border: 2px solid transparent;
    outline: none;
    cursor: pointer;

    &.link--small {
        font-size: 0.833rem;
    }
}

.link:hover {
    color: #3E2EEF;
}

.link:focus {
    color: #13097B;
}

.link:visited {
    color: #681DA8;
}

.link:focus-visible {
    border-color: var(--c-black);
    color: #1A0DAB;
}

a.link--disabled,
.link.link--disabled {
    color: var(--c-greyLight);
}

.tag {
    font-size: 0.833rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--c-grey);

    text-decoration: underline;
}

a.tag:hover {
    color: var(--c-greyDark);
    text-decoration: underline;
    text-decoration-style: dotted;
}

.caption {
    font-size: 0.78rem;
    font-weight: 400;
    line-height: 1.6;
}

.caption-f--smaller {
    font-size: 0.67rem;
    font-weight: 400;
    line-height: 1.6;
}




/*---form elements---*/
input:not([type="range"]),
textarea,
select {
    --padding: 16px;

    border: 1px solid var(--c-grey);
    border-radius: var(--b-radius-input);
    color: var(--c-greyDark);
    padding: var(--padding);
    font-size: 1rem;
}

input::placeholder,
textarea::placeholder {
    color: var(--c-greyLight);
}

input:not([type="range"]):focus,
input:not([type="range"]):focus-within,
input:not([type="range"]):focus-visible,
textarea:focus,
textarea:focus-within,
textarea:focus-visible,
select:focus,
select:focus-within,
select:focus-visible {
    border-color: var(--c-black);
    border-width: 2px;
    outline: none;
    padding: calc(var(--padding) - 1px);
}

input:disabled,
textarea:disabled, input[readonly], textarea[readonly] {
    background-color: var(--c-greyLighter);
    border: none;
    color: var(--c-greyLight);
    cursor: not-allowed;
}

input:not(:placeholder-shown):invalid:required,
textarea:not(:placeholder-shown):invalid:required,
input.invalid-form,
textarea.invalid-form {
    background-color: var(--c-primaryLightest);
    border-color: var(--c-signal-error);
    color: var(--c-signal-error);
}

.form_input__error {
    display: none;
}

input:not(:placeholder-shown):invalid:required + .form_input__error,
textarea:not(:placeholder-shown):invalid:required + .form_input__error,
input.invalid-form + .form_input__error,
textarea.invalid-form + .form_input__error {
    display: block;
}

input.symbol, .symbol {
    background: no-repeat 10px;
    padding-left: 48px;
}

.input.symbol, .symbol:focus {
    padding-left: 48px !important;
}

input.symbol--search, .symbol--search {
    background-image: url(../icon/search.svg);
}

/*---checkboxes---*/
.form__checkbox input:first-child {
    display: none;
}

.form__checkbox label {
    position: relative;
    cursor: pointer;
    /*to align the text after our custom checkbox*/
    margin-left: 28px;
}

.form__checkbox label:before {
    content: "";
    height: 20px;
    width: 20px;
    display: inline-block;
    border-radius: 5px;
    border: 2px solid var(--c-grey);
    margin-right: 8px;
    vertical-align: sub;
    box-sizing: border-box;
    /*to align the text after our custom checkbox*/
    margin-left: -28px;
}

.form__checkbox label:hover:before {
    border-color: var(--c-secondary);
}

.form__checkbox input:checked + label {
    color: var(--c-black);
}

.form__checkbox input:checked + label:before {
    background: var(--c-grey) url(../icon/check.svg) no-repeat center;
    background-size: cover;
}

.form__checkbox:hover input:checked + label:before {
    background-color: var(--c-secondary);
    border-color: var(--c-secondary);
}

.form__checkbox input:disabled + label:before {
    background-color: var(--c-white);
    border-color: var(--c-greyLight);
    cursor: not-allowed;
}

.form__checkbox.isInvalid .form_input__error {
    display: block;
}

.form__checkbox .link {
    padding: 0;
}

/*---radio buttons---*/
.form__radiobutton input:first-child {
    display: none;
}

.form__radiobutton label {
    position: relative;
    cursor: pointer;
}

.form__radiobutton label:before {
    content: "";
    height: 20px;
    width: 20px;
    display: inline-block;
    border-radius: 50%;
    border: 2px solid var(--c-grey);
    margin-right: 8px;
    vertical-align: sub;
    box-sizing: border-box;
}

.form__radiobutton:hover label:before {
    border-color: var(--c-secondary);
}

.form__radiobutton input:checked + label {
    color: var(--c-black);
}

.form__radiobutton input:checked + label:before {
    background: var(--c-white) url(../icon/circle.svg) no-repeat center;
    background-size: cover;
}

.form__radiobutton:hover input:checked + label:before {
    background-image: url(../icon/circle-highlight.svg);
    border-color: var(--c-secondary);
}

.form__radiobutton input:disabled + label:before {
    background-color: var(--c-white);
    border-color: var(--c-greyLight);
    cursor: not-allowed;
}

/*---tooltip---*/
.tooltiptext {
    background-color: var(--c-white);
    border-radius: var(--b-radius-small);
    box-shadow: var(--shadow-light);
    color: var(--c-grey);
    padding: 8px 12px;
}

.tooltip .tooltiptext::before {
    content: "";
    position: absolute;
    top: 7px;
    left: -20px;
    border-width: 12px;
    border-style: solid;
    border-color: transparent var(--c-white) transparent transparent;
}

/*---help classes---*/

.headline-dot {
	color:var(--c-primary);
}


.hide {
    display: none !important;
}

#disappearing_spinner_box{
    background-color: #ebf7fa;
	position: fixed;
	width:33vw;
	font-size:20px;
	right:0;
	margin:auto;
	border-radius: var(--b-radius-button);
	text-align: center;
	padding:1em 0;
	transition: opacity 0.3s, bottom 0.3s;
}
#disappearing_spinner_box.active{
	bottom:0;
	opacity:1;
}
#disappearing_spinner_box.inactive{
	bottom:-100px;
	opacity:0;
}
#disappearing_alert_box{
	position: fixed;
	width:33vw;
	font-size:20px;
	left:0;
	right:0;
	margin:auto;
	border-radius: var(--b-radius-button);
	text-align: center;
	padding:1em 0;
	transition: opacity 0.3s, top 0.3s;
    z-index: 5;
}
#disappearing_alert_box.active{
	top:10px;
	opacity:1;
}
#disappearing_alert_box.inactive{
	top:-100px;
	opacity:0;
}
#disappearing_alert_box.alarm{
	background-color:#ff8995;
	border:2px solid rgb(247, 51, 51);
}
#disappearing_alert_box.confirm{
	background-color:#89ffa6;
	border:2px solid rgb(33, 161, 65);
}

/****  HINT FOR NEW UPDATES AVAILABLE ****/
.updateMessage {
	padding: 32px 16px;
	display: flex;
	justify-content: center;
	align-items: center;
	background-color: var(--c-secondaryLightest);
	position: relative;
}

.updateMessage__close {
	position: absolute;
	right: 32px;
	top: 0;
	background-color: transparent;
}

.updateMessage__text {
	display: flex;
	align-items: center;
	gap: 8px;
	justify-content: center;
	flex-wrap: wrap;
	text-align: center;
}

.updateMessage__text > span {
	color: var(--c-secondaryDarker);
}

:nth-child(1 of .updateMessage__text > span) {
	font-weight: 600 !important;
}

dialog::backdrop {
	background: rgba(71, 71, 71, 0.6);
}

@media screen and (width > 1200px) {
    .hide-on-desktop {
        display: none !important;
    }
}

@media screen and (width <= 1200px) {
    .hide-on-tablet {
        display: none !important;
    }
}

@media (width <= 900px) {
    h1 {
        margin-bottom: 16px;
    }

    h2,
    h3 {
        margin-bottom: 4px;
    }
}

@media (width <= 600px) {
    :root {
        font-size: 16px;
    }

    h1,
    .h1 {
        font-size: 1.875rem;
    }

    h2,
    .h2 {
        font-size: 1.5rem;
        line-height: 1.4;
    }

    h3,
    .h3 {
        font-size: 1.375rem;
        line-height: 1.2;
    }

    h4,
    .h4 {
        font-size: 1rem;
        line-height: 1.4;
    }

    h5,
    .h5 {
        font-size: 0.875rem;
        line-height: 1.4;
    }

    p.p-f--smaller {
        font-size: 0.875rem;
        line-height: 1.2;
    }

    .caption {
        font-size: 0.75rem;
        line-height: 1.6;
    }

    .caption-f--smaller, span.p-f--smaller {
        font-size: 0.625rem;
        line-height: 1.6;
    }

    .hide-on-mobile {
        display: none !important;
    }
}
