leaflet {
    display: block;
}

#maplayer {
    position: relative;
}

.leaflet-control-zoom {
    background: #FFFFFF !important;
    border: 1px solid #e2e2e2!important;
}

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

.leaflet-bar a.inline {
    display: inline !important;
    font-weight: 400;
    vertical-align: initial;
}

.leaflet-bar a.link {
    height: auto;
    width: auto;
    display: inline-block;
}

.leaflet-bar:not(.leaflet-control-status) a:not(:last-child) {
    border-bottom: 1px solid #e2e2e2;
}

.leaflet-bar a:hover {
    background-color: transparent !important;
}

.leaflet-control-dimension-link a {
    background-image: url(../img/map/dimension.png);
    opacity: 1;
}

.leaflet-control-satellite-link a {
    background-image: url(../img/map/satellitelayer.png);
    opacity: 1;
}

.leaflet-control-editmap-link a {
    background-image: url(../img/map/editmap.png);
    opacity: 1;
}

.leaflet-control-editmap-link.white-icon a {
    background-image: url(../img/map/editmap_white.png);
}

.leaflet-control-demolish-link a {
    background-image: url(../img/map/trash.png);
    opacity: 1;
}

.leaflet-control-demolish-link.white-icon a {
    background-image: url(../img/map/trash_white.png);
}

.leaflet-control-addbuilding-link a {
    background-image: url(../img/icon/add.png);
    opacity: 1;
}

.leaflet-control-addbuilding-link.white-icon a {
    background-image: url(../img/icon/add_white.png);
    opacity: 1;
}

.map-toolbar > *:not(:first-child) {
    border-left: 1px solid #e2e2e2;
}

.map-toolbar, .edit-map, .map-action {
    display: flex;
    display: -webkit-flex;
}

.edit-map {
    margin-right: 8px;
}

.map-action {
    flex-direction: row-reverse;
    position: absolute;
    top: 0;
    right: 40px;
}

.map-action > * > * {
    width: 88px;
    height: 64px;
}

.map-toolbar-btn {
    display: flex;
    display: -webkit-flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    background-color: #FFFFFF;
    cursor: pointer;
}

.map-toolbar-btn.active-dimension {
    background-color: #EEEFFD !important;
}

/*.map-toolbar-btn:hover {
  background-color: #EEEFFD;
}*/
.map-toolbar-title {
    margin-top: 8px;
    color: #6d6d6d;
}

.toolbar-done {
    color: #A95597!important;
}

.active-satellite.leaflet-control-satellite-link a {
    background-image: url(../img/map/topolayer.png);
}

.leaflet-control-measurement-link a {
    background-image: url(../img/map/measurement.png);
    opacity: 1;
}

.leaflet-control-measurement-link.white-icon a {
    background-image: url(../img/map/measurement_white.png);
}

.leaflet-control-zoom-in,
.leaflet-control-zoom-out {
    border-radius: 0 !important;
    width: 32px !important;
    height: 32px !important;
    line-height: 32px !important;
    color: transparent !important;
    background-size: 16px auto !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
}

.leaflet-control-dimension-link a,
.leaflet-control-satellite-link a,
.leaflet-control-measurement-link a,
.leaflet-control-editmap-link a,
.leaflet-control-demolish-link a,
.leaflet-control-addbuilding-link a,
.close-bar {
    border-radius: 0 !important;
    width: 16px !important;
    height: 16px !important;
    line-height: 16px !important;
    color: transparent !important;
    background-size: 16px auto !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
}

.leaflet-disabled {
    background-color: transparent !important;
}

.leaflet-control-zoom-in {
    background-image: url(../img/map/zoomin.png);
    opacity: 1;
}

.leaflet-control-zoom-in.leaflet-disabled {
    background-image: url(../img/map/zoomin_inactive.png);
    opacity: 1;
}

.leaflet-control-zoom-out {
    background-image: url(../img/map/zoomout.png);
    opacity: 1;
}

.leaflet-control-zoom-out.leaflet-disabled {
    background-image: url(../img/map/zoomout_inactive.png);
    opacity: 1;
}

.leaflet-top .leaflet-control {
    margin-top: 24px;
}

.leaflet-right .leaflet-control {
    margin-right: 24px;
}

.leaflet-left .leaflet-control {
    margin-left: 24px;
}

.leaflet-bottom .leaflet-control {
    margin-bottom: 24px;
}

.leaflet-right.leaflet-bottom {
    z-index: 1001;
}

.map-box {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;

    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    cursor: default;
    pointer-events: none;
}

.map-bar {
    background-color: #FFFFFF;
    color: #171717;
    margin: 0;
    pointer-events: auto;
}

.map-box-row {
    height: 48px;
    box-sizing: border-box;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    justify-content: center;
}

.map-box-row:not(:first-child) {
    border-top: 1px solid #e2e2e2;
}

.map-flex {
    display: flex;
    display: -webkit-flex;
    padding: 16px 0;
    align-items: center;
}

.map-button {
    box-sizing: border-box;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;

    display: flex;
    display: -webkit-flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;

    height: 64px;
    width: 88px;

    border-left: 1px solid #e2e2e2;
    cursor: pointer;
}

.map-button:last-child {
    border-right: 1px solid #e2e2e2;
}

.map-button .icon-button {
    width: 16px;
    height: 16px;
    background-size: 16px auto;
    border-radius: 0;
}

/*Measurement*/
.leaflet-measure-path-measurement {
    position: absolute;
    font-size: 9px !important;
    font-weight: 600;
    letter-spacing: 0.005625em; /* (9*2)/3200=0.005625*/
    color: #fff;
    text-shadow: -1px 0 0 #505050, -1px -1px 0 #505050, 0 -1px 0 #505050, 1px -1px 0 #505050, 1px 0 0 #505050, 1px 1px 0 #505050, 0 1px 0 #505050, -1px 1px 0 #505050;
    white-space: nowrap;
    transform-origin: 0;
    pointer-events: none;
}

.leaflet-measure-path-measurement > div {
    position: relative;
    font-size: 9px !important;
    font-weight: 600;
    letter-spacing: 0.005625em; /* (9*2)/3200=0.005625*/
    padding: 0 8px !important;
    border-radius: 4px;
    margin-top: -25%;
    margin-bottom: -50%;
    left: -50%;
}

.leaflet-draw-tooltip-subtext {
    color: #fff;
    text-shadow: -1px 0 0 #505050, -1px -1px 0 #505050, 0 -1px 0 #505050, 1px -1px 0 #505050, 1px 0 0 #505050, 1px 1px 0 #505050, 0 1px 0 #505050, -1px 1px 0 #505050;
    font-size: 9px !important;
    font-weight: 600;
    letter-spacing: 0.005625em;
    width: 50px;
    display: block;
}

.active-satellite .building-line {
    stroke: #fff !important;
}

.active-satellite .leaflet-draw-guide-dash {
    background-color: #FFFFFF !important;
}

/*Hide Draw Controls*/
.leaflet-draw.leaflet-control {
    height: 0 !important;
    overflow: hidden !important;
    opacity: 0 !important;
}

.measurement-popup .leaflet-popup-content {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
}

.measurement-popup .leaflet-popup-content-wrapper {
    border-radius: 0;
}

.measurement-popup .leaflet-popup-content * {
    font-size: 12px !important;
    line-height: 14px !important;
}

.leaflet-popup-close-button {
    display: none;
}

.instructions {
    display: flex;
    display: -webkit-flex;
    z-index: 99999;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    align-items: center;
    justify-content: center;
    background-color: transparent;
}

.back-to-nonmap-view {
    display: flex;
    display: -webkit-flex;
    z-index: 99999;
    position: absolute;
    top: -1000px;
    left: 0;
    width: 100%;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    
}

.leaflet-popup-content {
    padding: 8px;
    font-size: 12px;
    letter-spacing: 0.00375em;
    line-height: 16px;
}

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

.leaflet-popup-tip {
    border-left: 8px solid transparent !important;
    border-right: 8px solid transparent !important;
    border-top: 8px solid #FCFCFF !important;
    margin: -1px 0 0 !important;
}

.leaflet-popup-tip-container {
    width: 16px !important;
    height: 16px !important;
}

.leaflet-popup-content-wrapper, .map-legends, .map-tooltip {
    background: #FFFFFF !important;
    /*box-shadow: 0 0 6px rgba(81, 96, 236, 0.3) !important;
    -webkit-box-shadow: 0 0 6px rgba(81, 96, 236, 0.3) !important;
    -moz-box-shadow: 0 0 6px rgba(81, 96, 236, 0.3) !important;*/
    border-radius: 0 !important;
}

.leaflet-container a {
    font-weight: 600;
}

.map-note:not(:empty) {
    margin-top: 8px
}

.map-note a {
    font-weight: 400;
}

@media only screen and (max-width: 855px) {
    .map-action > * > * {
        width: 80px
    }

    .leaflet-control.map-action {
        margin-right: 8px;
    }

    .leaflet-control-zoom.leaflet-bar.leaflet-control {
        margin-right: 4px;
    }

}

.mobile-mini-map {
    width: 70%;
    height: 124px;
    justify-content: center;
    padding: 24px;
    margin: auto;
    align-items: center;
    margin-bottom: 24px;
    cursor: pointer;
}

@media screen and (max-width: 768px) {
    .mobile-mini-map {
        top: 0 !important;
        position: relative !important;
        height: 192px;
        width: 100%;
        margin-left: -24px;
    }
    
    #mobile-mini-map {
        pointer-events: none !important;
    }

    .hidden-off-screen {
        left: -10000px;
    }

    .mobile-mini-map .edit-map {
        position: absolute;
        bottom: 24px;
        z-index: 999999;
    }

    /*position mapbox marks on top left*/
    .leaflet-bottom.leaflet-left {
        top: 0px;
    }
    /*Hide zoom*/
    .leaflet-control-zoom {
        display: none;
    }
    /*move instructions to bottom*/
    .instructions {
        bottom: 0px;
        top: initial;
    }
    #maplayer .leaflet-bottom.leaflet-right {
        height: 64px;
        left: 0px;
        right: 0px;
        width: 100%;
        background-color: #FCFCFF;
        display: flex;
        box-shadow: 0 0 6px rgba(81, 96, 236, 0.3);
        -webkit-box-shadow: 0 0 6px rgba(81, 96, 236, 0.3);
        -moz-box-shadow: 0 0 6px rgba(81, 96, 236, 0.3);
    }
    #maplayer .leaflet-bottom.leaflet-right .shadowed {
        box-shadow: none;
        -webkit-box-shadow: none;
        -moz-box-shadow: none;
    }
    #maplayer .leaflet-top.leaflet-right .leaflet-control {
        margin-right: 16px;
        margin-top: 64px;
    }
    .maynotfit {
        top: 64px;
        right: 16px;
    }
    .map-box {
        bottom: 0px;
        top: initial;
        z-index: 1002;
    }
    .map-action {
        margin: auto!important;
        right: auto;
        top: auto;
        position: relative;
        border-left: 1px solid #e2e2e2;
        border-right: 1px solid #e2e2e2;
    }
    .edit-map {
        margin-right: 0px;
    }
    .map-toolbar > * {
        border-left: 1px solid #e2e2e2;
    }
    #maplayer[mapmode='yes']:not([editmode='yes']) .back-to-nonmap-view {
        top: 0px;
    }
    [mobile='yes'] .leaflet-control-measurement-link, [mobile='yes'] #add {
        display: none;
    }
}
