/* Dedicated Print & Realistic Digital Book Preview CSS */

.print-document-page {
  background: #ffffff;
  width: 210mm;
  min-height: 297mm;
  padding: 18mm 15mm 15mm 15mm;
  margin: 1.5rem auto;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
  border-radius: 4px;
  box-sizing: border-box;
  font-family: 'Sarabun', sans-serif;
  color: #000000;
  position: relative;
  page-break-after: always;
}

/* Page 1: Physical Book Cover Replica */
.print-cover-page {
  background: linear-gradient(180deg, #9C1B66 0%, #D81B60 30%, #E91E63 55%, #F06292 75%, #ffffff 75%);
  border: 4px solid #8E1559;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.cover-school-header {
  text-align: center;
  color: #ffffff;
}

.cover-school-emblem-svg {
  width: 75px;
  height: 75px;
  margin: 0 auto 0.5rem;
  background: #ffffff;
  border-radius: 50%;
  padding: 8px;
  border: 3px solid #FBC02D;
}

.cover-school-name {
  font-family: 'Prompt', sans-serif;
  font-size: 1.65rem;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
  margin-bottom: 0.2rem;
}

.cover-office-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: #ffffff;
}

.cover-main-title-box {
  text-align: center;
  margin: 1.5rem 0 1rem;
}

.cover-book-tag {
  font-family: 'Prompt', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.3rem;
}

.cover-activity-title {
  font-family: 'Prompt', sans-serif;
  font-size: 2.1rem;
  font-weight: 800;
  color: #ffffff;
  text-shadow: 0 2px 6px rgba(0,0,0,0.4), 0 0 15px rgba(255,255,255,0.4);
  line-height: 1.25;
}

.cover-level-subtitle {
  font-family: 'Prompt', sans-serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: #8E1559;
  background: rgba(255,255,255,0.9);
  display: inline-block;
  padding: 0.3rem 1.5rem;
  border-radius: 20px;
  margin-top: 0.8rem;
}

.cover-illustration-container {
  width: 100%;
  height: 200px;
  border-radius: 12px;
  overflow: hidden;
  margin: 1rem 0;
  border: 2px solid #8E1559;
}

.cover-illustration-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cover-student-table-box {
  background: #ffffff;
  border: 2px solid #8E1559;
  border-radius: 10px;
  padding: 1rem 1.2rem;
  margin-top: 1rem;
}

.cover-student-row {
  display: flex;
  align-items: center;
  margin-bottom: 0.6rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.dotted-line-field {
  border-bottom: 1px dotted #000;
  padding: 0 0.5rem;
  flex: 1;
  display: inline-block;
}

/* Page 2: Inside Log Table Replica */
.print-inner-page-header {
  text-align: center;
  margin-bottom: 1rem;
}

.inner-level-title {
  font-family: 'Prompt', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: #8E1559;
  margin-bottom: 0.2rem;
}

.inner-activity-type {
  font-family: 'Prompt', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.inner-student-info-line {
  font-size: 1rem;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.8rem;
}

.inner-instruction-box {
  background: #FDF4F8;
  border: 1px solid #8E1559;
  padding: 0.6rem 0.8rem;
  font-size: 0.88rem;
  border-radius: 6px;
  margin-bottom: 1rem;
}

.inner-instruction-box strong {
  color: #8E1559;
}

.print-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
}

.print-table th, .print-table td {
  border: 1px solid #000000;
  padding: 0.5rem 0.6rem;
  text-align: center;
  font-size: 0.9rem;
}

.print-table th {
  background: #8E1559;
  color: #ffffff;
  font-weight: 700;
  font-family: 'Prompt', sans-serif;
}

.print-table td.text-left {
  text-align: left;
}

.inner-footer-signatures {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: flex-end;
}

.signature-block {
  text-align: center;
  min-width: 280px;
  font-size: 0.92rem;
}

.signature-line-dotted {
  border-bottom: 1px dotted #000000;
  width: 180px;
  display: inline-block;
  margin-bottom: 0.3rem;
  height: 25px;
}

.evaluation-checkboxes {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  font-weight: 700;
  margin-top: 0.4rem;
}

/* Page 3: Off-Campus Activity Photo Attachment Replica */
.offcampus-print-header {
  text-align: center;
  font-family: 'Prompt', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.8rem;
  color: #000000;
}

.offcampus-instruction {
  font-size: 0.9rem;
  color: #C2185B;
  font-weight: 600;
  margin-bottom: 1rem;
  line-height: 1.4;
}

.semester-photo-container {
  border: 2px solid #333333;
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.semester-photo-title {
  color: #C2185B;
  font-family: 'Prompt', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 0.6rem;
}

.semester-activity-meta {
  font-size: 0.92rem;
  font-weight: 600;
  margin-bottom: 0.8rem;
}

.printed-photo-frame {
  width: 100%;
  height: 220px;
  border: 1px dashed #666666;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #FAFAFA;
}

.printed-photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.page-number-footer {
  position: absolute;
  bottom: 10mm;
  left: 15mm;
  font-size: 0.85rem;
  font-weight: 600;
  color: #333;
}

.school-name-footer {
  position: absolute;
  bottom: 10mm;
  right: 15mm;
  font-size: 0.85rem;
  font-weight: 600;
  color: #333;
}

/* @media print Rules */
@media print {
  body {
    background: #ffffff !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  #app, .app-header, .nav-tabs-bar, .app-footer, .btn, .modal-overlay {
    display: none !important;
  }

  .print-only-container {
    display: block !important;
  }

  .print-document-page {
    box-shadow: none !important;
    margin: 0 !important;
    width: 100% !important;
    min-height: 100vh !important;
    padding: 10mm !important;
    page-break-after: always;
  }
}
