/* ==========================================================================
   ClassKit Global - Desk Nameplates & Number Lines Stylesheet
   Calibrated for high-precision A4 & US Letter printing
   Strict Decoupling: Under 250 lines
   ========================================================================== */

.nameplate-sheet {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-sizing: border-box;
  padding: 8mm 12mm 6mm;
  background: #FFFFFF;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  margin-bottom: 24px;
  position: relative;
  page-break-after: always;
  break-after: page;
}

.nameplate-sheet:last-child {
  page-break-after: auto;
}

.nameplates-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 0;
  gap: 8px;
}

/* Individual Nameplate Strip */
.nameplate-strip {
  width: 100%;
  flex: 1;
  border: 2px solid #0F172A;
  border-radius: 8px;
  background: #FFFFFF;
  box-sizing: border-box;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.04);
  min-height: 0;
}

.cut-separator-guide {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin: 2px 0;
  color: #94A3B8;
  font-size: 10.5px;
  font-weight: 600;
  flex-shrink: 0;
}

.cut-separator-guide::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  border-top: 1.5px dashed #94A3B8;
  z-index: 1;
}

.cut-separator-guide span {
  position: relative;
  z-index: 2;
  background: #FFFFFF;
  padding: 0 10px;
}

/* Strip Top: Alphabet & Directional Hands */
.plate-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #E2E8F0;
  padding-bottom: 4px;
  font-size: 11px;
  flex-shrink: 0;
}

.hand-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-weight: 800;
  font-size: 10.5px;
  color: #475569;
  background: #F1F5F9;
  padding: 2px 5px;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}

.plate-alphabet {
  font-family: 'Outfit', -apple-system, sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: #1E293B;
  letter-spacing: 0.8px;
  text-align: center;
  flex: 1;
  padding: 0 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Strip Center: Student Name 3-Line Area */
.plate-name-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  margin: 4px 0;
  min-height: 44px;
}

.name-line-guide {
  width: 100%;
  height: 52px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.strips-3 .name-line-guide {
  height: 38px;
}

.name-guide-top {
  width: 100%;
  height: 1px;
  background-color: #60A5FA;
}

.name-guide-mid {
  width: 100%;
  border-top: 1.5px dashed #94A3B8;
}

.name-guide-base {
  width: 100%;
  height: 1.5px;
  background-color: #EF4444;
}

.typed-student-name {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Outfit', cursive, sans-serif;
  font-size: 30px;
  font-weight: 700;
  color: #0F172A;
  white-space: nowrap;
  letter-spacing: 1px;
}

.strips-3 .typed-student-name {
  font-size: 22px;
}

/* Strip Bottom: Number Line & Shapes */
.plate-bottom-bar {
  border-top: 1px solid #E2E8F0;
  padding-top: 4px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex-shrink: 0;
}

.plate-number-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  position: relative;
  padding: 0 2px;
  box-sizing: border-box;
}

.number-line-tick {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 10px;
  font-weight: 700;
  color: #1E293B;
  flex: 1;
  text-align: center;
  position: relative;
}

.number-line-tick::before {
  content: '';
  width: 1.5px;
  height: 6px;
  background-color: #0F172A;
  margin-bottom: 2px;
}

.plate-number-line::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  border-top: 1.5px solid #0F172A;
}

.plate-shapes-bar {
  display: flex;
  justify-content: space-around;
  font-size: 9.5px;
  font-weight: 700;
  color: #64748B;
  padding-top: 2px;
}

/* Print Overrides */
@media print {
  .nameplate-sheet {
    box-shadow: none !important;
    margin: 0 !important;
    padding: 7mm 10mm 6mm !important;
    page-break-after: always !important;
    break-after: page !important;
    width: 100% !important;
  }

  .nameplate-strip {
    border-color: #0F172A !important;
    box-shadow: none !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .name-guide-top {
    background-color: #60A5FA !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .name-guide-mid {
    border-top-color: #94A3B8 !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .name-guide-base {
    background-color: #EF4444 !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
}
