/* ==========================================================================
   ClassKit Global - 30-Student Shuffle Bingo Stylesheet
   Calibrated for high-precision A4 & US Letter printing (2-up per page)
   Strict Decoupling: Under 300 lines
   ========================================================================== */

.bingo-meta-badge {
  background: #EFF6FF;
  color: #2563EB;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
}

.bingo-preset-select {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #CBD5E1;
  border-radius: 8px;
  font-size: 13px;
  color: #1E293B;
  background: #FFFFFF;
  margin-bottom: 8px;
}

.bingo-word-textarea {
  width: 100%;
  height: 90px;
  padding: 8px 10px;
  border: 1px solid #CBD5E1;
  border-radius: 8px;
  font-size: 12px;
  font-family: monospace;
  color: #334155;
  background: #F8FAFC;
  resize: vertical;
  line-height: 1.4;
  box-sizing: border-box;
}

.bingo-word-textarea:focus {
  outline: none;
  border-color: #2563EB;
  background: #FFFFFF;
}

.word-count-badge {
  font-size: 11px;
  color: #64748B;
  text-align: right;
  margin-top: 3px;
}

/* Print Sheet Styles */
.bingo-sheet {
  background: #FFFFFF;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  margin-bottom: 24px;
  box-sizing: border-box;
  padding: 8mm 10mm 6mm 10mm;
  display: flex;
  flex-direction: column;
  position: relative;
  page-break-after: always;
  break-after: page;
}

/* 2-Up Cards per Sheet */
.bingo-duo-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: space-between;
  flex: 1;
  box-sizing: border-box;
  gap: 4mm;
}

.bingo-single-card {
  border: 2px solid #0F172A;
  border-radius: 8px;
  padding: 10px 14px;
  background: #FFFFFF;
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: space-between;
  box-sizing: border-box;
}

.bingo-cut-line {
  border: none;
  border-top: 1.5px dashed #94A3B8;
  margin: 3mm 0;
  position: relative;
}

.bingo-cut-line::after {
  content: "✂ Cut along line";
  position: absolute;
  top: -8px;
  right: 16px;
  background: #FFFFFF;
  padding: 0 6px;
  font-size: 9px;
  color: #94A3B8;
  font-weight: 600;
}

.card-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1.5px solid #0F172A;
  padding-bottom: 4px;
  margin-bottom: 6px;
}

.card-title-group h2 {
  font-size: 14px;
  font-weight: 800;
  color: #0F172A;
  margin: 0;
  letter-spacing: -0.2px;
}

.card-title-group p {
  font-size: 9px;
  color: #64748B;
  margin: 1px 0 0 0;
}

.card-id-tag {
  background: #0F172A;
  color: #FFFFFF;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.card-student-line {
  display: flex;
  gap: 12px;
  font-size: 10px;
  font-weight: 600;
  color: #475569;
  margin-bottom: 8px;
}

.card-student-line .fill-line {
  border-bottom: 1px solid #94A3B8;
  flex: 1;
  display: inline-block;
  height: 12px;
}

/* Bingo Grid Table */
.bingo-grid-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  border: 1.5px solid #0F172A;
  margin-bottom: 4px;
}

.bingo-grid-table th {
  background: #F1F5F9;
  border: 1px solid #0F172A;
  font-size: 15px;
  font-weight: 900;
  color: #0F172A;
  text-align: center;
  padding: 4px 0;
  letter-spacing: 1.5px;
}

.bingo-grid-table td {
  border: 1px solid #0F172A;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: #0F172A;
  padding: 6px 2px;
  word-break: break-word;
  background: #FFFFFF;
  height: 34px;
}

.bingo-grid-table td.free-cell {
  background: #EFF6FF;
  color: #1D4ED8;
  font-weight: 900;
  font-size: 11px;
  letter-spacing: 0.5px;
}

.card-footer-note {
  font-size: 8px;
  color: #94A3B8;
  text-align: right;
}

/* Print Specific Rules */
@media print {
  @page {
    margin: 0;
    size: auto;
  }

  body {
    background: #FFFFFF !important;
  }

  .studio-header,
  .studio-sidebar {
    display: none !important;
  }

  .studio-viewport {
    padding: 0 !important;
    background: #FFFFFF !important;
  }

  .a4-wrapper {
    box-shadow: none !important;
    padding: 0 !important;
  }

  .bingo-sheet {
    box-shadow: none !important;
    margin: 0 !important;
    page-break-after: always;
    break-after: page;
  }
}
