/* SchoolDay v236.3: Policies and Class Report Generation as admin panels.

   The markup comes from the module's own page, which is written to BE a page:
   it sets its own width against the viewport, draws its own card, and expects
   to be the only thing on screen. Inside an admin tab it is none of those
   things. Everything here turns a page back into a panel.

   Scoped to .admin-module-host-v2363 throughout, so the standalone pages are
   untouched -- they are still the fallback if the panel cannot load. */

/* ---- The panel stops being a card ------------------------------------- */

/* The tab panel is a .card and the module draws its own cards inside it, so
   without this every module is a card in a card with two borders and two lots
   of padding. */
.admin-embedded-panel-v206:has(.admin-module-host-v2363) {
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
}

/* ---- The module stops sizing itself against the viewport --------------- */

/* .reportcards-shell is width: calc(100vw - 2rem) !important -- correct for a
   page, and inside a sidebar layout it is wider than the column it sits in,
   which is what pushes the whole admin page sideways. */
.admin-module-host-v2363 .reportcards-shell,
.admin-module-host-v2363 .policies-shell,
.admin-module-host-v2363 .admin-shell {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0;
  margin: 0 !important;
  padding: 0 !important;
}

.admin-module-host-v2363 {
  display: block;
  min-width: 0;
  background: none;
}

/* ---- One page, one scrollbar ------------------------------------------ */

/* The whole reason the iframe was removed. Nothing inside a module panel gets
   its own scrolling box: the admin page scrolls, and only the admin page. */
.admin-module-host-v2363 .report-setup-card,
.admin-module-host-v2363 .report-setup-workspace,
.admin-module-host-v2363 .report-setup-pane,
.admin-module-host-v2363 .report-mapping-panel,
.admin-module-host-v2363 .report-match-pane .report-mapping-list,
.admin-module-host-v2363 .report-editor-panel,
.admin-module-host-v2363 .report-student-list,
.admin-module-host-v2363 .report-student-nav,
.admin-module-host-v2363 .policies-shell {
  max-height: none;
  overflow: visible;
  scrollbar-gutter: auto;
}

/* ---- The module's own chrome ------------------------------------------ */

/* The header is not brought over and the Return to Admin controls are removed
   when the markup is injected. These are the belt to that pair of braces: if a
   module grows a new one, it does not appear as a second navigation bar
   disagreeing with the sidebar about where you are. */
.admin-module-host-v2363 .site-header,
.admin-module-host-v2363 .reportcards-header,
.admin-module-host-v2363 .policies-header,
.admin-module-host-v2363 .reportcards-admin-bar-v196,
.admin-module-host-v2363 [data-schoolday-admin-link],
.admin-module-host-v2363 [data-schoolday-admin-action] {
  display: none !important;
}

/* The module's login panel never applies here: reaching this tab means the
   admin page has already signed you in. */
.admin-module-host-v2363 .login-card {
  display: none !important;
}

/* ---- While it is arriving, and if it does not ------------------------- */

.admin-embedded-opening-v236 {
  margin: 0;
  padding: 2rem 1rem;
  color: #4a5f74;
  font-size: 1rem;
  text-align: center;
}

.admin-module-error-v2363 {
  padding: 1.5rem;
  border: 1px solid #e5a3a3;
  border-left: .28rem solid #c0392b;
  border-radius: .6rem;
  background: #fdf1f0;
  color: #8f2c20;
}
.admin-module-error-v2363 h2 { margin: 0 0 .4rem; font-size: 1.1rem; }
.admin-module-error-v2363 p { margin: 0 0 .6rem; }
.admin-module-error-v2363 .button-link { display: inline-block; }

/* ---- Overlays belong to the panel, not the window --------------------- */

/* Both modules have a full-screen fixed loading overlay and a fixed toast
   region. Fixed inside a tab means it covers the sidebar and the header too,
   including while you are on a different tab. */
.admin-module-host-v2363 .admin-loading-overlay {
  position: absolute;
  inset: 0;
}
.admin-embedded-panel-v206:has(.admin-module-host-v2363) { position: relative; }

.admin-module-host-v2363 .report-toast-region,
.admin-module-host-v2363 .policy-toast-region {
  position: fixed;
  z-index: 60;
}

/* An inactive tab is .tab-panel { display: none }, and display:none takes
   position:fixed descendants with it -- so a module's overlay and toasts
   cannot appear over a different tab. Nothing more is needed here; the rule
   that used to be at this spot was guarding against something the existing
   stylesheet already prevents. */
