*, *:after, *:before {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

body {
    font-family: sans-serif;
}

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

.head {
    background-color: #2D3A2D;
    color: #F1F2F1;
    height: 50px;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 0 1em;
}

.head h1 {
    margin: 0;
    margin-right: 10px;
    line-height: 50px;
    display: inline;
    font-size: 18px;
}

.logo {
    float: left;
    padding-right: 12px;
    padding-top: 6px;
    height: 41px;
}

.reset {
    background-color: #062506;
    color: #C0C0C0;
    border: none;
    line-height: 35px;
    padding: 0 18px;
    margin: 7px 0;
    font-family: sans-serif;
    font-size: .8em;
    cursor: pointer;
    border-radius: 4px;
}

.mapbox {
    width: 100%;
    padding-right: 256px;
    position: absolute;
    top: 50px;
    bottom: 0;
}

#map {
    height: 100%;
    bottom: 0;
}

.arter, .individer {
    font-size: .9em;
    color: #C0C0C0;
}

.species {
    overflow: scroll;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;    
    width: 256px;
    background-color: #FFF;
    background-color: rgba(255, 255, 255, 0.9);
    border-left: 1px solid gray;
    position: absolute;
    top: 50px;
    right: 0;
    bottom: 0;
    font-size: .9em;
}

.species h2{
    font-size: 1.15rem;
    margin: 0;
}

.specieshead {
    padding: 1.7em 1em 1.7em 1em;
    text-align: center;
    background-color: #20422D;
    color: #FFF;
}

.species ul {
    list-style: none;
    height: 100%;
    margin: 0;
    padding: 0;
    padding-top: .6em;
}

.species li {
    cursor: pointer;
    padding: .5em 1em;
}

.species li:last-child {
    padding-bottom: 1em;
}

.species li h3 {
    font-style: italic;
    font-size: 1em;
}

.species li h3, .species li p {
    margin: 0;
}

.species li p {

}

.searchtools {
    right: 8px;
    position: absolute;
    text-align: right;
    width: 600px;
}

.searchtools select {
    margin: 0 20px;
}

.searchtools input {
    background: url("img/search_white.svg") no-repeat 8px center;
    background-size: 15px 15px;
    background-color: #FFF;
    height: 32px;
    margin: 0;
    width: 243px;
    padding: 0 10px 0 30px;
    border: none;
    border-radius: 4px;
    color: #C0C0C0;
}

.searchtools input:focus {
    background-color: #FFF;
    color: #062506;
}

.searchtools > *{
    -webkit-tap-highlight-color: rgba(255, 255, 255, 0); 
    -webkit-tap-highlight-color: transparent;
    outline: none;    
}

.leaflet-popup-content-wrapper {
    border-radius: 2px;
}

.leaflet-popup-content-wrapper p{
    margin: 0 0 1em 0;
}

.leaflet-control-attribution a {
    text-decoration: underline;
}

.name {
    margin: 0;
    font-style: italic;
    padding-right: 35px;
    line-height: 1.15;
    margin-bottom: 5px;
}

.popup .taxinfo {
    margin-bottom: 1em;
    display: block;
    color: #707070;
    font-size: 1.2em;
}

.popup .distr {
    font-size: .85em;
}

.leaflet-container a, .leaflet-container a:visited, .leaflet-container input {
    color: #525151;
}

.leaflet-bar {
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    -webkit-border-radius: 0 !important;    
    border-radius: 0 !important;
}

.leaflet-bar a{
    -webkit-border-radius: 0 !important;    
    border-radius: 0 !important;
}

.popup {
    position: relative;
}

.numero {
    position: absolute;
    top: 5px;
    right: 0;
    color: #7F7E7E;
}

.popup a {
    text-decoration: underline;
    cursor: pointer;
}

.popup .readmore {
    margin-top: 1em;
    display: block;
}

.popup th {
    vertical-align: top;
}

.popup .indImg {
    cursor: pointer;
}

/*.blur {
    -webkit-filter: blur(2px);
}*/

.searchTools {
    margin-top: 1em;
    font-size: .9em;    
}

.ui-autocomplete {
    max-height: 500px;
    max-width: 223px;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;   
    box-shadow: 0 3px 14px rgba(0,0,0,0.4);
    border-bottom-right-radius: 4px;
    border-bottom-left-radius: 4px;
    background-color: #FFF;
}

.ui-state-hover,
.ui-widget-content .ui-state-hover,
.ui-widget-header .ui-state-hover,
.ui-state-focus,
.ui-widget-content .ui-state-focus,
.ui-widget-header .ui-state-focus {
    border: 1px solid #fff;
    background: #F0EEEE;
}

.fix:before, .fix:after {
    content: " ";
    display: table;
}

.fix:after {
    clear: both;
}

.showSpecies {
    display: none;
}

.leaflet-container .leaflet-control-attribution {
    font-size: 10px;
    color: #757575;
    box-shadow: none;
    background: rgba(255, 255, 255, 0.5);
}

.leaflet-container .leaflet-control-scale {
    -webkit-transform: rotate(-90deg);
            transform: rotate(-90deg);
    -webkit-transform-origin: right top;
            transform-origin: right top;
    right: 9px;
    top: -6px;
}

.leaflet-control-scale-line {
    border-width: 1px;
    border-color: #757575;
    font-size: 10px;
}

.leaflet-container {
    background-color: #FEFEFE;
}

.txt_overlay {
    position: absolute;
    top: 0;
    z-index: 1001;
    height: 100%;
    padding-right: 256px;
    width: 100%;
    background-color: rgba(2, 5, 2, 0.7);
}

.txt_overlay_content::after {
    content: "\00d7";
    right: 8px;
    top: -2px;
    position: absolute;
    color: darkgray;
    font-size: 1.5em;
    cursor: pointer;
}

.txt_overlay_content {
    background-color: #FFFFFB;
    padding: 2em;
    box-shadow: 0 3px 14px rgba(0,0,0,0.4);
    max-width: 620px;
    margin: 1em auto;
    position: relative;
    overflow: scroll;
    border-radius: 2px;
    line-height: 1.4;
    max-height: 90%;
    font-family: Georgia, serif;
}

.txt_overlay_content h2 {
    margin: 0;
    font-family: sans-serif;
}

.scientific {
    margin-top: 0;
    color: gray;
    font-family: sans-serif;
    font-style: italic;
}

.txt_overlay_content img{
    max-height: 71vh;
    max-width: 100%;
    display: block;
    margin: 0 auto;
}

 .popup img{
    width: 100%;

 }

.txt_overlay_content > :last-child {
    margin-bottom: 0;
}

@media only screen and (max-width: 930px) {

    .txt_overlay {
        padding: 0;
        /*background: none;*/
    }

    .txt_overlay_content {
        margin: 0 auto;
        padding: 1.5em;
        max-height: 100%;
        min-height: 100%;
        border-radius: 0;
    }

    .mapbox {
        padding: 0;
    }

    .head .arter, .head .individer, .head h1, .logo {
        display: none;
    }

    .head {
        padding: 0;
        background-color: #062506;
    }

    .searchtools {
        width: 100%;
        position: static;
        display: block;
        height: 50px;
        text-align: left;
    }

    .searchtools input {
        border: none;
        padding: 5px;
    }

    #searchbar {
        background-color: #062506;
        color: #062506;
        width: 25%;
        max-width: none;
        border-radius: 0;
        height: 49px;
        background: url("img/search.svg") no-repeat center;
        text-indent: -9999px;
        background-size: 17px 17px;
    }

    #searchbar:focus {
        background-color: #FFF;
        width: 50%;
        color: #062506;
        text-indent: 0;
        font-family: sans-serif;
        font-size: .8em;
    }

    .searchtools > * {
        float: left;
    }

    #regionSelector {
        width: 25%;
        margin: 0;
        background-color: #062506;
        color: #C0C0C0;
        border: none;
        -webkit-appearance: none;
        height: 50px;
        border-radius: 0;
        background: url("img/globe.svg") no-repeat center;
        text-indent: -9999px;
        background-size: 17px 17px;
    }

    #regionSelector option {
        text-transform: none;
    }

    .reset {
        width: 25%;
        padding: 0;
        margin: 0;
        height: 50px;
        border-radius: 0;
        background: url("img/home.svg") no-repeat center;
        text-indent: -9999px;
        background-size: 17px 17px;
    }

    .showSpecies {
        border: none;
        display: inline;
        width: 25%;
        padding: 0;
        margin: 0;
        height: 50px;
        border-radius: 0;
        background: url("img/list.svg") no-repeat center;
        text-indent: -9999px;
        background-size: 17px 17px;
    }

    .species {
        display: none;
    }

    .ui-autocomplete {
        max-width: 300px;
        z-index: 99999;
    }
}

.leaflet-control-gps a.passive {
    background: url("img/cross.png") 2px no-repeat white;
    background-repeat: no-repeat;
    background-position: 0px 2px;
}

.leaflet-control-gps a.active {
    background: url("img/cross.png") 2px no-repeat white;
    background-repeat: no-repeat;
    background-position: 0px -24px;
}


.leaflet-control-fullscreen a {
  background: #fff url(js/Leaflet.fullscreen/src/fullscreen.png) no-repeat 0 0;
  background-size: 26px 52px;
}

.leaflet-touch .leaflet-control-fullscreen a {
  background-position: 2px 2px;
}

.leaflet-fullscreen-on .leaflet-control-fullscreen a {
  background-position: 0 -26px;
}

.leaflet-fullscreen-on .leaflet-touch .leaflet-control-fullscreen a {
  background-position: 0px -24px;
}

.leaflet-control {
    clear: none;
}

@media (-webkit-min-device-pixel-ratio:2), (min-resolution:192dpi) {
    .leaflet-control-fullscreen a {
        background-image: url(js/Leaflet.fullscreen/src/fullscreen@2x.png);
    }

    .leaflet-control-gps a.passive {
        background: white url("img/cross.svg");
        background-repeat: no-repeat;
        background-position: 0px 3px;
        background-size: 26px;
    }

    .leaflet-control-gps a.active {
        background: white url("img/cross.svg");
        background-repeat: no-repeat;
        background-position: 0px -23px;
        background-size: 26px;
    }        
}
