﻿/*------------------------------------- 
  LEGENDA GRAFICI DEVEXPRESS 
-------------------------------------*/

/* Dimensione icona */
.dxbl-chart-legend-icon {
    cursor: default;
    border-radius: 3px;
    width: 12px !important;
    height: 12px !important;
    min-width: 12px !important;
}
    .dx-chart-legend-icon:hover {
        box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
    }

/* Item legenda (icona + testo) */
.dxbl-chart-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-right: 0.75rem;
    padding: 2px 4px;
    font-size: 0.875rem;
}

/* Nascondi checkbox */
.dxbl-checkbox-check-element {
    display: none !important;
}

/* Testo legenda */
.dxbl-text {
    cursor: pointer;
    color: black;
}

/* Stato unchecked */
.dxbl-checkbox:not(.dxbl-checkbox-checked) + .dx-chart-legend-icon {
    opacity: 0.5;
    background-color: gray;
}

.dxbl-checkbox:not(.dxbl-checkbox-checked) .dxbl-text {
    opacity: 0.5;
    text-decoration-line: line-through;
}


/*------------------------------------- 
  DEVEXPRESS CHART - TOOLTIP POSITIONING FIX
-------------------------------------*/

/* Forza tooltip a seguire il cursore */
.dxc-tooltip,
div[class*="dxc-tooltip"] {
    position: absolute !important;
    z-index: 10000 !important;
    pointer-events: none !important;
}

/* Override positioning inline styles */
.dxc-chart-container > div[style*="position"] {
    position: relative !important;
}

/* Assicura che il container del chart sia posizionato */
.dxc-chart,
.dx-chart {
    position: relative !important;
}

/* Styling tooltip */
.chart-tooltip-custom {
    border-radius: 8px;
    box-shadow: 0 0px 1px rgba(0, 0, 0, 0.4);
    min-width: 180px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}