/* Print Button */
.print-container {
  text-align: center;
  margin: 30px 0;
}

.print-button {
  background-color: #d6f8e0;
  color: #1e1e1e;
  border: none;
  padding: 15px 40px;
  border-radius: 16px;
  cursor: pointer;
  font-size: 18px;
  font-weight: bold;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.print-button:hover {
  background-color: #c5e7cf;
}

/* Print Styles */
.print-area {
  display: none;
}

/**
 * Print Stylesheet
 * Defines styles for printing reports, hiding non-printable elements, and formatting print layouts.
 */

@media print {
  /* Hide everything by default */
  body > * {
    display: none !important;
  }

  /* Ensure print areas are hidden by default in print, only show the one with .printable */
  .print-area {
    display: none !important;
  }

  .print-area.printable {
    display: block !important;
    background-color: white;
    z-index: 9999;
  }
  
  /* Reset body visibility for the print area */
  body {
    background-color: white;
    color: black;
    visibility: visible;
  }

  .watermark {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.1;
    z-index: -1;
    width: 80%;
    max-width: 600px;
  }
  
  .watermark img {
    width: 100%;
  }

  .print-content {
    position: relative;
    z-index: 1;
    padding: 40px;
  }

  .print-header {
    text-align: center;
    margin-bottom: 30px;
    border-bottom: 3px solid #d6f8e0;
    padding-bottom: 10px;
  }

  .print-header h1 {
    color: #1e1e1e;
    font-size: 28px;
    margin: 0;
  }

  .student-details {
    margin-bottom: 30px;
  }

  .detail-row {
    margin-bottom: 15px;
    font-size: 16px;
  }

  .detail-row-group {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .detail-label {
    font-weight: bold;
    margin-right: 10px;
  }

  .underline-field {
    border-bottom: 1px solid #000;
    display: inline-block;
    min-width: 200px;
  }

  .print-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
    font-size: 14px;
  }

  .print-table th, .print-table td {
    border: 1px solid #000;
    padding: 8px;
    text-align: left;
    color: #000;
  }

  .print-table th {
    background-color: #d6f8e0 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    font-weight: bold;
  }

  .print-footer {
    position: fixed;
    bottom: 20px;
    left: 0;
    width: 100%;
    text-align: center;
    font-size: 12px;
    color: #666;
    border-top: 1px solid #ccc;
    padding-top: 10px;
  }
  
  .print-footer a {
    color: #000;
    text-decoration: none;
  }
}
