/* ================================
   FONT GLOBALI
   ================================ */
body {
    font-family: "Inter", "Segoe UI", sans-serif;
    font-size: 12px;
}

/* ================================
   TABELLA — CONTORNI E STILE
   ================================ */
#mainTable {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

#mainTable th,
#mainTable td {
    border: 1px solid #ccc;
    padding: 4px 6px;
    text-align: left;
}

#mainTable th {
    background: #f2f2f2;
    font-weight: 600;
}

#mainTable tr:nth-child(even) {
    background: #fafafa;
}

#mainTable tr:hover {
    background: #e8f0ff;
}

/* ================================
   COLONNE DESCRIZIONE E NOTE (50%)
   ================================ */
#mainTable td:nth-child(5),
#mainTable th:nth-child(5),
#mainTable td:nth-child(6),
#mainTable th:nth-child(6) {
    width: 50%;
    max-width: 50%;
    white-space: normal;
}

/* ================================
   IMMAGINI NELLA TABELLA (max 70px)
   ================================ */
.mini {
    width: 70px !important;
    height: auto !important;
    object-fit: contain;
}

/* ================================
   ANTEPRIMA — IMMAGINI ORIGINALI
   ================================ */
/* Nessun ridimensionamento forzato */
#previewContainer img {
    width: auto !important;
    height: auto !important;
    max-height: 120px !important; /* limite massimo, NON forzato */
    object-fit: contain;
}

/* ================================
   PREVIEW CONTAINER (bordo + altezza)
   ================================ */
#previewContainer {
    position: relative;
    width: 100%;
    height: 100px; /* altezza richiesta */
    overflow: hidden;
    border: 1px solid #ccc;
    background: #fff;
}

/* ================================
   CESTINO
   ================================ */

#trashBin {
    position: absolute;
    top: 5px;
    right: 5px; /* SPOSTATO A DESTRA */
    font-size: 22px;
    cursor: pointer;
    z-index: 99999;
    pointer-events: auto;
    transition: transform 0.2s ease, filter 0.2s ease;
}




#trashBin:hover {
    transform: scale(1.15);
    filter: drop-shadow(0 0 6px red);
}

#trashBin.active {
    transform: scale(1.25);
    filter: drop-shadow(0 0 10px red);
}

/* ================================
   SCROLL ZONES
   ================================ */
.scroll-zone {
    position: absolute;
    top: 0;
    width: 40px;
    height: 100%;
    z-index: 10;
    pointer-events: auto;
}

#scrollLeftZone { left: 0; }
#scrollRightZone { right: 0; }

/* ================================
   PREVIEW WRAPPER (scroll orizzontale)
   ================================ */
#previewWrapper {
    position: relative;
    width: 100%;
    height: 100%;
    overflow-x: auto; /* scorrimento orizzontale */
    overflow-y: hidden;
    white-space: nowrap;
    z-index: 5;
    scroll-behavior: smooth;
}

/* ================================
   DRAG AREA
   ================================ */
#dragArea {
    position: relative;
    display: inline-flex;
    align-items: flex-end;
    height: 100%;
    z-index: 5;
}

/* ================================
   ROTABILI IN ANTEPRIMA
   ================================ */
.draggable-wagon {
    height: auto; /* dimensione originale */
    max-height: 100px; /* limite massimo */
    width: auto;
    margin: 0; /* NESSUNO SPAZIO tra le immagini */
    cursor: grab;
    user-select: none;
    transition: transform 0.15s ease;
}

.draggable-wagon:active {
    cursor: grabbing;
    transform: scale(1.05);
}
