/* css/sidebar.css */


/* ==========================================================================
   STILE PER LA SIDEBAR
   ========================================================================== */

.sidebar {
  position: absolute;
  top: 50px;
  bottom: 0px;
  width: 500px;
  background: white;
  z-index: 2;
  transition: left 0.3s ease;
}

.sidebar.left {
  left: 0;
}

.sidebar.left.collapsed {
  left: -500px;
}

.sidebar-toggle {
  position: absolute;
  top: 80px;
  right: -25px;
  width: 25px;
  height: 25px;
  background: #ddd;
  text-align: center;
  line-height: 25px;
  cursor: pointer;
  border: 1px solid #aaa;
  z-index: 3;
}


.sidebar-content {
  font-family: sans-serif;
  font-size: 14px;
  color: #333;
  padding: 20px;

  overflow-y: auto;       /* Mostra la scrollbar verticale se necessario */
  max-height: calc(100vh - 50px); /* Adatta alla finestra, togliendo spazio al top */
  box-sizing: border-box; /* Evita che padding allarghi il contenitore */
}



button.toggle-dettaglio {
  background-color: #f0f0f0;
  border: none;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 14px;
  width: 100%;
  text-align: left;
}
.dettaglio-contenuto {
  animation: fadeIn 0.3s ease-in-out;
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

















/* Contenitore dei box */
.box-container {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

/* Stile generale dei box */
.box {
  flex: 1 1 300px;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 15px;
  background-color: #fdfdfd;
  box-shadow: 0 3px 6px rgba(0,0,0,0.1);
  transition: transform 0.2s, box-shadow 0.2s;
}

/* Hover effect */
.box:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

/* Titolo box */
.box h4 {
  margin-top: 0;
  font-weight: bold;
  font-size: 1.1em;
  line-height: 1.2;
}

/* Paragrafo con elenco comuni */
.box p {
  margin: 0;
  color: #2c3e50;
  line-height: 1.5;
}

/* Colori distintivi per ciascuna fascia */
.box-10min h4 {
  color: #e71515ff; /* blu */
}

.box-25min h4 {
  color: #e88a10ff; /* verde */
}

.box-40min h4 {
  color: #f7d707ff; /* arancione */
}







/* Toggle button moderno stile MapLibre */
.sidebar-toggle {
  position: absolute;
  right: -20px;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  background-color: #fff;
  border: 1px solid #ccc;
  border-radius: 20%;
  box-shadow: 0 1px 4px rgba(0,0,0,0.25);
  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 14px;
  font-weight: bold;
  color: #444;

  transition: all 0.3s ease;
  z-index: 1000;
}

/* Hover */
.sidebar-toggle:hover {
  background-color: #f5f5f5;
  border-color: #999;
  color: #000;
  transform: translateY(-50%) scale(1.05);
}

/* Sidebar aperta → ruota la freccia */
.sidebar.left:not(.collapsed) .sidebar-toggle {
  right: -26px;
}