@import url('https://rsms.me/inter/inter.css');
:root {
    --tblr-font-sans-serif: 'Inter Var', -apple-system, BlinkMacSystemFont, San Francisco, Segoe UI, Roboto, Helvetica Neue, sans-serif;
}
body {
    font-feature-settings: "cv03", "cv04", "cv11";
}
.small-text {
      font-size: 0.75rem; /* Font size minore */
      font-family: monospace;
      font-weight: 400;
  }

  .card-header {
color: inherit;
display:inline-block;
align-items: center;
background: 0 0;
}

.scalvi-blue {
color: #206bc4;
} 

.bg-scalvi-blue {
  background-color: #206bc4;

}

.scalvi-red {
      color: #d9534f;
    }

    .bg-scalvi-red {
      background-color: #d9534f;
    }

    .hidden {
display: none;
opacity: 0;
transition: opacity 0.3s ease-in;
}

.card-body {
opacity: 1;
transition: opacity 0.3s ease-in;
}

.fade-in {
opacity: 1;
}

.edit-icon {
color: #0054a6;
}   

.service-icon {
font-size: 1rem;
}

.card {
border-radius: 0.375rem;
--tblr-card-spacer-y: 0.6rem;
--tblr-card-spacer-x: 1rem;
}

.card-click {
     
      transition: border 0.3s ease; /* Transizione per il cambiamento del bordo */
  }

  .card-click:hover {
      border: 1px solid #206bc4; /* Colore blu solido */
  }

.card-header {
padding: 0.6rem 1.25rem;
}

.progress-riparto {
height: 1rem;
}

.wip {
background: repeating-linear-gradient(
45deg,
#bcbc60,
#bcbc60 10px,
#989446 10px,
#989446 20px
);
}
.circle {
      line-height: 0;      /* remove line-height */
      display: inline-block; /* circle wraps image */
      border-radius: 50%; /* relative value */
      /*box-shadow: 0px 0px 5px rgba(0,0,0,0.4);*/
  }
  .circle img {
      border-radius: 50%; /* relative value for adjustable image size */
  }
  a.circle {
      color: transparent;
  } /* IE fix: removes blue border */

 
/* Overlay for focus - hidden by default */
#calendarOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1999;
    display: none;
}

/* Calendar container positioning */
#calendarContainer {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    z-index: 2000;
    display: none;
    /*background: white;*/
    /*padding: 8px;*/
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 4px;
}
#calendarContainer.show {
    display: block;
}

/* Mobile modal positioning */
@media (max-width: 576px) {
    /* Show overlay only on mobile */
    #calendarOverlay.show {
        display: block;
    }
    #calendarContainer {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 90%;
        max-width: 320px;
    }
}

/* Highlight days with readings: bold + blue underline */
.flatpickr-day.highlight {
    background: transparent !important;
    border: none !important;
    font-weight: bold;
    position: relative;
}
.flatpickr-day.highlight:after {
    content: '';
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 3px;
    background: #0054a6;
    border-radius: 2px;
}

/* Ensure selected date is visible (white text on #0054a6) */
.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange {
    background: #0054a6 !important;
    color: white !important;
    font-weight: bold;
}

        @media (max-width: 768px) {
            .truncate-text {
                display: inline-block;
                max-width: 290px; /* Specifica la larghezza massima desiderata */
                white-space: nowrap;
                overflow: hidden;
                text-overflow: ellipsis;
                vertical-align: bottom; /* Allinea verticalmente con il resto del testo */
            }
        }
        .no-wrap td {
            white-space: nowrap;
        }
        
        .table td.align-middle {
    vertical-align: middle;
}

@media print {
    .row.print-row {
        display: flex;
        flex-wrap: nowrap;
    }
    .print-row .col-lg-6,
    .print-row .col-md-12 {
        flex: 1;
        max-width: 50%;
    }
}
@media print {
        table {
            font-size: 0.75em; /* Equivalent to .table-sm */
        }
    }

    #loader-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

#loader {
    border: 8px solid #f3f3f3;
    border-top: 8px solid #0054a6;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
}

.loader-text {
    margin-top: 15px;
    font-size: 18px;
    color: #333;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#loader-wrapper.hide {
    opacity: 0;
    pointer-events: none;
}

/* Animazioni per le icone */
    #loadingIcon, #excelLoadingIcon {
      animation: spin 1s linear infinite;
    }
    
    @keyframes spin {
      from { transform: rotate(0deg); }
      to { transform: rotate(360deg); }
    }
    
    .fade-in {
      animation: fadeIn 0.3s ease-in;
    }
    
    @keyframes fadeIn {
      from { opacity: 0; }
      to { opacity: 1; }
    }
    
    .scale-success {
      animation: scaleSuccess 0.5s ease-out;
    }
    
    @keyframes scaleSuccess {
      0% { transform: scale(0.8); opacity: 0; }
      50% { transform: scale(1.2); }
      100% { transform: scale(1); opacity: 1; }
    }

    /* Stili specifici per la stampa/PDF */
    @media print {
      /* Nascondi tutto tranne il contenuto da stampare */
      body * {
        visibility: hidden;
      }
      
      /* Mostra solo gli elementi per la stampa */
      #pdfHeader,
      #pdfHeader *,
      #printableTable,
      #printableTable * {
        visibility: visible;
      }
      
      /* Posiziona gli elementi stampabili */
      #pdfHeader {
        display: block !important;
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
      }
      
      #printableTable {
        position: absolute;
        top: 460px; /* Aumentato da 420px a 460px per fare spazio alla data della lettura */
        left: 0;
        width: 100%;
      }
      
      /* Nascondi elementi non necessari */
      .no-print {
        display: none !important;
      }
      
      /* Mostra elementi specifici per la stampa */
      .print-only {
        display: block !important;
      }
      
      .print-show {
        display: inline !important;
      }
      
      .print-hide {
        display: none !important;
      }
      
      /* Rimuovi stili dei link */
      .print-plain {
        color: black !important;
        text-decoration: none !important;
      }
      
      /* Stili per la tabella in stampa */
      table {
        width: 100% !important;
        border-collapse: collapse !important;
        font-size: 12px !important;
      }
      
      th, td {
        border: 1px solid #000 !important;
        padding: 8px !important;
        text-align: left !important;
      }
      
      th {
        background-color: #f0f0f0 !important;
        font-weight: bold !important;
      }
      
      /* Evita interruzioni di pagina nelle righe */
      tr {
        page-break-inside: avoid;
      }
      
      /* Margini pagina */
      @page {
        margin: 1in;
        size: A4;
      }
      
      /* Colori per la stampa */
      .text-success {
        color: #28a745 !important;
      }
      
      .text-danger {
        color: #dc3545 !important;
      }
      
      .text-muted {
        color: #6c757d !important;
      }
    }

#myBtn {
  display: none;
  position: fixed;
  padding: 11px;
  bottom: 20px;
  right: 30px;
  z-index: 99;
}

#myBtn:hover {
  background-color: #004c95;
}

    @keyframes debugSpinClockwise {
      from { transform: rotate(0deg); }
      to { transform: rotate(360deg); }
    }
    
    @keyframes debugSpinCounterClockwise {
      from { transform: rotate(0deg); }
      to { transform: rotate(-360deg); }
    }
    
    .debug-bug-spin {
      animation-iteration-count: infinite;
      animation-timing-function: linear;
      transform-origin: center;
    }

.energoogle {
    width: 200px;
    margin-top: -23px;
}
