/* Qanoun V9.9.4 — publish layout, mobile PDF preview, dark account-bar fixes */

/* The old desktop companion occupied a third grid column even after it became a modal.
   Collapse the publishing workspace back to steps + full content. */
@media (min-width:1200px){
  body.publish-page-v85 .publish-wizard .wizard-layout{
    grid-template-columns:minmax(205px,245px) minmax(0,1fr)!important;
    gap:1rem!important;
  }
  body.publish-page-v85 .publish-reader-dialog-v990{
    position:fixed!important;
    inset:18px!important;
    width:auto!important;
    max-width:none!important;
    height:auto!important;
    top:18px!important;
  }
  body.publish-page-v85 .publish-document-companion-head-v985 [data-companion-close]{display:inline-flex!important}
  body.publish-page-v85 .publish-document-fab-v985{display:flex!important}
}

/* Mobile/tablet PDF.js canvas fallback. No text layer is created: RTL rules from the
   application cannot reshape/reorder the PDF text. */
.publish-mobile-pdfjs-v994[hidden]{display:none!important}
.publish-mobile-pdfjs-v994{min-width:100%;min-height:100%;padding:10px;direction:ltr;overflow:visible}
.publish-mobile-pdfjs-page-v994{width:max-content;min-width:100%;display:flex;justify-content:center;align-items:flex-start}
.publish-mobile-pdfjs-page-v994 canvas{display:block;max-width:none;background:#fff;box-shadow:0 8px 28px rgba(0,0,0,.24);direction:ltr}
.publish-reader-page-nav-v994{display:flex;align-items:center;gap:.3rem;white-space:nowrap}
.publish-reader-page-nav-v994>span{min-width:58px;text-align:center;font-size:.72rem;font-weight:900;font-variant-numeric:tabular-nums}

@media(max-width:767.98px){
  .publish-reader-dialog-v990 .publish-native-pdf-stage-v993{overflow:auto!important;-webkit-overflow-scrolling:touch!important;overscroll-behavior:contain!important}
  .publish-reader-dialog-v990 .publish-reader-actions-v990{max-width:calc(100vw - 118px);overflow-x:auto;overflow-y:hidden;flex-wrap:nowrap!important;scrollbar-width:none}
  .publish-reader-dialog-v990 .publish-reader-actions-v990::-webkit-scrollbar{display:none}
  .publish-reader-page-nav-v994,.publish-reader-zoom-v990{flex:0 0 auto}
  .publish-reader-page-nav-v994 .btn,.publish-reader-zoom-v990 .btn{width:34px;height:34px;padding:0;display:inline-grid;place-items:center}
  .publish-mobile-pdfjs-v994{padding:8px}
}
@media(max-width:430px){
  .publish-reader-head-v990>div:first-child{max-width:92px}
  .publish-reader-head-v990>div:first-child strong{font-size:.74rem}
  .publish-reader-actions-v990{max-width:calc(100vw - 112px)!important}
}

/* Store account quick links used a fixed almost-white mobile background from V9.7.0.
   In dark mode the later theme changed link text to light, producing blank white pills. */
html[data-bs-theme="dark"] body.v972-ui .store-accountbar-v970{
  background:var(--v92-surface)!important;
  border-color:var(--v92-line)!important;
  color:var(--v92-text)!important;
}
html[data-bs-theme="dark"] body.v972-ui .store-accountbar-links-v970 a{
  background:var(--v92-soft)!important;
  color:var(--v92-text)!important;
  border:1px solid var(--v92-line)!important;
}
html[data-bs-theme="dark"] body.v972-ui .store-accountbar-links-v970 a i{color:var(--v92-gold)!important}
html[data-bs-theme="dark"] body.v972-ui .store-accountbar-links-v970 a:hover,
html[data-bs-theme="dark"] body.v972-ui .store-accountbar-links-v970 a:focus-visible{
  background:color-mix(in srgb,var(--v92-gold) 16%,var(--v92-surface))!important;
  color:var(--v92-text)!important;
  border-color:color-mix(in srgb,var(--v92-gold) 55%,var(--v92-line))!important;
}
