/**
 * Print Profile: Crossword
 * V7.2 Multi-Site Platform
 *
 * Crossword puzzle print layout.
 * Grid with numbered cells + Across/Down clue lists.
 * Optimized for US Letter paper.
 */

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

/* Crossword grid */
.crossword-print-grid {
  border-collapse: collapse;
  margin: 0 auto 5mm;
  border: 2px solid #000;
}

.crossword-print-grid td {
  width: 10mm; /* Increased from 9mm for better student writing */
  height: 10mm; /* Increased from 9mm */
  border: 0.8px solid #666; /* Thinner to save ink */
  text-align: center;
  vertical-align: middle;
  font-size: 13pt; /* Increased from 12pt for better readability */
  font-weight: 700;
  font-family: Arial, sans-serif;
  padding: 0;
  position: relative;
}

/* Black (blocked) cells */
.crossword-print-grid td.blocked {
  background: #000;
  border-color: #000;
}

/* Cell number (top-left corner) */
.crossword-print-grid td .cell-number {
  position: absolute;
  top: 0.3mm;
  left: 0.5mm;
  font-size: 5.5pt;
  font-weight: 600;
  line-height: 1;
  color: #333;
}

/* Empty cells (worksheet mode) */
.crossword-print-grid td.empty {
  color: transparent;
}

/* Filled cells (answer key mode) */
.crossword-print-grid td.filled {
  font-size: 11pt;
  font-weight: 700;
  text-transform: uppercase;
}

/* Clues section */
.crossword-clues-print {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3mm 6mm; /* Reduced gap to save space */
  margin-top: 3mm;
  font-size: 9.5pt; /* Increased from 9pt for better readability */
  line-height: 1.5; /* Increased from 1.4 for better readability */
}

/* Clue heading */
.crossword-clues-print h3 {
  font-size: 11pt;
  font-weight: 700;
  margin: 0 0 2mm;
  padding-bottom: 1mm;
  border-bottom: 1px solid #333;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Individual clue */
.crossword-clues-print .clue-item {
  margin-bottom: 1.5mm;
  display: flex;
  gap: 1.5mm;
}

.crossword-clues-print .clue-number {
  font-weight: 700;
  min-width: 5mm;
  text-align: right;
  flex-shrink: 0;
}

.crossword-clues-print .clue-text {
  flex: 1;
}

/* Answer in clue (answer key) */
.crossword-clues-print .clue-answer {
  font-weight: 700;
  font-size: 8pt;
  color: #333;
  margin-left: 1mm;
  text-transform: uppercase;
}

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

  .crossword-print-grid {
    page-break-inside: avoid;
  }

  .crossword-clues-print {
    page-break-before: avoid;
    orphans: 3;
    widows: 3;
  }
}
