/* Shared by the app and /print.css; the print popup does not load Vue styles. */
.report-top-students {
  border: 1px solid rgba(var(--v-theme-on-surface, 47, 43, 61), 36%);
  border-radius: 5px;
  background-color: rgba(var(--v-theme-primary, 115, 103, 240), 4%);
  border-inline-start: 3px solid rgb(var(--v-theme-primary, 115, 103, 240));
  break-inside: auto;
  container-type: inline-size;
  direction: rtl;
  margin-block: 20px;
  padding-block: 10px;
  padding-inline: 10px;
}

.report-top-students__title {
  break-after: avoid;
  color: rgb(var(--v-theme-on-surface, 47, 43, 61));
  font-size: inherit;
  font-weight: 700;
  margin-block: 0 8px;
}

.report-top-students__layout {
  display: none;
  align-items: start;
  gap: 8px;
}

.report-top-students__layout--capacity-1 {
  display: grid;
}

.report-top-students__layout--tables-1 {
  grid-template-columns: minmax(0, 1fr);
  max-inline-size: min(100%, max(33.333%, 240px));
}

.report-top-students__layout--tables-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-inline-size: min(100%, max(66.666%, 360px));
}

.report-top-students__layout--tables-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.report-top-students__layout--tables-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.report-top-students__layout--tables-5 {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.report-top-students__table {
  border: 1px solid rgba(var(--v-theme-on-surface, 47, 43, 61), 50%);
  border-radius: 0;
  border-collapse: collapse;
  break-inside: auto;
  inline-size: 100%;
  table-layout: fixed;
}

.report-top-students__table th,
.report-top-students__table td {
  border: 1px solid rgba(var(--v-theme-on-surface, 47, 43, 61), 35%);
  font-size: 0.85em;
  font-weight: 400;
  line-height: 1.5;
  padding-block: 4px;
  padding-inline: 4px;
  text-align: start;
  vertical-align: middle;
}

.report-top-students__table th {
  background-color: rgba(var(--v-theme-primary, 115, 103, 240), 8%);
  font-weight: 700;
}

.report-top-students__table thead {
  display: table-header-group;
}

.report-top-students__table tr {
  break-inside: avoid;
}

.report-top-students__table .report-top-students__rank {
  inline-size: 2.5em;
  text-align: center;
  white-space: nowrap;
}

.report-top-students__table .report-top-students__average {
  inline-size: 3.5em;
  text-align: center;
  white-space: nowrap;
}

.report-top-students__name {
  overflow-wrap: anywhere;
}

@container (min-width: 360px) {
  .report-top-students__layout { display: none; }
  .report-top-students__layout--capacity-2 { display: grid; }
}

@container (min-width: 540px) {
  .report-top-students__layout { display: none; }
  .report-top-students__layout--capacity-3 { display: grid; }
}

@container (min-width: 660px) {
  .report-top-students__layout { display: none; }
  .report-top-students__layout--capacity-4 { display: grid; }
}

@container (min-width: 900px) {
  .report-top-students__layout { display: none; }
  .report-top-students__layout--capacity-5 { display: grid; }
}

@media print {
  .report-top-students {
    border-color: #555;
    background: #fff;
    border-inline-start-color: #333;
    color: #111;
    margin-block: 10px 14px;
    padding-block: 7px;
    padding-inline: 7px;
  }

  .report-top-students__title {
    color: #111;
    font-size: 9pt;
    margin-block-end: 5px;
  }

  .report-top-students__layout { gap: 5px; }

  .report-top-students__table,
  .report-top-students__table th,
  .report-top-students__table td {
    border-color: #555;
    color: #111;
  }

  .report-top-students__table th,
  .report-top-students__table td {
    font-size: 8pt;
    line-height: 1.4;
    padding-block: 2px !important;
    padding-inline: 3px;
  }

  .report-top-students__table th {
    background: #fff;
    font-weight: 700;
  }
}

.report-top-students__rank span,
.report-top-students__average bdi {
  color: inherit;
  font: inherit;
}
