/* KEI eBook Reader – storefront & My eBooks */
.kebr-hidden { display: none !important; }

/* Format picker (book page) */
.kebr-picker { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 4px 0 18px; }
.kebr-pick {
	display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left;
	padding: 14px 16px; border-radius: 14px; border: 1.5px solid rgba(0,0,0,.14); background: #fff; color: #171715;
	cursor: pointer; font: inherit; line-height: 1.3; transition: border-color .15s, box-shadow .15s, transform .15s;
}
.kebr-pick:hover { border-color: #d2a66f; }
.kebr-pick.is-on { border-color: #1d2a4d; box-shadow: 0 0 0 3px rgba(29,42,77,.12); }
.kebr-pick-name { font-family: "Space Grotesk", sans-serif; font-weight: 600; font-size: 15px; }
.kebr-pick-price { font-weight: 700; font-size: 16px; color: #1d2a4d; }
.kebr-pick-price del { opacity: .5; font-weight: 400; margin-right: 4px; }
.kebr-pick-price ins { text-decoration: none; }
.kebr-pick-note { font-size: 12.5px; color: #6f6f67; }
.kebr-pick.is-ebook .kebr-pick-name::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: #d2a66f; vertical-align: middle; }

.kebr-avail { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 12px; }
.kebr-avail span { font-size: 12px; font-weight: 700; letter-spacing: .03em; padding: 4px 10px; border-radius: 999px; background: rgba(29,42,77,.07); color: #1d2a4d; }
.kebr-avail .kebr-avail-ebook { background: rgba(210,166,111,.18); color: #9c7134; }

.kebr-read-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 14px 0 6px; }
.kebr-read-actions .kebr-read-now { background: #1d2a4d !important; color: #fff !important; border-radius: 999px; }
.kebr-owned { font-size: 13.5px; color: #6f6f67; }
.kebr-sample-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: #9c7134; text-decoration: none; padding: 8px 2px; }
.kebr-sample-link:hover { text-decoration: underline; }

/* Owned eBook: greyed out in the picker */
.kebr-pick { position: relative; }
.kebr-pick.is-owned, .kebr-pick.is-owned:hover {
	cursor: not-allowed; background: #f3f2ee; border: 1.5px dashed rgba(0,0,0,.16); box-shadow: none; color: #8b8a83; transform: none;
}
.kebr-pick.is-owned .kebr-pick-name::before { background: #b9b8b1; }
.kebr-pick.is-owned .kebr-pick-price,
.kebr-pick.is-owned .kebr-pick-price .amount,
.kebr-pick.is-owned .kebr-pick-price bdi { color: #b3b2ab !important; }
.kebr-pick.is-owned .kebr-pick-price ins { text-decoration: line-through !important; text-decoration-thickness: 2px !important; text-decoration-color: #b3b2ab !important; }
.kebr-pick.is-owned .kebr-pick-price del { display: none !important; }
.kebr-pick.is-owned .kebr-pick-note { color: #1d2a4d; font-weight: 700; }
.kebr-pick.is-owned .kebr-pick-note::before { content: "✓ "; color: #2f8a57; }
.kebr-pick-badge {
	position: absolute; top: 10px; right: 10px; font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
	padding: 3px 9px; border-radius: 999px; background: #e6e4dc; color: #6f6f67;
}
.kebr-avail .kebr-avail-ebook.is-owned { background: rgba(47,138,87,.12); color: #2f7a4f; }
form.cart.kebr-all-owned .woocommerce-variation-add-to-cart,
form.cart.kebr-all-owned .single_variation_wrap { display: none !important; }

/* "Read in Tiridle" strip for owners */
.kebr-read-actions.is-owned {
	padding: 14px 16px; border-radius: 16px; background: linear-gradient(135deg, rgba(29,42,77,.05), rgba(210,166,111,.12));
	border: 1px solid rgba(210,166,111,.35); transition: box-shadow .3s, border-color .3s;
}
.kebr-read-actions .kebr-read-now { display: inline-flex !important; align-items: center; gap: 8px; }
.kebr-read-actions.kebr-flash { border-color: #d2a66f; box-shadow: 0 0 0 4px rgba(210,166,111,.35); }

.kebr-loop-formats { display: block; font-size: 12px; color: #9c7134; font-weight: 700; letter-spacing: .02em; margin: 2px 0 6px; }

.kebr-order-read { margin-top: 8px; }
.kebr-order-read .button { padding: 8px 18px !important; font-size: 14px !important; }
.kebr-thanks { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 16px 18px; margin: 0 0 24px; border-radius: 14px; background: rgba(210,166,111,.14); border: 1px solid rgba(210,166,111,.4); }

/* Tiridle library (My Account) */
.kebr-tiridle-head { display: flex; align-items: center; gap: 12px; margin: 0 0 20px; }
.kebr-tiridle-head .kr-logo { width: 40px; height: 40px; flex-shrink: 0; }
.kebr-tiridle-head strong { display: block; font-family: "Space Grotesk", sans-serif; font-size: 22px; font-weight: 700; color: #1d2a4d; line-height: 1.1; }
.kebr-tiridle-head span { display: block; font-size: 13.5px; color: #6f6f67; }
.kebr-shelf-wrap { --navy: #1d2a4d; --gold: #d2a66f; }
.kebr-continue {
	display: flex; gap: 20px; align-items: center; padding: 18px; margin-bottom: 26px; border-radius: 18px;
	background: linear-gradient(135deg, #1d2a4d, #2c3d6b); color: #fff !important; text-decoration: none !important;
	box-shadow: 0 10px 30px rgba(29,42,77,.25); transition: transform .2s;
}
.kebr-continue:hover { transform: translateY(-2px); }
.kebr-continue img { width: 96px; flex-shrink: 0; border-radius: 4px; box-shadow: 0 8px 22px rgba(0,0,0,.35); }
.kebr-continue-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.kebr-continue-body small { text-transform: uppercase; letter-spacing: .1em; font-size: 11px; color: var(--gold); font-weight: 700; }
.kebr-continue-body strong { font-family: "Space Grotesk", sans-serif; font-size: 19px; font-weight: 600; color: #fff; line-height: 1.25; }
.kebr-continue-body em { font-style: normal; font-size: 13.5px; opacity: .75; }
.kebr-continue .kebr-shelf-bar { background: rgba(255,255,255,.2); margin: 8px 0 2px; max-width: 360px; }
.kebr-continue-meta { font-size: 12.5px; opacity: .8; }
.kebr-continue-btn { align-self: flex-start; margin-top: 10px; background: var(--gold) !important; color: #fff !important; padding: 10px 22px !important; font-size: 14px !important; pointer-events: none; }

.kebr-shelf-head h3 { font-family: "Space Grotesk", sans-serif; font-size: 18px; margin: 0 0 14px; }
.kebr-shelf-head h3 span { font-size: 13px; color: #6f6f67; font-weight: 400; margin-left: 6px; }
.kebr-shelf { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 26px 18px; }
.kebr-shelf-item a { display: flex; flex-direction: column; gap: 4px; text-decoration: none !important; color: #171715; }
.kebr-shelf-cover { position: relative; display: block; aspect-ratio: 2 / 3; border-radius: 4px 6px 6px 4px; overflow: hidden; background: #e9e6da; box-shadow: 0 2px 4px rgba(0,0,0,.1), 0 10px 24px rgba(0,0,0,.14); transition: transform .2s, box-shadow .2s; }
.kebr-shelf-cover::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: linear-gradient(to right, rgba(0,0,0,.18), transparent); z-index: 1; }
.kebr-shelf-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.kebr-shelf-item a:hover .kebr-shelf-cover { transform: translateY(-3px); box-shadow: 0 4px 8px rgba(0,0,0,.12), 0 16px 32px rgba(0,0,0,.18); }
.kebr-shelf-badge { position: absolute; right: 6px; top: 6px; z-index: 2; font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 999px; background: rgba(255,255,255,.92); color: #1d2a4d; }
.kebr-shelf-badge.is-new { background: var(--gold); color: #fff; }
.kebr-shelf-bar { display: block; height: 4px; border-radius: 4px; background: rgba(0,0,0,.08); overflow: hidden; margin-top: 6px; }
.kebr-shelf-bar > span { display: block; height: 100%; background: var(--gold); border-radius: 4px; }
.kebr-shelf-item strong { font-family: "Space Grotesk", sans-serif; font-weight: 600; font-size: 14px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.kebr-shelf-item small { font-size: 12.5px; color: #6f6f67; }
.kebr-shelf-item.is-unavailable { opacity: .55; }
.kebr-shelf-item.is-unavailable a { pointer-events: none; }
.kebr-shelf-tip { margin-top: 28px; font-size: 13px; color: #6f6f67; }

.kebr-shelf-empty { text-align: center; padding: 40px 20px; border: 1px dashed rgba(0,0,0,.15); border-radius: 18px; color: #6f6f67; }
.kebr-shelf-empty svg { color: #d2a66f; }
.kebr-shelf-empty h3 { font-family: "Space Grotesk", sans-serif; color: #171715; margin: 10px 0 6px; }

@media (max-width: 520px) {
	.kebr-shelf { grid-template-columns: repeat(2, 1fr); gap: 22px 14px; }
	.kebr-continue { padding: 14px; gap: 14px; }
	.kebr-continue img { width: 74px; }
	.kebr-continue-body strong { font-size: 16px; }
}
