*, html {
    margin: 0;
    padding: 0;
}

html {
    overflow: hidden;
}

body {
    font: 400 100%/1.2em 'Helvetica Neue', Helvetica;
    background: #eee;
    width: 100%;
}

h1, h2, h3, h4 {
    font-size: 1.5em;
    font-weight: 500;
    margin: 0 0 0.5em 0;
    padding: 0;
}

h3 {
    font-size: 1.2em;
    border-bottom: 2px solid #ccc;
    font-weight: 400;
}

ul, ol {
    list-style: none;
}

#loading {
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    z-index: 200;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.9;
    background: #fff;
    text-align: center;
    cursor: pointer;
}

.loader {
    width: 100%;
    height: 5px;
    margin: 0 auto 1em auto;
    position: relative;
    overflow: hidden;
    background: #eee;
}

.loadbar {
    width: 1%;
    height: 100%;
    display: block;
    background: #f47c46;
    transition: all ease-in 0.5s;
}

.mapviewport {
    margin: 0;
    width: 100%;
    text-align: left;
    overflow: hidden;
}

#siteName {
    text-align: center;
    font-weight: 400;
}

#map_container {
    position: relative;
}

#map_canvas {
    display: block;
    height: 430px;
    width: 100%;
    z-index: 5;
    background: #D5D5D5;
    /* matches ocean color */
}

#map_legend {
    border-radius: 0.5em;
    font-size: 0.8em;
    position: absolute;
    z-index: 10;
    padding: 0.7em;
    overflow: scroll;
    height: 85%;
    width: 200px;
    border: 1px solid #aaa;
    left: 10px;
    top: 10px;
    /* Permalink - use to edit and share this gradient: http://colorzilla.com/gradient-editor/#ffffff+0,ffffff+100&1+0,0.5+100;White+to+Transparent */
    background: -moz-linear-gradient(top, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0.8) 100%);
    /* FF3.6-15 */
    background: -webkit-linear-gradient(top, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0.8) 100%);
    /* Chrome10-25,Safari5.1-6 */
    background: linear-gradient(to bottom, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0.8) 100%);
    /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#80ffffff', GradientType=0);
    /* IE6-9 */
}

.legend-grouping {
    margin-bottom: 1em;
}

.legend-field {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-bottom: 0.2em;
    margin-bottom: 0.2em;
    border-bottom: 1px solid #eee;
}

.legend-field:last-child {
    border: 0;
}

.legend-field .swatch {
    border: 1px solid #aaa;
    margin-left: 0.5em;
    width: 10px;
    height: 10px;
}

[data-type="markers"] .swatch {
    border-radius: 1em;
}

.legend-field .title {
    font-weight: 600;
    flex: 0 1 90%;
}

.legend-field .subtitle {
    clear: both;
    font-weight: 400;
}

.control-section {
    overflow: hidden;
    padding: 0.5em;
    border-bottom: 1px solid #ccc;
}

.button-list {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    text-align: left;
    padding-bottom: 5px;
    margin-bottom: 5px;
    border-bottom: 1px solid #ccc;
}

.button-list li {
    flex: 0 1 24.3%;
    margin-right: 5px;
}

.button-list li.title {
    flex: 0 1 100%;
    margin: 0 0 5px 0;
    text-align: left;
}
.button-list li:last-child {
    margin: 0;
}

#map_controls {
    padding: 10px;
    display: flex;
    flex-direction: column;
}

#markercontrols .button-list li {
    margin-left: 5px;
}

.toggle .swatch {
    border: 1px solid #aaa;
    min-width: 1em;
    margin-right: 0.5em;
    height: 1em;
}

.toggle .label {
    margin-top: 0.5em;
    min-height: 4em;
}

.toggle img {
    height: 15px;
    width: auto;
    display: inline-block;
}

.toggle {
    display: flex;
    align-items: center;
    text-align: left;
    border-radius: 0.5em;
    padding: 0.5em;
    width: 100%;
    min-height: 3.5em;
    margin: 0 0 5px 0;
    background: #fff;
    outline: 0;
    font-size: 0.8em;
    font-weight: 600;
    margin-right: 5px;
    border: 1px solid #ccc;
    border-right: 1px solid #aaa;
    border-bottom: 1px solid #888;
}

.toggle:hover {
    cursor: pointer;
    color: #222;
    background: #ddd;
}

.toggle:active {
    background: #ddd;
}

.toggle.active {
    color: #fff;
    background: #bbb;
    border-color: #888;
    box-shadow: inset 0 0.5em 1em #aaa;
    text-shadow: 0 1px 1px #555;
}

.toggle input {
    display: none;
}

.toggle svg {
    width: 20px;
    height: 20px;
    vertical-align: middle;
}

#markercontrols .toggle {
    border-radius: 0.5em;
}

#statecontrols li:first-child .toggle {
    border-radius: 1em 0 0 1em;
}

#statecontrols li:last-child .toggle {
    border-radius: 0 1em 1em 0;
}

/* Maps ====================================================== */

.gm-style .gm-style-iw {
    left: 10px !important;
}

.infowindow {
    overflow: hidden;
    text-align: left;
    font-size: 1.2em;
    max-width: 300px;
    padding: 0 0 0.5em 0;
    margin: 0;
    z-index: 100;
}

.infowindow a {
    display: block;
    padding: 0.5em;
    margin: 0.5em 0 0 0;
    text-align: center;
    border: 1px solid #ccc;
    text-decoration: none;
    border-radius: 0.5em;
    background: #eee;
    color: #000;
}

.infowindow a:hover {
    background: #888;
    color: #fff;
}

.more-button:hover {
    background: #eee;
    color: #555;
}

.more-button:focus, .more-button:active {
    background: #555;
    color: #eee;
}

#loadingPopup {
    width: 80%;
    background: #fff;
    overflow: hidden;
    padding: 0.5em;
    font-size: 1.2em;
    font-weight: 400;
    line-height: 1.5;
}

#loadingText {
    margin-bottom: 1em;
}

#enterButton {
    display: none;
    border: 2px solid #f47c46;
    border-radius: 2em;
    padding: 0.5em;
    width: 60%;
    min-width: 300px;
    margin: auto;
    font-size: 1.2em;
    font-weight: 600;
    color: #f47c46;
    cursor: pointer;
    background: #fff;
}

#enter:hover {
    background: #f47c46;
    color: #fff;
}

footer {
    margin-top: 1em;
    text-align: center;
}