/* ==========================================================
   THE OPEN SHELF
   Component Library
========================================================== */

/* ==========================================================
   Component #001
   Generator Book
========================================================== */

/*
Purpose:
Displays a single worksheet generator as an interactive book.

Used On:
- Homepage
- My Shelf
- Featured Collections
- Search Results
- Recommendations

Status:
Design Phase

Last Updated:
August 2026
*/

/* ==========================================================
   Generator Book
========================================================== */

.generator-book {

    width: 320px;

    margin: 4rem auto;

    display: flex;

    align-items: stretch;

}

/* ==========================================================
   Book Body
========================================================== */

.book-body {

    position: relative;

    flex: 1;

}

/* ==========================================================
   Book Pages
========================================================== */

/* ==========================================================
   Book Page Block
========================================================== */

.book-pages {

    position: absolute;

    top: -10px;

    right: -10px;

    width: 100%;

    height: 100%;

    border-radius: 24px;

    background:
        linear-gradient(
            to bottom,
            #FFFDFB,
            #F7F2EA
        );

    border: 1px solid #E5DED1;

    box-shadow:
        2px 0 0 rgba(215,205,188,.55),
        5px 0 0 rgba(215,205,188,.35);

    z-index: 1;

}

.book-cover {

    position: relative;

    z-index: 2;

    aspect-ratio: 5 / 8.8;

    min-height: 760px;

    box-sizing: border-box;

    background:

    radial-gradient(
        circle at 20% 18%,
        rgba(255,255,255,.55),
        transparent 38%
    ),

    linear-gradient(
        to right,
        rgba(255,255,255,.50) 0%,
        rgba(255,255,255,.16) 12%,
        transparent 20%
    ),

    linear-gradient(
        to bottom,
        #FFFDF9,
        #F8F5EE
    );

    border: 1px solid #E8E3D9;

    border-radius: 22px;

    box-shadow:

    0 6px 12px rgba(19,34,56,.08),

    0 22px 42px rgba(19,34,56,.14);

    padding: 2rem;

    display: flex;

    flex-direction: column;

    align-items: center;

    text-align: center;

    overflow: visible; }

/* ==========================================================
   Cover Inset Frame
========================================================== */

.book-cover::before {

    content: "";

    position: absolute;

    inset: 12px;

    border: 1px solid rgba(196, 185, 166, .55);

    border-radius: 14px;

    pointer-events: none;

}

/* ==========================================================
   Cover Flourishes
========================================================== */

.cover-flourishes {

    position: absolute;

    inset: 0;

    pointer-events: none;

}

.corner {

    position: absolute;

    font-size: .65rem;

    color: rgba(150,163,138,.28);

    line-height: 1;

}

.top-left {

    top: 22px;

    left: 24px;

    transform: rotate(-90deg);

}

.top-right {

    top: 22px;

    right: 24px;

}

.bottom-left {

    bottom: 22px;

    left: 24px;

    transform: rotate(180deg);

}

.bottom-right {

    bottom: 22px;

    right: 24px;

    transform: rotate(90deg);

}

/* ==========================================================
   Cover Corner Flourishes
========================================================== */

.book-cover::after {

    content: "";

    position: absolute;

    inset: 0;

    border-radius: 22px;

    background:

        repeating-linear-gradient(

            0deg,

            rgba(255,255,255,.025) 0px,

            rgba(255,255,255,.025) 2px,

            transparent 3px,

            transparent 6px

        );

    opacity: .18;

    pointer-events: none;

}

/* ==========================================================
   Book Illustration
========================================================== */

.book-illustration {

    width: 170px;

    display: flex;

    align-items: center;

    justify-content: center;

    margin-bottom: 1.5rem;

}

/* ==========================================================
   Generator Illustration
========================================================== */

.generator-illustration {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
}

.book-title {

    display: flex;

    flex-direction: column;

    align-items: center;

    gap: .2rem;

    font-family: "Poppins", sans-serif;

    color: #22334A;

}

/* ==========================================================
   Book Title
========================================================== */

.book-title-main {

    font-size: 1.75rem;

    letter-spacing: .08em;

}

.book-title-sub {

    font-size: .95rem;

    font-weight: 600;

    letter-spacing: .12em;

    text-transform: uppercase;

    color: #7A8793;

}

.book-description {

    max-width: 90%;

    color: #6D7A86;

    font-size: .96rem;

    line-height: 1.55;

    text-align: center;

}

/* ==========================================================
   Publisher Ornament
========================================================== */

.book-ornament {

    display: flex;

    align-items: center;

    justify-content: center;

    gap: .5rem;

    width: 100%;

    margin: 1.1rem 0 1.35rem;

}

.book-ornament span {

    flex: 1;

    max-width: 50px;

    height: 1px;

    background: rgba(196,185,166,.28);

}

.ornament-mark {

    font-size: .7rem;

    color: rgba(146,169,138,.55);

    line-height: 1;

}

/* ==========================================================
   Book Divider
========================================================== */

.book-badges {

    display: flex;

    gap: .75rem;

}

.badge {

    padding: .4rem .9rem;

    border-radius: 999px;

    background: #F5F7F2;

    color: #394A5A;

    font-size: .85rem;

    font-weight: 600;

}

.book-button {

    display: inline-flex;

    justify-content: center;

    align-items: center;

    width: 100%;

    padding: 1rem;

    border-radius: 999px;

    background: #22334A;

    color: white;

    text-decoration: none;

    font-weight: 600;

    transition: .25s;

}

/* ==========================================================
   Book Spine
========================================================== */

.book-spine {

    position: absolute;

    left: -52px;

    top: 12px;

    bottom: 12px;

    width: 52px;

    border-radius: 12px 0 0 12px;

    display: flex;

    justify-content: center;

    align-items: center;

    padding: 0 4px;

    box-shadow:
        inset -3px 0 6px rgba(0,0,0,.10),
        inset 3px 0 5px rgba(255,255,255,.25),
        2px 0 6px rgba(0,0,0,.08);

    overflow: hidden;

}

.book-spine::before,
.book-spine::after {

    content: "";

    position: absolute;

    left: 5px;

    right: 5px;

    height: 5px;

    border-radius: 999px;

    background: rgba(39, 56, 74, .75);

    box-shadow:

        0 1px 0 rgba(255,255,255,.20),

        inset 0 1px 1px rgba(255,255,255,.12);

}

.book-spine::before {

    top: 22px;

}

.book-spine::after {

    bottom: 22px;

}

.book-spine-emblem {

    position: absolute;

    top: 50%;

    left: 50%;

    transform:
        translate(-50%, -175px);

    font-size: .9rem;

    color: rgba(255,255,255,.65);

    text-shadow:

        0 1px 1px rgba(0,0,0,.12);

    pointer-events: none;

}

.spine-title {

    writing-mode: vertical-rl;

    transform: rotate(180deg);

    font-family: "Poppins", sans-serif;

    font-size: .70rem;

    font-weight: 700;

    letter-spacing: .22em;

    text-transform: uppercase;

    color: rgba(255,255,255,.92);

    text-align: center;

    text-shadow:

        0 1px 1px rgba(0,0,0,.15);

}

/* ==========================================================
   Book Content
========================================================== */

.book-content {

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: flex-start;

    width: 100%;

    height: 100%;

    padding: 1.5rem 0 2rem;

    box-sizing: border-box;

}

/* ==========================================================
   Book Footer
========================================================== */

.book-footer {

    display: flex;

    flex-direction: column;

    align-items: center;

    gap: 1rem;

    width: 100%;

}

/* ==========================================================
   Open Shelf Imprint
========================================================== */

.book-imprint {

    display: flex;

    flex-direction: column;

    align-items: center;

    gap: .25rem;

    margin-top: 1.25rem;

}

.book-imprint-mark {

    font-size: .95rem;

    color: #93A283;

    line-height: 1;

}

.book-imprint-text {

    font-size: .72rem;

    letter-spacing: .18em;

    text-transform: uppercase;

    color: #A1AAB3;

}