/* «رفع ملف PDF»: the uploaded file shown as a book (assets/js/pdf-book.js). */
.PdfBook{margin:1rem 0 0;background:#2b2438;color:#fff;border-radius:.5rem;overflow:hidden;text-align:center}
.PdfBook--note{padding:2rem 1rem}
.PdfBook [hidden]{display:none!important}
.PdfBook__controls{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:.5rem;padding:.5rem}
.PdfBook__controls button{margin:0;padding:.15rem .8rem;font:inherit;font-size:.9rem;line-height:1.7;white-space:nowrap;cursor:pointer;color:var(--purple);background:#fff;border:1px solid #fff;border-radius:.375rem}
.PdfBook__controls button:disabled{opacity:.35;cursor:default}
.PdfBook__controls span{min-width:8rem;font-size:.9rem}
.PdfBook__stage{padding:12px;overflow:hidden}
.PdfBook__fit{position:relative;margin:0 auto}
/* touch-action pan-y: a finger can still scroll the page over the book. */
.PdfBook__book{position:absolute;top:0;left:0;width:800px;height:var(--h);transform-origin:0 0;touch-action:pan-y;user-select:none;-webkit-user-select:none;cursor:grab}
.PdfBook__book--dragging{cursor:grabbing}
.PdfBook__book--single{width:400px}
.PdfBook__book--single .PdfBook__half--right,.PdfBook__book--single .PdfBook__spine{display:none}
.PdfBook__stack{position:absolute;inset:-4px -9px -9px;border-radius:4px;background:repeating-linear-gradient(90deg,#d9d4c6 0 1px,#f7f4ea 1px 3px);box-shadow:0 18px 40px rgba(0,0,0,.4)}
.PdfBook__half{position:absolute;top:0;left:0;width:400px;height:var(--h);overflow:hidden;background:#fdfbf5;pointer-events:none}
.PdfBook__half--right{left:400px}
.PdfBook__back{transform-origin:0 0;background:#f8f4e9}
.PdfBook__page{display:flex;align-items:center;justify-content:center;width:100%;height:100%;color:#555;direction:rtl}
.PdfBook__page canvas{display:block}
.PdfBook__spine{position:absolute;top:0;bottom:0;left:374px;width:52px;pointer-events:none;background:linear-gradient(90deg,transparent,rgba(0,0,0,.05) 35%,rgba(0,0,0,.18) 50%,rgba(0,0,0,.05) 65%,transparent)}
.PdfBook__flap{position:absolute;inset:0;pointer-events:none;filter:drop-shadow(0 0 12px rgba(0,0,0,.35))}
.PdfBook__shade{position:absolute;top:0;left:0;height:2000px;transform-origin:0 0;pointer-events:none}
.PdfBook:fullscreen{display:flex;flex-direction:column;margin:0;border-radius:0}
.PdfBook:fullscreen .PdfBook__stage{display:flex;flex:1;min-height:0;align-items:center;justify-content:center}
.PdfBook:fullscreen .PdfBook__fit{flex:none;margin:0}
