/*

    Stylesheet specifically for the Book Layout Template.
    */

:root {
--spd-book-font-family: "Merriweather", serif;
--spd-book-heading-font-family: var(--spd-book-font-family); /* Fallback */
}

html,
body.page-template-template-book {
overflow: hidden;
margin: 0;
padding: 0;
width: 100%;
height: 100%;
background-color: #333;
-webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none;
}

.book-viewport {
width: 100vw;
height: 100vh;
display: flex;
justify-content: center;
align-items: stretch;
position: relative;
}

.previous-page-peek {
position: relative;
flex-shrink: 0;
width: 40px;
height: 100%;
cursor: pointer;
transform: scaleX(0);
transform-origin: left;
z-index: 101;
}
.previous-page-peek.is-active {
transform: scaleX(1);
}

.peek-buffer {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: #ccc;
box-shadow: inset 10px 0 20px -8px rgba(0,0,0,0.6);
border-right: 1px solid rgba(0,0,0,0.1);
opacity: 0;
pointer-events: none;
}

.peek-buffer.is-visible {
opacity: 1;
pointer-events: auto;
}

.peek-buffer::after {
content: '';
position: absolute;
top: 0;
right: 0;
width: 100%;
height: 100%;
background: linear-gradient(to right, transparent, rgba(0,0,0,0.15));
pointer-events: none;
}

#p5-canvas-container {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 100;
pointer-events: none;
cursor: grab;
}
#p5-canvas-container.is-active {
pointer-events: auto;
cursor: grab;
z-index: 102;
}
#p5-canvas-container.is-active:active {
cursor: grabbing;
}
#p5-canvas-container.is-last-page {
pointer-events: none;
cursor: default;
}

.stacked-book-container {
position: relative;
box-shadow:
0 0 0 1px rgba(0,0,0,0.1),
0 0 0 2px rgba(0,0,0,0.08),
0 0 0 3px rgba(0,0,0,0.06),
0 0 0 4px rgba(0,0,0,0.04),
0 20px 50px rgba(0,0,0,0.5);
flex-grow: 1;
height: 100%;
z-index: 1;
}

.stacked-book {
width: 100%;
height: 100%;
position: relative;
background-color: #f0f0f0;
overflow: hidden;
}

.book-page-wrapper {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
box-shadow: none;
will-change: clip-path;
}
.book-page-wrapper.is-hidden {
display: none;
}

.book-page-wrapper::before {
content: '';
position: absolute;
top: 0;
left: 0;
width: 15px;
height: 100%;
background: linear-gradient(to right, rgba(0,0,0,0.12), transparent);
z-index: 7;
pointer-events: none;
opacity: 0.8;
}
.book-page-wrapper:first-child::before {
display: none;
}

.book-page-content {
width: 100%;
height: 100%;
overflow-y: auto;
padding: 2vmin 3vmin;
box-sizing: border-box;
background-repeat: no-repeat;
background-position: center;
position: relative;
font-family: var(--spd-book-font-family);
-webkit-user-select: text; -moz-user-select: text; -ms-user-select: text; user-select: text;
/* Scrollbar-Hiding moved to book-layout.css for better separation */
	}

.page-text-content {
position: relative;
z-index: 5;
width: calc(var(--page-width, 100%) - 8vmin);
max-width: 100%;
height: auto;
}
.page-text-content * { color: inherit !important; }

.page-text-content h1,
.page-text-content h2,
.page-text-content h3,
.page-text-content h4,
.page-text-content h5,
.page-text-content h6 {
font-family: var(--spd-book-heading-font-family);
}
.page-text-content h2 { margin-top: 0; padding-right: 1em; }
.posts-list { list-style: none; padding: 0; }
.posts-list .full-post { margin-bottom: 2em; }
.posts-list h3 { font-size: 1.1em; margin: 0 0 0.8em; border-bottom: 1px solid rgba(0,0,0,0.1); padding-bottom: 0.8em; }

.loading-indicator, .no-more-posts-indicator {
text-align: center; padding: 2em 0; font-style: italic; color: rgba(0,0,0,0.5);
}
.loading-indicator p { animation: spd-pulse 1.5s infinite ease-in-out; }
@keyframes spd-pulse { 0% { opacity: 0.5; } 50% { opacity: 1; } 100% { opacity: 0.5; } }
.no-pages-notice { color: #fff; text-align: center; padding: 40px; }