/*
 * Stili del client delle torbiere del PNGP. Tutto e' sotto body.torbiere, che torbiere.js imposta
 * solo sul gruppo delle torbiere: le mappe degli altri gruppi della suite non cambiano.
 */

/* ---------------------------------------------------------------- pannello dei risultati: schede a tutta larghezza */
body.torbiere #search-results .queryresults { margin-left: 0 !important; }
body.torbiere #search-results .box.box-primary { margin-bottom: 10px; }
body.torbiere #search-results .box-body { padding: 6px 4px !important; }
body.torbiere #search-results .featurebox-body > td { padding: 4px 0 !important; }
body.torbiere #search-results .field { padding: 0 !important; }
body.torbiere #search-results .field_value { padding: 0 !important; text-align: left !important; }
body.torbiere #search-results .field_value > span { display: block; }
/* un solo gruppo di campi ("Scheda vegetazione"): l'etichetta della scheda e' gia' nel badge */
body.torbiere #search-results .tabs-wrapper > ul.nav-tabs:has(> li:only-child) { display: none; }

/* ---------------------------------------------------------------- evidenziazione al passaggio del mouse */
body.torbiere .ol-viewport.torbiere-interrogabile,
body.torbiere .ol-viewport.torbiere-interrogabile canvas { cursor: pointer !important; }
body.torbiere .torbiere-tip {
  position: absolute; z-index: 10; pointer-events: none; max-width: 300px;
  background: rgba(20, 33, 22, 0.92); color: #fff; border-radius: 8px; padding: 6px 10px;
  font: 13px/1.35 "Titillium Web", "Segoe UI", Arial, sans-serif; box-shadow: 0 4px 14px rgba(0, 0, 0, .3);
}
body.torbiere .torbiere-tip b { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: #cfe3bf; }
body.torbiere .torbiere-tip span { display: block; font-size: 14px; font-weight: 600; }
body.torbiere .torbiere-tip small { display: block; opacity: .75; font-size: 11px; margin-top: 2px; }

/* ---------------------------------------------------------------- popup di benvenuto */
body.torbiere .torbiere-modale {
  position: fixed; inset: 0; z-index: 200000; display: flex; align-items: center; justify-content: center;
  padding: 16px; background: rgba(17, 26, 18, 0.55);
}
body.torbiere .torbiere-finestra {
  position: relative; width: 100%; max-width: 760px; max-height: calc(100vh - 32px); display: flex; flex-direction: column;
  background: #fff; border-radius: 18px; overflow: hidden; box-shadow: 0 20px 50px rgba(0, 0, 0, .35);
  font-family: Inter, "Segoe UI", Arial, Helvetica, sans-serif; color: #1f2a22;
}
body.torbiere .torbiere-chiudi {
  position: absolute; top: 10px; right: 14px; border: 0; background: transparent; font-size: 30px; line-height: 1;
  color: #223019; cursor: pointer;
}
body.torbiere .torbiere-testa {
  padding: 22px 56px 18px 24px; border-bottom: 1px solid #c8d8bd;
  background: linear-gradient(135deg, #edf5e8 0%, #dfead7 55%, #cddfbe 100%);
}
body.torbiere .torbiere-badge {
  display: inline-block; padding: 4px 10px; margin-bottom: 10px; border-radius: 999px; background: #5b7f42; color: #fff;
  font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
}
body.torbiere .torbiere-testa h2 { margin: 0; font-size: 26px; font-weight: 800; color: #223019; line-height: 1.2; }
body.torbiere .torbiere-luogo { margin-top: 6px; color: #4f6147; font-size: 15px; }
body.torbiere .torbiere-corpo { padding: 18px 24px; overflow-y: auto; font-size: 15px; line-height: 1.6; }
body.torbiere .torbiere-corpo h2, body.torbiere .torbiere-corpo h3 { font-size: 18px; font-weight: 700; color: #223019; margin: 16px 0 6px; }
body.torbiere .torbiere-in-corso {
  margin-bottom: 14px; padding: 10px 14px; border-radius: 12px; background: #fff6df; border: 1px solid #f0d9a0; color: #6b4e00;
}
body.torbiere .torbiere-aiuto {
  margin-top: 14px; padding: 10px 14px; border-radius: 12px; background: #f7faf5; border: 1px solid #d9e2d3; font-size: 14px;
}
body.torbiere .torbiere-piede {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 14px 24px; border-top: 1px solid #e3eadf;
  background: #fafcf8; font-size: 14px;
}
body.torbiere .torbiere-piede label { margin: 0; font-weight: 400; cursor: pointer; }
body.torbiere .torbiere-spazio { flex: 1; }
body.torbiere .torbiere-link { color: #3f6a2a; font-weight: 600; }
body.torbiere .torbiere-entra {
  border: 0; border-radius: 999px; padding: 9px 20px; background: #5b7f42; color: #fff; font-weight: 700; cursor: pointer;
}
body.torbiere .torbiere-entra:hover, body.torbiere .torbiere-entra:focus { background: #466632; }
@media (max-width: 600px) {
  body.torbiere .torbiere-testa h2 { font-size: 21px; }
  body.torbiere .torbiere-piede { padding: 12px 16px; }
  body.torbiere .torbiere-corpo { padding: 14px 16px; }
}

/* ---------------------------------------------------------------- landing generica: elenco dei siti (frontend G3W) */
#torbiere-siti h2 { color: #4c6b25; font-size: 18px; font-weight: 700; line-height: 1.25; margin: 6px 0 10px; }
#torbiere-siti .torbiere-siti-griglia { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
#torbiere-siti .torbiere-sito {
  display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 10px; text-decoration: none;
  background: #f7faf5; border: 1px solid #d9e2d3; color: #1f2a22; transition: border-color .15s, box-shadow .15s;
}
#torbiere-siti .torbiere-sito:hover, #torbiere-siti .torbiere-sito:focus {
  border-color: #8ba93a; box-shadow: 0 4px 14px rgba(35, 49, 31, .15); text-decoration: none;
}
#torbiere-siti .torbiere-sito-nome { font-size: 16px; font-weight: 700; color: #223019; line-height: 1.25; }
#torbiere-siti .torbiere-sito-luogo { font-size: 13px; color: #4f6147; }
#torbiere-siti .torbiere-sito-apri { font-size: 13px; font-weight: 600; color: #3f6a2a; margin-top: 4px; }
#torbiere-siti .torbiere-sito-stato {
  align-self: flex-start; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  padding: 2px 8px; border-radius: 999px; margin-bottom: 4px;
}
#torbiere-siti .torbiere-sito-stato.online { background: #5b7f42; color: #fff; }
#torbiere-siti .torbiere-sito-stato.in-corso { background: #fff6df; color: #6b4e00; border: 1px solid #f0d9a0; }
.dres-landing-copy .torbiere-segnaposto { color: #8a6d00; font-style: italic; }
