html {
    height: 100%;
}

body {
  margin: 0; /* Remove default body margins */
  height: 100%; /* Make body take up the full viewport height */
  width: 100%;
  display: flex; /* Use flexbox for layout */
  flex-direction: column; /* Stack items vertically (navbar on top, content below) */
  position: absolute;
}

#mapid {
    flex-grow: 1; /* Content takes up the remaining space */
    background-color: #f0f0f0; /* Light grey background */
    padding: 20px;
}

.popup-image img {
    width: auto;
    height: auto;
    max-height: 175px;
    max-width: 200px;
}

.popup-image figure {
    margin: 0;
    text-align: center;
}

.popup-image figcaption {
    text-align: right;
}

.menu-button {
    display: flex;
    align-self: center;
}

.menu-button {
    flex-direction: column;
    justify-content: space-around;
    height: 20px;
    cursor: pointer;
    position: absolute;
    top: 10px;
    right: 5px;
    margin-right: 3px;
}

.menu-button span {
    height: 3px;
    width: 20px;
    background-color: #777;
    transition-duration: 0.5s;
}

.cross span.top {
    transform: rotate(45deg);
    transition-duration: 0.5s;
    transform-origin: left;
}
.cross span.middle {
    opacity: 0;
    transition-duration: 0.5s;
}
.cross span.bottom {
    transform: rotate(-45deg);
    transition-duration: 0.5s;
    transform-origin: left;
}

.hidden {
    display: none;
}

/*Legend specific*/
.legend {
    padding: 6px 8px;
    font: 14px Arial, Helvetica, sans-serif;
    background: white;
    background: rgba(255, 255, 255, 0.8);
    /*box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);*/
    /*border-radius: 5px;*/
    line-height: 24px;
    color: #555;
    min-width: 175px;
}

.legend.legend-closed {
    width: 20px;
    height: 20px;
    min-width: 20px;
}

.legend-closed h4 {
    display: none;
}

.legend-closed .legend-item,
.legend-closed .phase-legend-item {
    display: none;
}

.legend h4 {
    font-size: 16px;
    margin: 2px 12px 8px;
    color: #777;
}

.legend > span {
    position: relative;
    bottom: 3px;
}

.legend i {
    width: 18px;
    height: 18px;
    float: left;
    margin: 0 8px 0 0;
    opacity: 0.7;
}

.legend-item:hover {
    cursor: pointer;
}

.legend-item.Operating i{
    box-shadow: inset 0px 0px 0px 3px #2AAD27;
}

.legend-item.Operating input:checked + i{
    background-color: #2AAD27;
}
.legend-item.Construction i{
    box-shadow: inset 0px 0px 0px 3px #CAC428;
}

.legend-item.Construction input:checked + i {
    background-color: #CAC428;
}

.legend-item.Announced input:checked + i {
    background-color: #CB8427;
}

.legend-item.Announced i {
    box-shadow: inset 0px 0px 0px 3px #CB8427;
}

.legend-item.Renovation input:checked + i {
    background-color: #7B7B7B;
}

.legend-item.Renovation i {
    box-shadow: inset 0px 0px 0px 3px #7B7B7B;
}

.legend-item.Opening-Soon input:checked + i {
    background-color: #CB2940;
}

.legend-item.Opening-Soon i {
    box-shadow: inset 0px 0px 0px 3px #CB2940;
}

.legend-item.Newly-Announced input:checked + i {
    background-color: #2A81CB;
}

.legend-item.Newly-Announced i {
    box-shadow: inset 0px 0px 0px 3px #2A81CB;
}

.phase-legend-item.phase-0 i{
    box-shadow: inset 0px 0px 0px 3px #7B7B7B;
}

.phase-legend-item.phase-0 input:checked + i{
    background-color: #7B7B7B;
}
.phase-legend-item.phase-1 i{
    box-shadow: inset 0px 0px 0px 3px #CB2B3E;
}

.phase-legend-item.phase-1 input:checked + i {
    background-color: #CB2B3E;
}

.phase-legend-item.phase-2 input:checked + i {
    background-color: #CB8427;
}

.phase-legend-item.phase-2 i {
    box-shadow: inset 0px 0px 0px 3px #CB8427;
}

.phase-legend-item.phase-2B input:checked + i {
    background-color: #CAC428;
}

.phase-legend-item.phase-2B i {
    box-shadow: inset 0px 0px 0px 3px #CAC428;
}

.phase-legend-item.phase-3 input:checked + i {
    background-color: #2A81CB;
}

.phase-legend-item.phase-3 i {
    box-shadow: inset 0px 0px 0px 3px #2A81CB;
}

.phase-legend-item.phase-4 input:checked + i {
    background-color: #2AAD27;
}

.phase-legend-item.phase-4 i {
    box-shadow: inset 0px 0px 0px 3px #2AAD27;
}

.phase-legend-item input, 
.legend-item input {
    display: none;
}

.legend i.icon {
    background-size: 18px;
    background-color: rgba(255, 255, 255, 1);
}
