/* ==============================
   CARD E STRUTTURA GRAFICO
   ============================== */

.inner_content {
  max-width: 1000px !important;
  padding: 2rem !important;
  margin: 0 auto;
  transform: translateX(-0px); /* metà della sidebar */
}

.chart-card {
  background-color: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  padding: 2rem;
  max-width: 100%;
  margin: 2rem auto;
  position: relative;
  transition: box-shadow 0.3s ease;
}

.chart-card:hover {
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.15);
}

/* Wrapper scrollabile */
.chart-container {
  overflow-x: auto;
  overflow-y: hidden;
  width: 100%;
  padding-bottom: 1rem;
  cursor: grab;
}

/* Canvas grande → scrollabile orizzontalmente */
.chart-container canvas {
  display: block;
  max-height: 400px;
}

/* Legenda e trofeo */
#legend {
  margin-top: 15px;
  font-weight: 600;
  color: #333;
  text-align: center;
}

#trophy {
  margin-top: 20px;
  font-size: 2rem;
  display: none;
  color: gold;
  text-shadow: 0 0 10px #ffc107;
  animation: pop 0.8s ease;
  text-align: center;
}

@keyframes pop {
  0% { transform: scale(0.2); opacity: 0; }
  80% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(1); }
}

/* Animazione di comparsa */
.line-chart {
  animation: fadeIn 600ms cubic-bezier(.57, .25, .65, 1) forwards;
  opacity: 0;
}

@keyframes fadeIn {
  to { opacity: 1; }
}

/* ==============================
   INDICATORE SCROLL
   ============================== */
.scroll-indicator {
  position: absolute;
  bottom: 12px;
  right: 24px;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50px;
  padding: 6px 12px;
  font-size: 0.9rem;
  color: #555;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  animation: fadeInIndicator 1s ease forwards;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.scroll-indicator-left {
  position: absolute;
  bottom: 12px;
  left: 24px;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50px;
  padding: 6px 12px;
  font-size: 0.9rem;
  color: #555;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  animation: fadeInIndicator 1s ease forwards;
  opacity: 0;
  transition: opacity 0.3s ease;
  cursor: pointer;
}

.scroll-indicator-left .arrow {
  margin-right: 6px;
  font-size: 1.1rem;
  animation: arrowMove 1s infinite alternate ease-in-out;
}

.scroll-indicator .arrow {
  margin-left: 6px;
  font-size: 1.1rem;
  animation: arrowMove 1s infinite alternate ease-in-out;
}

.scroll-indicator.hidden,
.scroll-indicator-left.hidden {
  opacity: 0;
  pointer-events: none;
}

@keyframes arrowMove {
  from { transform: translateX(0); }
  to { transform: translateX(6px); }
}

@keyframes fadeInIndicator {
  to { opacity: 1; }
}

/* Nasconde l'indicatore quando non serve */
.scroll-indicator.hidden {
  opacity: 0;
  pointer-events: none;
}

/* Sfondo pagina */
html {
  box-sizing: border-box;
  /* padding: 20px; */
  background-color: #f6f8fa;
}

*, *:before, *:after {
  box-sizing: inherit;
}

.scroll-indicator {
  cursor: pointer;
  user-select: none;
}

@media only screen and (min-width: 768px) {
    #spinner-overlay {
        margin-left: 0rem !important;
    }
}