/*
 * Edusentia Enterprise UI | Phase 7, sticky workspace identity
 * Retains the existing navy SBA-inspired blue hero and E mark while users
 * scroll through reports, students, principal approvals and admin records.
 * Presentation only; does not change routing, roles, forms, reporting or PDFs.
 */

/* The actual sticky offset is synchronized to the already-sticky application
 * topbar by enterprise-sticky-headers-v7.js. Defaults protect first paint. */
.eds-enterprise-ui #appShell {
  --eds-sticky-topbar-height:80px;
}
.eds-enterprise-ui #paConsole {
  --eds-sticky-topbar-height:78px;
}
.eds-enterprise-ui #content .page-head,
.eds-enterprise-ui #paContent .pa-page-head {
  position:sticky;
  top:calc(var(--eds-sticky-topbar-height,80px) + 9px);
  z-index:35;
  /*
   * Keep the native E emblem, title and live action buttons above long
   * school tables, but below the application bar, sidebar and dialogs.
   */
  box-shadow:0 12px 28px rgba(9,45,96,.16);
  scroll-margin-top:calc(var(--eds-sticky-topbar-height,80px) + 16px);
}
.eds-enterprise-ui #paContent .pa-page-head {
  z-index:12; /* The platform topbar itself uses z-index:15. */
}
.eds-enterprise-ui #content .page-head:focus-within,
.eds-enterprise-ui #paContent .pa-page-head:focus-within {
  box-shadow:0 12px 28px rgba(9,45,96,.17),0 0 0 2px rgba(125,206,249,.4);
}

/* Preserve toolbars and forms immediately after the hero. A higher z-index
 * is not necessary for the school blue banner, keeping dialogs dominant. */
@media(max-width:820px){
  .eds-enterprise-ui #content .page-head,
  .eds-enterprise-ui #paContent .pa-page-head {
    top:calc(var(--eds-sticky-topbar-height,80px) + 6px);
    gap:9px;
  }
  .eds-enterprise-ui #content .page-head::before,
  .eds-enterprise-ui #paContent .pa-page-head::before {
    flex-basis:39px;
  }
  .eds-enterprise-ui #content .page-head .page-actions,
  .eds-enterprise-ui #paContent .pa-page-head .pa-actions {
    /*
     * Keep actionable navigation accessible rather than allowing a wrapping
     * 3+ row toolbar to consume the mobile screen while sticky.
     */
    flex:1 1 100%;
    min-width:0;
    max-width:100%;
    width:100%;
    flex-wrap:nowrap;
    overflow-x:auto;
    overflow-y:hidden;
    overscroll-behavior-inline:contain;
    scrollbar-width:thin;
    scrollbar-color:rgba(255,255,255,.5) transparent;
    padding-bottom:3px;
  }
  .eds-enterprise-ui #content .page-head .page-actions > *,
  .eds-enterprise-ui #paContent .pa-page-head .pa-actions > * {
    flex:0 0 auto;
  }
}
@media(max-width:460px){
  .eds-enterprise-ui #content .page-head,
  .eds-enterprise-ui #paContent .pa-page-head {
    min-height:0;
    padding:12px;
    border-radius:12px;
  }
  .eds-enterprise-ui #content .page-head h3,
  .eds-enterprise-ui #paContent .pa-page-head h3 {
    font-size:16px;
    line-height:1.25;
  }
  .eds-enterprise-ui #content .page-head p,
  .eds-enterprise-ui #paContent .pa-page-head p {
    font-size:11px;
    line-height:1.4;
  }
  .eds-enterprise-ui #content .page-head .page-actions :is(button,a),
  .eds-enterprise-ui #paContent .pa-page-head .pa-actions :is(button,a) {
    min-height:38px;
    white-space:nowrap;
  }
}
@media print {
  .eds-enterprise-ui #content .page-head,
  .eds-enterprise-ui #paContent .pa-page-head {
    position:static;
    top:auto;
    z-index:auto;
    scroll-margin-top:0;
    box-shadow:none;
  }
}
