/* ============================================================================
   graficas.css — estilos de los contenedores de gráficas MatemasGraph
   Se usa en: seccion.php (teoría), ejercicios.php (enunciados).
   Versión: 2026-10-31 (gráfica universal)
   ============================================================================ */

/* Web: contenedor oscuro a juego con el tema (tamaño ampliado un +20% manteniendo proporciones) */
.graph-box {
  max-width: 560px;
  margin: 1.2rem auto;
  background: #14161d;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px;
  padding: 0.75rem 0.6rem 0.5rem;
  break-inside: avoid;
  page-break-inside: avoid;
}

.graph-box svg {
  width: 100%;
  height: auto;
  display: block;
}

.graph-error {
  color: #f87171;
  font-size: 0.85rem;
  text-align: center;
  padding: 1rem;
}

/* Imágenes directas [IMAGE: url] */
.graph-box.graph-img {
  padding: 0.8rem;
}

.graph-box.graph-img img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 8px;
}

.graph-img-caption,
.graph-caption {
  margin-top: 0.5rem;
  font-size: 0.82rem;
  color: #94a3b8;
  text-align: center;
  line-height: 1.4;
}

/* Aviso de geometría 3D (solo disponible en modo vídeo) */
.graph-box.graph-3d {
  padding: 1rem;
  text-align: center;
}

.graph-3d-note {
  color: #94a3b8;
  font-size: 0.85rem;
}

/* Enunciados de ejercicios: la caja hereda el fondo de la tarjeta */
.enunciado .graph-box {
  margin: 1rem auto;
}

/* Impresión: fondo blanco, borde visible, sin cortes entre páginas */
@media print {
  .graph-box {
    background: #ffffff !important;
    border: 1px solid #999999 !important;
    max-width: 500px !important;
    break-inside: avoid !important;
    page-break-inside: avoid !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .graph-error {
    color: #000 !important;
  }
}
