/**
 * Print Profile: Card Activity
 * V7.2 Multi-Site Platform
 *
 * Card-based content print layout.
 * Applies to: word jumble/scramble, flashcards, matching.
 * Cards in 2- or 3-column grid, page-break-aware.
 * Optimized for US Letter paper.
 */

/* Card grid container */
.card-print-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3mm;
  margin: 0 auto;
  max-width: 195mm; /* Increased from 180mm for letter paper */
}

/* 3-column variant (for smaller cards) */
.card-print-grid.three-col {
  grid-template-columns: 1fr 1fr 1fr;
  gap: 2.5mm;
}

/* Individual card */
.card-print-item {
  border: 1px solid #333; /* Thinner to save ink */
  border-top: 2px solid #000; /* Reduced from 2.5px */
  border-radius: 1.5mm;
  padding: 3.5mm 4mm; /* Slightly increased vertical padding */
  min-height: 24mm; /* Increased from 22mm for better readability */
  display: flex;
  flex-direction: column;
  justify-content: center;
  page-break-inside: avoid;
  break-inside: avoid;
}

/* Card number */
.card-print-item .card-number {
  font-size: 8pt;
  font-weight: 700;
  color: #666;
  margin-bottom: 1.5mm;
}

/* Card front (question / scrambled word) */
.card-print-item .card-front {
  font-size: 15pt; /* Increased from 14pt for better readability */
  font-weight: 700;
  font-family: Arial, sans-serif;
  letter-spacing: 1px;
  text-align: center;
  margin-bottom: 2mm;
}

/* Word jumble: scrambled letters with spacing */
.card-print-item .scrambled-word {
  font-size: 18pt; /* Increased from 16pt for better readability */
  font-weight: 700;
  letter-spacing: 2.5px; /* Increased from 2px for better letter distinction */
  text-transform: uppercase;
  text-align: center;
  font-family: 'Courier New', monospace;
}

/* Answer line (worksheet mode) */
.card-print-item .answer-line {
  border-bottom: 1.2px solid #111; /* Thinner to save ink */
  min-height: 9mm; /* Increased from 8mm for student writing */
  margin-top: 2mm;
}

/* Card back / answer (answer key mode) */
.card-print-item .card-answer {
  font-size: 12pt;
  font-weight: 700;
  text-align: center;
  padding: 1.5mm 3mm;
  border: 1px solid #111;
  border-radius: 1mm;
  margin-top: 2mm;
  background: #f8f8f8;
}

/* Hint text */
.card-print-item .card-hint {
  font-size: 8pt;
  color: #666;
  font-style: italic;
  margin-top: 1mm;
  text-align: center;
}

/* Category / difficulty label */
.card-print-item .card-category {
  font-size: 7pt;
  font-weight: 600;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 1mm;
}

/* Word count / stats footer */
.card-stats-print {
  display: flex;
  justify-content: center;
  gap: 4mm;
  margin-top: 4mm;
  padding-top: 3mm;
  border-top: 0.8px solid #ccc;
}

.card-stats-print .stat-item {
  font-size: 8pt;
  font-weight: 600;
  color: #666;
  padding: 1mm 2.5mm;
  border: 0.8px solid #ddd;
  border-radius: 1mm;
}

@media print {
  .card-print-grid {
    orphans: 2;
    widows: 2;
  }

  .card-print-item {
    page-break-inside: avoid;
    break-inside: avoid;
  }
}
