/* PROJECT PRISM — Phase 2BB: LIGHT-PANEL READABILITY AUDIT
   Built on Phase 2BA, scoped to GLASS theme. CSS only.
   Retain all previously approved Glass surfaces, colorful buttons, theme toggle,
   semantic badges, quotation/award statuses and authorization logic.

   Root cause: prism-phase2ar2-unified-glass.css contains a high-specificity
   rule forcing every h2/h3 inside a non-dashboard .card to white. Nested light
   panels containing a toolbar (e.g., Supplier quotations and Submission
   Documents) were not reached by earlier direct-child contrast fixes.
*/

/* Inset panels have very LIGHT backgrounds. Their headings may be inside a
   toolbar, row, or subsection, not necessarily direct children. Scoping to
   named light surfaces avoids changing dark page headers, colored dashboard
   cards and the header of native sourcing dialogs. */
html.prismThemeGlass #app section.stack:not(#homePage) > .card
 :is(.sourceSection, .sourceCard, .sourceBulkAssist,
     .prismSourceWorkflowGuide, .prismAbstractHubCard,
     .prismAbstractAllocations, .prismAbstractSchedules,
     .prismOpsBlock, .prismIntakeSection, .prismIntakeCard,
     .phase2LineEntry, .appBudgetPanel, .prismRfCard,
     .prismSectionCard, .prismAccountPanel)
 :is(h2,h3,h4,h5,h6){
 color:#153b56!important;
 -webkit-text-fill-color:#153b56!important;
 text-shadow:none!important;
 opacity:1!important;
}

/* Nested help and instruction text in those same light panes. This deliberately
   excludes warning/error text, status badges, controls, and dark modal headers. */
html.prismThemeGlass #app section.stack:not(#homePage) > .card
 :is(.sourceSection, .sourceCard, .sourceBulkAssist,
     .prismSourceWorkflowGuide, .prismAbstractHubCard,
     .prismAbstractAllocations, .prismAbstractSchedules,
     .prismOpsBlock, .prismIntakeSection, .prismIntakeCard,
     .phase2LineEntry, .appBudgetPanel, .prismRfCard,
     .prismSectionCard, .prismAccountPanel)
 :is(.sub,.phase2Muted,.sourceMini,.sourceNotice){
 color:#36566e!important;
 -webkit-text-fill-color:#36566e!important;
 text-shadow:none!important;
 opacity:1!important;
}

/* Context-specific light sections which have no nested HTML heading yet.
   This keeps newly injected text readable, without recoloring the dark outer
   card or making disabled actions look enabled. */
html.prismThemeGlass #app #sourcingPage.stack > .card
 :is(.sourceSection,.prismAzContext) :is(.sourceField,.phase2DraftField),
html.prismThemeGlass #app #draftPage.stack > .card
 :is(.prismIntakeSection,.phase2LineEntry,.appBudgetPanel) :is(.sourceField,.phase2DraftField){
 color:#244b67!important;
 -webkit-text-fill-color:#244b67!important;
 text-shadow:none!important;
}

/* Explicit selectors for the two real regressions; makes future structural
   changes to the toolbar insensitive to the old generic white-heading rule. */
html.prismThemeGlass #app #sourcingPage.stack > .card
 #sourceQuotesPanel .prismSourceToolbar :is(h2,h3,h4),
html.prismThemeGlass #app #draftPage.stack > .card
 #draftIntakePanel .toolbar :is(h2,h3,h4){
 color:#143b55!important;
 -webkit-text-fill-color:#143b55!important;
 text-shadow:none!important;
}

@media (forced-colors:active){
 html.prismThemeGlass #app section.stack:not(#homePage) > .card
  :is(.sourceSection,.sourceCard,.prismIntakeSection,.prismOpsBlock,
      .phase2LineEntry,.appBudgetPanel,.prismRfCard) :is(h2,h3,h4,h5,h6){
   color:CanvasText!important;
   -webkit-text-fill-color:CanvasText!important;
 }
}

/* An accessible disabled state must still be legible. Older Glass styles left
   white lettering over pale gray backgrounds for disabled PR intake buttons.
   Muted charcoal on a gray surface remains unmistakably unavailable. */
html.prismThemeGlass #app section.stack:not(#homePage) > .card
 :is(.sourceSection,.sourceCard,.sourceBulkAssist,.prismOpsBlock,
     .prismIntakeSection,.prismIntakeCard,.phase2LineEntry,
     .appBudgetPanel,.prismRfCard,.prismAccountPanel)
 .btn:disabled{
 color:#445c72!important;
 -webkit-text-fill-color:#445c72!important;
 text-shadow:none!important;
 background:#dce7ef!important;
 border:1px solid #b7cbd9!important;
 opacity:1!important;
 cursor:not-allowed!important;
 box-shadow:inset 0 1px 1px rgba(255,255,255,.8)!important;
}
