
#overlay {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 600;
    display: none;
}

#overlay > div {
    background: #38497538;
    height: 100%;
    width: 100%;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    z-index: 900;
}
.overlay_body {
    background: white;
    z-index: 1000;
    overflow: auto;
    min-width: 700px;
    max-width: 80%;
    min-height: 200px;
    /* Fit fully inside the viewport (below the top menu bar) and scroll inside;
       shorter on smaller screens so the whole overlay stays visible. */
    max-height: calc(100vh - 150px);
    border: 1px solid #3a4b77;
    border-radius: 4px;
    margin-bottom: 40px;
}
@media (max-height: 760px) {
    .overlay_body { max-height: calc(100vh - 110px); margin-bottom: 24px; }
}
@media (max-height: 560px) {
    .overlay_body { max-height: calc(100vh - 70px); margin-bottom: 12px; }
}
#overlay_header {
    /*background: #d4a418;*/
    background: #131b31;
    color: #e7efff;
    text-transform: uppercase;
    padding: 10px 0 10px 20px;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
}
#overlay_header #overlay_close {
    padding: 10px 20px;
    font-size: 20px;
    width: 30px;
    /*color: #ffeeca;*/
    color: #969fb6;
    cursor: pointer;
}
#overlay_header #overlay_close:hover {
    color: #bbc5e1;
}
#overlay_content {
    padding: 10px 20px;
}