/* RUAV — in-app presentation viewer (pdf-viewer.js) */
.pdfv { position: relative; display: flex; flex-direction: column; width: 100%; max-width: 100%;
  height: max(420px, calc(100vh - 280px)); height: max(420px, calc(100dvh - 280px));
  background: #1e293b; border-radius: 12px; overflow: hidden;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.pdfv * { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.pdfv-bar { display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 14px; color: #e2e8f0; background: #0f172a; flex: 0 0 auto; min-width: 0; }
.pdfv-title { font-weight: 700; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1 1 auto; }
.pdfv-count { font-size: .82rem; font-variant-numeric: tabular-nums; opacity: .85; white-space: nowrap; direction: ltr; }
.pdfv-btn { width: 36px; height: 36px; border-radius: 9px; border: 1px solid rgba(226,232,240,.25); background: transparent; color: #e2e8f0; display: grid; place-items: center; cursor: pointer; flex: 0 0 auto; }
.pdfv-btn:hover { background: rgba(255,255,255,.08); }
.pdfv-btn svg, .pdfv-top svg { width: 18px; height: 18px; }

/* vertical scrolling only — never sideways */
.pdfv-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain; touch-action: pan-y; padding: 10px; outline: none; }
.pdfv-pages { display: flex; flex-direction: column; gap: 10px; width: 100%; margin: 0 auto; }
.pdfv-page { position: relative; width: 100%; background: #fff; border-radius: 4px; box-shadow: 0 2px 10px rgba(0,0,0,.35); overflow: hidden; }
.pdfv-canvas { display: block; width: 100%; height: 100%; position: absolute; inset: 0; pointer-events: none; }
.pdfv-pnum { position: absolute; inset: 0; display: grid; place-items: center; color: #94a3b8; font-weight: 700; font-size: 1.4rem; }
.pdfv-page.is-ready .pdfv-pnum { display: none; }
.pdfv-loading { display: flex; flex-direction: column; align-items: center; gap: 12px; color: #cbd5e1; padding: 60px 10px; font-size: .9rem; }
.pdfv-spin { width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(203,213,225,.25); border-top-color: #38bdf8; animation: pdfvSpin .8s linear infinite; }
@keyframes pdfvSpin { to { transform: rotate(360deg); } }
.pdfv-top { position: absolute; bottom: 16px; right: 16px; width: 42px; height: 42px; border-radius: 50%; border: 0; background: rgba(15,23,42,.85); color: #fff; display: grid; place-items: center; box-shadow: 0 4px 14px rgba(0,0,0,.35); cursor: pointer; }
.pdfv-top.hidden { display: none; }

/* full screen (works on iPhone too — no Fullscreen API needed) */
.pdfv.is-full { position: fixed; inset: 0; z-index: 99995; height: 100vh; height: 100dvh; border-radius: 0;
  padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); }
.pdfv.is-full .pdfv-scroll { padding-left: max(8px, env(safe-area-inset-left)); padding-right: max(8px, env(safe-area-inset-right)); }
html.pdfv-lock, html.pdfv-lock body { overflow: hidden !important; }

/* presentation screen never scrolls sideways */
#presentationView { max-width: 100%; overflow-x: hidden; }
#presentationIframeWrap { max-width: 100%; }
#presentationIframe { max-width: 100%; display: block; }
#presentationVideoEl video { max-width: 100%; }

.pdfv:not(.is-full) .pdfv-title { visibility: hidden; }
@media (max-width: 600px) {
  .pdfv { height: max(360px, calc(100dvh - 170px)); border-radius: 10px; }
  .pdfv-scroll { padding: 6px; }
  .pdfv-pages { gap: 6px; }
}

/* printing the presentation screen is blocked */
@media print {
  #presentationView, .pdfv { display: none !important; }
}
