/* ==========================================================================
   ClassKit Global - Quick Exit Tickets 4-in-1 Stylesheet
   Calibrated for high-precision A4 & US Letter printing
   Strict Decoupling: Under 300 lines
   ========================================================================== */

/* A4 Sheet Print Styling */
.ticket-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;
}

/* 4-in-1 Grid Container (2x2) */
.tickets-quad-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  width: 100%;
  height: 100%;
  gap: 6mm;
  box-sizing: border-box;
  position: relative;
  flex: 1;
}

/* Cross Scissor Cut Lines */
.cut-guide-horizontal {
  position: absolute;
  top: 50%;
  left: -4mm;
  right: -4mm;
  border-top: 1.5px dashed #94A3B8;
  transform: translateY(-50%);
  pointer-events: none;
}

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

.cut-guide-vertical {
  position: absolute;
  left: 50%;
  top: -4mm;
  bottom: -4mm;
  border-left: 1.5px dashed #94A3B8;
  transform: translateX(-50%);
  pointer-events: none;
}

.cut-guide-vertical::after {
  content: "✂";
  position: absolute;
  top: 8px;
  left: -5px;
  background: #FFFFFF;
  padding: 2px 0;
  font-size: 10px;
  color: #94A3B8;
}

/* Single Exit Ticket Slip */
.single-ticket-slip {
  border: 2px solid #0F172A;
  border-radius: 8px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  background: #FFFFFF;
  box-sizing: border-box;
  justify-content: space-between;
}

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

.ticket-title-text {
  font-size: 13px;
  font-weight: 800;
  color: #0F172A;
  margin: 0;
  letter-spacing: -0.2px;
}

.ticket-badge {
  background: #0F172A;
  color: #FFFFFF;
  font-size: 9px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.ticket-meta-fields {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  font-weight: 600;
  color: #475569;
  margin-bottom: 8px;
}

.ticket-line {
  border-bottom: 1px solid #94A3B8;
  display: inline-block;
  height: 11px;
  flex: 1;
  margin-left: 4px;
}

/* Ticket Body Content */
.ticket-prompts-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: space-evenly;
}

.prompt-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.prompt-label {
  font-size: 10.5px;
  font-weight: 700;
  color: #0F172A;
  display: flex;
  align-items: center;
  gap: 5px;
}

.prompt-num-circle {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #F1F5F9;
  border: 1px solid #0F172A;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 800;
  color: #0F172A;
}

.prompt-writing-lines {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 2px;
}

.write-line {
  border-bottom: 1px solid #CBD5E1;
  height: 12px;
  width: 100%;
}

/* Emoji Check Row */
.emoji-rating-row {
  display: flex;
  justify-content: space-around;
  background: #F8FAFC;
  border: 1px solid #CBD5E1;
  border-radius: 6px;
  padding: 6px 4px;
  margin: 4px 0;
}

.emoji-option {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 700;
  color: #1E293B;
}

.emoji-circle-check {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1.5px solid #64748B;
  display: inline-block;
}

/* Ticket Footer */
.ticket-footer-text {
  font-size: 8px;
  color: #94A3B8;
  text-align: right;
  margin-top: 4px;
}

/* 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;
  }

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