/*
 * Stili della pagina Larioclimb - Falesie.
 * Le librerie (W3.CSS, Font Awesome, Leaflet, DataTables, ion.rangeSlider)
 * hanno i loro fogli di stile in vendor/.
 */

/* Raleway: file locale (variabile, sottoinsieme latino), nessuna richiesta a Google */
@font-face {
  font-family: "Raleway";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../vendor/fonts/raleway-latin-wght-normal.woff2") format("woff2");
}

:root {
  --lc-tab: url("../img/tab.jpg");
  --lc-tab-hover: url("../img/tab2.jpg");
  --lc-blue: #428bca;
  --dt-row_background: #fff;
}

/* Gli elementi con l'attributo hidden restano nascosti anche con le classi W3.CSS */
[hidden] { display: none !important; }

body.w3-content {
  background-image: url("../img/d15.jpeg");
  max-width: 1400px;
}
body, h1, h2, h3, h4, h5, h6 { font-family: "Raleway", sans-serif; }

a { text-decoration: none; }
.w3-sidebar a, .w3-sidebar h4 { font-weight: bold; }

/* Testo riservato agli screen reader */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Focus visibile da tastiera */
button:focus-visible, a:focus-visible, input:focus-visible, label:focus-within {
  outline: 2px solid var(--lc-blue);
  outline-offset: 1px;
}

/* Sfondo "tab" dei riquadri */
.lc-tab { background-image: var(--lc-tab); }
.lc-nopad { padding: 0; }
.lc-logo { width: 100%; height: auto; margin-bottom: 10px; }

/* Barra laterale e sovrapposizione (z-index: sidebar 2001 > overlay 2000 > mappa 1000) */
#mySidebar { z-index: 2001; width: 300px; }
#myOverlay { z-index: 2000; cursor: pointer; }
.w3-main { margin-left: 300px; }

.close-btn {
  background: none; border: 0; padding: 0;
  font-size: 32px; line-height: 1; cursor: pointer;
}

/* Accordion */
.acc-title { margin: 0; font-size: inherit; font-weight: inherit; }
.acc-toggle { border: 0; }
.acc-panel { box-shadow: 0 2px 5px 0 rgba(0,0,0,.16), 0 2px 10px 0 rgba(0,0,0,.12); }
.w3-block:hover { box-shadow: none; }

/* Pulsanti in stile Larioclimb */
.LCbutton, .LCbutton-small {
  background-image: var(--lc-tab);
  border: none;
  color: black;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 16px;
  cursor: pointer;
}
.LCbutton:hover, .LCbutton-small:hover {
  background-image: var(--lc-tab-hover);
  color: #184D8A;
}
.LCbutton { padding: 0.3em 0.5em; margin: 4px 2px; }
.LCbutton-small { padding: 0; margin: 4px 0; }
.LCbuttonMap {
  border: none;
  padding: 0.3em 0.5em;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  margin: 4px 2px;
}
.LCbuttonMap input[type="text"] { width: 220px; max-width: 100%; }

/* Ricerca per nome */
.lc-results { background: #fff; }
.lc-result { margin-left: 16px; }

/* Mappa */
#mappa { height: 512px; z-index: 1000; }
#mappa[aria-busy="true"] { cursor: progress; }

.MapLegend {
  padding: 2px 10px;
  background: white;
  box-shadow: 0 0 15px rgba(0,0,0,0.5);
  border-radius: 5px;
  line-height: 18px;
  color: #555;
}
.MapLegend i {
  width: 18px; height: 18px;
  float: left; margin-right: 8px;
  opacity: 0.7;
}
.MapLegend .lg-high   { background-color: red; }
.MapLegend .lg-medium { background-color: yellow; }
.MapLegend .lg-low    { background-color: green; }

/* Marker a goccia (sostituiscono Leaflet.AwesomeMarkers) */
.lc-pin { background: none; border: 0; }
.lc-pin__svg {
  display: block; width: 35px; height: 46px;
  filter: drop-shadow(0 2px 2px rgba(0,0,0,.35));
}
.lc-pin__svg path { fill: var(--pin); stroke: rgba(0,0,0,.35); stroke-width: 1; }
.lc-pin__glyph {
  position: absolute; top: 10px; left: 0;
  width: 35px; text-align: center;
  font-size: 14px; line-height: 1;
  color: var(--glyph, #fff);
}
.lc-pin__letter { font: bold 15px/1 Arial, Helvetica, sans-serif; }
.lc-pin--shop { --pin: #5b396b; --glyph: #fff; }
.lc-pin--stay { --pin: #a3a3a3; --glyph: #000; }
.lc-pin--park { --pin: #38aadd; --glyph: #fff; }

/* Tabella (DataTables) */
#myTable { width: 100%; font-size: small; }
.td { white-space: nowrap; }
.tbName { font-weight: bold; }

/* Slider: colori della skin "round" adattati al blu della pagina */
.irs--round .irs-bar { background-color: var(--lc-blue); }
.irs--round .irs-handle { border-color: var(--lc-blue); }
.irs--round .irs-from,
.irs--round .irs-to,
.irs--round .irs-single { background-color: var(--lc-blue); }
.irs--round .irs-from:before,
.irs--round .irs-to:before,
.irs--round .irs-single:before { border-top-color: var(--lc-blue); }

/* Rispetta la preferenza di ridurre le animazioni */
@media (prefers-reduced-motion: reduce) {
  .w3-animate-left, .w3-animate-opacity { animation: none; }
}

/* Lettera "P" nell'opzione PARCHEGGI */
.lc-letter-p { font-family: Arial, Helvetica, sans-serif; font-style: normal; font-weight: bold; display: inline-block; text-align: center; }
