/* 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;
}

.marker-circle-divicon {
    border-radius:50%;
    border:2px solid red;
}

/* HIDE LEAFLET DRAW ICON WHICH SHOWS EVEN IF ASKED NOT TO */
.leaflet-draw-section {
    display: none;
}

/* 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: Arial, sans-serif;
}

/* 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-radius:4px;
}
.leaflet-control-basemapbar-open span {
    font-size: 23px;
    line-height:2;
}
.leaflet-control-basemapbar-close {
    border-top-right-radius:4px;
    border-bottom-right-radius:4px;

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

.leaflet-control-basemapbar .leaflet-control-basemapbar-hidden {
    display:none;
}

#leftbar_toggler {
    position: absolute;
    top: 78px;
    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 {
    padding: 15px 10px 15px 10px;
    max-width: 400px;
    max-height: 400px;
    overflow-y:auto;
}

/* 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 also initClickQuery()
 * see also wms/clickquery/*.html
 * see also site.php/clickquery()
 */

#dialog_clickquery {
    padding:0;
}

#dialog_clickquery h1 {
    font-size:12pt;
    background-color:rgb(200,200,200);
    color:#444444;
    padding:0.1em 0 0.1em 0.5em;
}

#dialog_clickquery div.clickquery {
    padding:0 1em 1em 1em;
    font-size:9pt;
}

#dialog_clickquery div.clickquery div {
    margin-bottom:1em;
}

#dialog_clickquery div.clickquery table {
    font-size:8pt;
}

#dialog_clickquery div.moreinfo {
    display:none;
}
#dialog_clickquery div.lessinfo {
    display:block;
}

#dialog_clickquery div.bold {
    font-weight:bold;
}

#dialog_clickquery div.photo {
    font-size:75%;
    text-align:center;
    font-style: italic;
}

#dialog_clickquery div.photo a {
    text-decoration: none;
}

#dialog_clickquery div.photo img {
    max-width:100%;
}
