/*
 * Legacy report presentation, isolated to Admin Reports and shared report-card
 * panel printing. Every rule is print-only; screen layout stays in the modern
 * stylesheets.
 */

@page tb-admin-report {
  size: A4 portrait;
  margin: 9.88mm;
}

@page tb-report-card {
  size: A4 portrait;
  margin: 9.88mm;
}

@media print {
  html:has(.tab-pane.show.active .tb-admin-report:not(:empty)),
  html:has(body.tb-rc-printing) {
    background: transparent !important;
  }

  body:has(.tab-pane.show.active .tb-admin-report:not(:empty)) {
    background: #f5f5f5 !important;
  }

  body.tb-rc-printing {
    background: #f5f5f5 !important;
  }

  body:has(.tab-pane.show.active .tb-admin-report:not(:empty)) {
    page: tb-admin-report;
  }

  body.tb-rc-printing {
    page: tb-report-card;
  }

  body:has(.tab-pane.show.active .tb-admin-report:not(:empty)) #content,
  body.tb-rc-printing #content {
    min-height: 0 !important;
    padding: 7px !important;
  }

  body.tb-rc-printing .wrapper {
    display: flex !important;
  }

  body:has(.tab-pane.show.active .tb-admin-report:not(:empty)) .PrintHeader,
  body:has(.tab-pane.show.active .tb-admin-report:not(:empty)) .PrintHeader h3,
  body.tb-rc-printing .tb-rc-print-header,
  body.tb-rc-printing .tb-rc-print-header h3 {
    color: #272727 !important;
    font-weight: 500;
    letter-spacing: normal;
  }

  body:has(.tab-pane.show.active .tb-admin-report:not(:empty)) .PrintHeader a {
    color: inherit !important;
    text-decoration: underline !important;
  }

  .tb-admin-report,
  body.tb-rc-printing .tb-rc-view {
    font-size: 1rem;
    line-height: 1.5;
    color: #272727;
    color-scheme: light;
    text-rendering: auto;
    -webkit-font-smoothing: auto;
    -moz-osx-font-smoothing: auto;
  }

  .tb-admin-report h1,
  .tb-admin-report h2,
  .tb-admin-report h3,
  .tb-admin-report h4,
  .tb-admin-report h5,
  .tb-admin-report h6,
  body.tb-rc-printing .tb-rc-view h1,
  body.tb-rc-printing .tb-rc-view h2,
  body.tb-rc-printing .tb-rc-view h3,
  body.tb-rc-printing .tb-rc-view h4,
  body.tb-rc-printing .tb-rc-view h5,
  body.tb-rc-printing .tb-rc-view h6 {
    color: #272727 !important;
    font-weight: 500;
    letter-spacing: normal;
  }

  .tb-admin-report .table-responsive,
  body.tb-rc-printing .tb-rc-view .table-responsive {
    overflow: visible !important;
    border-radius: 0 !important;
    background-image: none !important;
  }

  .tb-admin-report.tb-admin-report--cards .table-responsive.BitBiggerText {
    display: flow-root;
  }

  .tb-admin-report .table-responsive > .table > thead > tr > th:first-child,
  .tb-admin-report .table-responsive > .table > tbody > tr > td:first-child,
  body.tb-rc-printing .tb-rc-view .table-responsive > .table > thead > tr > th:first-child,
  body.tb-rc-printing .tb-rc-view .table-responsive > .table > tbody > tr > td:first-child {
    position: static !important;
    left: auto !important;
    z-index: auto !important;
    box-shadow: none !important;
    background-color: #ffffff !important;
  }

  .tb-admin-report .table,
  body.tb-rc-printing .tb-rc-view .table {
    color: #212529 !important;
    background: #ffffff !important;
    border-color: #dee2e6 !important;
  }

  .tb-admin-report .table th,
  .tb-admin-report .table td,
  body.tb-rc-printing .tb-rc-view .table th,
  body.tb-rc-printing .tb-rc-view .table td {
    background: #ffffff !important;
    color: #212529 !important;
    border-color: #dee2e6 !important;
  }

  .tb-admin-report .table-bordered th,
  .tb-admin-report .table-bordered td,
  body.tb-rc-printing .tb-rc-view .table-bordered th,
  body.tb-rc-printing .tb-rc-view .table-bordered td {
    border: 1px solid #dee2e6 !important;
  }

  .tb-admin-report .table-bordered thead th,
  .tb-admin-report .table-bordered thead td,
  body.tb-rc-printing .tb-rc-view .table-bordered thead th,
  body.tb-rc-printing .tb-rc-view .table-bordered thead td {
    border-bottom-width: 1px !important;
  }

  .tb-admin-report .table tbody td,
  .tb-admin-report .table tbody th,
  body.tb-rc-printing .tb-rc-view .table tbody td,
  body.tb-rc-printing .tb-rc-view .table tbody th {
    vertical-align: top !important;
  }

  .tb-admin-report .table thead th,
  body.tb-rc-printing .tb-rc-view .table thead th {
    vertical-align: bottom !important;
    font-weight: 700;
  }

  .tb-admin-report .table thead th[rowspan],
  body.tb-rc-printing .tb-rc-view .table thead th[rowspan] {
    vertical-align: middle !important;
  }

  .tb-admin-report .table thead th.NotBold,
  body.tb-rc-printing .tb-rc-view .table thead th.NotBold {
    font-weight: 400;
  }

  .tb-admin-report .table-sm th,
  .tb-admin-report .table-sm td,
  body.tb-rc-printing .tb-rc-view .table-sm th,
  body.tb-rc-printing .tb-rc-view .table-sm td {
    padding: 0.3rem;
    font-size: inherit;
  }

  .tb-admin-report .table-sm td.BitSmaller,
  body.tb-rc-printing .tb-rc-view .table-sm td.BitSmaller {
    font-size: 0.95rem;
  }

  .tb-admin-report .table tbody tr,
  .tb-admin-report .table tbody td,
  .tb-admin-report .table tbody th,
  body.tb-rc-printing .tb-rc-view .table tbody tr,
  body.tb-rc-printing .tb-rc-view .table tbody td,
  body.tb-rc-printing .tb-rc-view .table tbody th {
    background: #ffffff !important;
  }

  .tb-admin-report.tb-admin-report--cards .text-info,
  .tb-admin-report.tb-admin-report--schedule .text-info,
  .tb-admin-report.tb-admin-report--login .text-info,
  body.tb-rc-printing .tb-rc-view .text-info {
    color: #3498db !important;
  }

  .tb-admin-report.tb-admin-report--cards .text-muted,
  .tb-admin-report.tb-admin-report--schedule .text-muted,
  .tb-admin-report.tb-admin-report--login .text-muted,
  body.tb-rc-printing .tb-rc-view .text-muted {
    color: #6c757d !important;
  }

  .tb-admin-report.tb-admin-report--cards .table .text-muted,
  .tb-admin-report.tb-admin-report--schedule .table .text-muted,
  .tb-admin-report.tb-admin-report--login .table .text-muted,
  body.tb-rc-printing .tb-rc-view .table .text-muted {
    color: #6c757d !important;
  }

  .tb-admin-report a,
  body.tb-rc-printing .tb-rc-view a {
    color: inherit !important;
    text-decoration: underline !important;
  }

  .tb-admin-report .btn,
  body.tb-rc-printing .tb-rc-view .btn {
    color: #212529 !important;
    border-radius: 0.25rem;
    font-weight: 400;
    min-height: 0;
    min-width: 0;
  }

  .tb-admin-report .alert,
  body.tb-rc-printing .tb-rc-view .alert {
    border-radius: 0.25rem;
  }

  .tb-admin-report hr,
  body.tb-rc-printing .tb-rc-view hr {
    height: 3px !important;
    border: 0 !important;
    background-color: rgb(60, 90, 180);
    color: rgb(60, 90, 180);
  }

  .tb-admin-report--cards .EvenBiggerText.btn,
  body.tb-rc-printing .tb-rc-view .EvenBiggerText.btn {
    border: 1px solid #c6c8ca !important;
    border-radius: 0.3rem;
  }

  .tb-admin-report.tb-admin-report--schedule .report-schedule__section {
    background: #ffffff !important;
    color: #272727 !important;
    border: 1px solid #c6c8ca !important;
    border-radius: 0.3rem !important;
    box-shadow: 5px 5px 10px skyblue !important;
    page-break-inside: auto !important;
    break-inside: auto !important;
  }

  .tb-admin-report--schedule .table {
    font-size: 1rem !important;
  }

  .tb-admin-report--schedule .report-schedule__empty-period {
    display: table-row !important;
  }

  .tb-admin-report.tb-admin-report--schedule .table tbody td.report-schedule__period:first-child {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    background: #375a7f linear-gradient(180deg, #557392, #375a7f) repeat-x !important;
    background-color: #375a7f !important;
    color: #ffffff !important;
    border: 1px solid #dee2e6 !important;
    border-radius: 0.25rem;
    font-weight: 400;
    margin: 0.25rem !important;
    padding: 0 !important;
    min-height: 0;
    min-width: 0;
  }

  .tb-admin-report.tb-admin-report--schedule .report-schedule__class {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    background: #02b875 linear-gradient(180deg, #28c38a, #02b875) repeat-x !important;
    background-color: #02b875 !important;
    color: #ffffff !important;
    border: 1px solid #c6c8ca !important;
    border-radius: 0.25rem;
    box-shadow: none !important;
    font-weight: 400;
    margin: 0.25rem !important;
    padding: 0 !important;
    min-height: 0;
    min-width: 0;
  }

  .tb-admin-report.tb-admin-report--cards .LoginInfo,
  .tb-admin-report.tb-admin-report--login .LoginInfo {
    background: #ffffff !important;
    color: #272727 !important;
    border: 5px dotted #3498db !important;
  }

  body.tb-rc-printing:has(#divReportCards) #divReportCards.OverviewReportCards {
    background: #ffffff !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    margin: 0 !important;
    overflow: visible !important;
  }

  body.tb-rc-printing:has(#divReportCards) #divReportCards .family-panel__body,
  body.tb-rc-printing:has(#divReportCards) #content > .container-fluid > .p-2 {
    padding: 0 !important;
  }

  body:has(.tab-pane.show.active .tb-admin-report:not(:empty)) .toast-container,
  body:has(.tab-pane.show.active .tb-admin-report:not(:empty)) .toast-wrapper,
  body:has(.tab-pane.show.active .tb-admin-report:not(:empty)) .toast,
  body:has(.tab-pane.show.active .tb-admin-report:not(:empty)) .tooltip,
  body:has(.tab-pane.show.active .tb-admin-report:not(:empty)) .popover,
  body:has(.tab-pane.show.active .tb-admin-report:not(:empty)) .dropdown-menu,
  body:has(.tab-pane.show.active .tb-admin-report:not(:empty)) [role="status"],
  body:has(.tab-pane.show.active .tb-admin-report:not(:empty)) [aria-live],
  body:has(.tab-pane.show.active .tb-admin-report:not(:empty)) .spinner-border,
  body:has(.tab-pane.show.active .tb-admin-report:not(:empty)) .modal,
  body.tb-rc-printing .toast-container,
  body.tb-rc-printing .toast-wrapper,
  body.tb-rc-printing .toast,
  body.tb-rc-printing .tooltip,
  body.tb-rc-printing .popover,
  body.tb-rc-printing .dropdown-menu,
  body.tb-rc-printing [role="status"],
  body.tb-rc-printing [aria-live],
  body.tb-rc-printing .spinner-border {
    display: none !important;
  }

  body.tb-rc-printing:has(#divReportCards) #content > *:not(.container-fluid) {
    display: none !important;
  }

  body.tb-rc-printing:has(#divReportCards) #content > .container-fluid > *:not(#divReportCards.OverviewReportCards):not(:has(#divReportCards.OverviewReportCards)) {
    display: none !important;
  }

  body.tb-rc-printing:has(#divReportCards) #content > .container-fluid > *:has(#divReportCards.OverviewReportCards) > *:not(#divReportCards.OverviewReportCards) {
    display: none !important;
  }

  body.tb-rc-printing .container-fluid > .modal:not(#StudentProfileModal) {
    display: none !important;
  }

  body.tb-rc-printing .modal.show:not(#StudentProfileModal) {
    display: none !important;
  }

  body.tb-rc-printing #StudentProfileModal:not(.show) {
    display: none !important;
  }
}
