/**
 * Print Profile: Maze / Canvas
 * V7.2 Multi-Site Platform
 *
 * Canvas-type content print layout.
 * Applies to: maze, coloring pages, drawing activities.
 * SVG/image centered with max size optimized for US Letter.
 */

/* Canvas container */
.canvas-print-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 auto;
  max-width: 195mm; /* Increased from 180mm for letter paper */
}

/* Maze / coloring image */
.canvas-print-container img,
.canvas-print-container svg,
.maze-print-image,
.coloring-print-image {
  max-width: 190mm; /* Increased from 170mm for letter paper */
  max-height: 240mm; /* Increased from 220mm for letter paper */
  width: auto;
  height: auto;
  display: block;
  margin: 0 auto;
  object-fit: contain;
}

/* SVG maze: ensure crisp lines */
.maze-print-image svg,
.canvas-print-container svg {
  shape-rendering: crispEdges;
}

/* SVG maze walls */
.maze-print-image svg line,
.maze-print-image svg rect {
  stroke: #000;
  stroke-width: 1.5px;
}

/* Maze grid table (array rendering) */
.maze-grid-table {
  border-collapse: collapse;
  border-spacing: 0;
  margin: 0 auto;
  line-height: 0;
}

.maze-grid-table td {
  width: 10px;
  height: 10px;
  padding: 0;
  margin: 0;
  border: none;
}

.maze-grid-table td.maze-wall {
  background: #000;
}

.maze-grid-table td.maze-path {
  background: #fff;
  border: 0.5px solid #ddd;
}

/* Maze start/end markers */
.maze-marker-start,
.maze-marker-end {
  font-size: 10pt;
  font-weight: 700;
  text-align: center;
  padding: 1mm 3mm;
}

.maze-marker-start::before {
  content: "START";
}

.maze-marker-end::before {
  content: "FINISH";
}

/* Difficulty / size info */
.maze-info-badge {
  text-align: center;
  font-size: 9pt;
  color: #555;
  margin-bottom: 3mm;
  font-weight: 600;
}

/* Answer key: solution path overlay */
.maze-solution-path {
  stroke: #cc0000;
  stroke-width: 2px;
  fill: none;
  stroke-dasharray: 4 2;
}

/* Coloring page: ensure outlines only (no fills in worksheet) */
.coloring-print-image svg path,
.coloring-print-image svg polygon,
.coloring-print-image svg circle,
.coloring-print-image svg ellipse {
  fill: none;
  stroke: #000;
  stroke-width: 1.2px;
}

/* Answer key: show fills */
.answer-key .coloring-print-image svg path,
.answer-key .coloring-print-image svg polygon,
.answer-key .coloring-print-image svg circle,
.answer-key .coloring-print-image svg ellipse {
  fill: inherit;
}

/* Hide interactive palettes and tools */
.canvas-palette-print,
.brush-selector-print {
  display: none !important;
}

@media print {
  .canvas-print-container {
    page-break-inside: avoid;
  }

  .maze-print-image,
  .coloring-print-image {
    page-break-inside: avoid;
  }
}
