/* Catalog pages (employee archive + guest sample) — ported from
   prototype-reference/digital-library.html and guest-library.html. */

.page-head { margin-bottom: 1.6rem; }
.page-head .hi-line { font-family: 'Noto Serif Devanagari', serif; font-size: .95rem; color: var(--ink-faint); margin-top: .2rem; }

.notice { background: rgba(201,138,46,.14); border: 1px solid #E0C08C; color: #7A521C; font-size: .83rem; padding: .9rem 1.1rem; border-radius: 9px; margin-bottom: 1.8rem; line-height: 1.55; }
.notice b { color: #5C3A10; }
.notice a { color: #5C3A10; text-decoration: underline; }
.notice .en-secondary { margin-top: .5rem; }
.expired-box h2 .en-secondary { display: block; font-family: var(--font-body); font-weight: 400; font-size: .8rem; color: var(--ink-faint); margin-top: .3rem; }
.cooldown-box h1 .en-secondary { display: block; font-family: var(--font-body); font-weight: 400; font-size: .9rem; color: var(--ink-faint); margin-top: .3rem; }

.toolbar { display: flex; flex-wrap: wrap; gap: .7rem; align-items: center; margin-bottom: 1.8rem; background: var(--paper-raised); border: 1px solid var(--border); border-radius: 10px; padding: .9rem 1rem; }
.toolbar select, .toolbar .search { font-family: var(--font-body); font-size: .83rem; border: 1px solid var(--border); border-radius: 6px; padding: .5rem .7rem; background: #fff; color: var(--ink); }
.toolbar .search { flex: 1; min-width: 220px; }
.chip-group { display: flex; gap: .4rem; }
.chip { font-family: var(--font-body); font-size: .74rem; padding: .4rem .7rem; border-radius: 99px; border: 1px solid var(--border); background: #fff; cursor: pointer; color: var(--ink-faint); }
.chip.active { background: var(--catalog-accent, var(--accent-employee-amber)); color: var(--catalog-accent-fg, var(--ink)); border-color: var(--catalog-accent, var(--accent-employee-amber)); }
.result-count { font-family: var(--font-body); font-size: .75rem; color: var(--slate); margin-left: auto; }

.catalog-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1.2rem; }
.book-card { background: var(--paper-raised); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; }
.book-cover { aspect-ratio: 2 / 3; height: auto; display: flex; align-items: flex-end; padding: 1rem; font-family: var(--font-display); font-weight: 700; font-size: 1.7rem; color: #fff; position: relative; }
.book-cover.has-image { background-size: cover; background-position: center; background-color: var(--ink); }
.fmt-badge { position: absolute; top: .6rem; right: .6rem; font-family: var(--font-mono); font-size: .62rem; background: rgba(0,0,0,.3); padding: .15rem .4rem; border-radius: 4px; }
.book-body { padding: .5rem .8rem; flex: 1; display: flex; flex-direction: column; }
.call-no { font-family: var(--font-mono); font-size: .68rem; color: var(--slate); margin-bottom: .3rem; }
/* Clamped to a fixed line count (not left to wrap freely) so every card in
   a row ends up the same height regardless of title/author length —
   title="" on the element carries the untruncated text as a hover tooltip. */
.book-title { font-family: var(--font-display); font-weight: 600; font-size: .8rem; margin-bottom: .15rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.3; }
.book-author { font-size: .76rem; color: var(--ink-faint); margin-bottom: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.badge { display: inline-flex; align-items: center; gap: .3rem; font-size: .65rem; font-weight: 600; padding: .15rem .45rem; border-radius: 25px; margin-bottom: .5rem; width: fit-content; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; display: block; }
.badge.avail { background: #DCE9E5; color: var(--accent-employee-ledger); }
.badge.issued { background: #E7E2D4; color: var(--slate); }
/* Badge + button pushed down as one unit — margin-top:auto on .btn-primary
   alone (still used directly by cards with no badge, e.g. Digital/Guest
   Library) would leave the flexible gap wedged between the badge and the
   button on short-content cards, visually orphaning the button from its
   status line. Grouping them keeps that pair anchored together; the
   flexible space now lands above the badge instead. */
.book-actions { margin-top: auto; }
.book-actions .btn-primary { margin-top: 0; }
.btn-primary { margin-top: auto; text-align: center; background: var(--catalog-accent, var(--accent-employee-amber)); color: var(--catalog-accent-fg, var(--ink)); font-size: .8rem; font-weight: 600; padding: .55rem; border-radius: 6px; border: none; cursor: pointer; text-decoration: none; display: block; }
.btn-primary:hover { background: var(--catalog-accent-hover, #B57A22); color: #fff; }
.empty-catalog { color: var(--ink-faint); font-size: .88rem; padding: 2rem 0; text-align: center; }

.pagination { display: flex; justify-content: center; gap: .4rem; margin-top: 2.2rem; }
.pagination button { width: 34px; height: 34px; border-radius: 6px; border: 1px solid var(--border); background: var(--paper-raised); font-family: var(--font-mono); font-size: .8rem; cursor: pointer; }
.pagination button.active { background: var(--catalog-accent, var(--accent-employee-amber)); color: var(--catalog-accent-fg, var(--ink)); border-color: var(--catalog-accent, var(--accent-employee-amber)); font-weight: 700; }

@media (max-width: 900px) { .catalog-grid { grid-template-columns: repeat(2,1fr); } }

.pb-pb-locate-link { font-family: var(--font-body); color: var(--accent-employee-ledger); font-weight: 600; text-decoration: none; }
.pb-pb-locate-link:hover { text-decoration: underline; }
.book-card.pb-pb-highlight { box-shadow: 0 0 0 3px var(--accent-employee-amber); }

/* ---------- Locate on Shelf modal (physical catalog only) ---------- */
.modal-overlay { position: fixed; inset: 0; background: rgba(32,28,24,.55); display: none; align-items: center; justify-content: center; z-index: 300; padding: 1.5rem; }
.modal-overlay.show { display: flex; }
.modal-box { background: #fff; border-radius: 12px; max-width: 480px; width: 100%; padding: 1.6rem; }
.modal-box h3 { font-family: var(--font-display); font-size: 1.2rem; margin-bottom: .3rem; }
.modal-box .a { font-size: .85rem; color: var(--ink-faint); margin-bottom: .5rem; }
.modal-close { margin-top: 1.2rem; background: var(--ink); color: #fff; border: none; padding: .6rem 1.1rem; border-radius: 7px; cursor: pointer; font-weight: 600; }
.locate-breadcrumb { font-family: var(--font-body); font-weight: 700; font-size: 1rem; color: var(--accent-employee-ledger); margin: .7rem 0 1rem; }
.locate-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: .6rem; margin-bottom: 1rem; }
.locate-cell { aspect-ratio: 1; border: 2px solid var(--border); border-radius: 9px; display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-weight: 700; font-size: .85rem; color: var(--ink-faint); background: var(--paper); }
.locate-cell.hit { border-color: var(--accent-employee-amber); background: rgba(201,138,46,.14); color: #7A521C; box-shadow: 0 0 0 3px rgba(201,138,46,.25); }
.locate-note { font-size: .78rem; color: var(--ink-faint); line-height: 1.5; }
.locate-note .en-secondary { font-size: .74rem; color: var(--slate); margin-top: .4rem; }

/* ---------- Guest banner (sticky, site-wide chrome — distinct from the
   reader's own in-page guest banner) ---------- */
.guest-site-banner { background: linear-gradient(90deg, #7A521C, var(--accent-employee-amber)); color: #fff; padding: .6rem 1.5rem; display: flex; align-items: center; justify-content: center; gap: 1rem; font-size: .82rem; font-weight: 600; position: sticky; top: 0; z-index: 60; flex-wrap: wrap; }
.guest-site-banner .timer { font-family: var(--font-mono); background: rgba(0,0,0,.2); padding: .2rem .6rem; border-radius: 6px; }
.guest-site-banner a { color: #fff; text-decoration: underline; text-underline-offset: 2px; }
.btn-head { font-size: .8rem; font-weight: 700; padding: .5rem .9rem; border-radius: 6px; background: var(--accent-employee-amber); color: var(--ink); text-decoration: none; }
.btn-head:hover { background: #fff; }

/* Was previously jammed into the brand-text as a second line (mislabeled
   ".hi" while mixing Hindi and English) — moved to a true center position
   in the header bar instead, now that brand-text carries the site's real
   bilingual name like every other header. Absolutely centered on
   .site-bar (position:relative, dashboard.css) rather than the flex gap
   between brand/head-actions, so it stays centered regardless of how wide
   either side is. */
.guest-header-badge { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; text-align: center; line-height: 1.25; pointer-events: none; }
.guest-header-badge .hi { font-family: 'Noto Serif Devanagari', serif; font-size: .85rem; font-weight: 600; color: #fff; }
.guest-header-badge .en { font-family: var(--font-body); font-size: .68rem; color: rgba(255,255,255,.78); }
@media (max-width: 760px) {
	.guest-header-badge { display: none; }
}

.expired-overlay { position: fixed; inset: 0; background: rgba(32,28,24,.75); display: none; align-items: center; justify-content: center; z-index: 500; padding: 1.5rem; }
.expired-overlay.show { display: flex; }
.expired-box { background: #fff; border-radius: 14px; max-width: 420px; width: 100%; padding: 2.2rem; text-align: center; }
.expired-box h2 { font-family: var(--font-display); font-size: 1.4rem; margin-bottom: .6rem; color: var(--ink); }
.expired-box p { font-size: .85rem; color: var(--ink-faint); line-height: 1.6; margin-bottom: 1.5rem; }
.expired-box .btn-primary { padding: .75rem; }

.cooldown-box { max-width: 480px; margin: 3rem auto; text-align: center; background: var(--paper-raised); border: 1px solid var(--border); border-radius: 14px; padding: 2.5rem; }
.cooldown-box h1 { font-family: var(--font-display); font-size: 1.5rem; margin-bottom: .8rem; }
.cooldown-box p { color: var(--ink-faint); font-size: .9rem; line-height: 1.6; }
