/* === PureRead — My Reading List (heart + drawer + floating pill + /my-list/ page) === */

/* iOS Safari/Chrome auto-substitute the ♥ character with the colour emoji ❤️,
 * which ignores CSS `color` and shows red on every card regardless of saved
 * state. font-variant-emoji:text forces text-glyph rendering so our grey/red
 * states work consistently across desktop and iOS. */
.prb-savebtn-ic,
.prb-savepill-ic,
.prb-mylist-heart,
.prb-mylist-h1-heart,
.prb-rl-h { font-variant-emoji: text; }

/* Save heart on cover cards */
.prb-archive-card { position: relative; }
.prb-savebtn { position: absolute; top: 8px; right: 8px; z-index: 3; width: 36px !important; height: 36px !important; min-width: 0 !important; padding: 0 !important; box-sizing: border-box !important; border-radius: 50%; border: 0; background: rgba(255,255,255,.92); color: #c0ccd6; font-size: 18px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 3px 10px rgba(30,50,70,.2); transition: transform .15s ease, color .15s ease; -webkit-appearance: none; appearance: none; }
.prb-savebtn:hover { transform: scale(1.1); color: #e2667f; }
.prb-savebtn.is-saved { color: #e2667f; background: #fff; }
.prb-savebtn-ic { pointer-events: none; }

/* Custom hover tooltip — uses aria-label as the source. Native `title`
 * tooltip is dropped (slow, ugly, inconsistent). aria-label keeps screen-
 * reader accessibility AND drives this visual tooltip. JS updates the
 * aria-label when state changes so the tooltip reflects saved/unsaved. */
.prb-savebtn::after {
	content: attr(aria-label);
	position: absolute;
	top: calc(100% + 8px);
	right: 0;
	background: rgba(42, 58, 76, 0.88);     /* slightly translucent, less alarmist */
	color: #fff;
	font-family: 'Nunito Sans', system-ui, sans-serif;
	font-size: 10.5px;
	font-weight: 600;
	letter-spacing: 0.2px;
	padding: 5px 9px;
	border-radius: 4px;
	white-space: nowrap;
	box-shadow: 0 3px 9px rgba(20,30,40,.18);
	opacity: 0;
	pointer-events: none;
	transform: translateY(-3px);
	/* 350ms delay on hover-in keeps quick fly-bys from triggering the tooltip,
	 * and prevents the tooltip re-appearing instantly under the cursor right
	 * after a click. Fades out instantly when the user moves away. */
	transition: opacity .15s ease .35s, transform .15s ease .35s;
	z-index: 4;
}
.prb-savebtn:hover::after,
.prb-savebtn:focus-visible::after {
	opacity: 1;
	transform: translateY(0);
}
.prb-savebtn:not(:hover)::after { transition-delay: 0s; }
/* Just-clicked: tooltip stays hidden until the cursor leaves and re-enters. */
.prb-savebtn.prb-savebtn-justclicked:hover::after,
.prb-savebtn.prb-savebtn-justclicked:focus-visible::after {
	opacity: 0;
	transform: translateY(-3px);
}
/* Suppress tooltip on touch-primary devices — no real hover state, and we
 * don't want the tooltip flashing on tap-to-save. Both `hover: none` AND
 * `pointer: coarse` are checked because iPadOS Safari reports `hover: hover`
 * even when used purely with touch. */
@media (hover: none), (pointer: coarse) {
	.prb-savebtn::after { display: none; }
}

/* Save pill on the book page */
.prb-saverow { text-align: center; margin: 8px 0 2px; }
.prb-savepill { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; border: 1px solid #c8d0da; background: #fff; color: #3d5a73; font-family: inherit; font-size: 14px; font-weight: 700; padding: 10px 20px; border-radius: 999px; transition: box-shadow .15s ease, border-color .15s ease, color .15s ease; }
.prb-savepill:hover { box-shadow: 0 6px 16px rgba(45,67,87,.18); }
.prb-savepill .prb-savepill-ic { color: #c0ccd6; font-size: 16px; }
.prb-savepill.is-saved { border-color: #e2667f; color: #c64f68; }
.prb-savepill.is-saved .prb-savepill-ic { color: #e2667f; }

/* Floating "My List (N)" pill (opens the drawer) */
.prb-mylist-pill { position: fixed; right: 20px; bottom: 20px; z-index: 9997; display: inline-flex; align-items: center; gap: 8px; background: #3d5a73; color: #fff; border: 0; cursor: pointer; font-family: inherit; font-size: 14px; font-weight: 700; padding: 12px 20px; border-radius: 999px; box-shadow: 0 8px 24px rgba(30,50,70,.35); transition: transform .15s ease; }
.prb-mylist-pill:hover { transform: translateY(-2px); }
.prb-mylist-pill .prb-mylist-heart { color: #ff9db0; }
.prb-mylist-pill .prb-mylist-count { background: rgba(255,255,255,.22); border-radius: 999px; padding: 1px 9px; font-size: 12px; }

/* Slide-out drawer + overlay */
.prb-rl-overlay { position: fixed; inset: 0; background: rgba(20,30,40,.45); opacity: 0; visibility: hidden; transition: opacity .3s ease, visibility .3s ease; z-index: 9998; }
.prb-rl-overlay.open { opacity: 1; visibility: visible; }
.prb-rl-drawer { position: fixed; top: 0; right: 0; height: 100%; width: 380px; max-width: 90vw; background: #fff; box-shadow: -10px 0 40px rgba(20,30,40,.3); transform: translateX(100%); transition: transform .32s ease; z-index: 9999; display: flex; flex-direction: column; font-family: 'Nunito Sans', sans-serif; }
.prb-rl-drawer.open { transform: translateX(0); }
.prb-rl-drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid #eef2f6; }
.prb-rl-drawer-title { font-family: 'Lora', serif; font-weight: 600; font-size: 18px; color: #2a3a4c; }
.prb-rl-drawer-title .prb-rl-h { color: #e2667f; }
.prb-rl-drawer-close { border: 0; background: none; font-size: 26px; line-height: 1; color: #9aa7b2; cursor: pointer; }
.prb-rl-drawer-msg { padding: 15px 20px 2px; font-size: 14px; color: #56708a; line-height: 1.4; }
.prb-rl-drawer-msg b { color: #2a3a4c; }
.prb-rl-tick { color: #3f9a6a; font-weight: 800; }
.prb-rl-drawer-items { flex: 1 1 auto; overflow-y: auto; padding: 8px 16px; }
.prb-rl-empty { color: #7a8ea0; font-size: 14px; padding: 24px 6px; text-align: center; line-height: 1.5; }
.prb-rl-item { display: flex; gap: 12px; align-items: center; padding: 10px 6px; border-bottom: 1px solid #f1f4f7; border-radius: 6px; }
.prb-rl-item.is-new { background: #f5fbf7; }
.prb-rl-item-cover { width: 44px; border-radius: 4px; box-shadow: 0 3px 9px rgba(30,50,70,.18); object-fit: cover; background: #eef2f6; display: block; }
.prb-rl-item-info { flex: 1; min-width: 0; }
.prb-rl-item-title { display: block; font-family: 'Lora', serif; font-weight: 600; font-size: 14px; color: #2a3a4c; text-decoration: none; line-height: 1.25; }
.prb-rl-item-author { font-size: 12px; color: #7a8ea0; }
.prb-rl-item-new { display: inline-block; margin-top: 3px; font-size: 10px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; color: #3f9a6a; background: #e8f5ee; padding: 2px 7px; border-radius: 4px; }
.prb-rl-item-remove { border: 0; background: none; color: #c0ccd6; font-size: 20px; cursor: pointer; flex: 0 0 auto; }
.prb-rl-item-remove:hover { color: #e2667f; }
.prb-rl-drawer-foot { padding: 16px 20px; border-top: 1px solid #eef2f6; display: flex; flex-direction: column; gap: 10px; }
.prb-rl-drawer-viewall { background: #3d5a73; color: #fff; text-align: center; text-decoration: none; font-weight: 700; padding: 13px; border-radius: 9px; transition: box-shadow .15s ease; }
.prb-rl-drawer-viewall:hover { box-shadow: 0 8px 20px rgba(45,67,87,.3); }
.prb-rl-drawer-keep { border: 0; background: none; color: #7a8ea0; font-weight: 700; cursor: pointer; font-size: 13px; }

/* The /my-list/ page */
.prb-mylist { max-width: 720px; margin: 0 auto; padding: 10px 16px 40px; font-family: 'Nunito Sans', sans-serif; }
.prb-mylist-empty { text-align: center; padding: 30px 0 10px; color: #56708a; }
.prb-mylist-empty-h { font-family: 'Lora', serif; font-size: 20px; color: #2a3a4c; margin-bottom: 6px; }
.prb-mylist-empty .prb-browse-all { display: inline-block; margin-top: 16px; background: #3d5a73; color: #fff; text-decoration: none; font-weight: 700; padding: 12px 26px; border-radius: 8px; }
.prb-mylist-row { display: flex; gap: 18px; align-items: center; border: 1px solid #e7edf2; border-radius: 12px; padding: 14px; margin-bottom: 14px; background: #fff; }
.prb-mylist-cover { width: 60px; border-radius: 5px; box-shadow: 0 5px 14px rgba(30,50,70,.18); display: block; }
.prb-mylist-info { flex: 1; min-width: 0; }
.prb-mylist-title { font-family: 'Lora', serif; font-weight: 600; font-size: 16px; color: #2a3a4c; text-decoration: none; }
.prb-mylist-author { font-size: 13px; color: #7a8ea0; }
.prb-mylist-amazon { background: #3d5a73; color: #fff; text-decoration: none; font-weight: 700; font-size: 13px; padding: 9px 16px; border-radius: 7px; white-space: nowrap; }
.prb-mylist-remove { border: 0; background: none; color: #c0ccd6; font-size: 22px; cursor: pointer; }
.prb-mylist-remove:hover { color: #e2667f; }
.prb-mylist-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; flex-wrap: wrap; }
.prb-mylist-note { font-size: 13px; color: #7a8ea0; }
.prb-mylist-back { color: #3d5a73; font-weight: 700; text-decoration: none; }
@media (max-width: 520px) { .prb-mylist-amazon { padding: 8px 12px; } .prb-mylist-cover { width: 50px; } .prb-rl-drawer { width: 100%; } }

/* Dedicated /my-list/ page — hide the host theme's page-title hero (keep the site nav),
   neutralise its overlap spacing, and use our own branded header. */
.prb-mylist-page .header-hero,
.prb-mylist-page .hero-page-title,
.prb-mylist-page .entry-header,
.prb-mylist-page .breadcrumb { display: none !important; }
.prb-mylist-page .site-inner { margin-top: 0 !important; padding-top: 26px !important; background: transparent !important; }
.prb-mylist-page .site-inner::before, .prb-mylist-page .site-inner::after { content: none !important; display: none !important; }
.prb-mylist-hero { text-align: center; padding: 18px 16px 8px; }
.prb-mylist-eyebrow { font-size: 12px; letter-spacing: 3px; text-transform: uppercase; font-weight: 700; color: #7a8ea0; margin: 0 0 6px; }
.prb-mylist-h1 { font-family: 'Lora', serif; font-weight: 600; font-size: 34px; line-height: 1.1; color: #2a3a4c; margin: 0 0 4px; }
.prb-mylist-h1-heart { color: #e2667f; }
@media (max-width: 600px) { .prb-mylist-h1 { font-size: 27px; } }
