@media print {
    tr.row-question,
    div.question {
        page-break-inside: avoid;
    }
}

html, body {
    font-family: 'Open Sans', sans-serif;
    font-size: 1.1rem;
    padding: 0;
    margin: 0;
}

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

.visual-italic {
    font-style: italic;
}

.visual-bold {
    font-weight: bold;
}

/* Prevent horizontal overflow from long strings */
body {
    overflow-x: hidden;
}

.question,
.question p,
.question .lead,
.question label,
.question td,
.question th,
.field-row label {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.question table {
    width: 100%;
    table-layout: fixed;
}

#container {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
}

header {
    border-bottom: 3px solid #121c5e;
    position: fixed;
    height: 100px;
    width: 100%;
    z-index: 1;
}

header #visual {
    display: none;
}

header #custom-logo img {
    max-height: 100px;
    width: auto;
}

main {
    display: flex;
    top: 100px;
    bottom: 60px;
    justify-content: center;
    position: fixed;
    width: 100%;
}

footer {
    background-color: #2a6adf;
    height: 60px;
    position: fixed;
    bottom: 0;
    width: 100%;
    display: flex;
    align-items: center;
    padding: 0;
    overflow: hidden;
    justify-content: space-between;
}

div#progress-holder {
    padding: 0 5px;
    min-width: 60%;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

div#progress-bar {
    background-color: #fff;
    border-radius: 2em;
    display: inline-block;
    left: auto;
    margin: 10px 0;
    height: 40px;
    width: 100%;
    position: relative;
}

div#progress-indicator {
    background-color: #82D9a8;
    border-radius: 2em;
    height: 100%;
}

div#progress-indicator span {
    color: #fff;
    height: 40px;
    line-height: 1.6rem;
    font-size: 1.4rem;
    padding: 5px;
    display: inline-block;
    font-weight: bold;
    width: 100%;
    text-align: center;
    text-shadow: 2px 2px 1px #000;
}

#logo {
    height: 80px;
    margin-top: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
}

#logo img {
    max-height: 100%;
    width: auto;
}

.button-action {
    border: none;
    background: none;
    color: #fff;
    font-size: 1.8rem;
    padding: .35em 1rem;
    min-width: 56px;
    height: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    flex: 0 0 auto;
    position: relative;
    z-index: 1;
}

.button-action:hover {
    background-color: #82D9a8;
    cursor: pointer;
    outline: none;
}

.error-summary-link {
    color: inherit;
    text-decoration: underline;
}

.error-summary-link:hover,
.error-summary-link:focus {
    color: inherit;
}

#action-close,
#action-next {
    position: relative;
    right: auto;
    margin-left: auto;
}

#action-previous,
#action-home {
    position: relative;
}

.button-action__label {
    white-space: nowrap;
}

sidebar#alert-test {
    background-color: #82D9a8;
    opacity: .80;
    position: absolute;
    top: 0;
    width: 100%;
    z-index: 10;
}

sidebar#alert-test p {
    color: #fff;
    font-size: .8em;
    font-weight: bold;
    margin: 0;
    padding: .25em 0;
    text-align: center;
    text-shadow: 0 0 .25em #000;
}

form {
    border: 3px solid #121c5e;
    border-radius: .25em;
    margin: 1em;
    padding: 1em;
    min-width: 0;
    width: 80%;
    max-width: 1280px;
    overflow-y: auto;
    overflow-x: hidden;
}

.question {
    border-bottom: 2px solid #3e8cea;
    padding: .5em .5em 1em;
    margin-bottom: 1em;
    overflow-x: hidden;
}

.question .lead {}

.question th {
    font-weight: normal;
    text-align: left;
}

.question td {
    text-align: center;
}

.question thead td {
    border-bottom: 2px solid #121c5e;
}

.question select,
.question input[type=text],
.question-open textarea {
    border: 2px solid #121c5e;
    padding: .5em;
    font-family: 'Open Sans', sans-serif;
    box-sizing: border-box;
    border-radius: .25em;
    width: 80%;
}

.question .field-row input.text-an {
    width: 50%;
}

.question-open textarea {
    height: 6em;
}

.question .datepicker {
    box-sizing: border-box;
    display: flex;
    flex-direction: row;
    width: 100%;
}

.question .wrapper-datetime select {
    margin-right: .5em;
    max-width: 20%;
    width: 4em;
}

.question select.datetime-date,
.question select.datetime-month,
.question select.datetime-year {
    display: none;
}

.question select.datetime-month {
    min-width: 6em;
    width: 8em;
}

.question select.datetime-year {
    margin-right: 1em;
    min-width: 5em;
    width: 6em;
}

div.choices {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

div.choices > .field-row {
    padding: 0 .5em .5em;
}

ul.choices {
    list-style: none;
    padding: 0;
}

ul.choices li {
    list-style: none;
    padding: 0 0 .5em;
}

.field-row {
    position: relative;
    min-height: 24px;
}

.question-multiplechoice .field-row label,
.question-singlechoice .field-row label,
.question-singlechoiceopen .field-row label {
    display: inline-block;
    margin-left: 0;
    padding-left: 2em;
}

.field-row input[type="checkbox"],
.field-row input[type="radio"] {
    cursor: pointer;
    height: 24px;
    width: 24px;
    left: 0;
    top: 0;
    position: absolute;
    opacity: 0;
}

.field-row label {
    margin-left: 0;
    padding-left: 2em;
    display: inline-block;
    min-height: 24px;
}

.checkmark,
.radiomark {
    border: 2px solid #121c5e;
    background-color: #ffffff;
    border-radius: .25em;
    height: 25px;
    left: 0;
    position: absolute;
    top: 0;
    width: 25px;
}

.radiomark {
    border-radius: 1em;
}

.question-matrix .checkmark,
.question-likert .radiomark,
.question-semantic .radiomark {
    margin-left: -12px;
    left: 50%;
}

.question-likert .radiomark,
.question-semantic .radiomark {
    top: 50%;
    transform: translate(0, -50%);
}

.question-smiley .radiomark {
    top: 0;
    left: 0.5em;
    transform: unset;
}

.field-row:hover input ~ .checkmark,
.field-row:hover input ~ .radiomark {
    background-color: #d1d5db;
}

.field-row input:focus ~ .checkmark,
.field-row input:focus ~ .radiomark,
.field-row input:focus-visible ~ .checkmark,
.field-row input:focus-visible ~ .radiomark {
    box-shadow: 0 0 0 3px #2a6adf;
}

.checkmark:after,
.radiomark:after {
    content: "";
    display: none;
    position: absolute;
}

.field-row input:checked ~ .checkmark:after,
.field-row input:checked ~ .radiomark:after {
    display: block;
}

.field-row .checkmark:after,
.field-row .radiomark:after {
    border: solid #82D9a8;
    border-width: 0 3px 3px 0;
    left: 8px;
    height: 12px;
    transform: rotate(45deg);
    top: 4px;
    width: 6px;
}

.question-matrix .field-row .checkmark:after,
.question-likert .field-row .radiomark:after,
.question-semantic .field-row .radiomark:after {
    border: solid #82D9a8;
    border-width: 0 3px 3px 0;
    left: 50%;
    margin-left: -4px;
    height: 12px;
    transform: rotate(45deg);
    top: 4px;
    width: 6px;
}

.question input[type=text].open-numeric {
    width: 5%;
    min-width: 100px;
    text-align: right;
}

.question-total span.total-sum {
    text-align: right;
    display: inline-block;
    width: 5%;
    min-width: 100px;
}

.question-smiley ul {
    display: flex;
    flex-direction: row;
    justify-content: space-around;
}

.question-smiley ul li:hover,
.question-smiley ul li img:hover {
    cursor: pointer;
}

.question input.text-an:disabled {
    display: none;
}

.question-semantic th.label-left {
    text-align: right;
}

.question-matrix td,
.question-likert td,
.question-semantic td {
    min-height: 24px;
}

.priority-wrapper {
    display: flex;
    flex-direction: row;
}

.priority-box {
    border: 2px solid #6b7280;
    box-sizing: border-box;
    border-radius: .25em;
    width: 50%;
    margin: 1em;
    min-height: 3em;
}

.priority-item {
    background-color: #e5e7eb;
    border: 2px solid #6b7280;
    border-radius: .25em;
    box-sizing: border-box;
    margin: .25em;
    padding: .25em;
    cursor: pointer;
}

.checked-bg {
    background-color: #82D9a8;
}

.attribute {
    border-bottom: unset;
}

.attribute > h3 {
    width: 100%;
    text-align: center;
    margin-top: unset;
}

.attribute .choices .field-row > label {
    display: inline-block;
    width: 20%;
}

.slider-wrapper {
    width: 100%;
    height: auto;
    display: flex;
    flex-direction: column;
}

.slider-block {
    width: 100%;
    height: auto;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.slider-label {
    width: auto;
    max-width: 16%;
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
}

.slider-inputs {
    width: 84%;
    height: auto;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

.slider-handler-wrapper {
    width: 75%;
    height: auto;
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
}

.slider-handler-wrapper span:first-of-type {
    text-align: right;
    padding-right: 1em;
}

.slider-handler-wrapper span:last-of-type {
    text-align: left;
    padding-left: 1em;
}

.slider-handler {
    width: 80%;
}

.slider-handler-wrapper .slider-handler span {
    padding: unset;
}

.slider-input {
    width: 25%;
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
}

.slider-input label {
    position: relative;
    margin-left: 10px;
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 4px 0;
}

.slider-input .checkmark {
    height: 24px;
    width: 24px;
    top: 2px;
    left: 0;
}

.slider-input .checkmark:after {
    border: solid #82D9a8;
    border-width: 0 3px 3px 0;
    left: 7px;
    height: 12px;
    transform: rotate(45deg);
    top: 3px;
    width: 6px;
}

.slider-input input:checked ~ .checkmark:after {
    display: block;
}

.priority-wrapper {
    width: 100%;
    height: auto;
    display: flex;
    flex-direction: column;
}

.priority-label {
    margin-right: 2em;
    text-align: right;
}

.priority-label-mob {
    width: 100%;
    text-align: right;
    display: none;
}

.priority-label-mob:first-of-type {
    margin-top: 1em;
}

.priority-widget {
    width: 100%;
    height: auto;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

.priority-widget .draggable {
    background-color: #e5e7eb;
    border: 2px solid #6b7280;
    border-radius: .25em;
    box-sizing: border-box;
    cursor: pointer;
    padding: .25em;
    margin: .25em 0;
}

.priority-divider {
    width: 5%;
}

.priority-draggables {
    border: 2px solid #6b7280;
    border-radius: .25em;
    box-sizing: border-box;
    padding: .5em;
    width: 45%;
}

.priority-box-wrapper {
    width: 45%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    margin: 1em;
}

.priority-droppable {
    border: 2px solid #6b7280;
    border-radius: .25em;
    box-sizing: border-box;
    padding: .5em;
    width: 100%;
    margin: unset;
}

.priority-buttons {
    width: 10%;
    height: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.priority-buttons a {
    width: 50px;
    height: 50px;
    border-radius: 5px;
    background-color: #8a8a8a;
    border: 2px solid #6b7280;
    text-decoration: none;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    font-size: 1.2em;
    color: #111111;
    cursor: pointer;
}

.priority-buttons a:first-of-type {
    margin-bottom: 20px;
}

.priority-item.selected-item {
    background-color: #ffffff;
    border-color: #333333;
}

.priority-selected-indicator {
    display: none;
    font-size: 0.85em;
    font-weight: bold;
    margin-left: 0.5em;
}

.priority-item.selected-item .priority-selected-indicator {
    display: inline-block;
}

.priority-selected-indicator .fa {
    margin-right: 0.35em;
}

.table-responsive {
    overflow-y: hidden !important;
    padding: 0 0 10px;
}
.table-responsive::-webkit-scrollbar {
    height: 4px;
    margin-top: 5px;
}
.table-responsive::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 2px;
}
.table-responsive::-webkit-scrollbar-thumb {
    background: #333333;
    border-radius: 2px;
}
.table-responsive::-webkit-scrollbar-thumb:hover {
    background: #333333;
    border-radius: 2px;
}

#auth-container {
    align-items: center;
    flex-direction: column;
    justify-content: flex-start;
    overflow-y: scroll;
}

#auth-container section {
    box-sizing: border-box;
    margin: 0 0 1rem;
    max-width: 960px;
    width: 80%;
}

#auth-container form {
    box-sizing: border-box;
    margin: 0;
    width: 100%;
}

@media screen and (max-width: 1350px) {
    .slider-label {
        width: auto;
        max-width: 20%;
        display: flex;
        flex-direction: row;
        justify-content: flex-start;
    }

    .slider-inputs {
        width: 80%;
        height: auto;
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .slider-handler-wrapper {
        width: 65%;
        height: auto;
        display: flex;
        flex-direction: row;
        justify-content: flex-start;
        align-items: center;
    }

    .slider-handler {
        width: 70%;
    }

    .slider-input {
        width: 35%;
        display: flex;
        flex-direction: row;
        justify-content: flex-start;
        align-items: center;
    }
}

@media screen and (max-width: 1023px) {
    .slider-block {
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
    }

    .slider-label {
        width: auto;
        max-width: 100%;
        display: flex;
        flex-direction: row;
        justify-content: flex-start;
        margin-bottom: 5px;
    }

    .slider-inputs {
        width: 100%;
        height: auto;
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .slider-handler-wrapper {
        width: 65%;
        height: auto;
        display: flex;
        flex-direction: row;
        justify-content: flex-start;
        align-items: center;
    }

    .slider-handler {
        width: 70%;
    }

    .slider-input {
        width: 35%;
        display: flex;
        flex-direction: row;
        justify-content: flex-start;
        align-items: center;
    }
}

@media screen and (max-width: 1040px) {
    header {
        height: 100px;
        position: fixed;
    }

    main {
        position: fixed;
        top: 100px;
        bottom: 60px;
        width: 100%;
    }

    footer {
        flex-wrap: nowrap;
    }

    #logo {
        position: static;
        margin: 10px auto 0;
        left: auto;
        height: 60px;
    }

    div#progress-holder {
        width: min(56%, 440px);
        min-width: 180px;
    }

    div#progress-bar {
        position: relative;
        left: auto;
        transform: none;
    }

    header #custom-logo img {
        max-height: 80px;
    }

    #logo {
        height: 60px;
        left: 40%;
        /*margin-left: -25%;*/
        /*margin-top: 10px;*/
        /*position: absolute;*/
    }

    main > h1 {
        text-align: center;
    }

    form {
        min-width: unset;
        width: 80%;
        max-width: 1280px;
    }

    footer {
        height: 60px;
    }

    .question input[type=text],
    .question-open textarea {
        font-size: 1rem;
    }

    select.question-dropdown {
        font-size: 1rem;
        color: #111111;
    }

    .slider-handler-wrapper {
        width: 50%;
        height: auto;
        display: flex;
        flex-direction: row;
        justify-content: flex-start;
        align-items: center;
    }

    .slider-handler {
        width: 65%;
    }

    .slider-input {
        width: 50%;
        display: flex;
        flex-direction: row;
        justify-content: flex-start;
        align-items: center;
    }

    div#progress-holder {
        position: absolute;
    }

    div#progress-bar {
        width: 100%;
        margin: 10px 0;
        transform: none;
    }

    .button-action {
        padding: 0 12px;
        height: 100%;
    }

    .button-action__label {
        display: none;
    }
}

@media screen and (max-width: 576px) {
    header {
        height: 60px;
    }

    header #custom-logo img {
        max-height: 60px;
    }

    #logo {
        height: 50px;
        left: 30%;
        margin-top: 5px;
    }

    #logo img {
        width: auto;
        max-height: 100%;
    }

    main {
        top: 60px;
        bottom: 60px;
    }

    main > h1 {
        text-align: center;
        margin: 0 20px;
    }

    form#intaketoken {
        width: 100%!important;
        height: auto!important;
    }

    form {
        border: none;
        min-width: unset;
        width: 100%;
        max-width: unset;
        margin: unset;
        padding: 0 1em;
        box-sizing: border-box;
    }

    .question input[type=text],
    .question-open textarea {
        width: 100%!important;
        font-size: 1rem;
    }

    .question input[type=text].open-numeric {
        width: 5%!important;
        min-width: 100px;
    }

    .question .field-row input.text-an {
        margin-top: 10px;
    }

    select.question-dropdown {
        font-size: 1rem;
        color: #111111;
    }

    .priority-wrapper .priority-widget {
        flex-direction: column;
    }

    .priority-wrapper .priority-draggables,
    .priority-wrapper .priority-droppable {
        width: 100%;
        margin-left: unset;
        margin-right: unset;
    }

    .priority-wrapper .priority-droppable {
        margin-top: 1em;
        margin-bottom: 1em;
    }

    .priority-wrapper .priority-box-wrapper {
        width: 100%;
        margin-left: unset;
        margin-right: unset;
        margin: unset;
    }

    .priority-wrapper .priority-buttons {
        width: 100%;
        flex-direction: row;
    }

    .priority-wrapper .priority-buttons > a {
        transform: rotate(90deg);
    }

    .priority-wrapper .priority-buttons > a:first-of-type {
        margin-bottom: 0;
        margin-right: 20px;
    }

    .priority-wrapper .priority-label {
        display: none;
    }

    .priority-wrapper .priority-label-mob {
        display: block;
    }

    .slider-block {
        margin-bottom: 20px;
    }

    .slider-label {
        margin-bottom: 10px;
    }

    .slider-inputs {
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
    }

    .slider-handler-wrapper {
        width: 100%;
        justify-content: center;
        margin-bottom: 10px;
    }

    .slider-handler {
        width: 70%;
    }

    .slider-input {
        width: 100%;
        justify-content: center;
    }

    div.choices > .field-row img {
        max-width: 100px;
    }

    footer {
        height: 60px;
        display: flex;
        flex-direction: row;
        justify-content: flex-start;
    }

    #action-close, #action-previous, #action-next  {
        position: relative;
    }

    #action-previous {
        margin-right: auto;
    }

    #action-next {
        margin-left: auto;
    }

    div#progress-holder {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        width: min(50%, 280px);
        min-width: 130px;
        margin: 0;
    }

    div#progress-bar {
        width: 100%;
        margin: 10px 0;
        transform: none;
    }

    .button-action {
        padding: 0 10px;
        height: 100%;
    }

    .button-action > i {
        font-size: 1.8rem;
    }

    .button-action__label {
        display: none;
    }

    #auth-container p {
        font-size: .9rem;
    }

    #auth-container form {
        padding: 0;
    }
}

/*
 * WCAG 1.4.10 Reflow
 *
 * At 320 CSS pixels (or 1280px at 400% zoom) the questionnaire becomes one
 * vertical document. This avoids a nested scroll area between a fixed header
 * and footer, and keeps all regular content operable without horizontal
 * scrolling.
 */
@media screen and (max-width: 400px) {
    html,
    body,
    .container {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        height: auto;
        overflow-x: clip;
    }

    body {
        overflow-y: auto;
    }

    header,
    main,
    footer {
        position: static;
        inset: auto;
        width: 100%;
        max-width: 100%;
    }

    header {
        height: auto;
        min-height: 60px;
    }

    header #custom-logo,
    header #custom-logo img,
    #logo,
    #logo img {
        max-width: 100%;
        height: auto;
    }

    #logo {
        min-height: 50px;
        margin: .25rem auto;
        padding: 0 .5rem;
    }

    main {
        display: block;
    }

    form,
    form#questionnaire {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        height: auto;
        margin: 0;
        padding: .75rem;
        border: 0;
        overflow: visible;
    }

    .question {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        margin: 0 0 1rem;
        padding: .5rem 0 1rem;
        overflow: visible;
    }

    .question fieldset,
    .question legend,
    .question .lead,
    .question p,
    .question label,
    .question li,
    .question th,
    .question td {
        width: auto;
        max-width: 100%;
        min-width: 0;
        white-space: normal;
        overflow: visible;
        overflow-wrap: anywhere;
        word-break: normal;
    }

    .question fieldset,
    .question legend {
        width: 100%;
    }

    .question ul,
    .question ol {
        max-width: 100%;
        padding-left: 0;
    }

    .question .field-row,
    .question .field-row label,
    .question-multiplechoice .field-row label,
    .question-singlechoice .field-row label,
    .question-singlechoiceopen .field-row label {
        display: block;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        height: auto;
    }

    .question .field-row label {
        padding-left: 2rem;
    }

    .question .field-row input.text-an {
        margin: .5rem 0 0;
    }

    .question table {
        width: 100%;
        max-width: 100%;
    }

    .responsive-question-layout-landscape,
    .table-responsive.js-scrollable {
        display: none;
    }

    .responsive-question-layout-portrait {
        display: block;
        width: 100%;
        max-width: 100%;
    }

    .attribute .choices .field-row > label {
        width: 100%;
    }

    .question-smiley .choices {
        justify-content: flex-start;
    }

    .question-smiley .field-row {
        width: auto;
        max-width: 100%;
    }

    .question-smiley .field-row label {
        width: auto;
    }

    .slider-block,
    .slider-inputs,
    .slider-handler-wrapper,
    .slider-input {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .slider-handler-wrapper {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr) auto;
        align-items: center;
        gap: .25rem;
    }

    .slider-handler-wrapper span:first-of-type,
    .slider-handler-wrapper span:last-of-type {
        padding: 0;
        text-align: start;
        overflow-wrap: anywhere;
    }

    .slider-handler {
        width: 100%;
        min-width: 0;
    }

    .slider-input {
        margin-top: .75rem;
        justify-content: flex-start;
    }

    .slider-input label {
        margin-left: 0;
    }

    .priority-wrapper .priority-widget {
        width: 100%;
        flex-direction: column;
    }

    .priority-wrapper .priority-draggables,
    .priority-wrapper .priority-box-wrapper,
    .priority-wrapper .priority-droppable,
    .priority-wrapper .priority-buttons {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .priority-wrapper .priority-box-wrapper {
        margin: 0;
    }

    .priority-wrapper .priority-buttons {
        flex-direction: row;
        margin: .5rem 0;
    }

    .priority-wrapper .priority-buttons > a {
        flex: 0 0 50px;
        transform: rotate(90deg);
    }

    .priority-wrapper .priority-buttons > a:first-of-type {
        margin: 0 1rem 0 0;
    }

    #map,
    .leaflet-container {
        width: 100%;
        max-width: 100%;
    }

    .leaflet-popup-content-wrapper,
    .leaflet-popup-tip-container {
        max-width: calc(100vw - 2rem);
    }

    .leaflet-popup-content {
        width: auto !important;
        max-width: calc(100vw - 4rem);
        margin: .75rem;
    }

    .error-summary {
        width: 100%;
        max-width: 100%;
        padding: .75rem;
    }

    .time-limit-modal {
        padding: .5rem;
        overflow-y: auto;
    }

    .time-limit-modal__content {
        width: 100%;
        max-width: 100%;
        max-height: calc(100vh - 1rem);
        padding: 1rem;
        overflow-y: auto;
    }

    .time-limit-modal__actions {
        flex-direction: column;
        align-items: stretch;
    }

    .time-limit-modal__actions .button-action {
        width: 100%;
        max-width: 100%;
    }

    #downloadPdfBtn {
        width: 100%;
        max-width: 100%;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    footer {
        height: auto;
        min-height: 0;
        padding: .5rem;
        overflow: visible;
    }

    footer.footer--middle {
        display: grid;
        grid-template-columns: auto auto 1fr auto;
        grid-template-rows: auto auto;
        gap: .25rem;
    }

    .footer--middle #progress-holder {
        grid-column: 1 / -1;
        grid-row: 1;
        width: 100%;
        min-width: 0;
    }

    .footer--middle #action-previous {
        grid-column: 1;
        grid-row: 2;
    }

    .footer--middle #action-home {
        grid-column: 2;
        grid-row: 2;
    }

    .footer--middle #action-next {
        grid-column: 4;
        grid-row: 2;
    }

    #action-previous,
    #action-home,
    #action-next {
        width: auto;
        min-width: 44px;
        max-width: none;
        min-height: 44px;
        padding: .35rem .5rem;
        font-size: 1rem;
        flex-basis: auto;
    }

    #action-previous .button-action__label,
    #action-next .button-action__label {
        display: inline;
        white-space: normal;
    }

    .footer--first,
    .footer--last {
        flex-wrap: wrap;
    }

    .footer--first img {
        max-width: calc(100% - 4rem);
        height: auto !important;
    }

    sidebar#alert-test {
        position: static;
    }
}

/*
 * At 200% zoom a 1280px viewport is roughly 640 CSS pixels wide. At this
 * width the navigation labels no longer fit beside the progress indicator.
 * Keep the footer one row high and use the labelled arrow buttons.
 */
@media screen and (max-width: 700px) {
    main {
        bottom: 60px;
    }

    footer {
        height: 60px;
        min-height: 60px;
        flex-wrap: nowrap;
        overflow: hidden;
    }

    #action-previous .button-action__label,
    #action-next .button-action__label {
        display: none;
    }

    #action-previous,
    #action-home,
    #action-next {
        width: 48px;
        min-width: 48px;
        max-width: 48px;
        min-height: 52px;
        padding: .25rem;
        flex: 0 0 48px;
    }

    div#progress-holder {
        flex: 1 1 auto;
        width: auto;
        min-width: 0;
    }
}

@media screen and (max-height: 576px) and (orientation: landscape) {
    header {
        height: 60px;
        background-color: white;
    }

    header #custom-logo img {
        max-height: 60px;
    }

    #logo {
        height: 50px;
        left: 40%;
        /*margin-left: -25%;*/
        margin-top: 5px;
        /*position: absolute;*/
    }

    #logo img {
        width: auto;
        max-height: 100%;
    }

    main {
        top: 60px;
        bottom: 60px;
    }

    main > h1 {
        text-align: center;
        margin: 0 20px;
    }

    form#intaketoken {
        width: 100%!important;
        height: 100%!important;
        padding: 60px 0 20px;
    }

    form#intaketoken div.flash {
        margin-top: 60px;
    }

    form {
        border: none;
        min-width: unset;
        width: 100%;
        max-width: unset;
        margin: unset;
        padding: 0 1em;
        box-sizing: border-box;
    }

    .question input[type=text],
    .question-open textarea {
        width: 80%!important;
        font-size: 1rem;
    }

    .question input[type=text].open-numeric {
        width: 5%!important;
        min-width: 100px;
    }

    .question .field-row input.text-an {
        margin-top: 10px;
    }

    select.question-dropdown {
        font-size: 1rem;
        color: #111111;
    }

    footer {
        height: 60px;
        display: flex;
        flex-direction: row;
        justify-content: flex-start;
    }

    #action-close, #action-previous, #action-next  {
        position: relative;
    }

    #action-previous {
        margin-right: auto;
    }

    #action-next {
        margin-left: auto;
    }

    div#progress-holder {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        width: min(52%, 320px);
        min-width: 150px;
        margin: 0;
    }

    div#progress-bar {
        width: 100%;
        margin: 10px 0;
        transform: none;
    }

    .button-action {
        padding: 0 10px;
        height: 100%;
    }

    .button-action > i {
        font-size: 1.8rem;
    }

    .button-action__label {
        display: none;
    }
}

#map {
    border: .05em solid #6b7280;
    border-radius: .5em;
    box-shadow: 0 .25em .5em #000; 
    box-sizing: border-box;
    height: 50vh;
    width: 100%;
}

.new-comment {
    border: 2px solid #007887;
    border-radius: .25em;
    padding: .25em;
    margin-bottom: 1em;
    width: 320px;
    max-width: 100%;
}

.new-comment:focus {
    border-color: #007887;
}

.save-comment {
    background-color: #007887;
    border: .25em solid #007887;
    border-radius: .25em;
    color: #fff;
    font-weight: bold;
    font-size: 1.2rem;
    padding: 0 1em;
    cursor: pointer;    
}

.save-comment:hover {
    background-color: #c2410c;
    border-color: #c2410c;
}


fieldset {
    border: 0;
    margin: 0;
    padding: 0;
}

legend {
    padding: 0;
}

.error-summary {
    background: #ffffff;
    color: #7a3f00;
    padding: 0.75rem 1.5rem;
    margin-bottom: 1rem;
    border-radius: 6px;
    border: 1px solid #7a3f00;
}

.error-summary > p {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin: 0;
    font-weight: 700;
}

.error-summary ul {
    margin: 0.5rem 0 0;
    padding-left: 1.25rem;
    list-style: disc;
}

.error-icon {
    display: inline-flex;
    flex: 0 0 auto;
    line-height: 1.2;
    color: inherit;
}

.error-text {
    font-weight: 600;
}

.error-summary li {
    margin-bottom: 0.25rem;
}

.error-summary li::marker {
    color: #7a3f00;
}

.error-summary li p,
.error-summary li a {
    color: inherit;
}

.error-summary li:last-child {
    margin-bottom: 0;
}

.time-limit-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.time-limit-modal__content {
    background: #fff;
    color: #111;
    max-width: 520px;
    width: calc(100% - 2rem);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    text-align: center;
}

.time-limit-modal__text {
    margin: 0.5rem 0;
}

.time-limit-modal__countdown {
    font-weight: bold;
    margin: 0.5rem 0 1rem;
}

.time-limit-modal__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.time-limit-modal__actions .button-action {
    background-color: #3e8cea;
    border-radius: 6px;
    color: #111;
    padding: 0.4rem 1rem;
    font-size: 1rem;
}

.time-limit-modal__actions .button-action:hover {
    background-color: #6fc18f;
}

.time-limit-modal__actions .button-action:focus,
.time-limit-modal__actions .button-action:focus-visible {
    box-shadow: 0 0 0 3px #82D9a8;
}

.time-limit-modal[aria-hidden="false"] {
    display: flex;
}

.responsive-question-layout-portrait {
    display: none;
}

.leaflet-popup-content {
    display: flex;
    flex-direction: column;
}

.leaflet-popup-content label {
    display: block;
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: .25rem;
}

.leaflet-popup-content textarea {
    display: block;
    min-height: 120px;
    width: 100%;
}

.leaflet-popup-content button {
    display: block;
}

@media screen and (max-width: 960px) {
    .leaflet-popup-content {
        border-color: red;
    }
}

@media screen and (max-width: 1280px) {
    .responsive-question-layout-landscape {
        display: none;
    }

    .responsive-question-layout-portrait {
        display: block;
    }
}

/*
 * User-controlled high contrast palette.
 *
 * These declarations deliberately use !important: questionnaire owners can add
 * their theme after this stylesheet and may also use inline styles. Scoping all
 * overrides to body.high-contrast restores the original theme as soon as the
 * user switches the mode off.
 */
.accessibility-menu {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
}

.accessibility-menu__toggle {
    align-items: center;
    background: #ffffff !important;
    border: 2px solid #121c5e !important;
    border-radius: .25rem;
    color: #121c5e !important;
    cursor: pointer;
    display: inline-flex;
    font-size: 1.6rem;
    height: 44px;
    justify-content: center;
    padding: 0;
    width: 44px;
}

.accessibility-menu__toggle * {
    color: inherit !important;
}

.accessibility-menu__toggle:hover {
    background: #121c5e !important;
    border-color: #121c5e !important;
    color: #ffffff !important;
}

.accessibility-menu__toggle:focus,
.accessibility-menu__toggle:focus-visible {
    box-shadow: 0 0 0 6px #ffffff !important;
    outline: 3px solid #121c5e !important;
    outline-offset: 3px;
}

.accessibility-menu__toggle:active {
    background: #121c5e !important;
    border-color: #121c5e !important;
    color: #ffffff !important;
}

.accessibility-menu__panel {
    background: #ffffff;
    border: 2px solid #121c5e;
    border-radius: .25rem;
    box-shadow: 0 .25rem .75rem rgba(18, 28, 94, .25);
    color: #121c5e;
    min-width: 240px;
    padding: 1rem;
    position: absolute;
    right: 0;
    top: calc(100% + .5rem);
}

.accessibility-menu__panel[hidden] {
    display: none !important;
}

.contrast-switch {
    align-items: center;
    color: #121c5e;
    cursor: pointer;
    display: flex;
    font-weight: 700;
    gap: 1rem;
    justify-content: space-between;
}

.contrast-switch input {
    height: 1px;
    opacity: 0;
    position: absolute;
    width: 1px;
}

.contrast-switch__visual {
    background: #ffffff;
    border: 2px solid #121c5e;
    border-radius: 1rem;
    display: inline-block;
    flex: 0 0 auto;
    height: 28px;
    position: relative;
    width: 50px;
}

.contrast-switch__visual::after {
    background: #121c5e;
    border-radius: 50%;
    content: "";
    height: 20px;
    left: 2px;
    position: absolute;
    top: 2px;
    transition: transform .15s ease;
    width: 20px;
}

.contrast-switch input:checked + .contrast-switch__visual::after {
    transform: translateX(22px);
}

.contrast-switch input:focus + .contrast-switch__visual,
.contrast-switch input:focus-visible + .contrast-switch__visual {
    outline: 3px solid #121c5e;
    outline-offset: 3px;
}

body.high-contrast,
body.high-contrast header,
body.high-contrast main,
body.high-contrast footer,
body.high-contrast form,
body.high-contrast .question,
body.high-contrast .priority-box,
body.high-contrast .time-limit-modal__content,
body.high-contrast .leaflet-popup-content,
body.high-contrast sidebar#alert-test {
    background-color: #ffffff !important;
    background-image: none !important;
    border-color: #121c5e !important;
    color: #121c5e !important;
    opacity: 1 !important;
}

body.high-contrast,
body.high-contrast p,
body.high-contrast span,
body.high-contrast div,
body.high-contrast label,
body.high-contrast legend,
body.high-contrast th,
body.high-contrast td,
body.high-contrast h1,
body.high-contrast h2,
body.high-contrast h3,
body.high-contrast h4,
body.high-contrast h5,
body.high-contrast h6 {
    color: #121c5e !important;
    text-shadow: none !important;
}

body.high-contrast a,
body.high-contrast a:visited {
    color: #121c5e !important;
}

body.high-contrast a:hover {
    background-color: #121c5e !important;
    color: #ffffff !important;
}

body.high-contrast button:not(:disabled),
body.high-contrast .button-action:not(:disabled),
body.high-contrast .save-comment:not(:disabled),
body.high-contrast .priority-item:not(:disabled) {
    background-color: #121c5e !important;
    border: 2px solid #121c5e !important;
    color: #ffffff !important;
    opacity: 1 !important;
    text-shadow: none !important;
}

body.high-contrast button:not(:disabled) *,
body.high-contrast .button-action:not(:disabled) *,
body.high-contrast .save-comment:not(:disabled) *,
body.high-contrast .priority-item:not(:disabled) * {
    color: #ffffff !important;
}

body.high-contrast button:not(:disabled):hover,
body.high-contrast .button-action:not(:disabled):hover,
body.high-contrast .save-comment:not(:disabled):hover,
body.high-contrast .priority-item:not(:disabled):hover {
    background-color: #ffffff !important;
    border-color: #121c5e !important;
    color: #121c5e !important;
}

body.high-contrast button:not(:disabled):hover *,
body.high-contrast .button-action:not(:disabled):hover *,
body.high-contrast .save-comment:not(:disabled):hover *,
body.high-contrast .priority-item:not(:disabled):hover * {
    color: #121c5e !important;
}

body.high-contrast button:not(:disabled):active,
body.high-contrast .button-action:not(:disabled):active,
body.high-contrast .save-comment:not(:disabled):active,
body.high-contrast .priority-item:not(:disabled):active,
body.high-contrast .priority-item[aria-pressed="true"] {
    border-color: #121c5e !important;
    color: #121c5e !important;
}

body.high-contrast button:not(:disabled):active *,
body.high-contrast .button-action:not(:disabled):active *,
body.high-contrast .save-comment:not(:disabled):active *,
body.high-contrast .priority-item:not(:disabled):active *,
body.high-contrast .priority-item[aria-pressed="true"] * {
    color: #121c5e !important;
}

body.high-contrast .priority-item[aria-pressed="true"]:hover,
body.high-contrast .priority-item[aria-pressed="true"]:hover * {
    background-color: #ffffff !important;
    border-color: #121c5e !important;
    color: #121c5e !important;
}

body.high-contrast button:disabled,
body.high-contrast input:disabled,
body.high-contrast select:disabled,
body.high-contrast textarea:disabled,
body.high-contrast [aria-disabled="true"] {
    background-color: #595959 !important;
    border: 2px dashed #ffffff !important;
    color: #ffffff !important;
    opacity: 1 !important;
}

body.high-contrast input:not([type="checkbox"]):not([type="radio"]),
body.high-contrast select,
body.high-contrast textarea {
    background-color: #ffffff !important;
    border: 2px solid #121c5e !important;
    color: #121c5e !important;
}

body.high-contrast input::placeholder,
body.high-contrast textarea::placeholder {
    color: #595959 !important;
    opacity: 1 !important;
}

body.high-contrast .checkmark,
body.high-contrast .radiomark {
    background-color: #ffffff !important;
    border-color: #121c5e !important;
}

body.high-contrast .field-row input:checked ~ .checkmark,
body.high-contrast .field-row input:checked ~ .radiomark {
    background-color: #ffffff !important;
    border-color: #121c5e !important;
    color: #121c5e !important;
}

body.high-contrast .checked-bg {
    background-color: #82d9a8 !important;
    border-color: #121c5e !important;
    color: #121c5e !important;
}

body.high-contrast .field-row input:checked ~ .checkmark::after,
body.high-contrast .field-row input:checked ~ .radiomark::after {
    border-color: #121c5e !important;
}

body.high-contrast .field-row input:focus ~ .checkmark,
body.high-contrast .field-row input:focus ~ .radiomark,
body.high-contrast .field-row input:focus-visible ~ .checkmark,
body.high-contrast .field-row input:focus-visible ~ .radiomark {
    box-shadow: 0 0 0 3px #121c5e !important;
}

body.high-contrast :focus,
body.high-contrast :focus-visible {
    outline: 3px solid #121c5e !important;
    outline-offset: 3px !important;
    box-shadow: none !important;
}

footer .button-action:focus,
footer .button-action:focus-visible {
    box-shadow:
        inset 0 0 0 3px #121c5e,
        inset 0 0 0 6px #ffffff !important;
    outline: none !important;
}

body.high-contrast .error-summary,
body.high-contrast .error-text,
body.high-contrast [role="alert"] {
    background-color: #8b0000 !important;
    border-color: #ffffff !important;
    color: #ffffff !important;
}

body.high-contrast .error-summary *,
body.high-contrast [role="alert"] * {
    color: #ffffff !important;
}

body.high-contrast .error-summary li::marker {
    color: #ffffff !important;
}

body.high-contrast .time-limit-modal {
    background: rgba(18, 28, 94, .85) !important;
}

body.high-contrast #progress-bar {
    background-color: #ffffff !important;
    border: 2px solid #121c5e !important;
}

body.high-contrast #progress-indicator {
    background-color: #121c5e !important;
}

body.high-contrast #progress-indicator span {
    color: #ffffff !important;
    text-shadow: none !important;
}

body.high-contrast .ui-slider,
body.high-contrast .ui-widget-content {
    background: #ffffff !important;
    border-color: #121c5e !important;
    color: #121c5e !important;
}

body.high-contrast .ui-slider-handle,
body.high-contrast .ui-state-active,
body.high-contrast .ui-state-selected {
    background: #ffffff !important;
    border-color: #121c5e !important;
    color: #121c5e !important;
}

body.high-contrast .accessibility-menu__toggle {
    background: #ffffff !important;
    border-color: #121c5e !important;
    color: #121c5e !important;
}

body.high-contrast .accessibility-menu__toggle * {
    color: #121c5e !important;
}

body.high-contrast .accessibility-menu__toggle:hover {
    background: #121c5e !important;
    color: #ffffff !important;
}

body.high-contrast .accessibility-menu__toggle:hover * {
    color: #ffffff !important;
}

body.high-contrast .accessibility-menu__toggle:active {
    background: #121c5e !important;
    color: #ffffff !important;
}

body.high-contrast .accessibility-menu__toggle:active * {
    color: #ffffff !important;
}

@media screen and (max-width: 720px) {
    .accessibility-menu {
        right: .5rem;
    }

    .accessibility-menu__panel {
        min-width: 220px;
    }
}
