/*
 * School Result Plugin — Frontend CSS (Old-school examination portal style)
 * All classes prefixed with .sr- to avoid theme conflicts.
 */

/* ──────────────────────────────────────────
   Base wrapper
────────────────────────────────────────── */
.sr-result-wrapper {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  color: #111;
  background: #fff;
  max-width: 820px;
  margin: 20px auto;
}

/* ──────────────────────────────────────────
   Search Box
────────────────────────────────────────── */
.sr-search-box {
  background: #fff;
  border: 1px solid #999;
  padding: 20px 24px;
  margin-bottom: 24px;
}
.sr-search-header {
  text-align: center;
  border-bottom: 2px solid #003070;
  margin-bottom: 18px;
  padding-bottom: 10px;
}
.sr-search-title {
  font-size: 17px;
  font-weight: bold;
  color: #003070;
  margin: 0;
  letter-spacing: 1px;
}
.sr-search-form .sr-form-row {
  margin-bottom: 14px;
}
.sr-search-form label {
  display: block;
  font-weight: bold;
  margin-bottom: 4px;
  font-size: 13px;
  color: #222;
}
.sr-search-form select,
.sr-search-form input[type="text"] {
  width: 100%;
  max-width: 340px;
  padding: 5px 7px;
  border: 1px solid #888;
  border-radius: 0;
  font-size: 13px;
  background: #fff;
  color: #111;
  box-shadow: none;
  -webkit-appearance: none;
  appearance: none;
}
.sr-search-form select {
  padding-right: 20px;
  background-image: none;
}
.sr-form-submit {
  margin-top: 16px;
}
.sr-btn-search {
  background: #003070;
  color: #fff;
  border: 1px solid #00255a;
  padding: 7px 22px;
  font-size: 13px;
  border-radius: 0;
  cursor: pointer;
  font-family: Arial, Helvetica, sans-serif;
}
.sr-btn-search:hover {
  background: #00255a;
}
.sr-loading {
  text-align: center;
  padding: 10px;
  font-style: italic;
  color: #555;
}

/* Not found */
.sr-not-found {
  border: 1px solid #c00;
  background: #fff8f8;
  padding: 12px 16px;
  color: #c00;
  margin-top: 10px;
}

/* ──────────────────────────────────────────
   Result Sheet
────────────────────────────────────────── */
.sr-result-sheet {
  border: 1px solid #999;
  background: #fff;
  padding: 20px 24px;
}

/* School header */
.sr-school-header {
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: center;
  text-align: center;
  margin-bottom: 10px;
}
.sr-school-logo img {
  max-height: 70px;
  max-width: 70px;
}
.sr-school-name {
  font-size: 18px;
  font-weight: bold;
  color: #003070;
  text-transform: uppercase;
  margin: 0 0 4px 0;
  letter-spacing: 1px;
}
.sr-school-address,
.sr-school-contact {
  font-size: 12px;
  margin: 2px 0;
  color: #333;
}
.sr-exam-title {
  font-size: 14px;
  font-weight: bold;
  color: #111;
  margin: 6px 0 0 0;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.sr-divider {
  border: none;
  border-top: 2px solid #003070;
  margin: 10px 0;
}

/* Student section */
.sr-student-section {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin: 14px 0;
}
.sr-student-info {
  flex: 1;
}
.sr-info-table {
  border-collapse: collapse;
  width: 100%;
}
.sr-info-table td {
  padding: 4px 6px;
  font-size: 13px;
  vertical-align: top;
}
.sr-label {
  font-weight: bold;
  color: #333;
  white-space: nowrap;
  width: 130px;
}
.sr-colon {
  width: 12px;
  text-align: center;
}
.sr-student-name {
  font-weight: bold;
  font-size: 14px;
  color: #003070;
}

/* Photo */
.sr-student-photo {
  text-align: center;
  flex-shrink: 0;
}
.sr-photo-img {
  width: 100px;
  height: 120px;
  object-fit: cover;
  border: 1px solid #888;
  display: block;
}
.sr-photo-placeholder {
  width: 100px;
  height: 120px;
  border: 1px dashed #888;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #999;
  background: #f9f9f9;
}

/* ──────────────────────────────────────────
   Marks Table
────────────────────────────────────────── */
.sr-result-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-bottom: 0;
}
.sr-result-table th,
.sr-result-table td {
  border: 1px solid #aaa;
  padding: 5px 8px;
  text-align: center;
}
.sr-result-table th {
  background: #e8edf5;
  font-weight: bold;
  color: #003070;
  white-space: nowrap;
}
.sr-result-table .sr-th-subject,
.sr-result-table .sr-subject-name {
  text-align: left;
}
.sr-result-table tfoot td {
  font-weight: bold;
  background: #f5f5f5;
}
.sr-result-table .sr-totals-row td {
  background: #e8edf5;
}
.sr-sub-pass {
  color: #006000;
}
.sr-sub-fail {
  color: #c00000;
  font-weight: bold;
}
.sr-obtained-marks {
  font-weight: bold;
}

/* ──────────────────────────────────────────
   Result Summary
────────────────────────────────────────── */
.sr-result-summary {
  margin-top: 14px;
  border-top: 1px solid #ccc;
  padding-top: 10px;
}
.sr-summary-table {
  border-collapse: collapse;
}
.sr-summary-table td {
  padding: 4px 8px;
  font-size: 14px;
}
.sr-summary-label {
  font-weight: bold;
  color: #333;
  width: 140px;
}
.sr-summary-colon {
  width: 16px;
}
.sr-summary-value {
  font-size: 14px;
}
.sr-final-status {
  font-size: 15px;
  font-weight: bold;
  padding: 2px 10px;
  border: 1px solid;
}
.sr-status-pass {
  color: #006000;
  border-color: #006000;
  background: #eaffea;
}
.sr-status-fail {
  color: #c00000;
  border-color: #c00000;
  background: #fff0f0;
}
.sr-fail-detail {
  font-size: 12px;
  color: #c00;
  margin-left: 8px;
}

/* ──────────────────────────────────────────
   Action buttons
────────────────────────────────────────── */
.sr-result-actions {
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid #ddd;
}
.sr-btn-print,
.sr-btn-again {
  background: #fff;
  color: #003070;
  border: 1px solid #003070;
  padding: 6px 18px;
  font-size: 13px;
  cursor: pointer;
  margin-right: 10px;
  border-radius: 0;
  font-family: Arial, Helvetica, sans-serif;
}
.sr-btn-print:hover,
.sr-btn-again:hover {
  background: #003070;
  color: #fff;
}

/* Print footer (hidden on screen by default) */
.sr-printonly {
  display: none;
}

/* ──────────────────────────────────────────
   Responsive
────────────────────────────────────────── */
@media screen and (max-width: 600px) {
  .sr-result-wrapper {
    margin: 10px;
  }
  .sr-search-box {
    padding: 14px;
  }
  .sr-search-form select,
  .sr-search-form input[type="text"] {
    max-width: 100%;
  }
  .sr-student-section {
    flex-direction: column-reverse;
  }
  .sr-school-header {
    flex-direction: column;
  }
  .sr-result-table {
    font-size: 12px;
  }
  .sr-result-table th,
  .sr-result-table td {
    padding: 4px 5px;
  }
}
