/*
    Workaround for https://github.com/Leaflet/Leaflet/issues/3575
*/
.leaflet-tile-container img {
    box-shadow: 0 0 1px rgba(0, 0, 0, .05);
}

/*
    Fix leaflet button styles
*/
.leaflet-bar button {
    margin: 0;
    padding: 0;
}

/*
    External links button
*/
.open-active .fa, .closed-active .fa {
    font-size: .875rem;
}

.open-active:hover {
    background: white;
}

/*
    Remove touch border
*/
.leaflet-touch .leaflet-bar {
    border: 0;
}

/*
    Customise button looks
*/
.add-point-active, .remove-point-active {
    background: red;
    color: white;
}

.leaflet-control-zoom > a,
.leaflet-disabled {
    background-color: black !important;
    border: 1px solid black !important;
    color: white !important;
}

.leaflet-control-geocoder-icon {
    background: black !important;
    border: 1px solid black;
    color: white;
}

.closed-active {
    background: black;
    color: white;
}

.leaflet-control-geocoder-icon::before {
    color: white;
}

.leaflet-control-geocoder-icon:hover,
.leaflet-control-zoom > a:hover,
.add-point-active:hover,
.remove-point-active:hover,
.closed-active:hover {
    box-shadow: 0 0 1px 1px white;
    background: black;
    color: white;
    position: relative;
    z-index: 10;
}

.add-point-active:hover,
.remove-point-active:hover {
    background: red;
}

/*
    Leaflet marker styles
*/
.vector-marker {
    width: 28px;
    height: 37px;
    position: absolute;
    left: 0;
    top: 0;
    display: block;
    text-align: center;
    -webkit-filter: drop-shadow(1px 0px 2px #999);
    filter: drop-shadow(1px 0px 2px #999);
}

/*
    Make sure the attribution is always rendered as one line
*/

.leaflet-control-attribution {
    border-radius: 3px 0 0 0;
}

.leaflet-control-attribution ul {
    list-style: none;
    margin: 0;
}

.leaflet-control-attribution ul li {
    float: left;
    font-size: 9px !important;
    font-weight: normal;
    margin-bottom: 2px;
    padding: 0;
    position: relative;
    top: 1px;
}

.leaflet-control-attribution ul li + li {
    margin-left: 5px;
}

.leaflet-control-attribution ul li a {
    font-weight: normal;
    color: #333;
    line-height: 10px;
}

.leaflet-control-attribution ul li a:hover {
    color: #2D5594;
}

/*
    Map button context menu
*/

.easy-button-container {
    background-color: white;
}

button.open-active {
    float: right;
}

.leaflet-container .leaflet-control-container .map-context-menu {
    float: left;
    list-style: none;
    margin: 0;
    padding: 0;
    text-align: right;
}

.leaflet-container .leaflet-control-container .map-context-menu li a,
.leaflet-container .leaflet-control-container .map-context-menu li a:hover {
    font-size: .875rem !important;
    font-weight: normal !important;
    padding: 0 5px;
    text-align: left;
    text-overflow: normal !important;
    width: auto !important;
}

/*
    Disable mouse pointer on non-clickable markers (which is currently all)
*/

.marker-undefined {
    cursor: -webkit-grab;
    cursor: -moz-grab;
    cursor: grab;
}

.marker-thumbnail {
    cursor: auto;
}

/*
    Leaflet geocoder fixes
*/

.leaflet-control-geocoder-expanded {
    width: 200px;
}

.leaflet-control-geocoder-icon {
    float: right;
    height: 24px;
    margin: 0;
    padding: 0;
}

.leaflet-control-geocoder-icon::before {
    content: "\f002";
    font-family: "FontAwesome";
    margin-left: 4px;
    position: relative;
    top: -1px;
}

.leaflet-control-geocoder .leaflet-control-geocoder-form {
    width: 165px;
}

.leaflet-control-geocoder .leaflet-control-geocoder-form input {
    box-shadow: none;
    font-size: 12px;
    height: 25px;
    margin: 0;
    width: 100%;
}

.leaflet-control-geocoder .leaflet-control-geocoder-form input:focus {
    box-shadow: none;
    background: none;
}

.leaflet-control-geocoder ul {
    width: 100%;
}

.leaflet-control-geocoder li {
    border-color: #efefef;
    display: none;
    font-size: 12px;
    margin: 0;
}

.leaflet-control-geocoder li:nth-child(1),
.leaflet-control-geocoder li:nth-child(2),
.leaflet-control-geocoder li:nth-child(3) {
    display: block;
}

.leaflet-control-geocoder-form-no-error {
    display: none;
}

.leaflet-control-geocoder-error {
    background-color: red;
    display: block;
    height: 4px;
    margin: 0;
    padding: 0;
    position: relative;
    top: -1px;
    z-index: 100;
    box-shadow: 0 2px 0 0 red;
}

/*
    Leaflet popups
*/

.leaflet-popup > div {
    border-radius: 5px;
}

.leaflet-popup-content {
    font-size: .8rem;
    margin: 7px 14px !important;
}

.leaflet-popup-content .popup-title {
    font-weight: bold;
}
