/* PL-04 map isolation. This stylesheet is intentionally local and self-contained:
 * map geometry must not depend on a third-party stylesheet reaching a CDN.
 * All Leaflet rules are scoped to this component, not to storefront/dashboard CSS. */
.pl04-location {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    padding: 1rem;
    margin: 1rem 0;
}
.pl04-location legend { font-weight: 700; padding: 0 .4rem; }
.pl04-location__map,
.pl04-location__map.leaflet-container {
    position: relative;
    display: block;
    width: 100%;
    height: 270px;
    min-height: 270px;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    isolation: isolate;
    background: #e2e8f0;
    border-radius: 10px;
    z-index: 0;
    cursor: grab;
    touch-action: pinch-zoom;
}
.pl04-location__map.leaflet-dragging { cursor: grabbing; }
/* Without these absolute positions Leaflet's translated 256px tiles become
 * independent normal-flow images, as observed on BOTH storefront and dashboard. */
.pl04-location__map .leaflet-pane,
.pl04-location__map .leaflet-map-pane,
.pl04-location__map .leaflet-tile,
.pl04-location__map .leaflet-tile-container,
.pl04-location__map .leaflet-marker-icon,
.pl04-location__map .leaflet-marker-shadow,
.pl04-location__map .leaflet-image-layer,
.pl04-location__map .leaflet-layer,
.pl04-location__map .leaflet-pane > svg,
.pl04-location__map .leaflet-pane > canvas,
.pl04-location__map .leaflet-zoom-box {
    position: absolute !important;
    top: 0;
    left: 0;
}
.pl04-location__map .leaflet-map-pane,
.pl04-location__map .leaflet-pane,
.pl04-location__map .leaflet-tile-pane,
.pl04-location__map .leaflet-tile-container {
    width: auto;
    height: auto;
    max-width: none !important;
    max-height: none !important;
    max-inline-size: none !important;
    max-block-size: none !important;
}
.pl04-location__map .leaflet-map-pane { z-index: auto; }
.pl04-location__map .leaflet-tile-pane { z-index: 200; }
.pl04-location__map .leaflet-overlay-pane { z-index: 400; }
.pl04-location__map .leaflet-shadow-pane { z-index: 500; }
.pl04-location__map .leaflet-marker-pane { z-index: 600; }
.pl04-location__map .leaflet-tooltip-pane { z-index: 650; }
.pl04-location__map .leaflet-popup-pane { z-index: 700; }
.pl04-location__map .leaflet-tile {
    display: block !important;
    width: 256px !important;
    height: 256px !important;
    min-width: 256px !important;
    min-height: 256px !important;
    max-width: none !important;
    max-height: none !important;
    max-inline-size: none !important;
    max-block-size: none !important;
    visibility: hidden;
    object-fit: fill !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}
.pl04-location__map .leaflet-tile-loaded { visibility: visible; }
.pl04-location__map .leaflet-zoom-animated { transform-origin: 0 0; }
.pl04-location__map .leaflet-marker-icon,
.pl04-location__map .leaflet-marker-shadow {
    max-width: none !important;
    max-height: none !important;
    object-fit: fill !important;
    background: transparent !important;
    border-radius: 0;
}
/* HTML marker: no dependency on Leaflet's externally hosted default PNGs. */
.pl04-location__map .leaflet-marker-icon.pl04-location__pin {
    box-sizing: border-box;
    width: 22px !important;
    height: 22px !important;
    background: #a5211b !important;
    border: 3px solid #fff !important;
    border-radius: 50% !important;
    box-shadow: 0 1px 6px rgba(0,0,0,.55) !important;
    cursor: move;
}
.pl04-location__map .leaflet-control-container { font-family: inherit; }
.pl04-location__map .leaflet-top,
.pl04-location__map .leaflet-bottom {
    position: absolute;
    z-index: 1000;
    pointer-events: none;
}
.pl04-location__map .leaflet-top { top: 0; }
.pl04-location__map .leaflet-bottom { bottom: 0; }
.pl04-location__map .leaflet-left { left: 0; }
.pl04-location__map .leaflet-right { right: 0; }
.pl04-location__map .leaflet-control {
    position: relative;
    z-index: 800;
    pointer-events: auto;
    margin: 10px;
}
.pl04-location__map .leaflet-control-zoom {
    overflow: hidden;
    border-radius: 5px;
    border: 1px solid #aab7c1;
    background: #fff;
    box-shadow: 0 1px 6px rgba(0,0,0,.16);
}
.pl04-location__map .leaflet-control-zoom a {
    display: block;
    width: 30px;
    height: 30px;
    line-height: 30px;
    color: #262626;
    background: #fff;
    text-align: center;
    text-decoration: none;
    font: bold 22px/30px Arial, sans-serif;
}
.pl04-location__map .leaflet-control-zoom a + a { border-top: 1px solid #ddd; }
.pl04-location__map .leaflet-control-zoom a:hover { background: #eee; }
.pl04-location__map .leaflet-control-zoom a.leaflet-disabled { color: #bbb; cursor: default; }
.pl04-location__map .leaflet-control-attribution {
    background: rgba(255,255,255,.82);
    color: #333;
    font: 11px/1.4 Arial, sans-serif;
    padding: 0 5px;
}
.pl04-location__map .leaflet-control-attribution a { color: #005ea8; }
.pl04-location__map .leaflet-control-attribution.leaflet-control { margin: 0; }
.pl04-location__actions { display: flex; gap: .65rem; align-items: center; flex-wrap: wrap; margin: .8rem 0; }
.pl04-location__actions button { padding: .55rem .85rem; border: 1px solid #64748b; border-radius: 8px; cursor: pointer; color: inherit; background: transparent; }
.pl04-location__actions button:disabled { opacity: .5; cursor: not-allowed; }
.pl04-location__coordinates { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,145px),1fr)); gap: 1rem; }
.pl04-location__coordinates input { width: 100%; direction: ltr; box-sizing: border-box; }
.pl04-location [data-location-status] { flex: 1 1 180px; }
.pl04-location [data-location-accuracy] { font-size: .9rem; }
@media (max-width: 600px) {
    .pl04-location { padding: .65rem; }
    .pl04-location__map, .pl04-location__map.leaflet-container { height: 250px; min-height: 250px; }
}
