/* ===== MAPPA: zoom, drag, marker corretti e touch v1.9.9 ===== */

/* NON allarga la colonna: così il master resta fermo */
.top-section {
    gap: 14px;
}

.top-section .top-col:nth-child(3) {
    width: 460px;
}

.map-outer {
    width: 460px;
    position: relative;
    display: flex;
    justify-content: center;
}

/* Solo la viewport della mappa è più larga; altezza invariata */
.map-container {
    width: 600px;
    height: 225px;
    max-height: 225px;
    position: relative;
    cursor: grab;
    touch-action: none;
}

.map-container.dragging {
    cursor: grabbing;
}

.map-container.marker-placement {
    cursor: crosshair;
}

.map-container img {
    transform-origin: center center;
    transition: transform 0.15s ease;
    user-select: none;
    -webkit-user-drag: none;
}

/* Barra mappa compatta, in fila e leggermente più alta */
.map-tools {
    position: absolute;
    top: 2px;
    right: -62px;
    z-index: 30;

    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;

    background: rgba(255,255,255,0.72);
    border-radius: 999px;
    padding: 2px 5px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);

    white-space: nowrap;
}

.map-zoom-controls,
.map-marker-controls {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 4px;

    background: transparent;
    box-shadow: none;
    padding: 0;
}

.map-marker-controls select {
    height: 20px;
    min-width: 78px;
    font-size: 10px;
    padding: 1px 4px;
}

.map-marker-controls .btn-small,
.map-zoom-controls .btn-small {
    height: 20px;
    min-width: 26px;
    padding: 2px 6px;
    white-space: nowrap;
    line-height: 1;
}

#markerModeBtn.marker-mode-active {
    background: #9B5CFF;
    color: white;
}

#markerLayer {
    position: absolute;
    inset: 0;
    z-index: 20;
    pointer-events: none;
    transform-origin: center center;
    transition: transform 0.15s ease;
}

.map-marker {
    position: absolute;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 0 8px rgba(0,0,0,0.55);
    transform: translate(-50%, -50%);
    z-index: 21;
    pointer-events: auto;
    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 11px;
    font-weight: bold;
    color: white;
}

.map-marker.party {
    background: #9B5CFF;
}

.map-marker.enemy {
    background: #e74c3c;
}

.map-marker.poi {
    background: #f1c40f;
    color: #333;
}

