
/* =========================================
   PRECIFIO BOOKS CHECKOUT
   Scoped to the Books page
========================================= */

.book-store .book-buy-button {
    width: 100%;
    border: 0;
    cursor: pointer;
    font: inherit;
    justify-content: center;
    margin-top: 12px;
}

.book-store .book-price {
    margin-top: 18px;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text, #172033);
}

.book-store .book-body {
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.book-store .book-body p {
    line-height: 1.7;
}

.book-checkout-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(5, 12, 30, .78);
    backdrop-filter: blur(8px);
}

.book-checkout-overlay.active {
    display: flex;
}

.book-checkout-box {
    position: relative;
    width: 100%;
    max-width: 460px;
    padding: 36px;
    border-radius: 20px;
    background: #fff;
    color: #172033;
    box-shadow: 0 25px 80px rgba(0,0,0,.25);
}

.book-checkout-label {
    color: #2563eb;
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .16em;
}

.book-checkout-box h2 {
    margin: 12px 0;
    font-size: 1.8rem;
}

.book-checkout-box > p {
    color: #64748b;
    line-height: 1.6;
}

.book-checkout-price {
    margin: 20px 0;
    font-size: 2rem;
    font-weight: 800;
    color: #2563eb;
}

.book-checkout-close {
    position: absolute;
    top: 15px;
    right: 18px;
    border: 0;
    background: transparent;
    font-size: 30px;
    color: #64748b;
    cursor: pointer;
}

.book-checkout-box label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    font-size: .9rem;
}

.book-checkout-box input[type="email"] {
    width: 100%;
    padding: 14px;
    border: 1px solid #dbe2ed;
    border-radius: 9px;
    font: inherit;
    outline: none;
}

.book-checkout-box input[type="email"]:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}

.book-checkout-box form > button {
    width: 100%;
    justify-content: center;
    border: 0;
    cursor: pointer;
    margin-top: 16px;
    font: inherit;
}

.book-checkout-note {
    margin-top: 12px;
    font-size: .8rem;
    line-height: 1.6;
    color: #64748b;
}

.book-checkout-error {
    color: #dc2626;
    font-size: .85rem;
    margin-top: 12px;
}

.book-secure-note {
    border-top: 1px solid #e5e7eb;
    margin-top: 24px;
    padding-top: 16px;
    text-align: center;
    font-size: .8rem;
    color: #64748b;
}

.book-payment-status {
    max-width: 650px;
    margin: 30px auto;
    padding: 20px;
    border-radius: 12px;
    background: #eff6ff;
    color: #1e40af;
    line-height: 1.7;
}

.book-payment-status[hidden] {
    display: none;
}

.book-payment-status.error {
    background: #fef2f2;
    color: #991b1b;
}

@media (max-width: 480px) {
    .book-checkout-box {
        padding: 28px 22px;
    }

    .book-checkout-box h2 {
        font-size: 1.5rem;
    }
}




/* =========================================
   PRIVATE EBOOK ACCESS PAGE
========================================= */

.book-access-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.book-access-card {
    width: 100%;
    max-width: 480px;
    padding: 42px 32px;
    background: #fff;
    color: #172033;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,.12);
}

.book-access-logo {
    width: 65px;
    height: 65px;
    object-fit: contain;
    margin: 0 auto 22px;
}

.book-access-card h1 {
    margin: 16px 0;
    font-size: 1.9rem;
}

.book-access-card p {
    line-height: 1.7;
    color: #64748b;
}

.access-loader {
    width: 38px;
    height: 38px;
    margin: 24px auto;
    border: 4px solid #dbeafe;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: access-spin .8s linear infinite;
}

@keyframes access-spin {
    to {
        transform: rotate(360deg);
    }
}

.book-access-card button {
    border: 0;
    cursor: pointer;
    justify-content: center;
    margin: 18px auto;
}

.access-footer {
    border-top: 1px solid #e5e7eb;
    margin-top: 28px;
    padding-top: 18px;
    font-size: .78rem;
}

.access-back-link {
    display: inline-block;
    margin-top: 18px;
    color: #2563eb;
    font-weight: 600;
    text-decoration: none;
}

.access-back-link:hover {
    text-decoration: underline;
}
