/* v12.10.318 - native Turn.js fold shadows and an opaque moving paper leaf. */

/* The catalogue page remains the visual source of truth. Supplying a paper
   colour on its physical sheet prevents the book background from bleeding
   through the back face while Turn.js rotates/clips that sheet. Structural
   padding sheets remain transparent and hidden by the existing endpoint rules. */
body.op-turntest-ready #op-turn-integrated-book
  .op-turn-sheet:not(.op-turn-padding-sheet) > .page{
  background-color:var(--paper,#e6cd91)!important;
  opacity:1!important;
}

/* `start` adds folding, native pointer movement adds dragging and a committed
   Turn.js animation adds turning. Cover the complete lifecycle so button,
   keyboard and physical corner turns paint the same opaque paper. Do not set a
   background on turn-page-wrapper: Turn.js needs that clipping wrapper clear. */
body.op-turntest-folding #op-turn-integrated-book
  .op-turn-sheet:not(.op-turn-padding-sheet),
body.op-turntest-dragging #op-turn-integrated-book
  .op-turn-sheet:not(.op-turn-padding-sheet),
body.op-turntest-turning #op-turn-integrated-book
  .op-turn-sheet:not(.op-turn-padding-sheet),
body.op-turntest-folding #op-turn-integrated-book
  .op-turn-sheet:not(.op-turn-padding-sheet) > .page,
body.op-turntest-dragging #op-turn-integrated-book
  .op-turn-sheet:not(.op-turn-padding-sheet) > .page,
body.op-turntest-turning #op-turn-integrated-book
  .op-turn-sheet:not(.op-turn-padding-sheet) > .page{
  background-color:var(--paper,#e6cd91)!important;
  opacity:1!important;
}

/* Turn.js creates its gradient canvases dynamically. They must remain
   non-interactive, but visible, so their opacity can follow the real curl. */
body.op-turntest-ready #op-turn-integrated-book div[class*="shadow"],
body.op-turntest-ready #op-turn-integrated-book div[class*="gradient"]{
  pointer-events:none!important;
}
