/* vrv-postmap.css — accordion Post ↕ Mappa per visualizza_post.
   Idioma "VitExplorer": barra cliccabile + stato sul contenitore.
   Due stati: .is-post (default) e .is-map. Split contemporaneo: per ora fuori. */

.vrv-postmap {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;          /* riempie lo spazio rimasto nella card (sotto il titolo) — altezza dal CSS, non piu' dal JS */
  min-height: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, .12);
}

.vrv-postmap-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* ── Barra cliccabile (header di pannello) ── */
.vrv-postmap-bar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 14px;
  background: #1e3a5f;
  color: #cce4ff;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  font-size: 13px;
  cursor: pointer;
  user-select: none;
}
.vrv-postmap-bar:hover { filter: brightness(1.12); }
.vrv-postmap-bar:focus-visible { outline: 2px solid #7eb8f7; outline-offset: -2px; }

.vrv-postmap-arrow {
  font-size: 10px;
  opacity: .8;
  flex: 0 0 auto;
  display: inline-block;
}

.vrv-postmap-title {
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;       /* mai su due righe */
  overflow: hidden;
  text-overflow: ellipsis;   /* se troppo lungo: troncamento con … */
}

/* corpo post: annulla il max-height:85vh legacy quando è dentro l'accordion */
body.page-visualizza-post .vrv-postmap #vv-post-body {
  max-height: none !important;
  flex: 1 1 auto;
  min-height: 0;
}

.vrv-postmap-mapbody {
  flex: 1 1 auto;
  min-height: 0;
}
.vrv-postmap-iframe {
  width: 100%;
  height: 100% !important;   /* batte eventuali regole globali iframe{height:auto} */
  border: 0;
  display: block;
}

/* ── Stato: solo POST ── (si mostra solo la barra MAPPA: quella del post è inutile) */
.vrv-postmap.is-post .vrv-postmap-post { flex: 1 1 auto; }
.vrv-postmap.is-post .vrv-postmap-map  { flex: 0 0 auto; }
.vrv-postmap.is-post .vrv-postmap-mapbody { display: none; }
.vrv-postmap.is-post .vrv-postmap-bar-post { display: none; }

/* ── Stato: solo MAPPA ── (si mostra solo la barra POST) */
.vrv-postmap.is-map .vrv-postmap-post { flex: 0 0 auto; }
.vrv-postmap.is-map #vv-post-body { display: none !important; }
.vrv-postmap.is-map .vrv-postmap-map { flex: 1 1 auto; }
.vrv-postmap.is-map .vrv-postmap-bar-map { display: none; }

/* ── Con la mappa aperta, nascondi i pin di scorrimento del testo ── */
body.vrv-map-open .vv-scrollpins { display: none !important; }

/* ── Senza mappa (post legacy): niente barre, il post riempie tutto ── */
.vrv-postmap[data-nomap] .vrv-postmap-bar { display: none; }
.vrv-postmap[data-nomap] .vrv-postmap-post { flex: 1 1 auto; }
