.mley-pdf-mobile-shell, .mley-pdf-mobile-details-close { display:none; }
body.mley-pdf-mobile-active { overflow:hidden; }
body.mley-pdf-mobile-active :is(.fixed-header,#sidebar,#mley-chatbot-launcher) { display:none!important; }
body.mley-pdf-mobile-active [data-pdf-reader-layout].mley-pdf-mobile:not([hidden]) {
  display:flex!important; flex-direction:column; box-sizing:border-box; min-width:0; max-width:100%;
  border:0; overflow:hidden; padding:0 env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  background:var(--bg-surface,#fff); color:var(--text-color,#203246);
}
.mley-pdf-mobile > :is(.mley-pdf-heading,.mley-pdf-toolbar,.mley-reader-heading) { display:none!important; }
.mley-pdf-mobile :is(.mley-pdf-state-note,.mley-pdf-article-choices) { top:var(--pdf-mobile-bar-height,56px); }
.mley-pdf-mobile #mley-pdf-frame { flex:1 1 0; width:100%; min-width:0; min-height:0; height:0; border:0; }
.mley-pdf-mobile .mley-reader-frames { min-width:0; flex:1 1 0; }
.mley-pdf-mobile .mley-pdf-mobile-shell { display:block; flex:none; min-width:0; padding-top:env(safe-area-inset-top); }
.mley-pdf-mobile-shell[hidden], .mley-pdf-mobile-shell [hidden] { display:none!important; }
.mley-pdf-mobile-bar { display:flex; align-items:center; gap:4px; min-width:0; padding:4px; border-bottom:1px solid var(--border-color,#ccd5df); }
.mley-pdf-mobile-bar button { flex:none; width:44px; min-width:44px; min-height:44px; padding:8px; border:0; background:transparent; color:inherit; font:inherit; font-size:var(--text-heading); line-height:1; border-radius:8px; }
.mley-pdf-mobile-bar button:disabled { opacity:.6; }
.mley-pdf-mobile-bar .mley-pdf-mobile-current { flex:1; width:auto; min-width:0; padding:2px 4px; text-align:left; }
.mley-pdf-mobile-current :is(strong,span) { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; line-height:var(--leading-compact); }
.mley-pdf-mobile-current strong { font-size:var(--text-small); }
.mley-pdf-mobile-current span { font-size:var(--text-caption); font-weight:var(--weight-regular); }
.mley-pdf-mobile-bar svg { width:22px; height:22px; fill:none; stroke:currentColor; stroke-width:1.8; }
.mley-pdf-mobile-menu, .mley-pdf-mobile #mley-pdf-provenance { position:absolute; z-index:25; inset:calc(var(--pdf-mobile-bar-height,57px) + env(safe-area-inset-top)) 0 auto; max-height:calc(100% - var(--pdf-mobile-bar-height,57px) - env(safe-area-inset-top)); overflow:auto; box-sizing:border-box; padding:10px; margin:0; background:var(--bg-surface,#fff); color:inherit; box-shadow:0 8px 20px #0003; }
.mley-pdf-mobile-menu :is(button,a), .mley-pdf-mobile #mley-pdf-provenance :is(button,a,select) { display:block; box-sizing:border-box; width:100%; min-height:44px; margin:4px 0; padding:10px; border:1px solid var(--border-color,#bac7d5); border-radius:7px; font:inherit; font-size:var(--text-body); text-align:left; white-space:normal; background:transparent; color:inherit; text-decoration:none; }
.mley-pdf-mobile-menu > button:first-child { text-align:right; }
.mley-pdf-mobile :is(.mley-pdf-mobile-shell,#mley-pdf-provenance) :focus-visible { outline:3px solid var(--accent-color,#2874bb); outline-offset:-2px; }
.mley-pdf-mobile .mley-pdf-mobile-details-close { display:block; }
.mley-pdf-mobile #mley-pdf-provenance .mley-pdf-source-links { display:block; }

/* The embedded CJF viewer uses this toolbar at every width. */
[data-cjf-compact] { container-type:inline-size; }
[data-cjf-compact] .mley-pdf-mobile-bar { gap:2px; }
[data-cjf-compact] .mley-pdf-mobile-bar .mley-pdf-mobile-current { min-width:44px; }
.mley-pdf-mobile-bar > [data-header-share] {
  display:inline-flex; align-items:center; justify-content:center;
}
@container(max-width:500px) {
  [data-cjf-compact] .mley-pdf-mobile-bar { gap:0; }
  [data-cjf-compact] .mley-pdf-mobile-bar > :is(.mley-cjf-match-count,.mley-cjf-match-nav) { display:none; }
}
@container(max-width:360px) {
  [data-cjf-compact] .mley-pdf-mobile-current strong { display:none; }
}
[data-cjf-compact] .mley-pdf-mobile-bar :is(button,a):not(:disabled):hover,
[data-cjf-compact] .mley-pdf-mobile-bar button[aria-expanded="true"] {
  background:var(--bg-surface-3); color:var(--accent-color);
}
.mley-cjf-match-count { flex:none; white-space:nowrap; font-size:var(--text-caption); font-variant-numeric:tabular-nums; }
[data-cjf-compact] .mley-pdf-mobile-current span { text-overflow:clip; }
@container(min-width:640px) {
  [data-cjf-compact] .mley-pdf-mobile-current :is(strong,span) { display:inline; }
  [data-cjf-compact] .mley-pdf-mobile-current span { margin-inline-start:8px; }
  [data-cjf-compact] .mley-pdf-mobile-current { overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
}

body.mley-pdf-mobile-active .mley-reader-split > .mley-reader-details:not(#mley-pdf-provenance) { display:none; }
