/*
 * PE-Class 11982 — student assessment grade summary
 *
 * Wide student screens omit the location sentence. The assessment summary
 * uses the same A/B/C contract and colors as the assessment-management tab.
 */

@media (min-width: 769px) {
  html[data-pe-tab="students"] #app.studentScreen .pe87Crumb {
    display: none !important;
  }

  /* PC, MacBook and iPad keep every subject/total/grade column equal. */
  html[data-pe-tab="students"]:not(.pe87FoldWide):not([data-pe-fold-wide="true"])
  #app.studentScreen #studentAssessTable .studentAssessmentRecordTable > :is(thead, tbody) > tr > :is(th, td) {
    width: calc(100% / var(--student-assessment-columns)) !important;
  }

  /* Fold7 unfolded uses flex cells; give every cell the same explicit basis. */
  html[data-pe-tab="students"][data-pe-fold-wide="true"] #app.studentScreen
  #studentAssessTable .studentAssessmentRecordTable > tbody > tr > td,
  html[data-pe-tab="students"].pe87FoldWide #app.studentScreen
  #studentAssessTable .studentAssessmentRecordTable > tbody > tr > td {
    box-sizing: border-box !important;
    flex: 0 0 calc(100% / var(--student-assessment-columns)) !important;
    width: calc(100% / var(--student-assessment-columns)) !important;
  }
}

html[data-pe-tab="students"] #app.studentScreen
#studentAssessTable .studentAssessmentGradeCell {
  text-align: center !important;
  vertical-align: middle !important;
}

html[data-pe-tab="students"] #app.studentScreen
#studentAssessTable .studentAssessmentGradeBadge {
  display: inline-grid !important;
  place-items: center !important;
  width: 38px !important;
  height: 38px !important;
  max-width: 100% !important;
  border-radius: 50% !important;
  color: #fff !important;
  font-size: 16px !important;
  font-weight: 950 !important;
  line-height: 1 !important;
  box-shadow: 0 5px 12px rgba(23, 52, 79, .13) !important;
}

html[data-pe-tab="students"] #app.studentScreen
#studentAssessTable .studentAssessmentGradeA {
  background: #11a984 !important;
}

html[data-pe-tab="students"] #app.studentScreen
#studentAssessTable .studentAssessmentGradeB {
  background: #3487e5 !important;
}

html[data-pe-tab="students"] #app.studentScreen
#studentAssessTable .studentAssessmentGradeC {
  background: #f47a36 !important;
}

html[data-pe-tab="students"] #app.studentScreen
#studentAssessTable .studentAssessmentGradeEmpty {
  background: #8da0b5 !important;
  box-shadow: none !important;
}

@media (max-width: 768px) {
  html[data-pe-tab="students"] #app.studentScreen
  #studentAssessTable table.mobileAssessVertical .studentAssessmentGradeCell {
    justify-items: stretch !important;
  }

  html[data-pe-tab="students"] #app.studentScreen
  #studentAssessTable table.mobileAssessVertical .studentAssessmentGradeBadge {
    justify-self: end !important;
    width: 36px !important;
    height: 36px !important;
    font-size: 15px !important;
  }
}
