/*
 * Venado Virtual - visor de mapas Leaflet
 * Motor visual común para mapas dinámicos.
 * No contiene estilos propios de una cartografía particular.
 */

:root {
  --vvml-texto: #30352f;
  --vvml-suave: #62675f;
  --vvml-borde: #c9c5b8;
  --vvml-fondo: #ffffff;
  --vvml-fondo-mapa: #e8e6dd;
  --vvml-fondo-suave: #f6f4ec;
  --vvml-punto: #b92822;
  --vvml-punto-activo: #e3b23c;
  --vvml-sombra: 0 0.4rem 1.5rem rgba(0, 0, 0, 0.18);
}

.vvml-visor,
.vvml-visor *,
.vvml-visor *::before,
.vvml-visor *::after {
  box-sizing: border-box;
}

.vvml-visor {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  width: 100%;
  color: var(--vvml-texto);
}

.vvml-visor.vvml-panel-abierto {
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
}

.vvml-mapa {
  width: 100%;
  height: min(78vh, 760px);
  min-height: 480px;
  border: 1px solid var(--vvml-borde);
  background: var(--vvml-fondo-mapa);
}

.vvml-panel {
  display: none;
  position: relative;
  min-width: 0;
  max-height: min(78vh, 760px);
  overflow: auto;
  border: 1px solid var(--vvml-borde);
  border-left: 0;
  background: var(--vvml-fondo);
}

.vvml-panel[aria-hidden="false"] {
  display: block;
}

.vvml-panel-cabecera {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  justify-content: flex-end;
  padding: 0.5rem;
  background: rgba(255, 255, 255, 0.96);
}

.vvml-panel-cerrar {
  width: 2.4rem;
  height: 2.4rem;
  border: 1px solid var(--vvml-borde);
  border-radius: 50%;
  background: var(--vvml-fondo);
  color: inherit;
  font: inherit;
  font-size: 1.45rem;
  line-height: 1;
  cursor: pointer;
}

.vvml-panel-cerrar:hover,
.vvml-panel-cerrar:focus-visible {
  background: var(--vvml-fondo-suave);
}

.vvml-panel-contenido {
  padding: 0 1rem 1.25rem;
}

.vvml-panel-contenido h2 {
  margin: 0 0 0.4rem;
  font-size: 1.35rem;
  line-height: 1.2;
}

.vvml-panel-contenido h3 {
  margin: 1.1rem 0 0.55rem;
  font-size: 1rem;
}

.vvml-panel-contenido p {
  margin: 0.45rem 0;
  line-height: 1.5;
}

.vvml-meta-lugar {
  color: var(--vvml-suave);
  font-size: 0.9rem;
}

.vvml-lista-fotos {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
  margin-top: 0.7rem;
}

.vvml-foto {
  display: block;
  color: inherit;
  text-decoration: none;
}

.vvml-foto img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--vvml-borde);
  background: var(--vvml-fondo-suave);
}

.vvml-foto span {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.82rem;
  line-height: 1.3;
}

.vvml-recursos {
  display: grid;
  gap: 0.45rem;
  margin-top: 0.55rem;
}

.vvml-recurso {
  display: block;
  padding: 0.5rem 0.7rem;
  border: 1px solid var(--vvml-borde);
  border-radius: 0.25rem;
  background: var(--vvml-fondo-suave);
  color: inherit;
  text-decoration: none;
}

.vvml-recurso:hover,
.vvml-recurso:focus-visible {
  background: #eeeeea;
}

.vvml-estado {
  min-height: 1.5rem;
  margin: 0.5rem 0 0;
  color: var(--vvml-suave);
  font-size: 0.9rem;
}

.vvml-marcador {
  border: 0;
  background: transparent;
}

.vvml-marcador-punto {
  display: block;
  width: 16px;
  height: 16px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--vvml-punto);
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
  transition: width 120ms ease, height 120ms ease, background-color 120ms ease;
}

.vvml-marcador.vvml-marcador-activo .vvml-marcador-punto,
.vvml-marcador:focus .vvml-marcador-punto,
.vvml-marcador:hover .vvml-marcador-punto {
  width: 22px;
  height: 22px;
  margin: -3px;
  background: var(--vvml-punto-activo);
}

.vvml-mensaje-error {
  color: #8a1f1a;
}

@media (max-width: 767.98px) {
  .vvml-visor,
  .vvml-visor.vvml-panel-abierto {
    display: block;
  }

  .vvml-mapa {
    height: 75vh;
    min-height: 420px;
  }

  .vvml-panel {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1000;
    max-height: min(55vh, 520px);
    border: 1px solid var(--vvml-borde);
    border-bottom: 0;
    border-radius: 0.65rem 0.65rem 0 0;
    box-shadow: var(--vvml-sombra);
  }

  .vvml-panel-cabecera {
    border-radius: 0.65rem 0.65rem 0 0;
  }

  .vvml-panel-contenido {
    padding-inline: 0.9rem;
  }
}

@media (max-width: 575.98px) {
  .vvml-lista-fotos {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
