﻿/* Contenitore principale senza bordi o padding di disturbo */
.mezzi-form-wrapper-container {
    width: 100%;
    border: none;
    border-radius: none;
    overflow: hidden;
    background-color: transparent;
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* --- STILI DEL CONTENITORE E IMMAGINE --- */
.mezzi-form-interactive-image-wrapper {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    line-height: 0;
    margin: 0;
    padding: 0;
    border: none;
}

    .mezzi-form-interactive-image-wrapper img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: contain;
        pointer-events: none;
        margin: 0;
        padding: 0;
        border: none;
    }

/* --- STILI DEGLI HOTSPOT --- */
.mezzi-form-hotspot {
    position: absolute;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background-color: rgba(220, 53, 69, 0.8);
    border: 3px solid white;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
    cursor: pointer;
    /* CENTRAGGIO MATEMATICO (sostituisce il translate)
               Dimensione (22px) + bordi (6px) = 28px totali. Metà = 14px */
    margin-top: -14px;
    margin-left: -14px;
    /* SCALA DINAMICA: applichiamo solo lo scale dal centro esatto */
    transform-origin: center center;
    transform: scale(var(--hotspot-scale, 1));
    touch-action: none;
    will-change: left, top, transform;
    transition: background-color 0.2s, transform 0.1s;
}

    .mezzi-form-hotspot:hover {
        /*background-color: rgba(220, 53, 69, 1);*/
        /* Modifichiamo solo lo scale, i margini mantengono il centro fermo */
        transform: scale(calc(var(--hotspot-scale, 1) * 1.15));
    }

    /* --- STATO SELEZIONATO --- */
    .mezzi-form-hotspot.is-selected {
        background-color: rgb(221, 224, 43);
        border-color: #575615;
        box-shadow: 0 0 12px rgba(165, 167, 40, 0.8);
        transform: scale(calc(var(--hotspot-scale, 1) * 1.2));
        z-index: 1;
    }

/* --- STATO DURANTE IL TRASCINAMENTO --- */
.mezzi-form-hotspot-dragging {
    opacity: 0.9;
    cursor: grabbing !important;
    transform: scale(calc(var(--hotspot-scale, 1) * 1.3));
    /*Color*/
    background-color: rgb(221, 224, 43);
    border-color: #575615;
    box-shadow: 0 0 12px rgba(165, 167, 40, 0.8);
    /*transition: none;*/
    z-index: 2;
}
