:root {
    --light-gray: #F9FAFB;
    --light-gray-2: #f6f6f6;
    --light-gray-3: #b1b1b1;
    --gray: #DEDEDE;
    --dark-gray: #61676C;
    --white: #ffffff;
    --primary: #032849;
    --black: #000000;
    --transparent-white: rgba(255, 255, 255, 0.75);
    --gray-2: #C1C2C4;
    --link-color: #0083B7;
    --link-hover: #19314F;
    --dark-primary: #19314F;
    --dark-primary-2: #21416A;
    --light-primary: #0083B7;
    --light-primary-2: #D6E4F1;
    --accent: #FEE003;
    --alert-error-text: #e53935;
    --alert-error-background: rgba(229, 140, 140, 0.13);
    --alert-success-text: #0b5910;
    --alert-success-background: rgba(11, 89, 16, 0.1);
    --mobile-bottom-url-bar-height: 4vh;
}

* {
    box-sizing: border-box;
    background-color: transparent;
    margin: 0;
    padding: 0;
    border: 0;
}

body {
    background: #FFFFFF;
    font-family: 'Open Sans', sans-serif;
    font-size: 16px;
    line-height: 1.5;
}

a {
    color: var(--link-color);
    text-decoration: none;
    cursor: pointer;
}

a:hover {
    color: var(--dark-primary-2);
}

h2 {
    margin: 0.25em 0;
    font-family: 'Maitree';
    font-style: normal;
    font-weight: 200;
    font-size: 2.25em;
    letter-spacing: -0.01em;
    line-height: 1.1;
}

.link-style-1 {
    font-family: 'Open Sans';
    font-style: normal;
    font-weight: 400;
    font-size: 0.875em;
    line-height: 1.1875em;
    text-decoration-line: underline;
    color: var(--white);
}

.link-style-1:hover {
    color: var(--link-color);
}

.link-thin {
    font-weight: 100;
}

.link-small {
    font-size: 0.875em;
}

li {
    list-style: none;
}

.text-style-1 {
    font-family: 'Open Sans';
    font-style: normal;
    font-weight: 400;
    font-size: 0.875em;
    line-height: 1.25em;
    letter-spacing: -0.01em;
    color: var(--white);
}

.text-style-2 {
    font-family: 'Open Sans';
    font-style: normal;
    font-weight: 400;
    font-size: 0.75em;
    line-height: 1em;
    text-align: center;
    letter-spacing: -0.01em;
    color: var(--gray-2);
}

.main-container {
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: row;
    overflow: hidden;
}

#side-menu-container {
    width: 29.375em;
    height: 100%;
    position: relative;
}

#side-menu {
    width: 100%;
    height: 100%;
    min-height: 100%;
    background-color: var(--dark-primary);
    display: flex;
    flex-direction: column;
    padding: 0 2.5em;
}

body.side-menu-hidden #side-menu-container {
    width: 0;
    padding: 0;
}

body.side-menu-hidden #side-menu {
    display: none;
}

.side-menu-header {
    width: 100%;
    padding: 1em 0;
}

.side-menu-logo {
    display: block;
    background-image: url("../assets/contourmap/logo-line.svg");
    height: 1.4375em;
    width: 19.125em;
    background-size: 19.125em 1.4375em;
}

#side-menu-toggle-button {
    z-index: 10000;
    background-color: var(--dark-primary-2);
    width: 1.5em;
    height: 3em;
    position: absolute;
    right: -1.5em;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0 0.625em 0.625em 0;
    top: calc(50% - 1.5em);
}

#side-menu-toggle-button:hover {
    background-color: var(--dark-primary);
    cursor: pointer;
}

.side-menu-toggle-icon {
    display: block;
    width: 1em;
    height: 1em;
    background-size: 1em 1em;
}

#side-menu-container .side-menu-toggle-icon {
    background-image: url("../assets/contourmap/arrow_hide-idle.svg");
}

body:not(.side-menu-open) .side-menu-toggle-icon {
    background-image: url("../assets/contourmap/arrow_show-idle.svg");
}

#mobile-menu-button {
    width: 1.75em;
    height: 1em;
    background-size: 1.75em 1em;
    background-image: url("../assets/contourmap/menu_button-idle.svg");
    position: absolute;
    right: 1em;
    top: 1.5em;
    display: none;
}

body.side-menu-open #side-menu-container #mobile-menu-button {
    background-image: url("../assets/contourmap/menu_button-active.svg");
}

.mobile-subheader {
    display: none;
    background-color: var(--light-gray-2);
    font-size: 0.75em;
    padding: 0.5em;
    color: var(--light-primary);
    text-align: center;
    box-shadow: 0 0.1875em 0.375em rgba(0, 0, 0, 0.16), 0 0.1875em 0.375em rgba(0, 0, 0, 0.23);
}

.side-menu-title {
    margin: 0.25em 0;
    font-family: 'Maitree';
    font-style: normal;
    font-weight: 400;
    font-size: 2.625em;
    letter-spacing: -0.01em;
    color: #FFFFFF;
}

.side-menu-message {
    display: none;
    margin: 0.875em 0 0.125em;
    padding: 0 0.125em;
    font-weight: 300;
    text-align: center;
    font-size: 0.875em;
    color: var(--primary)
}

.side-menu-message.visible {
    display: block;
}

.side-menu-message.info {
    color: var(--dark-primary);
    background-color: var(--white);
}

.side-menu-message:hover {
    background-color: var(--dark-primary-2);
    cursor: pointer;
}

.side-menu-message.error {
    background-color: var(--alert-error-text);
    color: var(--white)
}

.side-menu-message.error:hover {
    background-color: var(--alert-error-background);
    cursor: pointer;
}

.side-menu-message.success {
    color: var(--white);
    background-color: var(--alert-success-text);
}

.side-menu-message.success:hover {
    background-color: var(--alert-success-background) !important;
    cursor: pointer;
}

.side-menu-body {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding-bottom: 1.25em
}

#map-data {
    flex: 1;
}

.side-menu-form {
    box-sizing: border-box;
}

.side-menu-label {
    display: block;
    margin-bottom: 0.25em;
    font-family: 'Work Sans';
    font-style: normal;
    font-weight: 400;
    font-size: 0.875em;
    line-height: 1.1875em;
    color: var(--white);
}

.date-input-container > button {
    width: 30px;
    cursor: pointer;
}

.date-input-container > button:disabled,
.date-input-container > input#id_at_date:disabled {
    opacity: 0.5;
}

.side-menu-form-container {
    position: relative;
    margin-top: 1.25em;

}

/* TODO: Remove after deploying date stepper */
.side-menu-form-buttons {
    width: 100%;
    display: flex;
}

.side-menu-form-button, .side-menu-input {
    flex: 1 1 auto;
    background-color: var(--light-gray);
    margin-right: 0.25em;
    height: 2.5em;
    color: var(--primary);
    border-radius: 0.125em;
    font-weight: 300;
}

.side-menu-form-button.submit {
    background-color: var(--accent);
    border: none;
}


.side-menu-form-button:hover {
    background-color: var(--light-primary);
    color: var(--light-gray);
    cursor: pointer;
}

.side-menu-form-button.submit.htmx-request {
    pointer-events: none;
    background-color: var(--light-gray-3);
}

.side-menu-form-button.submit.htmx-request .button-label {
    display: none;
}

.date-controls.htmx-request .date-input-container {
    opacity: 0.5;
}

.side-menu-form-button:last-child {
    margin-right: 0;
}

/* END TODO */

.side-menu-underform {
    margin: 0 1em;
}

.side-menu-underform p {
    text-align: center;
    font-size: 0.875em;
    color: var(--primary);
    font-weight: 300;
}

.side-menu-input {
    width: 100%;
    height: 3em;
    padding: 0 1em;
    flex: 1 1 auto;
    background-color: var(--dark-primary-2);
    color: var(--white);
    border-radius: 0.125em;
    display: flex;
    flex-direction: row;
    align-items: center;
    font-family: 'Maitree';
    font-style: normal;
    font-weight: 400;
    font-size: 0.9375em;
    line-height: 1.5625em;
    letter-spacing: -0.01em;
}

.side-menu-input.with-icon {
    padding-right: 3.5em;
}

.side-menu-radio-container {
    display: flex;
    margin-bottom: 0.25em;
}

.side-menu-row {
    flex: 1;
    border: solid 0.0625em var(--dark-primary);
    position: relative;
}

.side-menu-row input[type="radio"] {
    position: absolute;
    opacity: 0.01;
    z-index: 100;
}

.side-menu-radio-label {
    display: block;
    font-weight: 300;
    color: var(--white);
    width: 100%;
    height: 100%;
    text-align: center;
    padding: 0.625em;
    background-color: var(--dark-primary-2);
    border-radius: 0.125em;
    cursor: pointer;
}

.side-menu-radio-label:hover {
    background-color: var(--light-primary);
}

.side-menu-row input[type="radio"]:checked + .side-menu-radio-label {
    background-color: var(--light-primary);
}

.search-button {
    display: block;
    width: 1em;
    height: 1em;
    background-image: url("../assets/contourmap/search_icon.svg");
    background-size: 1em 1em;
    position: absolute;
    right: 1em;
    bottom: 0.8125em;
}

.search-button:hover {
    background-image: url("../assets/contourmap/search_icon_hover.svg");
}

.input-clear-button {
    visibility: hidden;
    width: 0.75em;
    height: 0.75em;
    background-image: url("../assets/contourmap/clear_input.svg");
    background-size: 0.75em 0.75em;
    position: absolute;
    right: 3em;
    top: 2.4em;
}

.input-clear-button.visible {
    visibility: visible;
}

.input-clear-button:hover {
    background-image: url("../assets/contourmap/clear_input_hover.svg");
}

.side-menu-footer {
    align-self: center;
    display: flex;
    flex-direction: column;
    width: 100%;
    bottom: 1.25em;
}

.autocomplete-list {
    display: none;
    position: absolute;
    border-radius: 0.125em;
    background-color: var(--dark-primary-2);
    width: 100%;
    border-top: solid 0.25em var(--dark-primary);
    z-index: 30000;
}

#location-search-results.visible {
    display: block;
}

#location-search-results-overlay {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 20000;
}

#location-search-results-overlay.visible {
    display: block;
}

.autocomplete-list-item {
    display: block;
    padding: 0.5em 1em;
    font-family: 'Open Sans';
    color: var(--white);
    font-style: normal;
    font-weight: 400;
    font-size: 0.9375em;
}

.autocomplete-list-item:hover {
    color: var(--gray-2);
    cursor: pointer;
}

.side-menu-footer-sitemap {
    padding: 0.25em;
    font-size: 0.75em;
    color: var(--dark-gray);
    width: 100%;
    background-color: var(--gray);
    text-align: center;
}

.side-menu-footer-sitemap:hover {
    color: var(--primary);
}

.side-menu-footer-button {
    position: relative;
    background: var(--accent);
    color: var(--primary);
    font-weight: 300;
    margin-bottom: 1em;
    padding: 0.75em 1em;
    gap: 1.25em;
    width: 8.5625em;
    border-radius: 0.125em;
    text-align: left;
}

#share-url-notification {
    visibility: hidden;
    background-color: var(--light-primary-2);
    border-radius: 1.25em;
    width: 8.5625em;
    padding: 0 0.25em;
    margin-bottom: 1.5em;
    font-weight: 300;
    color: var(--primary);
    gap: 1.25em;
    text-align: center;
    cursor: pointer;
}

#share-url-notification.error {
    background-color: var(--alert-error-text);
    color: var(--white);
}

#share-url-notification.visible {
    visibility: visible;
}

.side-menu-footer-button:hover {
    background-color: var(--light-primary);
    color: var(--light-gray);
    cursor: pointer;
}

.side-menu-footer-button .icon {
    display: block;
    position: absolute;
    right: 0.5em;
    top: 0.5em;
    width: 1.5em;
    height: 1.5em;
    background-size: 1.5em 1.5em;
}

.side-menu-footer-button .icon.icon-share {
    background-image: url("../assets/contourmap/icon_share-idle.svg");
}

.side-menu-footer-button:hover .icon.icon-share {
    background-image: url("../assets/contourmap/icon_share-hover.svg");
}

#side-menu-sign-up {
    display: flex;
    flex-direction: row;
    margin-bottom: 1.5em;
    align-items: center;
}

.side-menu-sign-up-block {
    display: block;
    flex: 1;
}

.side-menu-sign-up-arrow {
    display: block;
    width: 2em;
    height: 2em;
    background-size: 2em 2em;
    background-image: url("../assets/contourmap/arrow-right.svg");
}

.side-menu-footer-link {
    font-family: 'Work Sans';
    font-style: normal;
    font-weight: 700;
    font-size: 1.25em;
    line-height: 1.625em;
    display: flex;
    align-items: center;
    color: var(--white);
    letter-spacing: -0.01em;
    width: 80%;
    margin-right: 8px;
}

#side-menu-sign-up:hover .side-menu-footer-link {
    color: var(--link-color);
}

#side-menu-sign-up:hover .side-menu-sign-up-arrow {
    background-image: url("../assets/contourmap/arrow-right-hover.svg");
}

.map-container {
    height: 100%;
    flex: 1;
    position: relative;
    display: flex;
    justify-content: center;
}

#map {
    width: 100%;
    height: 100%;
}

.map-overlay {
    position: absolute;
    height: 100%;
    z-index: 10000;
    top: 0;
    width: 100%;
    display: flex;
    flex-direction: row;
    padding: 0.5em;
    pointer-events: none;
}

.main-notification-container {
    flex: 1;
    margin-right: 0.5em;
}

#main-notification {
    pointer-events: initial;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 0.5em;
    font-weight: 400;
    cursor: pointer;
}

#main-notification.visible {
    display: flex;
}

#main-notification.success {
    background-color: var(--alert-success-background);
    color: var(--alert-success-text);
}

#main-notification.error {
    color: var(--alert-error-text);
    background-color: var(--alert-error-background);
}

.legend-outer-container {
    display: flex;
    flex-direction: column;
    width: 24.25em;
}

.legend-content {
    position: relative;
}

.legend-container {
    padding: 0.625em 1em;
    background-color: var(--transparent-white);
    border: solid 0.0625em #cccccc;
    display: flex;
    flex-direction: column;
}

/* Explainer Panel */

.explainer-container {
    margin-top: 10px;
    padding: 0.625em 0.625em;
    background-color: white;
    display: flex;
    flex-direction: column;
    pointer-events: initial;
    overflow: auto;
}

.explainer-container h2 {
    margin: 0.25em 0;
    font-family: 'Maitree';
    font-style: normal;
    font-weight: 200;
    font-size: 2.25em;
    letter-spacing: -0.01em;
    line-height: 1.1;
}

.explainer-container h4 {
    font-size: 1.3em;
    font-weight: 600;
    margin: 22px 0 5px 0;
    line-height: 1.3;
}


.explainer-content {
    display: flex;
    flex-direction: column;
}

.explainer-header {
    display: flex;
    justify-content: end;
}

.explainer-header button {
    cursor: pointer;
}

.explainer-youtube-thumbnail {
    width: 100%;
}

.explainer-learn-more {
    display: flex;
    align-items: center;
    margin: 20px 0 20px;
}

.explainer-learn-more a {
    margin-right: 8px;
    font-weight: bold;
    font-size: 0.9em;
}

table.csi-scale th {
    font-weight: normal;
}

table.csi-scale th, td:first-child {
    text-align: center;
}

table.csi-scale th, td {
    padding: 8px;
}

table.csi-scale td {
    border: 1px solid #C1C2C4;
}


table.csi-scale {
    border-collapse: collapse;
    width: 100%;
    margin-top: 5px;
}

table.csi-scale th {
    background-color: white;
    color: #000;
}

table.csi-scale tr:nth-child(2) {
    background-color: #F1F1F1;
}
table.csi-scale tr:nth-child(3) {
    background-color: #F7B826;
}
table.csi-scale tr:nth-child(4) {
    background-color: #F44B16;
}
table.csi-scale tr:nth-child(5) {
    background-color: #C91D1B;
}
table.csi-scale tr:nth-child(6) {
    background-color: #8D0006;
}
table.csi-scale tr:nth-child(7) {
    background-color: #4E0002;
}
table.csi-scale tr:nth-child(8) {
    background-color: #DDDDDD;
}
table.csi-scale tr:nth-child(9) {
    background-color: #C4C4C4;
}
table.csi-scale tr:nth-child(10) {
    background-color: #999999;
}
table.csi-scale tr:nth-child(11) {
    background-color: #737373;
}
table.csi-scale tr:nth-child(12) {
    background-color: #545454;
}

table.csi-scale tr:nth-child(4),
table.csi-scale tr:nth-child(5),
table.csi-scale tr:nth-child(6),
table.csi-scale tr:nth-child(7),
table.csi-scale tr:nth-child(10),
table.csi-scale tr:nth-child(11),
table.csi-scale tr:nth-child(12) {
    color: white;
}

/* END Explainer Panel */

.legend-title {
    font-size: 1.67em;
    font-weight: 400;
    text-align: center;
}

.legend-subtitle {
    font-size: 0.8125em;
    font-weight: 400;
    text-align: center;
    margin-bottom: 1em;
}

.legend-row {
    display: flex;
    flex-direction: row;
}

.legend-color {
    flex: 1;
    text-align: center;
    height: 2em;
    padding: 4px 0;
}

.legend-color.light {
    color: var(--white);
}

.legend-color.dark {
    color: var(--black)
}

.legend-arrow {
    flex: 1;
    display: flex;
    flex-direction: row;
    height: 0.5em;
    align-self: center;
    margin: 0 0.5em;
}

.legend-arrow-left {
    display: block;
    width: 0.5em;
    height: 0.5em;
    background-size: 0.5em 0.5em;
    background-image: url("../assets/contourmap/arrow_head_left.svg");
}

.legend-arrow-right {
    display: block;
    width: 0.5em;
    height: 0.5em;
    background-size: 0.5em 0.5em;
    background-image: url("../assets/contourmap/arrow_head_right.svg");
}

.legend-arrow-middle {
    display: block;
    flex: 1;
    height: 0.5em;
    background-size: 0.5em 0.5em;
    background-image: url("../assets/contourmap/arrow_base.svg");
}

.legend-footer {
    margin-top: .5em;
    display: flex;
    flex-direction: row;
    pointer-events: initial;
}

.legend-footer-block {
    flex: 1;
    display: flex;
    flex-direction: row;
    align-items: center;
}

.legend-hashed {
    display: block;
    width: 1.5em;
    height: 1.5em;
    background-image: url("../assets/contourmap/dash-pattern-clear.svg");
    background-size: 1.5em 1.5em;
    border: solid 0.0625em var(--black);
}

.legend-hashed-tooltip {
    display: none;
    position: absolute;
    background-color: #fff;
    border: solid 0.0625em #ccc;
    padding: 0.25em 0.5em;
    right: 0.15em;
    bottom: 2.7em;
    border-radius: 0.125em;
    box-shadow: 0 0.1875em 0.375em rgba(0, 0, 0, 0.16), 0 0.1875em 0.375em rgba(0, 0, 0, 0.23);
    text-align: center;
}

.legend-footer-block:hover .legend-hashed-tooltip {
    display: block;
}

.legend-hashed-tooltip-icon {
    width: 0.875em;
    height: 0.875em;
    background-image: url("../assets/contourmap/question-mark.svg");
    background-size: 0.875em 0.875em;
    margin-left: 0.25em;
}

.legend-hashed-text {
    margin-left: 0.375em;
    font-size: 0.8125em;
}

.legend-footer .link-1 {
    font-size: 0.8125em;
}

#legend-button {
    display: none;
}

#mode {
    position: absolute;
    top: 1em;
    right: 1em;
    z-index: 1000;
    border-radius: 0.125em;
}

.switch {
    position: relative;
    display: inline-block;
    width: 1.875em;
    height: 1.0625em;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    -webkit-transition: .4s;
    transition: .4s;
    border: solid 0.0625em white;
}

.slider:before {
    position: absolute;
    content: "";
    height: 0.75em;
    width: 0.8125em;
    left: 0.125em;
    bottom: 0.125em;
    background-color: white;
    -webkit-transition: .4s;
    transition: .4s;
}

input:checked + .slider {
    background-color: #353535;
}

input:focus + .slider {
    box-shadow: 0 0 0.0625em #353535;
}

input:checked + .slider:before {
    -webkit-transform: translateX(0.8125em);
    -ms-transform: translateX(0.8125em);
    transform: translateX(0.8125em);
}

/* Rounded sliders */
.slider.round {
    border-radius: 2em;
}

.slider.round:before {
    border-radius: 50%;
}

#mode input[type="radio"] {
    margin: 0 0.125em;
}

.date-input-container, .date-controls {
    width: 100%;
}

.date-controls, .date-input-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.date-controls.htmx-request .lds-ring {
    display: inline-block;
    position: absolute;
}

.date-controls.htmx-request .lds-ring div {
    border-color: white transparent transparent transparent;
}

/* TODO: Remove after deploying date stepper */
/*Loading spinner*/
#submit-button.htmx-request .lds-ring, .htmx-request .context-menu .lds-ring {
    display: inline-block;
}

.lds-ring {
    display: none;
    position: relative;
    width: 1.5em;
    height: 1.5em;
}

.lds-ring div {
    box-sizing: border-box;
    display: block;
    position: absolute;
    width: 1.5em;
    height: 1.5em;
    margin: 0.1875em;
    border: 0.1875em solid var(--primary);
    border-radius: 50%;
    animation: lds-ring 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
    border-color: var(--primary) transparent transparent transparent;
}

.lds-ring div:nth-child(1) {
    animation-delay: -0.45s;
}

.lds-ring div:nth-child(2) {
    animation-delay: -0.3s;
}

.lds-ring div:nth-child(3) {
    animation-delay: -0.15s;
}

.notification-box {
    position: absolute;
    z-index: 2000;
    width: calc(100% - 1em);
    padding: 0.5em 2em;
    text-align: center;
}

.notification-box:hover {
    cursor: pointer;
}

.notification-box.error {
    background-color: var(--alert-error-background);
    color: var(--alert-error-text);
}

.notification-box.success {
    background-color: var(--alert-success-background);
    color: var(--alert-success-text);

}

.context-menu {
    background-color: var(--white);
    position: absolute;
    z-index: 2000;
    display: none;
    flex-direction: column;
    min-width: 15.625em;
    max-width: 18.75em;
    bottom: 0;
    box-shadow: 0 0.1875em 0.375em rgba(0, 0, 0, 0.16), 0 0.1875em 0.375em rgba(0, 0, 0, 0.23);
    height: fit-content;
}

.context-menu.visible {
    display: flex;
}

.context-menu-item {
    padding: 0.5em 1em;
    text-align: center;
    color: var(--primary);
    font-weight: 300;
}

.context-menu-centered {
    top: 50% !important;
    left: 50% !important;
}


.context-menu-item:hover {
    background-color: var(--light-gray-2);
    cursor: pointer;
}

.context-menu-separator {
    background-color: var(--light-gray-2);
    box-sizing: border-box;
    height: 0.0625em;
    width: calc(100% - 2em);
    margin: 0 1em;
}

.leaflet-contextmenu-item {
    text-align: center !important;
}

#location-data {
    padding: 0.5em 1em;
    font-size: 0.75em;
    display: none;
    flex-direction: column;
    bottom: 0;
    height: fit-content;
    color: var(--primary);
}

#location-data.visible {
    display: flex;
}

#context-menu-data.hidden {
    display: none;
}

.htmx-request .context-menu-button-label {
    display: none;
}

.centered-bottom-block-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-right: 2em;
}

.centered-bottom-block-column:last-child {
    margin-right: 0;
}

.info-label {
    font-size: 0.75em;
    font-weight: 300;
}

.info-value {
    font-size: 1em;
    font-weight: bold;
    margin-top: 0.25em;
}

@keyframes lds-ring {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@media only screen and (max-width: 1366px) {
    body {
        font-size: 14px;
    }
}

/*tablet and phones*/
@media only screen and (max-width: 1024px) {
    .main-container {
        flex-direction: column;
    }

    #side-menu-toggle-button {
        display: none;
    }

    #side-menu-container {
        height: auto;
        width: 100%;
    }

    body.side-menu-open:not(.explainer-open) #side-menu-container {
        height: 100%;
    }

    body.side-menu-open:not(.explainer-open) .side-menu-body {
        display: flex;
    }

    .side-menu-body {
        display: none;
    }

    .side-menu-footer-link {
        width: auto;
    }

    .side-menu-header {
        height: 4em;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .input-clear-button {
        right: 3em
    }

    #mobile-menu-button {
        display: block;
    }

    body.side-menu-open .mobile-subheader {
        box-shadow: none;
    }

    body.side-menu-open:not(.explainer-open) #map-container {
        display: none;
    }

    #legend-button {
        display: block;
        width: 1.875em;
        height: 1.875em;
        padding: 0.25em 0;
        font-size: 1em;
        background-color: var(--white);
        border-radius: 0.125em;
        border: solid 0.0625em #ccc;
        text-align: center;
        color: #000;
        position: absolute;
        top: 0;
        right: 0;
        cursor: pointer;
        pointer-events: initial;
    }

    body.legend-open #legend-button {
        background-color: var(--link-color);
        color: var(--white);
    }

    .legend-container {
        display: none;
    }

    body.legend-open:not(.explainer-open) .legend-container {
        display: flex;
    }

    body.explainer-open #legend-button {
        display: none;
    }

    .side-menu-message {
        top: 6em;
        margin: 0;
        padding: 0.125em;
        width: 100%;
    }

    .context-menu {
        bottom: 2em !important;
        top: auto !important;
        left: auto !important;
        margin: auto;
        margin-bottom: var(--mobile-bottom-url-bar-height);
        max-width: 90%;
        min-width: 90%;
    }


/* small phones */
@media only screen and (max-width: 400px) {
    .side-menu-logo {
        width: 213px;
        height: 16px;
        background-size: 213px 16px;
    }

    .side-menu-title {
        font-size: 2em;
    }

    .legend-container {
        width: 100%;
        margin: 0;
    }
}

/* smaller phones */
@media only screen and (max-width: 370px) {
    .side-menu-title {
        font-size: 1.75em;
    }
}
