body {
    font-family: Arial, Helvetica, sans-serif;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100vh;
}

@import "https://fonts.googleapis.com/css?family=Open+Sans:300,300i,400,400i,700,700i&display=swap";

table {
    /* Override absolutely insane display:block in hextra core style */
    display: table !important;
}

/** Override another insane tailwind default */
img,
svg,
video,
canvas,
audio,
iframe,
embed,
object {
    display: inline-block;
    vertical-align: unset;
}

:root {
    --bs-body-font-family: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    /** This only controls the bizarre height calculation for the page **/
    --navbar-height: 12rem;

    font-family: var(--bs-body-font-family)
}

body {
    background-color: #184E62;
    color: #FDF2CE;
}

/** Override absolutely ridiculous tailwind hardcoded content colour **/
main .content h3, main.content h2, main h1 {
    color: #FDF2CE !important;
}

.imerss-main {
    display: flex;
    height: 100%;
}

/** Defeat side matter which screws up layout when page is wide **/
.xl\:hx-block {
    display: none !important;
}

.imerss-page {
    width: 40%;
}

.imerss-navbar-title {
    color: #FDF2CE;
    font-weight: 700;
    font-size: 22px;
    text-transform: uppercase;
    letter-spacing: 0.2rem;
}

.imerss-bg-neutral-50 {
    background-color: #ffffff80;
}

nav a span {
    color: #FDF2CE;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 1px;
}

nav a {
    position: relative;
}

.imerss-navbar-background {
    background: url("../images/imerss-header-cropped.jpg") no-repeat;
    background-size: cover;
    height: 160px;
    width: 100%;
    position: fixed;
}

.imerss-navbar {
    justify-content: space-between;
    display: flex;
    height: 100px;
}

/* Weird trick inherited from docsy for filtering background image */

.imerss-navbar::after {
    content: "";
    position: absolute;
    inset: 0;
    background-color: #184E6280;
}

.imerss-navbar a, .imerss-subnav a, .imerss-subnav .search-wrapper {
    position: relative;
    z-index: 2;
}

.imerss-navbar img {
    margin-right: 12px;
}

.imerss-navbar span {
    margin-left: 16px;
}

.imerss-subnav {
    position: relative;
    font-size: 16px;
}

.imerss-subnav::after {
    content: "";
    position: absolute;
    inset: 0;
    background-color: #184E62b0;
}



footer {
    color: black;
}

.imerss-copyright {
    padding: 0.5rem 1rem;
}


h2 {
    margin-block-start: 0px;
}

.main-container h2 {
    margin-bottom: 1.1rem;
    text-align: center;
}

.mxcw-banner {
    font-size: 36px;
}

.mxcw-section-nav {
    display: flex;
    align-items: center;
    padding-bottom: 1rem;

    position: absolute;
    top: 5px;
    width: calc(100% + 50px);
    margin-left: -3rem;
    margin-right: -3rem;
    z-index: 200;
}

.mxcw-section-nav .mxcw-hidden {
    display: none;
}

.section-left-desc, .section-right-desc {
    white-space: nowrap;
    padding: 0 0.8rem 0 0.8rem;
}

.section-nav-spacer {
    width: 100%
}

.mxcw-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 14rem);
    padding: 0 1.5rem;
}

.mxcw-container ::-webkit-scrollbar {
    -webkit-appearance: none;
    width: var(--imerss-scrollbar-width);
    background-color: revert;
}

.mxcw-container ::-webkit-scrollbar-thumb {
    border-radius: 6px;
    background-color: #C1C1C1;
    -webkit-box-shadow: 0 0 1px rgba(255,255,255,.5);
}

.mxcw-container ::-webkit-scrollbar-thumb:hover {
    background-color: #A8A8A8;
}


.mxcw-content {
    overflow: hidden;
}

.mxcw-content a {
    text-decoration: underline;
}

.section.level2 {
    height: 100%;
    flex-direction: column;
}

.mxcw-sectionInner {
    display: flex;
    flex-direction: row;
    width: 100%;
    overflow: hidden;
}

.imerss-region-pane {
    display: flex;
    flex-direction: column;
}

.mxcw-viz-pane {
    display: flex;
    flex-direction: row;
}

.mxcw-sectionColumn {
    width: 50%;
    overflow-y: auto;
    margin-right: 8px;
    padding-right: 8px;
}

.mxcw-sectionColumn.mxcw-vizColumn {
    overflow-y: visible;
    border: solid 1px black;
    padding: 8px 4px 8px 0;
}

@media screen and ( max-width: 620px ) {
    .mxcw-sectionInner {
        flex-direction: column;
        overflow-y: scroll;
    }

    .mxcw-content {
        flex-direction: column;
    }

    .mxcw-viz-pane .imerss-container {
        width: 100%;
        overflow-y: visible;
    }

    .mxcw-sectionColumn {
        width: 100%;
        overflow-y: visible;
    }
}


.mxcw-map-holder {
    display: flex;
    flex-direction: column;
    margin-bottom: 1rem;
    height: 50%;
    transition-property: height;
    transition-duration: 800ms;
    position: relative;
}

.mxcw-content-holder {
    display: flex;
    flex-direction: column;
    height: 40%;
    font-size: 18px;
    padding: 0.5rem 0.5rem 1rem 0.5rem;
    align-items: center;
    transition-property: height;
    transition-duration: 800ms;
    position: relative;
    /* TODO hoist this main text colour to a variable */
    color: #eefaff;
}

.section-button {
    stroke: #362F24;
    fill: #FFFDFD;
    position: relative;
}

.imerss-ecological-pane {
    --section-circle-stroke-width: 0;
}

.imerss-ecological-pane .section-button {
    stroke: #F2FCD6;
    fill: var(--section-circle-fill);
}

.section-button:hover:not(.disabled) {
    stroke: rgba(90,82,68,.8);
    cursor: pointer;
}

.imerss-ecological-pane .section-button:hover:not(.disabled) {
    stroke: #AAA;
    cursor: pointer;
}

.section-button.disabled {
    display: none;
    /* stroke: #ccc; */
}

.section-button-desc {
    display: none;
    position: absolute;
    z-index: 50;
    border: solid 1px black;
    background-color: white;
    color: black;
}

.section-right-desc {
    right: 0;
}

.section-button:hover:not(.disabled) .section-button-desc {
    display: block;
}

.mxcw-leftPane {
    display: flex;
    flex-direction: column;
    width: 60%;
    /* For God's sake I really mean it! */
    min-width: 60%;
}

.mxcw-map {
    height: 80%;
    min-height: 0;
    width: 100%;
    min-width: auto;
    transition-property: height;
    margin: 0px auto;
    overflow: hidden;
    z-index: 5;
    color: black;

    /** Somehow this works when hiding but not when showing */
    /*
    transition-duration: 800ms;
     */
}

.mxcw-hideMap .mxcw-map {
    height: 0;
    min-height: 0;
}
.mxcw-data {
    z-index: 5;
    opacity: 1;
    color: black;
    margin: 0.5rem 0;
    height: 20%;
}

.mxcw-hideMap ~ .mxcw-content-holder {
    height: 100%;
}

.mxcw-hideMap {
    height: 0;
}

.mxcw-content {
    overflow-y: auto;
    width: 100%;
}

.mxcw-content .section {
    /* We've got the scrollbar at the right, eat into it a bit */
    padding: 8px 0 8px 8px;
}

.mxcw-content img {
    max-height: 35vh;
    max-width: 100%;
    display: block;
    margin: auto;
}

.mxcw-content h2 {
    font-size: larger;
    font-weight: 700;
}

.mxcw-mapPane {
    opacity: 0;
    visibility: hidden;
    transition-property: opacity, visibility;
    transition-duration: 800ms;
}

.mxcw-mapPane.mxcw-activeMapPane {
    opacity: 1;
    visibility: visible;
}

.mxcw-mapSubPane.mxcw-mapPane {
    transition-duration: 0ms;
}

.mxcw-widgetPane {
    display: none;
    padding: 2em;
}

.mxcw-widgetPane.mxcw-activeWidgetPane {
    display: flex;
}

.mxcw-content .section {
    display: none;
}

.mxcw-content .mxcw-activeSection {
    display: flex;
}

body .mx-header ::-webkit-scrollbar {
    width: 8px;
}

body .mx-header ::-webkit-scrollbar-thumb {
    border-radius: 4px;
}

.imerss-container {
    margin: 0px;
    height: 60%;
}

/* Styling for native legends */

.legend {
    line-height: 18px;
    color: #555;
}

.legend i {
    width: 18px;
    height: 18px;
    margin-right: 4px;
    opacity: 0.7;
    display: inline-block;
    vertical-align: top;
    zoom: 1;
}

.info {
    padding: 6px 8px;
    font: 14px/16px Arial, Helvetica, sans-serif;
    background: white;
    background: rgba(255,255,255,0.8);
    box-shadow: 0 0 15px rgb(0 0 0 / 20%);
    border-radius: 5px;
}

.mxcw-hidden.legend {
    opacity: 0;
    visibility: hidden;
    display: none;
}

.imerss-panel-dataPanel {
    padding: 0 1rem 1rem 1rem;
}

/* Technique from https://www.w3schools.com/howto/howto_css_responsive_iframes.asp */

.iframe-container {
    position: relative;
    overflow: hidden;
    width: 100%;
    padding-top: 56.25%; /* 16:9 Aspect Ratio (divide 9 by 16 = 0.5625) */
}

.data-pane iframe {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    width: 100%;
    height: 100%;
}
