/*
 * Paikallinen Leafletin kriittinen CSS-varmistus.
 * Jos CDN:n leaflet.css ei lataudu, nämä pitävät karttatiilet,
 * markerit ja popupit oikeilla paikoillaan.
 */
.leaflet-container {
    overflow: hidden;
    position: relative;
    z-index: 0;
    background: #ddd;
    outline-offset: 1px;
    font-family: inherit;
    touch-action: none;
}

.leaflet-pane,
.leaflet-tile,
.leaflet-marker-icon,
.leaflet-marker-shadow,
.leaflet-tile-container,
.leaflet-pane > svg,
.leaflet-pane > canvas,
.leaflet-zoom-box,
.leaflet-image-layer,
.leaflet-layer {
    position: absolute;
    left: 0;
    top: 0;
}

.leaflet-tile,
.leaflet-marker-icon,
.leaflet-marker-shadow {
    user-select: none;
    -webkit-user-drag: none;
}

.leaflet-tile {
    filter: inherit;
    visibility: hidden;
}

.leaflet-tile-loaded {
    visibility: inherit;
}

.leaflet-container img.leaflet-tile,
.leaflet-container img.leaflet-marker-icon,
.leaflet-container img.leaflet-marker-shadow {
    max-width: none !important;
    max-height: none !important;
}

.leaflet-container .leaflet-overlay-pane svg {
    max-width: none !important;
    max-height: none !important;
}

.leaflet-tile-container {
    width: 256px;
    height: 256px;
}

.leaflet-pane { z-index: 400; }
.leaflet-tile-pane { z-index: 200; }
.leaflet-overlay-pane { z-index: 400; }
.leaflet-shadow-pane { z-index: 500; }
.leaflet-marker-pane { z-index: 600; }
.leaflet-tooltip-pane { z-index: 650; }
.leaflet-popup-pane { z-index: 700; }

.leaflet-map-pane canvas { z-index: 100; }
.leaflet-map-pane svg { z-index: 200; }

.leaflet-control {
    position: relative;
    z-index: 800;
    pointer-events: auto;
    float: left;
    clear: both;
}

.leaflet-top,
.leaflet-bottom {
    position: absolute;
    z-index: 1000;
    pointer-events: none;
}

.leaflet-top { top: 0; }
.leaflet-right { right: 0; }
.leaflet-bottom { bottom: 0; }
.leaflet-left { left: 0; }

.leaflet-control-container .leaflet-top.leaflet-left .leaflet-control {
    margin-left: 10px;
    margin-top: 10px;
}

.leaflet-control-container .leaflet-top.leaflet-right .leaflet-control {
    margin-right: 10px;
    margin-top: 10px;
}

.leaflet-control-container .leaflet-bottom.leaflet-left .leaflet-control {
    margin-left: 10px;
    margin-bottom: 10px;
}

.leaflet-control-container .leaflet-bottom.leaflet-right .leaflet-control {
    margin-right: 10px;
    margin-bottom: 10px;
}

.leaflet-bar {
    box-shadow: 0 1px 5px rgba(0,0,0,.25);
    border-radius: 8px;
    overflow: hidden;
}

.leaflet-bar a,
.leaflet-bar a:hover {
    background-color: #fff;
    border-bottom: 1px solid #d1d5db;
    width: 30px;
    height: 30px;
    line-height: 30px;
    display: block;
    text-align: center;
    text-decoration: none;
    color: #111827;
    font: 700 18px/30px system-ui, sans-serif;
}

.leaflet-bar a:last-child { border-bottom: 0; }
.leaflet-bar a:hover { background-color: #f3f4f6; }
.leaflet-disabled { cursor: default; opacity: .45; }

.leaflet-popup {
    position: absolute;
    text-align: center;
    margin-bottom: 20px;
}

.leaflet-popup-content-wrapper {
    padding: 1px;
    text-align: left;
    border-radius: 16px;
    background: #fff;
    color: #172033;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .22);
}

.leaflet-popup-content {
    margin: 13px 19px;
    line-height: 1.4;
    min-height: 1px;
}

.leaflet-popup-tip-container {
    width: 40px;
    height: 20px;
    position: absolute;
    left: 50%;
    margin-left: -20px;
    overflow: hidden;
    pointer-events: none;
}

.leaflet-popup-tip {
    width: 17px;
    height: 17px;
    padding: 1px;
    margin: -10px auto 0;
    transform: rotate(45deg);
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .18);
}

.leaflet-popup-close-button {
    position: absolute;
    top: 0;
    right: 0;
    border: none;
    text-align: center;
    width: 28px;
    height: 28px;
    font: 18px/28px system-ui, sans-serif;
    color: #64748b;
    text-decoration: none;
    background: transparent;
}

.leaflet-popup-close-button:hover {
    color: #0f172a;
}

.leaflet-container a.leaflet-popup-close-button {
    color: #64748b;
}

.leaflet-interactive { cursor: pointer; }
.leaflet-grab { cursor: grab; }
.leaflet-dragging .leaflet-grab { cursor: grabbing; }

.leaflet-control-attribution {
    background: rgba(255, 255, 255, .78);
    margin: 0;
    padding: 2px 6px;
    color: #334155;
    font-size: 11px;
}

.leaflet-control-attribution a {
    color: #1d4ed8;
    text-decoration: none;
}
