/* Common styles for power generation maps */

#map_canvas {
    margin: 0;
    padding: 0;
    height: 800px;
    max-width: 100%;
    border: 1px solid #ccc;
}

.flex-video {
    padding-top: 0 !important;
}


/* Legend and its child elements: */

#legend {
    background: #EEE;
    opacity: .95;
    padding: 12px 6px 6px 12px;
    width: 350px;
    border-left: 1px solid #ccc;
    border-bottom: 1px solid #ccc;
    border-top: 1px solid #ccc;
}

    #legend p {
        margin: 0;
        padding: 3px 0 12px 0;
    }

        /* Align resource images and checkboxes/labels */
        #legend p span {
            vertical-align: top;
        }

        #legend p a {
            text-decoration: underline;
        }

        #legend p,
        #legend p strong,
        #legend p a,
        #legend li,
        #legend li a,
        #legend select {
            font-family: Roboto, Arial, sans-serif;
            font-size: .8rem;
            line-height: 1.2rem;
        }

    #legend img {
        vertical-align: top;
        padding-top: 3px;
    }

    #legend .tag {
        margin-top: 3px;
    }

    /* Legend links should be black, except on power gen map, the two top "main filters/more options" tabs*/
    #legend a:not(.ui-tabs-anchor) {
        color: black;
    }

select {
    padding: 2px 0 2px 4px;
    margin: 0 0 0 4px;
    background: #fff;
    height: inherit;
    width: 85%;
    vertical-align: top;
}

label {
    line-height: 1em;
    cursor: pointer;
}

input, select {
    display: inline;
    margin-bottom: 0 !important;
}

    input[type="checkbox"] {
        width: 20px;
        height: 20px;
        margin: 0 2px 0 2px;
    }

#slider-range {
    width: 85%;
    margin: 0 0 1em .5em;
}

/* Animate button to right of slider */
#slider-animate {
    margin-top: -3px;
    float: right;
}

/* Begin/end years on slider */
#firstyear, #lastyear {
    font-weight: bold;
}
/* End of legend styles */

/* Small legend styles */
#small_legend {
    display: none;
}

    #small_legend p {
        line-height: 1em;
        margin: 0;
        padding-bottom: 6px;
    }

    #small_legend img {
        vertical-align: bottom;
    }

/* Hide disabled options in resource dropdown boxes (for when timeline changes to restrict lists) */
option:disabled {
    display: none;
}

/* Items in map infowindows */
.gm-style-iw-d img {
    padding-top: 8px
}

.gm-style-iw-d h4 { /* Inherit site font for any H4 headers in map */
    font-family: inherit;
    font-size: .85rem !important;
    line-height: 1.2rem;
    margin: 0 0 .5em 0;
}

.gm-style-iw-d * {
    font-family: inherit;
}

.gm-style-iw-d b, .gm-style-iw-d strong {
    font-weight: 600 !important;
}

/* Advanced markers: see /ext/maptest_damguidelabelsonly for example to display HTML elements as markers */
.advancedmarker {
    background-color: #4285F4;
    border-radius: 8px;
    color: #FFFFFF;
    font-size: 14px;
    padding: 10px 15px;
    position: relative;
}

    .advancedmarker::after {
        content: "";
        position: absolute;
        left: 50%;
        top: 100%;
        transform: translate(-50%, 0);
        width: 0;
        height: 0;
        border-left: 8px solid transparent;
        border-right: 8px solid transparent;
        border-top: 8px solid #4285F4;
    }

/* Custom tooltips (to replace jquery-ui version) */
.ui-tooltip-content {
    font-size: .8rem;
    color: #333;
}

.ui-tooltip {
    -webkit-box-shadow: 2px 2px 4px #333;
    box-shadow: 2px 2px 4px #333;
    padding: 6px;
    opacity: 1;
    /* This is only needed in Drupal to overcome the .5 opacity set somewhere */
}

/* "Loading" spinner (especially for large western US map) */
#loader-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: none;
    text-align: center;
}

.loader {
    border: 16px solid #f3f3f3;
    border-radius: 50%;
    border-top: 16px solid #3498db;
    width: 100px;
    height: 100px;
    -webkit-animation: spin 2s linear infinite; /* Safari */
    animation: spin 2s linear infinite;
}

/* Safari */
@-webkit-keyframes spin {
    0% {
        -webkit-transform: rotate(0deg);
    }

    100% {
        -webkit-transform: rotate(360deg);
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}
