/* STACKING ORDER OF CONTROLS RELATIVE TO JQUI MODAL DIALOGS... */

.leaflet-bottom, .leaflet-top {
    z-index: 50;
}

.ui-front {
    /*defaults to 1000 which is below other page elements set to 1001+ to be above leaflet map*/
    z-index: 10000 !important;
}

/* LEAFLET MARKER FIXES */
.leaflet-marker-draggable {
    cursor:move;
}

/* DIALOG TOGGLER */
div.leaflet-control-legendtoggle {
    display:inline-block;
    background-color:white;
    color:#444;
    cursor:pointer;
    padding:0.25em 1em 0.25em 1em;
    line-height: 2.1 !important;
    font-size: 13px;
    font-weight: bold;
    width: auto;
    height:35px;
    margin-left:20px !important; /* overrides typical L.control margin */
    left:350px;
    font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;
}

/* BOX ZOOM */

.leaflet-control-boxzoom {
    background-color:white;
    border-radius: 4px;
    border:1px solid #cccccc;

    width:25px;
    height:25px;
    line-height: 25px !important;

    background-image:url(../../images/leaflet-control-boxzoom.svg);
    background-repeat:no-repeat;
    background-size:21px 21px;      /* 25px image, 25px box: subtract 2px for padding on every side = 21px rendering height */
    background-position:2px 2px;

    box-shadow: 0 1px 2px rgba(0,0,0,0.65);

    cursor:pointer;
}

.leaflet-control-boxzoom.leaflet-control-boxzoom-active {
    background-color:#aaaaaa;
}


/* BASEMAP PICKER */

.leaflet-control-basemapbar {
    color: #444 !important;
}

.leaflet-control-basemapbar {
    box-shadow: 0px 1px 5px rgba(0,0,0,0.65);
    border-radius:3px;
    font-weight: bold;
    background-color:white;
    cursor:pointer;
    border-radius:3px;
}

.leaflet-control-basemapbar > div {
    font-size: 13px;
    color: #444;
    display:inline-block;
    padding:0.25em .75em 0.25em .75em;
    border-left: 1px solid rgba(0,0,0,0.25);
    height:35px;
    line-height:2.3;
}
.leaflet-control-basemapbar > div:last-child {
    border:none;
}


/*.leaflet-control-basemapbar-option {
    border:1px solid rgba(0, 0, 0, 0.4);
}*/

.leaflet-control-basemapbar-option:hover {
    background: #e0e0e0;
}

.leaflet-control-basemapbar-option-active {
    color:white !important;
    background-color:black !important;
}
.leaflet-control-basemapbar-option:first-child {
    border-bottom-left-radius:5px;
    border-top-left-radius:5px;
}
.leaflet-control-basemapbar-option:last-child {
    border-bottom-right-radius:5px;
    border-top-right-radius:5px;

    border-right:0 none transparent;
}

.leaflet-control-basemapbar-open {
    /*border:1px solid rgba(0, 0, 0, 0.4); TFA no border to better match leaflet controls*/
    border-radius:4px;

    /* when expanded, they're 7pt but when closed it's sized to match everything else */
    /*font-size:12px; TFA*/
}
.leaflet-control-basemapbar-open span {
    font-size: 23px;
    line-height:2;
}
.leaflet-control-basemapbar-close {
    /*border:1px solid rgba(0, 0, 0, 0.4); TFA no border to better match leaflet controls*/
    border-top-right-radius:4px;
    border-bottom-right-radius:4px;

    font-size:7pt; /* same size as the options defined above */
}

/*.leaflet-control-basemapbar-open {
    border:1px solid rgba(0, 0, 0, 0.4);
    border-radius:4px;
}
.leaflet-control-basemapbar-close {
    border:1px solid rgba(0, 0, 0, 0.4);
    border-top-right-radius:4px;
    border-bottom-right-radius:4px;
}*/
.leaflet-control-basemapbar .leaflet-control-basemapbar-hidden {
    display:none;
}

#leftbar_toggler {
/*    position:absolute;
    top:50%; left:350px;

    height:58px;
    width:27px;

    background-repeat:no-repeat;

    z-index:800;

    cursor:pointer;*/

    position: absolute;
    top: 75px;
    left: 350px;
    height: 58px;
    width: 27px;
    background-repeat: no-repeat;
    z-index: 800;
    cursor: pointer;

    display: inline-block;
    background-color: white;
    color: #444;
    cursor: pointer;
    padding: 0.25em 0.5em;
    line-height: 2.1 !important;
    font-size: 13px;
    font-weight: bold;
    width: auto;
    height: 28px;
    left: 350px;
    border-top-right-radius: 3px;
    border-bottom-right-radius: 3px;
    text-align: center;
    text-decoration: none;
    box-shadow: 0 1px 5px rgba(0,0,0,0.65);
}
#leftbar_toggler.leftbar_toggler_expanded {
    /*background-image:url(../../images/sidebar_expanded.png);*/
}
#leftbar_toggler.leftbar_toggler_collapsed {
    /*background-image:url(../../images/sidebar_collapsed.png);*/
}


/* LEAFLET POPUP FIXES */
.leaflet-popup-content-wrapper {
    padding:0;
}
.leaflet-popup-content {
    padding: 0;
    max-width: 400px;
    max-height: 400px;
    overflow-y:auto;
}
.leaflet-popup-content > div {
    padding: 15px 10px 15px 10px;
}

/* LEAFLET CONTROL FIXES */
.leaflet-control-attribution a {
    color:#333333 !important;
}

.leaflet-control-attribution {
    font-size:7pt;
    line-height: 10pt;
}

/* CUSTOM LEAFLET CONTROL: GIN LOGO & CREDITS */
.leaflet-greeninfocredits-control {
    margin-right:0 !important;
    margin-bottom:0 !important;

    height:47px; /* image is 39x39, this extra 8 is somwething about MapboxJS */
    padding-right:39px;

    background-image:url(../../images/greeninfo.png);
    background-repeat:no-repeat;
    background-position:100% 0;

    background-color:white;
    opacity:0.90;
    border-radius:5px;
    border:4px solid rgba(0, 0, 0, 0.1);

    cursor:pointer;
}
.leaflet-greeninfocredits-control a {
    font-size:8pt;
    color:#333333 !important;
    text-decoration:none;

    text-align:right;

    display:none; /* becomes visible on mouse hover, see GreeninfoCreditsControl */
}
.leaflet-greeninfocredits-control a.leaflet-greeninfocredits-showlink {
    display:inline-block;
    padding-left:5px;
    padding-right:5px;

    margin-top:5px;

    line-height:15px;
}

/* CUSTOM LEAFLET CONTROL: ZOOM BAR WITH HOME */
.leaflet-bar {
    box-shadow: 0 1px 5px rgba(0,0,0,0.65);

}

.leaflet-bar a:first-child {
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
}
.leaflet-bar a, .leaflet-control-layers-toggle {
    background-position: 50% 50%;
    background-repeat: no-repeat;
    display: block;
}
.leaflet-bar a,  .leaflet-control-dialogtoggle {
    background-color: #fff;
    border-bottom: 1px solid #ccc;
    /*border-bottom-color: rgb(204, 204, 204);*/
    color: #444;
    display: block;
    height: 26px;
    width: 26px;
    line-height: 1.45 !important;
    text-align: center;
    text-decoration: none;
    font: bold 18px 'Lucida Console', Monaco, monospace;
    /*text-indent: 1px;*/
}

.grey {
    color: #444;
}

.leaflet-container a {
    /*font-weight: bold;*/
}

.leaflet-right .leaflet-control {
    margin-right:10px;
}
.leaflet-control-scale.leaflet-control {
    background-color:rgba(255,255,255,0.3) !important;
    font-size:90%;
    left:350px; /* initial position */
}

.leaflet-bar, .leaflet-control {
    border:none;
    background-color: #fff;
    border-top-left-radius: 3px;
    border-bottom-left-radius:3px;
}
.leaflet-bar a {
    border-bottom: 1px solid #ccc;
}

/* Font awesome icons: make then middle align (override baseline);*/
i.fa {
    vertical-align:middle;
}



/* WMS GetFeatureInfo popups; see wms/clickquery/*.html */

.clickinfo-with-header {
    padding: 0px !important;
}

.clickinfo-header {
    color: white;
    background-color: #777777;
}

.clickinfo-title {
    font-size: 18px;
    font-weight: 700;
    /*margin-bottom: 10px; */
}

.clickinfo-header,
.clickinfo-sub-info {
    padding: 10px 5px 5px 10px;
}

.clickinfo-info {
    margin-top: 5px;
}

.clickinfo-fieldname {
    font-weight: 700;
    font-size: 1em;
}

.leaflet-popup-close-button {
    right:-5px;
    top:-5px;
}
