.dlemaps-block,
.dlemaps-block * {
    box-sizing: border-box;
}

/* Map geometry only. DLE admin controls intentionally inherit native DLE styles. */
.dlemaps-map-canvas,
.dlemaps-editor-map {
    width: 100%;
    min-height: 250px;
    overflow: hidden;
}

.dlemaps-editor-map {
    height: 390px;
}

/* Public/fullstory map container. */
.dlemaps-block .dlemaps-map-canvas {
    background: #f3f4f6;
    border: 1px solid #d9dde3;
    border-radius: 8px;
}

/* Lightweight Google-like pins: inline SVG, no image or font requests. */
.dlemaps-leaflet-icon {
    background: transparent;
    border: 0;
}

.dlemaps-leaflet-icon .dlemaps-pin-svg {
    display: block;
    overflow: visible;
    filter: drop-shadow(0 2px 2px rgba(32, 33, 36, .35));
    transform-origin: 50% 100%;
    transition: transform .16s ease, filter .16s ease;
}

.dlemaps-leaflet-icon:hover .dlemaps-pin-svg,
.dlemaps-leaflet-icon:focus .dlemaps-pin-svg,
.dlemaps-leaflet-icon.dlemaps-marker-active .dlemaps-pin-svg {
    filter: drop-shadow(0 4px 4px rgba(32, 33, 36, .4));
    transform: translateY(-2px) scale(1.08);
}

.dlemaps-map-canvas .leaflet-popup-content-wrapper,
.dlemaps-editor-map .leaflet-popup-content-wrapper {
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(60, 64, 67, .3);
    color: #202124;
    font-family: Roboto, Arial, sans-serif;
}

.dlemaps-map-canvas .leaflet-popup-content,
.dlemaps-editor-map .leaflet-popup-content {
    margin: 14px 18px;
    font-family: Roboto, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.45;
}

.dlemaps-map-canvas .leaflet-tooltip,
.dlemaps-editor-map .leaflet-tooltip {
    padding: 7px 10px;
    border: 0;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(60, 64, 67, .26);
    color: #202124;
    font-family: Roboto, Arial, sans-serif;
    font-size: 13px;
    font-weight: 500;
}

.dlemaps-map-canvas .leaflet-control-zoom,
.dlemaps-editor-map .leaflet-control-zoom {
    overflow: hidden;
    border: 0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(60, 64, 67, .3);
}

.dlemaps-map-canvas .leaflet-control-zoom a,
.dlemaps-editor-map .leaflet-control-zoom a {
    width: 40px;
    height: 40px;
    border-color: #e8eaed;
    background: #fff;
    color: #3c4043;
    font-family: Arial, sans-serif;
    font-size: 24px;
    line-height: 38px;
}

.dlemaps-map-canvas .leaflet-control-zoom a:hover,
.dlemaps-map-canvas .leaflet-control-zoom a:focus,
.dlemaps-editor-map .leaflet-control-zoom a:hover,
.dlemaps-editor-map .leaflet-control-zoom a:focus {
    background: #f8f9fa;
    color: #1a73e8;
}

/* User-facing addnews editor: site templates do not load DLE adminpanel CSS. */
.dlemaps-editor-row-site {
    margin: 18px 0;
    padding: 14px;
    border: 1px solid #d9dde3;
    border-radius: 4px;
}

.dlemaps-editor-row-site .dlemaps-editor-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.dlemaps-editor-row-site .dlemaps-editor-summary,
.dlemaps-editor-row-site .dlemaps-status {
    color: #68717d;
    font-size: 13px;
}

.dlemaps-editor-row-site .dlemaps-address-row {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) auto auto;
    gap: 8px;
    margin-bottom: 10px;
}

.dlemaps-editor-row-site .dlemaps-editor-map {
    background: #f3f4f6;
    border: 1px solid #d9dde3;
    border-radius: 4px;
}

.dlemaps-editor-row-site .dlemaps-coordinates {
    display: flex;
    gap: 20px;
    margin-top: 8px;
    color: #68717d;
    font-size: 12px;
}

.dlemaps-actions {
    margin-top: 10px;
}

.dlemaps-route,
.dlemaps-popup-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 8px 14px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
}

.dlemaps-route {
    background: #1a73e8;
    color: #fff;
}

.dlemaps-route:hover,
.dlemaps-route:focus {
    color: #fff;
    text-decoration: none;
}

.dlemaps-popup {
    max-width: 310px;
    color: #3c4043;
    font-family: Roboto, Arial, sans-serif;
    font-size: 13px;
    line-height: 1.5;
}

.dlemaps-popup-title {
    display: block;
    margin-bottom: 5px;
    color: #202124;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
}

.dlemaps-popup-address {
    margin-bottom: 7px;
    color: #5f6368;
}

.dlemaps-popup-text {
    margin-bottom: 8px;
    color: #3c4043;
}

.dlemaps-popup-more {
    min-height: 30px;
    padding: 5px 10px;
    background: #f1f3f4;
    color: #1a73e8;
}

@media (max-width: 700px) {
    .dlemaps-editor-row-site .dlemaps-address-row {
        grid-template-columns: 1fr;
    }

    .dlemaps-editor-map {
        height: 340px;
    }

    .dlemaps-map-canvas {
        min-height: 300px;
    }
}
