/* Map Scroll Protection */
.smp-map-container {
    position: relative;
    width: 100vw;
    max-width: 100%;
    margin-left: calc(-50vw + 50%);
    border: none;
    box-sizing: border-box;
}

/* Remove border from map */
.smp-map-container .leaflet-container {
    border: none;
    outline: none;
}

/* Remove focus outline */
.smp-map-container .leaflet-container:focus {
    outline: none;
}

.smp-map-container * {
    box-sizing: border-box;
}

/* Hide Leaflet attribution */
.smp-map-container .leaflet-control-attribution {
    display: none;
}

/* Minimal grey land on white background */
/* .smp-map-container img.leaflet-tile {
    filter: grayscale(1) invert(1) contrast(0.3) brightness(2.6);
} */
 .leaflet-container {
    background: #ffffff;
 }

/* Satellite toggle button */
.smp-satellite-toggle {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 500;
    height: 36px;
    padding: 0 12px;
    gap: 6px;
    border: none;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    transition: background-color 0.2s ease, color 0.2s ease;
    font-family: inherit;
    font-size: 13px;
}

.smp-satellite-label {
    font-weight: 500;
    line-height: 1;
}

.smp-satellite-toggle:hover {
    background: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.smp-satellite-toggle.active {
    background: rgba(255, 255, 255, 0.95);
    color: #333;
}

.theme-dark .smp-satellite-toggle {
    background: rgba(50, 50, 50, 0.95);
    color: #ddd;
}

.theme-dark .smp-satellite-toggle:hover {
    background: rgba(70, 70, 70, 1);
}

.theme-dark .smp-satellite-toggle.active {
    background: rgba(50, 50, 50, 0.95);
    color: #ddd;
}

.smp-scroll-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.6);
    background-blend-mode: lighten;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 500;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.theme-dark .smp-scroll-overlay {
    background: rgba(60, 60, 60, 0.6);
}

.smp-scroll-overlay.active {
    display: flex;
}

.smp-scroll-message {
    font-size: 16px;
    font-weight: 400;
    display: flex;
    align-items: center;
}

.smp-scroll-message > span {
    color: #666;
}

.theme-dark .smp-scroll-message > span {
    color: #ddd;
}

.smp-scroll-message kbd {
    margin-left: 4px;
    font-family: monospace;
    font-size: 20px;
    text-transform: uppercase;
}

.point-popup {
    min-width: 200px;
    padding: 10px;
}

.point-popup.clickable {
    cursor: pointer;
}

.leaflet-popup {
    max-width: 350px;
    margin-bottom: 0;
}

.leaflet-popup-content-wrapper, 
.leaflet-popup-tip {
    box-shadow: 0 0 1px 1px rgba(0,0,0,0.15);
}

.theme-dark .leaflet-popup-content-wrapper, 
.theme-dark .leaflet-popup-tip {
    box-shadow: 0 0 1px 1px rgba(255,255,255,0.15);
}

.theme-dark .leaflet-popup-content-wrapper,
.theme-dark .leaflet-popup-tip {
    background-color: #222;
}

.leaflet-popup .point-popup {
    max-width: 310px;
}

.leaflet-popup-content {
    margin: 0;
}

/* Custom popup with scroll for long content */
.custom-popup .leaflet-popup-content-wrapper {
    max-height: 400px;
    overflow-y: auto;
}

.custom-popup .leaflet-popup-content {
    max-height: 400px;
    overflow-y: auto;
}

/* Popup displayed below marker */
.popup-below .leaflet-popup-tip-container {
    transform: rotate(180deg);
}

.leaflet-interactive {
    fill: #e4e4e4;
    fill-opacity: 1;
    stroke-opacity: 1;
}

/* Zoom level specific styles */
.zoom-level-low .leaflet-interactive {
    stroke: #e4e4e4;
    stroke-width: 0.75;
}

.zoom-level-medium .leaflet-interactive {
    stroke: #000;
    stroke-width: 2;
    stroke-opacity: 0.02;
}

.zoom-level-high .leaflet-interactive {
    stroke: #000;
    stroke-width: 1.25;
    stroke-opacity: 0.05;
}

.theme-dark .leaflet-interactive {
    fill: #5e5e5e;
    fill-opacity: 1;
    stroke-opacity: 1;
}

/* Zoom level specific styles */
.theme-dark .zoom-level-low .leaflet-interactive {
    stroke: #5e5e5e;
    stroke-width: 0.75;
}

.theme-dark .zoom-level-medium .leaflet-interactive {
    stroke: #fff;
    stroke-width: 2;
    stroke-opacity: 0.02;
}

.theme-dark .zoom-level-high .leaflet-interactive {
    stroke: #fff;
    stroke-width: 1.25;
    stroke-opacity: 0.05;
}

/* Satellite mode - transparent fill, visible borders */
.satellite-mode .leaflet-interactive {
    fill: transparent;
    fill-opacity: 0;
    stroke: rgba(255, 255, 255, 0.6);
    stroke-width: 1;
    stroke-opacity: 1;
}

.satellite-mode.zoom-level-low .leaflet-interactive {
    stroke-width: 0.5;
}

.satellite-mode.zoom-level-medium .leaflet-interactive {
    stroke-width: 1;
    stroke-opacity: 0.7;
}

.satellite-mode.zoom-level-high .leaflet-interactive {
    stroke-width: 1.25;
    stroke-opacity: 0.6;
}

/* Satellite mode in dark theme - keep bright borders */
.theme-dark .satellite-mode .leaflet-interactive {
    fill: transparent;
    fill-opacity: 0;
    stroke: rgba(255, 255, 255, 0.6);
    stroke-opacity: 1;
}

.theme-dark .satellite-mode.zoom-level-medium .leaflet-interactive {
    stroke-opacity: 0.7;
}

.theme-dark .satellite-mode.zoom-level-high .leaflet-interactive {
    stroke-opacity: 0.6;
}