/* EDUHUNT R567 · Principal > Exam Dates ONLY
   The six live KPI buttons retain their click filters, and the toolbar retains
   the original select/row count/Download/Share/Print event handlers.
   @media widths below are also applied in the installed-app mobile viewport.
*/

/* Six KPI cards: centre the icon, count and caption within every button. */
body[data-portal-role="PRINCIPAL"][data-portal-module="schedule"]
  #content .principal-schedule-summary > .schedule-kpi-card {
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  text-align:center!important;
  min-height:130px!important;
  height:auto!important;
  min-width:0!important;
  padding:12px 6px!important;
  box-sizing:border-box!important;
}
body[data-portal-role="PRINCIPAL"][data-portal-module="schedule"]
  #content .principal-schedule-summary > .schedule-kpi-card .kpi-top {
  display:flex!important;
  width:100%!important;
  justify-content:center!important;
  align-items:center!important;
  flex:0 0 auto!important;
}
body[data-portal-role="PRINCIPAL"][data-portal-module="schedule"]
  #content .principal-schedule-summary > .schedule-kpi-card > b {
  width:100%!important;
  margin:7px 0 0!important;
  font-size:31px!important; /* base 27px + 3pt (4px) */
  line-height:1.12!important;
  text-align:center!important;
}
body[data-portal-role="PRINCIPAL"][data-portal-module="schedule"]
  #content .principal-schedule-summary > .schedule-kpi-card > span {
  display:block!important;
  width:100%!important;
  margin:5px 0 0!important;
  font-size:15px!important; /* base 11px + 3pt (4px) */
  line-height:1.22!important;
  text-align:center!important;
  font-weight:800!important;
  white-space:normal!important;
  overflow-wrap:normal!important;
  word-break:normal!important;
  hyphens:none!important;
}

/* Filter FIRST, filtered exam count SECOND, three icon actions LAST.
   These are CSS presentation orders; their native values and actions are unchanged. */
body[data-portal-role="PRINCIPAL"][data-portal-module="schedule"]
  #principalScheduleTable .table-toolbar {
  display:flex!important;
  flex-flow:row nowrap!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:8px!important;
  width:100%!important;
  min-width:0!important;
  box-sizing:border-box!important;
}
body[data-portal-role="PRINCIPAL"][data-portal-module="schedule"]
  #principalScheduleTable .principal-schedule-status-mobile {
  order:0!important;
  flex:0 0 auto!important;
  display:inline-flex!important;
  align-items:center!important;
  gap:0!important;
  min-width:0!important;
  margin:0!important;
}
/* The dropdown keeps its accessible label; remove only the extra visible word. */
body[data-portal-role="PRINCIPAL"][data-portal-module="schedule"]
  #principalScheduleTable .principal-schedule-status-text {
  display:none!important;
}
body[data-portal-role="PRINCIPAL"][data-portal-module="schedule"]
  #principalScheduleTable #principalScheduleStatusMobile {
  display:block!important;
  width:122px!important;
  min-width:0!important;
  max-width:122px!important;
  height:38px!important;
  flex:0 0 122px!important;
  margin:0!important;
  padding:0 7px!important;
  box-sizing:border-box!important;
}
body[data-portal-role="PRINCIPAL"][data-portal-module="schedule"]
  #principalScheduleTable .table-toolbar > strong {
  order:1!important;
  flex:0 0 auto!important;
  white-space:nowrap!important;
  margin:0!important;
  font-size:14px!important;
  line-height:1.1!important;
}
body[data-portal-role="PRINCIPAL"][data-portal-module="schedule"]
  #principalScheduleTable .principal-schedule-report-actions {
  order:2!important;
  display:flex!important;
  flex:0 0 auto!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:6px!important;
  min-width:0!important;
  margin-left:auto!important;
}
body[data-portal-role="PRINCIPAL"][data-portal-module="schedule"]
  #principalScheduleTable .principal-schedule-report-icon {
  display:inline-flex!important;
  justify-content:center!important;
  align-items:center!important;
  width:36px!important;
  height:36px!important;
  min-width:36px!important;
  min-height:36px!important;
  padding:0!important;
  flex:none!important;
}
/* The abbreviated Subject column gives more width to Chapter and Actions. */
body[data-portal-role="PRINCIPAL"][data-portal-module="schedule"]
  .principal-schedule-card.has-cdf-columns :is(th,td):nth-child(1) {width:17%!important;}
body[data-portal-role="PRINCIPAL"][data-portal-module="schedule"]
  .principal-schedule-card.has-cdf-columns :is(th,td):nth-child(2) {width:16%!important;}
body[data-portal-role="PRINCIPAL"][data-portal-module="schedule"]
  .principal-schedule-card.has-cdf-columns :is(th,td):nth-child(3) {width:9%!important;}
body[data-portal-role="PRINCIPAL"][data-portal-module="schedule"]
  .principal-schedule-card.has-cdf-columns :is(th,td):nth-child(4) {width:9%!important;}
body[data-portal-role="PRINCIPAL"][data-portal-module="schedule"]
  .principal-schedule-card.has-cdf-columns :is(th,td):nth-child(5) {width:27%!important;}
body[data-portal-role="PRINCIPAL"][data-portal-module="schedule"]
  .principal-schedule-card.has-cdf-columns :is(th,td):nth-child(6) {width:22%!important;}
@media(max-width:600px) {
  body[data-portal-role="PRINCIPAL"][data-portal-module="schedule"]
    .principal-schedule-card.has-cdf-columns .table-wrap th {
    white-space:normal!important;
    overflow-wrap:anywhere!important;
    word-break:normal!important;
    text-align:center!important;
    font-size:9px!important;
    line-height:1.2!important;
    padding:8px 2px!important;
  }
  body[data-portal-role="PRINCIPAL"][data-portal-module="schedule"]
    .principal-schedule-card.has-cdf-columns .table-wrap td {
    padding-left:3px!important;
    padding-right:3px!important;
  }
}

/* A one-letter subject column must be readable, not squeezed. */
body[data-portal-role="PRINCIPAL"][data-portal-module="schedule"]
  #principalScheduleTable .r567-subject-short {
  text-decoration:none!important;
  border:0!important;
  font-size:14px!important;
  font-weight:800!important;
  color:inherit;
  cursor:help;
}

@media(max-width:600px) {
  body[data-portal-role="PRINCIPAL"][data-portal-module="schedule"]
    #content .principal-schedule-summary > .schedule-kpi-card {
    min-height:136px!important;
    padding:8px 4px!important;
  }
  body[data-portal-role="PRINCIPAL"][data-portal-module="schedule"]
    #content .principal-schedule-summary > .schedule-kpi-card > b {
    font-size:27px!important; /* former 23px + 3pt */
  }
  body[data-portal-role="PRINCIPAL"][data-portal-module="schedule"]
    #content .principal-schedule-summary > .schedule-kpi-card > span {
    font-size:14.5px!important; /* former 10.5px + 3pt */
    line-height:1.2!important;
  }
  body[data-portal-role="PRINCIPAL"][data-portal-module="schedule"]
    #principalScheduleTable .table-toolbar {
    flex-flow:row nowrap!important;
    gap:5px!important;
    padding:10px 8px!important;
  }
  body[data-portal-role="PRINCIPAL"][data-portal-module="schedule"]
    #principalScheduleTable #principalScheduleStatusMobile {
    flex:0 0 85px!important;
    width:85px!important;
    max-width:85px!important;
    height:34px!important;
    padding:0 3px!important;
    font-size:11px!important;
  }
  body[data-portal-role="PRINCIPAL"][data-portal-module="schedule"]
    #principalScheduleTable .table-toolbar > strong {
    font-size:11px!important;
  }
  body[data-portal-role="PRINCIPAL"][data-portal-module="schedule"]
    #principalScheduleTable .principal-schedule-report-actions {
    gap:4px!important;
  }
  body[data-portal-role="PRINCIPAL"][data-portal-module="schedule"]
    #principalScheduleTable .principal-schedule-report-icon {
    flex:0 0 31px!important;
    width:31px!important;
    min-width:31px!important;
    height:34px!important;
    min-height:34px!important;
  }
  body[data-portal-role="PRINCIPAL"][data-portal-module="schedule"]
    #principalScheduleTable .principal-schedule-report-icon svg {
    width:16px!important;
    height:16px!important;
  }
}
@media(max-width:360px) {
  body[data-portal-role="PRINCIPAL"][data-portal-module="schedule"]
    #content .principal-schedule-summary > .schedule-kpi-card > b {
    font-size:25px!important; /* former 21px + 3pt */
  }
  body[data-portal-role="PRINCIPAL"][data-portal-module="schedule"]
    #content .principal-schedule-summary > .schedule-kpi-card > span {
    font-size:14px!important; /* former 10px + 3pt */
  }
  body[data-portal-role="PRINCIPAL"][data-portal-module="schedule"]
    #principalScheduleTable .table-toolbar {
    gap:3px!important;
    padding:9px 5px!important;
  }
  body[data-portal-role="PRINCIPAL"][data-portal-module="schedule"]
    #principalScheduleTable #principalScheduleStatusMobile {
    flex:0 0 75px!important;
    width:75px!important;
    max-width:75px!important;
    font-size:10.5px!important;
  }
  body[data-portal-role="PRINCIPAL"][data-portal-module="schedule"]
    #principalScheduleTable .table-toolbar > strong {
    font-size:10px!important;
  }
  body[data-portal-role="PRINCIPAL"][data-portal-module="schedule"]
    #principalScheduleTable .principal-schedule-report-actions {
    gap:3px!important;
  }
  body[data-portal-role="PRINCIPAL"][data-portal-module="schedule"]
    #principalScheduleTable .principal-schedule-report-icon {
    width:28px!important;
    min-width:28px!important;
    flex:0 0 28px!important;
    height:32px!important;
    min-height:32px!important;
  }
}
