.map-container {
    position: relative;
}

.map-container > * {
    height: 43em;
}

#map-overlay {
    display: none;
    position: absolute;
    z-index: 1;
}

.map-overlay-pane {
    display: flex;
    flex-direction: column;
    min-width: 14em;
    max-width: 20.5em;
    box-sizing: border-box;
    background: white;
    border: var(--dark-grey-border-style);
}

.map-overlay-pane > div {
    flex-grow: 1;
}

.map-overlay-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--lighter-grey);
    border-bottom: var(--light-grey-border-style);
}

.map-overlay-header-title {
    width: 100%;
    font-family: Arial, Helvetica, sans-serif;
    font-weight: bold;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.hide-map-overlay {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.4em;
    height: 1.4em;
    font-size: 1.2em;
}

.hide-map-overlay[onclick]:hover, #map-overlay-content tr:hover td {
    background: var(--light-grey);
    cursor: pointer;
}

#map-overlay-content {
    flex: auto;
    padding: 0.4em 0.2em;
    overflow: auto;
}

#map-overlay-footer {
    display: none; /* NOTE: Initially hidden to work around #map-overlay briefly displaying as block before flex; see map.js */
    background: var(--lighter-grey);
    border-top: var(--light-grey-border-style);
}

#map-overlay table {
    width: 100%;
    table-layout: unset;
    border-collapse: collapse;
}

#map-overlay th, #map-overlay td {
    padding: 0.5em 0.6em;
    text-align: center;
}

#map-overlay th, #map-overlay-content td.marker-name {
    font-weight: bold;
    white-space: nowrap;
}

#map-overlay-content td.name, #map-overlay-footer td.description {
    text-align: left;
    font-size: 0.95em;
}

#map-overlay-content td .icons {
    display: flex;
    justify-content: center;
}

#map-overlay-content td .icons i {
    width: 1em;
    height: 1em;
    padding: 0.1em;
}

#map-overlay-content td:first-child {
    border-radius: 0.4em 0 0 0.4em;
}

#map-overlay-content td:last-child {
    border-radius: 0 0.4em 0.4em 0;
}

#map-overlay-footer table {
    margin: 0 auto;
}

.map-overlay-panel {
    height: fit-content;
    align-self: flex-end;
    margin: 0.4em;
    padding: 0.2em 0.4em;
    background: white;
    border: var(--dark-grey-border-style);
}

.map-overlay-panel table {
    font-size: 10.5pt;
}

.map-overlay-panel table td:nth-child(1) {
    text-align: left !important;
    font-weight: bold;
}

.toggle-map-overlay-container {
    position: absolute;
    display: flex;
    align-items: center;
}

.toggle-map-overlay {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--dark-white);
    border-radius: 0 0.4em 0.4em 0;
    z-index: 1;
}

.toggle-map-overlay:hover {
    background: var(--light-grey);
    cursor: pointer;
}

.toggle-map-overlay span {
    padding: 1em 0.2em;
    font-size: 1.2em;
    font-weight: bold;
}

.site-info-window-container {
    padding-top: 12px !important;
    padding-bottom: 0.4em !important;
    font-weight: normal !important;
}

.site-info-window-container .gm-style-iw-chr {
    height: 0;
}

.site-info-window-container button.gm-ui-hover-effect {
    bottom: 0.6em !important;
    left: 1em;
}

.site-info-window-header, .site-info-window td:nth-child(1) {
    font-weight: bold;
}

.site-info-window-header {
    padding: 0.6em 3em 0;
    text-align: center;
    text-transform: uppercase;
    font-size: 0.9em;
    letter-spacing: 0.1em;
    border-top: 1px solid var(--secondary);
}

.site-info-window .subtitles, .site-info-window .loading-wheel, .site-info-window .pollutants-table, .site-info-window .met-table {
    margin-top: 0.5em;
    border-top: var(--primary-border-style);
}

.site-info-window .subtitles, .site-info-window table {
    width: 100%; /* NOTE: Required for info window with columnised table to look normal; see map.js */
}

.site-info-window .subtitles {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    column-gap: 0.5em;
}

.site-info-window .subtitles > div {
    display: flex;
    align-items: center;
    margin-top: 0.5em;
    padding: 0.2em;
    width: 100%;
    max-width: 20em;
    min-height: 2.8em;
    box-sizing: border-box;
    background: var(--light-secondary);
    border-radius: 0.4em;
}

.site-info-window .subtitles > div.critical {
    justify-content: center;
    padding: 0;
    background: none;
}

.site-info-window .subtitles i {
    align-self: flex-start;
    width: 1em;
    height: 1em;
    margin: 0.2em;
    padding: 0.5em;
    text-align: center;
    background: var(--primary);
    color: white;
    border-radius: 1em;
}

.site-info-window .subtitles > div.critical i {
    align-self: center;
    background: var(--red);
}

.site-info-window .subtitles span {
    flex-basis: fit-content;
    margin: 0 0.4em;
}

.site-info-window .pollutants-table .column {
    min-width: 16em;
}

.site-info-window td {
    padding: 0.4em;
}

.site-info-window td:nth-child(2) {
    text-align: center;
}
