/* =============================================================================
   reader-protect.css — visual side of the copy-paste deterrent.

   Two things:
     1. .pww-protect-no-select — applied to the prose container itself.
        Disables CSS-level text selection. Prefixed for older browsers.
     2. .pww-protect-toast — the one-time "copy is protected" notification.

   The class names are namespaced (pww-protect-) to avoid collisions
   with reader-mode themes or per-page styles already in play.

   Print: when the reader prints the page, the protections come off so
   a paying reader can produce a personal hard copy. We pair this in a
   future turn with a print stylesheet that watermarks the printed
   output with the reader's email — that's the "carrot, not stick"
   complement to this stick.
   ============================================================================ */


/* No-select: applied alongside .protected-prose / #reader-content / etc.
   The class is opt-in (CSS doesn't apply to the bare ID). Pages that
   want the protection add this class on the container; pages that don't
   (e.g. an admin preview where copy IS expected) leave it off. */
.pww-protect-no-select {
    -webkit-user-select: none;     /* Safari, older Chrome */
    -moz-user-select: none;        /* Firefox */
    -ms-user-select: none;         /* Edge legacy */
    user-select: none;             /* standard */
    -webkit-touch-callout: none;   /* iOS Safari long-press menu */
}

/* Toast notification. Pinned bottom-right, light fade-in, light fade-out.
   Z-index high enough to clear the chapter scroller; the typical site
   stack tops out around 100, so 9999 is well clear without colliding
   with browser UI overlays. */
.pww-protect-toast {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
    max-width: 22rem;
    padding: 0.9rem 1.2rem;
    background: var(--ink, #2a2520);
    color: var(--paper, #f7f1e8);
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 0.95rem;
    line-height: 1.4;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18);
    border-radius: 2px;
    opacity: 1;
    transition: opacity 0.5s ease-out;
}
.pww-protect-toast--fade {
    opacity: 0;
}

/* Mobile: pin to bottom edge full-width, less of a corner-card feel. */
@media (max-width: 640px) {
    .pww-protect-toast {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
        max-width: none;
    }
}

/* License header — visible attribution shown above watermarked prose.
   Small italic, muted color, similar visual weight to a footnote marker
   so it doesn't compete with the chapter title for the reader's eye but
   is impossible to miss on a casual scan. */
.license-header {
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 0.85rem;
    font-style: italic;
    color: var(--ink-faint, #8a7e6e);
    margin: 0 0 1.5rem;
    padding: 0.4rem 0.6rem;
    border-left: 2px solid var(--rule, #d6cfc1);
    text-indent: 0;  /* override .frb-prose p:first-child indentation */
}

/* Print: drop the no-select rule (reader can save a paper copy of their
   own purchase) but keep the license-header visible — that's the
   attribution that travels onto a printed page. We drop italics for
   readability on lower-resolution printers. */
@media print {
    .pww-protect-no-select {
        -webkit-user-select: auto;
        -moz-user-select: auto;
        -ms-user-select: auto;
        user-select: auto;
        -webkit-touch-callout: default;
    }
    .pww-protect-toast {
        display: none;
    }
    .license-header {
        font-style: normal;
        color: black;
    }
}
