/* V8.8 — reader hardening, clearer brand copy and mobile purchase cleanup */

/* Header branding must stay legible on the permanent navy header in both themes. */
.site-navbar-v6 .brand-copy-v6 strong,
.site-header-v6 .brand-copy-v6 strong{
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
  opacity:1!important;
  text-shadow:0 1px 1px rgba(0,0,0,.14)
}
.site-navbar-v6 .brand-copy-v6 small,
.site-header-v6 .brand-copy-v6 small{
  color:#dceaf2!important;
  -webkit-text-fill-color:#dceaf2!important;
  opacity:1!important;
  font-weight:650
}

/* Footer copy was too close to the background in several theme combinations. */
.site-footer-v6 .brand-mark-v6 strong,
.site-footer-v6 h6,
.site-footer-v6 h5,
.site-footer-v6 h4{
  color:#fff!important;
  -webkit-text-fill-color:#fff!important
}
.site-footer-v6 .footer-description-v6,
.site-footer-v6 .text-white-50.footer-description-v6,
.site-footer-v6 p.text-white-50{
  color:#d6e2e9!important;
  -webkit-text-fill-color:#d6e2e9!important;
  opacity:1!important
}
.site-footer-v6 a{color:#f1f6f9!important;-webkit-text-fill-color:#f1f6f9!important}
.site-footer-v6 a:hover{color:#f1ca55!important;-webkit-text-fill-color:#f1ca55!important}

/* The publishing CTA has a dark surface regardless of the global theme. */
.publish-cta-v6,
.publish-cta-v6 h2,
.publish-cta-v6 h3,
.publish-cta-v6 strong{
  color:#fff!important;
  -webkit-text-fill-color:#fff!important
}
.publish-cta-v6 p{
  color:#d7e5ec!important;
  -webkit-text-fill-color:#d7e5ec!important;
  opacity:1!important
}
.publish-cta-v6 .section-kicker-v6{
  color:#f3cf69!important;
  -webkit-text-fill-color:#f3cf69!important
}

/* If the logo eventually loads after a transient cache/network failure, do not let
   an old is-broken state obscure it. */
.brand-logo-shell-v75:not(.is-broken) .brand-logo-v6{display:block!important}

/* Purchase entry points: primary action + mobile sticky action. Reserve enough page
   space so neither the purchase bar nor the main mobile nav covers content. */
@media(max-width:991.98px){
  body.item-page-v74{padding-bottom:calc(176px + env(safe-area-inset-bottom,0px))}
  .item-page-v74 .mobile-buy-bar-v6{
    bottom:calc(82px + env(safe-area-inset-bottom,0px));
    z-index:1025;
    background:rgba(255,255,255,.96);
    border-color:#d9e2e7
  }
  [data-bs-theme="dark"] body.item-page-v74 .mobile-buy-bar-v6{
    background:rgba(10,28,39,.96);border-color:#2c4653
  }
}
@media(max-width:575.98px){
  .item-page-v74 .item-primary-actions-v6 .btn-buy-now-v80{grid-column:1/-1}
  .item-page-v74 .mobile-buy-bar-v6{right:.65rem;left:.65rem}
}

/* Restricted reader: remove native/browser-rendered PDF surfaces and discourage the
   obvious print/save paths. The actual authorization remains server-side. */
.reader-page-v74.reader-restricted-v88 .pdf-native-fallback,
.reader-page-v74.reader-restricted-v88 [data-pdf-native-toggle]{display:none!important}
.reader-page-v74.reader-restricted-v88 .reader-license-watermark{
  opacity:.18!important;
  font-weight:850;
  letter-spacing:.02em;
  pointer-events:none;
  user-select:none
}
.reader-page-v74.reader-restricted-v88 .pdf-page-stage canvas{
  -webkit-user-drag:none;
  user-select:none
}
.reader-page-v74.reader-restricted-v88 .reader-statusbar-v74{
  border-bottom-color:color-mix(in srgb,#d5a21d 32%,transparent)
}
@media print{
  body.reader-restricted-v88 *{visibility:hidden!important}
  body.reader-restricted-v88::before{
    visibility:visible!important;
    content:'الطباعة غير مسموحة لهذه الوثيقة. استخدم القارئ المحمي داخل Qanoun.ma.';
    position:fixed;inset:0;display:grid;place-items:center;padding:3cm;
    font-family:Tajawal,sans-serif;font-size:18pt;font-weight:800;text-align:center;color:#111;background:#fff
  }
}
