html, body {
  height: 100%;      /* give body a definite height */
  margin: 0;
}

body {
    display: flex;
    flex-direction: column;
    height: 100vh !important;
}

body > #content {
    flex-grow: 1;

    display: flex;
    flex-direction: row;
    width: 100vw;

    overflow: hidden;

    position: relative;

}

@media only screen and (max-width: 1051px) {
    body {
        height: auto;
    }
    body > #content {
        flex-wrap: wrap;
        overflow: auto;

    }
}


/* content wrapper ook wel #page_content_container */
body > #content .page-content-container {
    position: relative;
    width: 1220px; /* default width van sidebar/content, gebruiker kan aanpassen met slider */
    max-width: 100vw;
    flex-shrink: 0;

    z-index: 3;
    display: none;
    background: none;
    height: 100%;

    /* border: 10px solid red; */   
}

/* Deze overlay wordt over de pagina geplaatst tijdens het slepen van de .resize_page */
body > .page-dragging-overlay {
    position: fixed;
    inset: 0;
    z-index: 2147483647;
    pointer-events: auto;
    display: none;
    
    background: rgba(0, 0, 0, 0.5);
    border: 10px solid purple
}

body > #content .page-content-container.open {
    display: block;
}

@media only screen and (max-width: 1051px) {
    body > #content .page-content-container {
        width: 100vw;
    }
}

/* map */
body > #content > #map {
    flex: 1 1 auto;
    height: 100%;

    position: relative;
}


@media only screen and (max-width: 1051px) {
    body > #content > .controls,
    body > #content > #map {
        display: none;
    }
}


/* content */
#page_content {
    position: absolute;
    background-color: #d8e2ec;
    z-index: 9;
    box-shadow: 0px 0px 10px rgba(0,0,0,0.6);

    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

#page_content * {
    -webkit-user-select: none;
    user-select: none;
}

/* loader */
#page_content_overlay {
    display: none;
    position: absolute;
    background-color: rgba(0,0,0,0.2);
    color: white;

    top: 0;
    left: 0;
    right: 0;
    bottom: 0;

    z-index: 10;
    text-align: center;
    padding-top: 40vh;

}

#page_content_overlay img {
    width: 3rem;
}

#page_content_overlay > * {
    filter: drop-shadow(0px 0px 5px rgba(0,0,0,0.8));
}


/* Page toggle */

.toggle-page {
    background-image: url(../grfx/icon-collapse.png);
    background-repeat: no-repeat;
    background-color: var(--cdi-dark-blue, #566b84);
    background-size: auto 36px;
    background-position: center;
    color: #fff;
    position: absolute;
    cursor: pointer;

    top: 10vh;
    right: -36px;

    width: 36px;
    height: 90px;

    padding: 3px 10px 5px 8px;
    z-index: 1000;
    opacity: 0.8;
}

.toggle-page-open {
    background: url(../grfx/icon-collapse-open.png) no-repeat var(--cdi-dark-blue, #566b84); center center;

    background-image: url(../grfx/icon-collapse-open.png);
    background-repeat: no-repeat;
    background-color: var(--cdi-dark-blue, #566b84);
    background-size: auto 73px;
    background-position: center;

    position: absolute;
    cursor: pointer;

    width: 36px;
    height: 90px;

    top: 10vh;
    z-index: 1;
    opacity: 0.8;
}

@media only screen and (max-width: 1051px) {
    .toggle-page,
    .toggle-page-open {
        display: none;
    }
}

/* ------------------------------------- */
/* ------------------------------------- */
/* ------------------------------------- */
/* ------------------------------------- */
/* ------------------------------------- */
/* ------------------------------------- */



@media only screen and (max-width: 1270px) {
    
    /* #page_content_overlay, 
    #page_content {
        width: calc(990px - 36px)
    } */
    .page-content-container {
        /* width: 990px; */
    }

}

@media only screen and (max-width: 1176px) {
    
    /* #page_content_overlay, 
    #page_content {
        height: 100%;
    } */
}

@media only screen and (max-width: 1051px) {
    
    /* #page_content_overlay, 
    #page_content {
        width: calc(755px - 36px);
    } */
    .page-content-container {
        /* width: 755px; */
    }

}

@media only screen and (max-width: 810px) {
    
    /* #page_content_overlay, #page_content {
        width: 100%;
        min-width: auto;
        max-width: 470px;
    } */
    .page-content-container {
        max-width: 100%;
        width: 100%;
    }

}


@media only screen and (max-width: 480px) {
    
    /* #page_content_overlay, #page_content, */
    .page-content-container {
        width: 100%;
        max-width: 100%;
    }

    /* #page_content_overlay, #page_content {
        height: calc(100vh - 65px);
    } */

}


@media only screen and (-webkit-max-device-pixel-ratio: 2.0) and (max-width: 1980px) {
/*     
    #page_content_overlay, #page_content {
        min-width: 1020px;
        width: calc(1000px - 36px);
    } */
}

@media only screen and (-webkit-max-device-pixel-ratio: 1.5) and (max-width: 1980px) {
    /* #page_content_overlay, #page_content {
        min-width: 1020px;
        width: calc(1000px - 36px);
    } */
}
