/**
 * Print Profile: Word Search / Number Search
 * V7.2 Multi-Site Platform
 *
 * Grid-based puzzle print layout.
 * Grid cells + word/number target list below.
 * Optimized for US Letter paper.
 */

/* Grid container — centered, max width for readability */
.puzzle-grid-print,
.number-grid-print,
.problems-grid[data-profile="word-search"],
.problems-grid[data-profile="number-search"] {
  display: block;
  margin: 0 auto;
  max-width: 180mm; /* Increased from 160mm for letter paper */
}

/* Grid table (word search / number search) */
.puzzle-grid-print table,
.grid-print-table {
  border-collapse: collapse;
  margin: 0 auto 4mm;
  border: 2px solid #000;
}

.puzzle-grid-print td,
.grid-print-table td {
  width: 9mm; /* Increased from 8.5mm for better readability */
  height: 9mm; /* Increased from 8.5mm */
  border: 0.5px solid #bbb; /* Thinner to save ink */
  text-align: center;
  vertical-align: middle;
  font-size: 12pt; /* Increased from 11pt for better readability */
  font-weight: 600;
  font-family: 'Courier New', monospace;
  padding: 0;
  line-height: 1;
}

/* Highlighted cells (answer key mode) */
.grid-print-table td.highlighted,
.puzzle-grid-print td.found {
  background: #e0e0e0;
  font-weight: 700;
}

/* Direction indicator in answer key */
.grid-print-table td.answer-start {
  background: #d0d0d0;
  border: 1.5px solid #333;
}

/* Word/Number targets list */
.targets-print-list {
  display: flex;
  flex-wrap: wrap;
  gap: 2mm 4mm;
  margin-top: 4mm;
  padding: 3mm;
  border: 1px solid #ccc;
  border-radius: 1.5mm;
  justify-content: center;
}

.targets-print-list .target-word,
.targets-print-list .target-number {
  font-size: 10pt;
  font-weight: 600;
  padding: 1mm 2.5mm;
  border: 0.8px solid #ddd;
  border-radius: 1mm;
  white-space: nowrap;
  min-width: 16mm;
  text-align: center;
}

/* Found targets in answer key */
.targets-print-list .target-word.found,
.targets-print-list .target-number.found {
  text-decoration: line-through;
  color: #666;
  background: #f0f0f0;
}

/* Grid dimensions label */
.grid-dimensions-badge {
  text-align: center;
  font-size: 9pt;
  color: #666;
  margin-bottom: 2mm;
}

@media print {
  .puzzle-grid-print,
  .number-grid-print {
    page-break-inside: avoid;
  }

  .targets-print-list {
    page-break-inside: avoid;
  }
}
