﻿/* Layout della pagina: due contenitori affiancati */
.containers-row {
    display: flex;
    gap: 20px;
    padding: 20px;
    flex-wrap: wrap;
}

/* Wrapper di ogni immagine */
.background-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

    /* Immagine: RIEMPIE TUTTO il wrapper */
    .background-wrapper img {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: fill;
        display: block;
        user-select: none;
        -webkit-user-drag: none;
    }

/* Hotspot */
.hotspot {
    position: absolute;
    transform: translate(-50%, -50%);
    cursor: grab; 
    z-index: 10;
    touch-action: none;
}

.hotspot-dragging {
    cursor: grabbing;
    opacity: 0.7;
    z-index: 20; /* sopra gli altri durante il drag */
}

.debug-hotspot {
    border-radius: 50%;
    background: rgba(255, 0, 0, 0.4);
    border: 2px solid red;
    transition: background 0.2s, transform 0.2s;
    box-sizing: border-box;
}

    .debug-hotspot:hover {
        background: rgba(255, 0, 0, 0.7);
        transform: translate(-50%, -50%) scale(1.1);
    }

.hotspot-x {
    background: transparent;
    box-sizing: border-box;
    transition: transform 0.2s;
}

    .hotspot-x::before,
    .hotspot-x::after {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 80%;
        height: 16%;
        background: #dc3545;
        border-radius: 3px;
        box-shadow: 0 1px 3px rgba(0,0,0,0.5);
    }

    .hotspot-x::before {
        transform: translate(-50%, -50%) rotate(45deg); /* una barra a +45° */
    }

    .hotspot-x::after {
        transform: translate(-50%, -50%) rotate(-45deg); /* l'altra a -45° */
    }

    .hotspot-x:hover {
        transform: translate(-50%, -50%) scale(1.2);
    }

.popup {
    position: absolute;
    padding: 6px 12px;
    background: rgba(0,0,0,0.8);
    color: white;
    border-radius: 6px;
    transform: translate(-50%, -100%);
    pointer-events: none;
    z-index: 20;
    white-space: nowrap;
}

.context-menu {
    position: absolute;
    z-index: 100;
    min-width: 160px;
    background: white;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    padding: 4px 0;
    font-family: sans-serif;
    font-size: 14px;
    overflow: hidden;
}

.context-menu-item {
    padding: 8px 16px;
    cursor: pointer;
    color: #333;
    white-space: nowrap;
    transition: background 0.15s;
}

    .context-menu-item:hover {
        background: #f0f0f0;
    }