/* GENERAL STYLES */
body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    background-color: #EFEFEF;
    font-family: "Trebuchet MS", Tahoma, Arial, helvetica, sans-serif;
    font-size: 12px;
    color: #333366;
}

/* Overlay blocks */
.info-block {
    text-align: center;
}

/* Inputs */
.find_locator input,
.find_address input {
    font-family: "Trebuchet MS";
    font-size: 12px;
    padding: 2px 5px;
}

/* Clickable locator label */
#clicked_locator {
    margin-top: 5px;
    font-weight: bold;
    cursor: pointer;
    color: blue;
}

/* Leaflet controls */
.leaflet-bar button,
.leaflet-bar button:hover {
    background-color: #fff;
    border: none;
    border-bottom: 1px solid #ccc;
    width: 26px;
    height: 26px;
    line-height: 26px;
    display: block;
    text-align: center;
    text-decoration: none;
    color: black;
}

.leaflet-bar button:hover {
    background-color: #f4f4f4;
}

.leaflet-bar button:first-of-type {
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
}

.leaflet-bar button:last-of-type {
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
    border-bottom: none;
}

.leaflet-bar.disabled,
.leaflet-bar button.disabled {
    cursor: default;
    pointer-events: none;
    opacity: 0.4;
}

.leaflet-touch .leaflet-bar button {
    width: 30px;
    height: 30px;
    line-height: 30px;
}

.leaflet-bar {
    background-color: #ffffff;
}

.leaflet-control {
    cursor: pointer;
}

/* Mouse tooltip */
.result-tooltip {
    background-color: white;
    border-width: medium;
    border-color: #de0000;
}

.moving-tooltip {
    background-color: rgba(255, 255, 255, 0.7);
    background-clip: padding-box;
    opacity: 0.5;
    border: dotted red;
}

/* Info-block headers (red). Centered within their fixed-width column.
   Higher specificity (#map-info #id) so they stay centered while the
   value rows below are forced left-aligned. */
#map-info #info_wgs,
#map-info #info_dms,
#map-info #info_mouse {
    color: red;
    text-align: center;
}

#WGS84_lat,
#WGS84_lng,
#WGS84DMS_lat,
#WGS84DMS_lng,
#mouse_locator,
#mouse_coords {
    font-weight: bold;
}

/* ============ Stable info bar ============
   Fixed overall width + fixed-width columns + left-aligned, single-line
   value rows, so the box never changes width and the text never jumps
   position as the coordinates get longer or shorter. */
#map-info {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 20px;
    justify-content: flex-start;
    align-items: stretch;
    background: rgba(255,255,255,0.85);
    padding: 10px 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    font-size: 14px;
    font-variant-numeric: tabular-nums;   /* elke cijfer even breed */
    z-index: 999;
    box-sizing: border-box;
    max-width: 95%;
    width: 800px;                          /* vaste breedte op desktop */
}

/* Fixed-width columns: flex-basis vast, geen groei/krimp -> geen reflow */
#map-info .info-block {
    flex: 0 0 auto;
    box-sizing: border-box;
    overflow: hidden;
}
#map-info .info-block:nth-of-type(1) {           /* invoervelden          */
    width: 150px;
    display: flex;
    flex-direction: column;
    justify-content: center;   /* verticaal gecentreerd in de kolom */
    gap: 10px;                  /* gelijke ruimte tussen de velden   */
}
#map-info .info-block:nth-of-type(2) { width: 150px; }  /* DD.DDDDD          */
#map-info .info-block:nth-of-type(3) { width: 180px; }  /* DDMMSS            */
#map-info .info-block:nth-of-type(4) { width: 210px; }  /* Locator @ klik    */

/* Value rows: op een vaste plek links, altijd één regel */
#map-info .info-block > div {
    text-align: left;
    white-space: nowrap;
}

/* Inputs vullen hun kolom */
#map-info .find_locator input,
#map-info .find_address input {
    width: 100%;
    box-sizing: border-box;
}

@media (max-width: 840px) {
    #map-info {
        width: 95%;
        flex-wrap: wrap;    /* blokken onder elkaar indien nodig */
        gap: 15px;
        padding: 8px 10px;
    }
    #map-info .info-block {
        flex: 1 1 130px;
        width: auto;
    }
}
