/* -- SITE MAP -- */
/* functions/site_map.php, rola_site_map(). Its own file, not a section of
   component-classes.css, because the edit screen's preview loads it too -
   one copy of the look for both.

   One rounded square: water and contours, the location dot, and the
   OpenStreetMap credit small in the bottom-left corner. Colours follow
   the section's text colour (currentColor), so it sits on any page
   colour. The line styles are in the SVG itself; this only frames it. */
.site-map {
    --site-map-radius: var(--radius-image, 6px);
    --site-map-bg: var(--section-bg, var(--light, #fff));
    --site-map-fg: var(--section-text, var(--dark, #000));
    margin: 0;
}
.site-map-box {
    border: 1px solid currentColor;
    border-radius: var(--site-map-radius);
    overflow: hidden;
}
.site-map-square {
    position: relative;
    aspect-ratio: 1;
}
.site-map-svg {
    display: block;
    width: 100%;
    height: 100%;
}
/* Zoom (js/script.js, SITE MAP ZOOM): the drawing and its dot are scaled
   and moved together; --k is the zoom, so the dot can undo it and stay
   the same size. The credit and buttons sit outside, unscaled. */
.site-map-layer-zoom {
    position: absolute;
    inset: 0;
    transform-origin: 0 0;
}
.site-map-layer-zoom .site-map-dot {
    transform: scale(calc(1 / var(--k, 1)));
}
.site-map-square.is-zoomable {
    cursor: grab;
    touch-action: none;
}
.site-map-square.is-dragging {
    cursor: grabbing;
}
.site-map-zoom {
    position: absolute;
    right: 10px;
    bottom: 10px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.site-map-zoom[hidden] {
    display: none;
}
.site-map-zoom-button {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 1px solid currentColor;
    border-radius: 6px;
    background-color: var(--site-map-bg);
    color: inherit;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
}
.site-map-zoom-button:disabled {
    opacity: 0.35;
    cursor: default;
}
.site-map-zoom-button:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

/* The location dot, pulsing as the project map's clusters do: a ring
   swells out of the glow and fades every 2.4s, same keyframes. --dot is a
   real colour (the section's text colour), not currentColor - currentColor
   inside color-mix() in keyframes can't be interpolated, so the ring
   jumped between frames instead of swelling. It replaces the plain ring
   older drawings have at the pin. Still under reduced motion. */
.site-map-site circle {
    display: none;
}
.site-map-dot {
    --dot: var(--site-map-fg);
    position: absolute;
    width: 12px;
    height: 12px;
    margin: -6px 0 0 -6px;
    border-radius: 50%;
    background-color: var(--dot);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--dot) 25%, transparent);
    pointer-events: none;
}
@keyframes site-map-dot-pulse {
    0% {
        box-shadow: 0 0 0 4px color-mix(in srgb, var(--dot) 25%, transparent),
            0 0 0 4px color-mix(in srgb, var(--dot) 45%, transparent);
    }
    70%,
    100% {
        box-shadow: 0 0 0 4px color-mix(in srgb, var(--dot) 25%, transparent),
            0 0 0 16px color-mix(in srgb, var(--dot) 0%, transparent);
    }
}
@media (prefers-reduced-motion: no-preference) {
    .site-map-dot {
        animation: site-map-dot-pulse 2.4s ease-out infinite;
    }
}

/* Paths are not shown - just water and contours. Older drawings still
   carry a paths layer, so it is hidden here. */
.site-map-layer-paths {
    display: none;
}

/* The licence credit, small, in the bottom-left corner. Backed with the
   page colour so the lines don't run through it. */
.site-map-credit {
    position: absolute;
    left: 6px;
    bottom: 6px;
    margin: 0;
    padding: 2px 5px;
    border-radius: 3px;
    background-color: var(--site-map-bg);
    font-size: 0.5625rem;
    line-height: 1.2 !important;
}
.site-map-credit a {
    color: inherit;
    text-decoration: none !important;
    opacity: 0.75;
}
.site-map-credit a:hover {
    opacity: 1;
}
.site-map-credit a:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}
/* -- SITE MAP END -- */
