/*
 * Remove text-shadow in selection highlight:
 * https://twitter.com/miketaylr/status/12228805301
 *
 * Vendor-prefixed and regular ::selection selectors cannot be combined:
 * https://stackoverflow.com/a/16982510/7133471
 *
 * Customize the background color to match your design.
 */

::-moz-selection {
    background-color: #b3d4fc;
    text-shadow: none;
}

::selection {
    background-color: #b3d4fc;
    text-shadow: none;
}

/*
 * A better looking default horizontal rule
 */

hr {
    display: block;
    height: 1px;
    border: 0;
    border-top: 1px solid #ccc;
    margin: 1em 0;
    padding: 0;
}

/*
 * Remove the gap between audio, canvas, iframes,
 * images, videos and the bottom of their containers:
 * https://github.com/h5bp/html5-boilerplate/issues/440
 */

audio,
canvas,
iframe,
img,
svg,
video {
    vertical-align: middle;
}

/*
 * Remove default fieldset styles.
 */

fieldset {
    border: 0;
    margin: 0;
    padding: 0;
}

/*
 * Allow only vertical resizing of textareas.
 */

textarea {
    resize: vertical;
}

/* ==========================================================================
   Browser Upgrade Prompt
   ========================================================================== */

.browserupgrade {
    margin: 0.2em 0;
    background-color: #ccc;
    color: #000;
    padding: 0.2em 0;
}

/* ==========================================================================
   Author's custom styles
   ========================================================================== */

html {
    color: #222222;
    background-color: #2e2e2e;
    font-size: 1em;
    line-height: 1.4;
    font-family: Roboto, Arial, sans-serif;
}

html, body {
    position: relative;
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    height: 100%;
}

a {
    color: #ffffff;
    cursor: pointer;
}

#content {
    position: relative;
    width: 100%;
    flex: 1 0 auto;
}

header {
    text-align: center;
    background-color: #2e2e2e;
    color: #ffffff;
    padding: 5px 0;
}

header a {
    font-size: 2em;
    font-weight: bold;
    text-decoration: none;
    color: #ffffff;
}

nav {
    width: 100%;
}

nav ul {
    margin: 0;
    padding: 0;
}

nav li {
    list-style-type: none
}

nav li a:hover {
    transition: ease-in-out 250ms;
    background-color: rgba(0, 172, 236, 0.8);
}

nav li a {
    float: left;
    width: 20%;
    font-size: 1em;
    text-align: center;
    text-decoration: none;
    background-color: #ffffff;
    color: #000000;
    border-top: 3px solid #00acec;
    border-bottom: 3px solid #00acec;
}

nav li a.active {
    background-color: rgba(0, 172, 236, 0.8);
}


#ports {
    margin: 0;
    padding: 0 0 0 3px;
}

#ports li, #overview li {
    list-style-type: none
}

#ports li a, #overview li a {
    float: left;
    width: 100%;
    padding: 2px;
    font-size: 0.9em;
    text-decoration: none;
    color: #ffffff;
    white-space: nowrap;
}

/* override FF bug*/
@-moz-document url-prefix() {
    #main.front-page .sp1 {
        height: 1040px;
    }
}

/* calc 100 for the front-page*/
#sidebar, #main.front-page, #map, #main.front-page .sp1, #main.front-page .sp2 {
    min-height: calc(100vh);
    height: 100%;
}

/* calc 85 for everything else*/
#sidebar, #main, #map, #main .sp1, #main .sp2 {
    min-height: calc(85vh);
    height: 100%;
}

#sidebar {
    position: absolute;
    width: 12%;
    margin: 0 0 0 0;
    background: #2e2e2e;
    border-right: 3px solid #00acec;
}

.sidebar {
    position: absolute;
    visibility: hidden;
    width: calc(95% - 1px);
    height: calc(100% - 45px);
    top: 35px;
    z-index: 1;
    padding: 5px;
    overflow-y: auto;
    overflow-x: hidden;
}

.filter-wrapper {
    position: absolute;
    z-index: 401;
    width: 100%;
    height: 100%;
    visibility: hidden;
}

#filter {
    position: absolute;
    visibility: visible;
    z-index: 2;
    width: 85%;
    padding: 2px;
    margin: 10px 0 0 10px;
    text-indent: 20px;
    background-image: url('../img/searchicon.png');
    background-position: 4px 2px;
    background-size: 12px;
    background-repeat: no-repeat;
    font-size: 0.8em;
}

#main {
    float: left;
    width: 100%;
    margin: 0 0 0 0;
    background-color: #000000;
    color: #ffffff;
}

#main .sp1 {
    width: calc(35% - 1.5px);
}

#main .sp2 {
    width: calc(65% - 1.5px);
}

#main .sp1, #main .sp2 {
    position: relative;
    float: left;

    background-color: #000000;
}

#main .sp1 {
    border-right: 3px solid #00acec;
}

#main .fullwidth {
    width: calc(100% - 3px);
}

#main .nowidth {
    width: 0;
}


footer {
    position: relative;
    text-align: center;
    background-color: #2e2e2e;
    border-top: 3px solid #00acec;
    margin: 0 0 0 0;
}

footer a {
    flex-shrink: 0;
    text-decoration: none;
    color: #ffffff;
}

address {
    padding: 10px 0 10px 0;
}

.inner {
    padding: 5px 0 0 0;
    width: 95%;
    margin: 0 auto;
}

input {
    border: 0;
}

input:focus {
    outline: none;
}

/* Page Specific*/

/* Index */
#map {
    display: block;
    width: 100%;
    height: 100%;
}

#map.leaflet-container {
    /*background-color: rgba(255, 0, 0, 0.0);*/
    background-color: rgb(226, 244, 255);
}

.arrow {
    z-index: 401;
    position: absolute;
    top: calc(50% - 30px); /* top minus border pixels */
    width: 0;
    height: 0;
    cursor: pointer;
    background-color: transparent;
    transition: all 250ms ease;
}

.arrow-left {
    display: none;
    border-top: 30px solid transparent;
    border-bottom: 30px solid transparent;
    border-right: 30px solid #00acec;
    right: 0;
}

.arrow-left .empty {
    position: absolute;
    top: calc(50% - 27px); /* top minus border pixels */
    right: -33px;
    border-top: 27px solid transparent;
    border-bottom: 27px solid transparent;
    border-right: 27px solid #000000;
}

.arrow-right {
    display: none;
    left: 0;
    border-top: 30px solid transparent;
    border-bottom: 30px solid transparent;
    border-left: 30px solid #00acec;
    border-right: transparent;
}

.arrow-right .empty {
    position: absolute;
    top: calc(50% - 27px); /* top minus border pixels */
    left: -33px;
    border-top: 27px solid transparent;
    border-bottom: 27px solid transparent;
    border-left: 27px solid #2e2e2e;
}

/* Home */
#status {
    display: none;
    font-size: 10px;
}

#live .offline, #current .offline {
    fill: #ff0000;
    color: #ff0000;
}

#live .lostconnection, #current .lostconnection {
    fill: #c79a04;
    color: #c79a04;
}

#live .maintenance, #current .maintenance {
    fill: #ff8c00;
    color: #ff8c00;
}

#help-group:hover rect#help {
    transition: ease-in-out 200ms;
    fill: rgba(0, 172, 236, 0.8);
}

#middle-color-scale {
    display: none;
}

#checkbox-checked {
    display: none;
}

/* Hourly */
#hourly {
    display: none;
}

#hourly a {
    position: relative;
    font-size: 0.8em;
}

#hourly a .ui-icon-white-arrowreturnthick-1-w {
    display: block;
    position: absolute;
    top: 2.5px;
    left: -15px;
    background: url(../img/ui-icon-arrowreturnthick-1-w.png) no-repeat;
    width: 10px;
    height: 10px;
}

#hourly a .ui-icon-white-arrowreturnthick-1-e {
    display: block;
    -webkit-transform: scaleX(-1);
    transform: scaleX(-1);
    position: absolute;
    top: 2.5px;
    right: -15px;
    background: url(../img/ui-icon-arrowreturnthick-1-w.png) no-repeat;
    width: 10px;
    height: 10px;
}

#hourly .label {
    font-size: 1.6em;
    text-align: center;
    padding: 5px 0;
}

#history .label {
    padding-left: 0;
}

#current {
    float: left;
    width: 200px;
    border-radius: 5px;
    overflow: hidden;
}

#current .header {
    display: block;
    position: relative;
    color: #000000;
    padding: 5px 5px 5px 10px;
    margin: 0;
}

#current .header.now {
    background-color: #02aceb;
}

#current .header.max {
    background-color: #2B908F;
}

#maintenance {
    display: block;
    float: left;
    width: 100%;
    margin-bottom: 1px;
}

#maintenance .header {
    background-color: #ff8c00;
    border-bottom: 1px solid #000000;
}

#current .title {
    margin-bottom: -5px;
}

#current span {
    display: inherit;
    font-size: 2em;
}

#current .wind-direction span, #current .wind-direction-max span {
    color: #ffff00;
}

#current .wind-speed span {
    color: #02aceb;
}

#current .wind-speed-max span {
    color: #2B908F;
}

#current .maintenance-message {
    display: none;
    padding: 5px 5px 5px 10px;
    font-size: 0.7em;
    fill: #ff8c00;
    color: #000000;
    background-color: #ff8c00;
}

#air-temperature {
    display: none;
    float: left;
    width: 100%;
    background: rgba(199, 199, 199, 0.5);
    color: #000000;
}

#air-temperature .air-temperature {
    padding: 5px 5px 0 10px;
}

#air-temperature .air-temperature span {
    color: #ffffff;
    text-shadow: -1px 0 #000000, 0 1px #000000, 1px 0 #000000, 0 -1px #000000;
}

#air-temperature .read-air-temperature {
    padding: 0 5px 0 10px;
    border-top: 1px solid #000000;
    border-bottom: 1px solid #000000;
}

#not-available {
    display: none;
    color: #ffffff;
    text-align: center;
}

#not-available .na {
    font-size: 20em;
}

#wind, #wind-max {
    display: block;
    float: left;
    width: 100%;
    background-color: #C7C7C7;
    color: #000000;
}

#wind .wind-speed, #wind-max .wind-speed-max {
    padding: 5px 5px 3px 10px;
}

#wind .wind-direction, #wind-max .wind-direction-max {
    padding: 2px 5px 5px 10px;
}

#wind .read, #wind-max .read-max {
    padding: 0 5px 0 10px;
    border-top: 1px outset #000000;
    border-bottom: 1px outset #000000;
}

#current .read .title, #current .read span,
#current .read-air-temperature .title, #current .read-air-temperature span,
#current .read-max .title, #current .read-max span {
    display: inline;
    font-size: 0.7em;
}

#links {
    display: block;
    float: left;
    width: 100%;
    background-color: rgba(0, 172, 236, 0.8);
}

#links .history {
    font-size: 1em;
    text-align: center;
    text-indent: -5px;
    padding: 5px 5px 5px 5px;
    line-height: 1.15;
}

#links > .history:hover {
    transition: ease-in-out 250ms;
    background-color: rgba(0, 172, 236, 0.8);
}

#container-gauge {
    display: block;
    position: relative;
    float: left;
    width: calc(50% - 140px);
    min-height: 468px;
    margin: 0 auto;
    padding: 0 15px 0 25px;
}

#container-wind-rose {
    display: block;
    position: relative;
    float: left;
    width: calc(50% - 140px);
    min-height: 468px;
    text-align: center;
    margin: 0 auto;
    padding: 0 25px 0 15px;
}

#container-wind-chart {
    display: block;
    position: relative;
    width: 100%;
    margin: 0 auto;
    height: 340px;
    padding-top: 25px;
    text-align: center;
}

/* About */
#main .sp1.about {
    background-image: url("../img/about.jpg");
    background-size: 100% 100%;
}

/* Contact */
#main .sp1.contact {
    background-image: url("../img/contact.jpg");
    background-size: 100% 100%;
}


/* ==========================================================================
   Helper classes
   ========================================================================== */

/*
 * Vertical align class
 */
.vertical-align {
    position: relative;
    top: 50%;
    -webkit-transform: translateY(50%);
    -ms-transform: translateY(50%);
    transform: translateY(50%);
}

/*
 * Hide visually and from screen readers
 */

.hidden {
    display: none !important;
}

.noselect {
    -webkit-touch-callout: none; /* iOS Safari */
    -webkit-user-select: none; /* Safari */
    -khtml-user-select: none; /* Konqueror HTML */
    -moz-user-select: none; /* Firefox */
    -ms-user-select: none; /* Internet Explorer/Edge */
    user-select: none;
    /* Non-prefixed version, currently
                                     supported by Chrome and Opera */
}

.right {
    float: right;
}

/*
 * Hide only visually, but have it available for screen readers:
 * https://snook.ca/archives/html_and_css/hiding-content-for-accessibility
 *
 * 1. For long content, line feeds are not interpreted as spaces and small width
 *    causes content to wrap 1 word per line:
 *    https://medium.com/@jessebeach/beware-smushed-off-screen-accessible-text-5952a4c2cbfe
 */

.visuallyhidden {
    border: 0;
    clip: rect(0 0 0 0);
    -webkit-clip-path: inset(50%);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    white-space: nowrap; /* 1 */
}

/*
 * Extends the .visuallyhidden class to allow the element
 * to be focusable when navigated to via the keyboard:
 * https://www.drupal.org/node/897638
 */

.visuallyhidden.focusable:active,
.visuallyhidden.focusable:focus {
    clip: auto;
    -webkit-clip-path: none;
    clip-path: none;
    height: auto;
    margin: 0;
    overflow: visible;
    position: static;
    width: auto;
    white-space: inherit;
}

/*
 * Hide visually and from screen readers, but maintain layout
 */

.invisible {
    visibility: hidden;
}

/*
 * Clearfix: contain floats
 *
 * For modern browsers
 * 1. The space content is one way to avoid an Opera bug when the
 *    `contenteditable` attribute is included anywhere else in the document.
 *    Otherwise it causes space to appear at the top and bottom of elements
 *    that receive the `clearfix` class.
 * 2. The use of `table` rather than `block` is only necessary if using
 *    `:before` to contain the top-margins of child elements.
 */

.clearfix:before,
.clearfix:after {
    content: " "; /* 1 */
    display: table; /* 2 */
}

.clearfix:after {
    clear: both;
}

@media print,
(-webkit-min-device-pixel-ratio: 1.25),
(min-resolution: 1.25dppx),
(min-resolution: 120dpi) {
    /* Style adjustments for high resolution devices */
}

/* ==========================================================================
   Print styles.
   Inlined to avoid the additional HTTP request:
   http://www.phpied.com/delay-loading-your-print-css/
   ========================================================================== */

@media print {
    *,
    *:before,
    *:after {
        background: transparent !important;
        color: #000 !important;
        /* Black prints faster:
                                          http://www.sanbeiji.com/archives/953 */
        box-shadow: none !important;
        text-shadow: none !important;
    }

    a,
    a:visited {
        text-decoration: underline;
    }

    a[href]:after {
        content: " (" attr(href) ")";
    }

    abbr[title]:after {
        content: " (" attr(title) ")";
    }

    /*
     * Don't show links that are fragment identifiers,
     * or use the `javascript:` pseudo protocol
     */
    a[href^="#"]:after,
    a[href^="javascript:"]:after {
        content: "";
    }

    pre {
        white-space: pre-wrap !important;
    }

    pre,
    blockquote {
        border: 1px solid #999;
        page-break-inside: avoid;
    }

    /*
     * Printing Tables:
     * http://css-discuss.incutio.com/wiki/Printing_Tables
     */
    thead {
        display: table-header-group;
    }

    tr,
    img {
        page-break-inside: avoid;
    }

    p,
    h2,
    h3 {
        orphans: 3;
        widows: 3;
    }

    h2,
    h3 {
        page-break-after: avoid;
    }

    text {
        fill: #000000;
    }
}

/* Mobile */
@media screen and (max-width: 1366px) {
    #container-gauge,
    #container-wind-rose,
    #container-wind-chart {
        width: 100%;
    }

    html {
        background-color: #000000;
    }

    .inner {
        width: 90%;
    }

    #sidebar {
        display: none;
    }

    #main .sp1 {
        display: none;
    }

    #main, #main .sp2 {
        position: relative;
        width: 100%;
    }

    #help-group {
        display: none;
    }

    #hourly .label {
        padding-left: 0;
        text-align: center;
    }

    #history .label {
        padding-left: 0;
        text-align: center;
    }

    #current, #current .header, #current .maintenance-message {
        width: 100%;
    }

    #not-available .na {
        font-size: 10em;
    }

    #container-gauge {
        height: 338px;
        padding: 0 0 0 0;
    }

    #container-wind-rose {
        height: 338px;
        padding: 10px 0 5px 0;
    }

    #container-wind-chart {
        height: 338px;
        padding: 5px 0 10px 0;
    }

    #container-gauge,
    #container-wind-rose,
    #container-wind-chart {
        position: relative;
        min-height: unset;
    }

    footer .vertical-align {
        transform: none;
        top: unset;
    }

    address {
        padding: 10px 0 10px 0;
    }
}

/* Tablet override */
@media only screen
and (min-device-width: 750px)
and (max-device-width: 1024px) {
    #help-group {
        display: block;
    }
}