/* =========================
   Guía Visual EzCAD — Estilos
   Archivo: css/guide.css
   Encapsulado: no afecta #output ni .param-card
   ========================= */

:root {
  --guide-bg: #0b0f14;
  --guide-panel: #1a1f27;
  --guide-accent: #1e88e5;
  --guide-text: #e8eef6;
  --guide-muted: #8fa3b6;

  --hotspot-stroke: #66b2ff;
  --hotspot-fill: rgba(102, 178, 255, 0.08);
  --hotspot-glow: rgba(102, 178, 255, 0.45);
}

/* Ocultar SOLO la sección de la guía */
#ezcad-guide.hidden { display: none; }

/* Contenedor de la guía */
#ezcad-guide.card {
  background: var(--guide-panel);
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

/* Tipografía interna de la guía */
#ezcad-guide h2,
#ezcad-guide p { color: var(--guide-text); }
#ezcad-guide p  { color: var(--guide-muted); }

/* Marco que contiene el SVG */
#ezcad-guide .ezcad-frame {
  position: relative;
  width: 100%;
  max-width: 980px;
  margin: 12px auto 16px;
  background: var(--guide-bg);
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.06);
  overflow: visible;     /* no recorta el borde inferior del SVG */
  padding-bottom: 24px;  /* aire por si el SVG crece */
}

/* SVG responsivo */
#ezcad-svg {
  display: block;
  width: 100%;
  height: auto;
  background: #14181f;
}

/* Hotspots (áreas interactivas) */
#ezcad-svg .hotspot {
  fill: var(--hotspot-fill);
  stroke: var(--hotspot-stroke);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
  cursor: pointer;
  transition: filter 160ms ease, fill 160ms ease, stroke 160ms ease;
  outline: none;
}
#ezcad-svg .hotspot:hover,
#ezcad-svg .hotspot:focus {
  filter: drop-shadow(0 0 10px var(--hotspot-glow));
  fill: rgba(102, 178, 255, 0.16);
  stroke: #a5d4ff;
}

/* Resalte del hotspot desde #output (no estilamos #output, solo el hotspot) */
#ezcad-svg .hotspot.highlight {
  stroke: #ffd166 !important;
  fill: rgba(255, 209, 102, 0.18) !important;
  filter: drop-shadow(0 0 10px rgba(255, 209, 102, 0.6));
}

/* Botón flotante para abrir la guía */
.floating-btn {
  position: fixed;
  right: 16px;
  bottom: 88px; /* deja espacio para el dock si existe */
  z-index: 1100;
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--guide-accent);
  color: #fff;
  border: none;
  box-shadow: 0 8px 20px rgba(0,0,0,0.35);
  font-weight: 600;
  letter-spacing: 0.2px;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, opacity 140ms ease;
}
.floating-btn:hover,
.floating-btn:focus {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(0,0,0,0.45);
  outline: none;
}
/* Accesibilidad: foco visible */
.floating-btn:focus-visible {
  box-shadow:
    0 0 0 3px rgba(255,255,255,0.3),
    0 0 0 6px rgba(30,136,229,0.55);
}

/* Botón para cerrar la guía (reusa .btn global) */
#close-guide.btn { margin-top: 10px; }

/* Panel flotante de mapeo (solo UI propia de la guía) */
#map-panel{
  position: fixed;
  right: 16px;
  bottom: 150px; /* encima del dock */
  z-index: 1200;
  min-width: 260px;
  max-width: 320px;
  background: #10151d;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.45);
  padding: 12px;
  opacity: 0;                 /* en vez de display:none; */
  transform: translateY(6px); /* suave */
  pointer-events: none;       /* no capta clicks cuando está oculto */
  transition: opacity .16s ease, transform .18s ease;
}
#map-panel.show{
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Botón de cierre (X) */
#map-panel .mp-close{
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px; height: 28px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(0,0,0,.28);
  color: #eaf2ff;
  font-size: 18px; line-height: 26px;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
}
#map-panel .mp-close:hover{ background: rgba(0,0,0,.42); }

#map-panel .mp-title {
  color: #e8eef6;
  font-weight: 700;
  margin-bottom: 6px;
  font-size: 15px;
}
#map-panel .mp-tip {
  color: #8fa3b6;
  font-size: 13px;
  line-height: 1.35;
  margin-bottom: 8px;
}
#map-panel .mp-value {
  color: #a7c7ff;
  font-size: 16px;
  font-weight: 600;
  margin: 6px 0 10px;
  word-break: break-word;
}
#map-panel .mp-actions {
  display: flex; gap: 8px; flex-wrap: wrap;
}
#map-panel .btn.mini {
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 13px;
}

/* Soporte de aspecto del SVG (ayuda a navegadores) */
@supports (aspect-ratio: 1) {
  #ezcad-svg { aspect-ratio: 800 / 580; }
}

/* Ajustes móviles */
@media (max-width: 420px) {
  .floating-btn {
    right: 12px;
    bottom: 84px;
    font-size: 14px;
    padding: 9px 12px;
  }
}
