/* =========================================================
   STUDENT FEEDBACK REPORT
========================================================= */

.feedback-report-message {
  text-align: center;
  padding: 15px 8px;
  color: #777;
  font-size: 13px;
}

/* =========================
   REPORT HEADER
========================= */

.feedback-report-header {
  margin: 10px 0;
  padding: 9px 10px;
  background: #52609a;
  border: 1px solid #d3d7e2;
  border-radius: 5px;
  color: white;
}

.feedback-report-header h3 {
  margin: 0 0 5px;
  font-size: 16px;
}

.feedback-report-exam {
  font-size: 13px;
  margin-top: 3px;
}

.feedback-report-teacher {
  font-size: 13px;
  font-weight: 600;
  margin-top: 4px;
}

/* =========================
   SUMMARY
========================= */

.feedback-report-section-title {
  font-size: 14px;
  font-weight: bold;
  margin: 12px 0 6px;
  text-align: left;
}

.feedback-summary-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 14px;
}

.feedback-summary-table th,
.feedback-summary-table td {
  border: 1px solid #ccc;
  padding: 8px 6px 10px 6px;
  text-align: center;
  font-size: 16px;
}

.feedback-summary-table th {
  background: #52609a;
  font-weight: bold;
}

.feedback-good {
  color: #24752c;
  font-weight: bold;
}

.feedback-no-good {
  color: #a42c2c;
  font-weight: bold;
}

/* =========================
   QUESTION-WISE TABLE
========================= */

.feedback-question-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.feedback-question-table th,
.feedback-question-table td {
  border: 1px solid #000;
  padding: 5px 5px 5px 5px;
  line-height: 1.2;
  vertical-align: top;
  font-size: 16px;
}

.feedback-question-table th {
  background: #52609a;
  text-align: center;
}

.feedback-question-table td:first-child {
  width: 8%;
  text-align: center;
  padding: 0px 5px 18px;
}

.feedback-question-table th:first-child {
  width: 8%;
  text-align: center;
}

.feedback-question-table td:nth-child(2) {
  width: 64%;
  text-align: left;
  padding: 0px 5px 18px;
}

.feedback-question-table td:nth-child(3),
.feedback-question-table td:nth-child(4),
.feedback-question-table td:nth-child(5),
.feedback-question-table td:nth-child(6),
.feedback-question-table td:nth-child(7),
.feedback-question-table td:nth-child(8) {
  width: 14%;
  text-align: center;
  padding: 0px 5px 18px;
}

.feedback-question-table th:nth-child(3),
.feedback-question-table th:nth-child(4) {
  width: 14%;
  text-align: center;
}

/* =========================
   EXAM BREAKDOWN
   Used when ALL EXAMS selected
========================= */

.feedback-exam-breakdown {
  margin-top: 14px;
}

.feedback-exam-row {
  border: 1px solid #d2d2d2;
  border-radius: 5px;
  margin-bottom: 7px;
  padding: 7px 9px;
  background: #fafafa;
}

.feedback-exam-name {
  font-size: 14px;
  font-weight: bold;
}

.feedback-exam-teacher {
  font-size: 16px;
  margin-top: 3px;
}

.feedback-exam-counts {
  display: flex;
  gap: 12px;
  margin-top: 5px;
  font-size: 12px;
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 600px) {
  .feedback-question-table th,
  .feedback-question-table td {
    font-size: 11px;
    padding: 5px;
  }
}

/* TEACHER ATTENDANCE REPORT CSS */

.teacher-attendance-header {
  margin: 10px 0;
  padding: 9px 10px;
  background: #52609a;
  border: 1px solid black;
  border-radius: 5px;
  color: white;
}

.teacher-attendance-subtitle {
  margin: 10px 2px 6px 2px;
  font-size: 16px;
}

.teacher-attendance-message {
  margin: 12px 2px 0px 2px;
  font-size: 16px;
  color: red;
}

.teacher-attendance-exam-title {
  margin: 12px 0;
  font-size: 16px;
  font-weight: bold;
}

/* Teacher Attendance Table - reuse Feedback Report table styling */
.teacher-attendance-table td:first-child {
  width: 13%;
  text-align: left;
  vertical-align: middle;
}

.teacher-attendance-table td:nth-child(2) {
  width: 13%;
  text-align: left;
  vertical-align: middle;
}

.teacher-attendance-table td:nth-child(3) {
  vertical-align: middle;
}

.teacher-attendance-table th:first-child {
  width: 13%;
  text-align: center;
  vertical-align: middle;
}

.teacher-attendance-table th:nth-child(2) {
  width: 13%;
  text-align: center;
  vertical-align: middle;
}

.teacher-attendance-table th:nth-child(3) {
  width: 20%;
  text-align: center;
  vertical-align: middle;
}

.teacher-attendance-table th:nth-child(4),
.teacher-attendance-table td:nth-child(4),
.teacher-attendance-table th:nth-child(5),
.teacher-attendance-table td:nth-child(5),
.teacher-attendance-table th:nth-child(6),
.teacher-attendance-table td:nth-child(6),
.teacher-attendance-table th:nth-child(7),
.teacher-attendance-table td:nth-child(7),
.teacher-attendance-table th:nth-child(8),
.teacher-attendance-table td:nth-child(8),
.teacher-attendance-table th:nth-child(9),
.teacher-attendance-table td:nth-child(9) {
  width: 7.3%;
  text-align: center;
  vertical-align: middle;
}

/* Attendance below 75% */
.teacher-attendance-table .teacher-attendance-red {
  color: #a42c2c !important;
  font-weight: bold;
}

/* Attendance below 75% */
.teacher-attendance-table .teacher-attendance-black {
  color: black !important;
  font-weight: bold;
}

.teacher-attendance-table .teacher-attendance-green {
  color: #24752c !important;
  font-weight: bold;
}

.teacher-attendance-class-subject-row {
  display: flex;
  gap: 10px;
  width: 100%;
  margin: 8px 0;
}

.teacher-attendance-filter-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.teacher-attendance-filter-item label {
  font-size: 16px;
  font-weight: 600;
  text-align: left;
}

.teacher-attendance-filter-item select {
  width: 100%;
  box-sizing: border-box;
}

.teacher-attendance-or {
  text-align: center;
  font-weight: bold;
  font-size: 13px;
  margin: 8px 0;
}

@media (max-width: 600px) {
  .teacher-attendance-class-subject-row {
    gap: 6px;
  }
}

/* Default low-attendance table */
.teacher-attendance-default-table {
  width: 100%;
  table-layout: fixed;
}

/* All Exams view */
.teacher-attendance-default-table.all-exams td:nth-child(1) {
  width: 22%;
  vertical-align: middle;
}

.teacher-attendance-default-table.all-exams th:nth-child(1) {
  width: 22%;
  text-align: center;
  vertical-align: middle;
}

.teacher-attendance-default-table.all-exams td:nth-child(2) {
  width: 18%;
  vertical-align: middle;
}

.teacher-attendance-default-table.all-exams td:nth-child(3) {
  width: 24%;
  vertical-align: middle;
}

.teacher-attendance-default-table.all-exams th:nth-child(2) {
  width: 18%;
  text-align: center;
  vertical-align: middle;
}

.teacher-attendance-default-table.all-exams th:nth-child(3) {
  width: 24%;
  text-align: center;
  vertical-align: middle;
}

/* Leaves, Absent, Late, OK % */
.teacher-attendance-default-table.all-exams th:nth-child(4),
.teacher-attendance-default-table.all-exams td:nth-child(4),
.teacher-attendance-default-table.all-exams th:nth-child(5),
.teacher-attendance-default-table.all-exams td:nth-child(5),
.teacher-attendance-default-table.all-exams th:nth-child(6),
.teacher-attendance-default-table.all-exams td:nth-child(6),
.teacher-attendance-default-table.all-exams th:nth-child(7),
.teacher-attendance-default-table.all-exams td:nth-child(7) {
  width: 9%;
  text-align: center;
  vertical-align: middle;
}

/* Specific Exam selected */
.teacher-attendance-default-table.selected-exam th:nth-child(1),
.teacher-attendance-default-table.selected-exam td:nth-child(1) {
  width: 25%;
}

.teacher-attendance-default-table.selected-exam th:nth-child(2),
.teacher-attendance-default-table.selected-exam td:nth-child(2) {
  width: 35%;
  text-align: left;
}

/* Leaves, Absent, Late, OK % — equal widths */
.teacher-attendance-default-table.selected-exam th:nth-child(3),
.teacher-attendance-default-table.selected-exam td:nth-child(3),
.teacher-attendance-default-table.selected-exam th:nth-child(4),
.teacher-attendance-default-table.selected-exam td:nth-child(4),
.teacher-attendance-default-table.selected-exam th:nth-child(5),
.teacher-attendance-default-table.selected-exam td:nth-child(5),
.teacher-attendance-default-table.selected-exam th:nth-child(6),
.teacher-attendance-default-table.selected-exam td:nth-child(6) {
  width: 10%;
  text-align: center;
}

/* =========================================
   CLASS + SUBJECT FILTERED REPORT
   ========================================= */

.teacher-attendance-class-subject-table {
  width: 100%;
  table-layout: fixed;
}

.teacher-attendance-class-subject-table td:first-child {
  width: 18% !important;
  text-align: left;
}

.teacher-attendance-class-subject-table th:nth-child(2),
.teacher-attendance-class-subject-table td:nth-child(2),
.teacher-attendance-class-subject-table th:nth-child(3),
.teacher-attendance-class-subject-table td:nth-child(3),
.teacher-attendance-class-subject-table th:nth-child(4),
.teacher-attendance-class-subject-table td:nth-child(4),
.teacher-attendance-class-subject-table th:nth-child(5),
.teacher-attendance-class-subject-table td:nth-child(5),
.teacher-attendance-class-subject-table th:nth-child(6),
.teacher-attendance-class-subject-table td:nth-child(6),
.teacher-attendance-class-subject-table th:nth-child(7),
.teacher-attendance-class-subject-table td:nth-child(7) {
  width: 10% !important;
  text-align: center;
}

/* Teacher-filtered attendance report */
.teacher-attendance-teacher-table {
  width: 100%;
  table-layout: fixed;
}

/* Class and Subject — broad and equal */
.teacher-attendance-teacher-table td:nth-child(1),
.teacher-attendance-teacher-table td:nth-child(2) {
  width: 20%;
  text-align: left;
}

/* All count / percentage columns — equal width */
.teacher-attendance-teacher-table th:nth-child(3),
.teacher-attendance-teacher-table td:nth-child(3),
.teacher-attendance-teacher-table th:nth-child(4),
.teacher-attendance-teacher-table td:nth-child(4),
.teacher-attendance-teacher-table th:nth-child(5),
.teacher-attendance-teacher-table td:nth-child(5),
.teacher-attendance-teacher-table th:nth-child(6),
.teacher-attendance-teacher-table td:nth-child(6),
.teacher-attendance-teacher-table th:nth-child(7),
.teacher-attendance-teacher-table td:nth-child(7),
.teacher-attendance-teacher-table th:nth-child(8),
.teacher-attendance-teacher-table td:nth-child(8) {
  width: 10%;
  text-align: center;
}

.feedback-question-table2 {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.feedback-question-table2 th,
.feedback-question-table2 td {
  border: 1px solid #000;
  padding: 5px 5px 5px 5px;
  line-height: 1.2;
  vertical-align: top;
  font-size: 16px;
}

.feedback-question-table2 th {
  background: #52609a;
  text-align: center;
}

.feedback-question-table2 td:first-child {
  width: 20%;
  text-align: center;
  padding: 0px 5px 18px;
}

.feedback-question-table2 th:first-child {
  width: 16%;
  text-align: center;
}

.feedback-question-table2 th:nth-child(2) {
  width: 16%;
  text-align: center;
}

.feedback-question-table2 td:nth-child(2) {
  width: 20%;
  text-align: center;
  padding: 0px 5px 18px;
}

.feedback-question-table2 td:nth-child(4),
.feedback-question-table2 td:nth-child(5),
.feedback-question-table2 td:nth-child(6),
.feedback-question-table2 td:nth-child(8) {
  width: 14%;
  text-align: center;
  padding: 0px 5px 18px;
}

.feedback-question-table2 th:nth-child(3),
.feedback-question-table2 th:nth-child(4) {
  text-align: center;
}

.feedback-question-table3 {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.feedback-question-table3 th,
.feedback-question-table3 td {
  border: 1px solid #000;
  padding: 5px 5px 5px 5px;
  line-height: 1.2;
  vertical-align: top;
  font-size: 16px;
}

.feedback-question-table3 th {
  background: #52609a;
  text-align: center;
}

.feedback-question-table3 td:first-child {
  width: 24%;
  text-align: center;
  padding: 0px 5px 18px;
}

.feedback-question-table3 th:first-child {
  width: 24%;
  text-align: center;
}

.feedback-question-table3 td:nth-child(4),
.feedback-question-table3 td:nth-child(5),
.feedback-question-table3 td:nth-child(3),
.feedback-question-table3 td:nth-child(7) {
  width: 14%;
  text-align: center;
  padding: 0px 5px 18px;
}

/* Add teacher search in attendance report: */

.teacher-search-container {
  position: relative;
  background: #f8d4ad;
}

.teacher-search-container input[type="text"] {
  font-size: 16px;
  background-color: #f3ece4;
  font-family: Arial, sans-serif;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

#teacherAttendanceTeacherSearch {
  width: 100%;
  box-sizing: border-box;
}

.teacher-search-options {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 1000;
  max-height: 220px;
  overflow-y: auto;
  background: #fff5ea;
  border: 1px solid #888;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

.teacher-search-options[hidden] {
  display: none;
}

.teacher-search-option {
  padding: 9px 12px;
  cursor: pointer;
}

.teacher-search-option:hover,
.teacher-search-option:focus {
  background-color: #0056b3;
  color: white;
}

.teacher-search-empty {
  padding: 9px 12px;
  color: #777;
}
