/*
 * VocabBrowse.css — esl_browseVocabulary.php
 * Faceted vocabulary browse. Loaded alongside ViewLesson.css, which supplies the
 * shell (.lesson-*, .cat-*, .gqz-*, .fc-*, .lesson-btn); this adds only the
 * vocab-specific facet bar, count, and compact result rows. Light theme to match
 * the rest of the student pages. Student brand green: var(--brand) / var(--brand-dark).
 */

.vb-controls { flex-wrap: wrap; align-items: center; gap: 10px; }
.vb-study { white-space: nowrap; }

/* Word-type facet chips (multi-select, OR) */
.vb-typebar {
	display: flex; flex-wrap: wrap; align-items: center; gap: 7px;
	margin: 12px 0 2px;
	padding: 10px 13px;
	background: #eef6f0; border: 1px solid #d5e5db; border-radius: 12px;
	box-shadow: 0 1px 2px rgba(20, 50, 30, .05);
}
.vb-typebar__label { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: #6f8479; margin-right: 3px; }
.vb-typechip {
	border: 1px solid #cdd8d1; background: #fff; color: #2f4a3b; border-radius: 999px;
	padding: 5px 13px; font-size: .84rem; font-weight: 600; cursor: pointer;
	transition: background .12s ease, border-color .12s ease, color .12s ease;
}
.vb-typechip:hover { border-color: var(--brand); color: var(--brand); }
.vb-typechip.is-on { background: var(--brand); border-color: var(--brand); color: #fff; }

.vb-count {
	display: inline-flex; align-items: center; gap: 6px;
	margin: 0;
	font-size: .82rem; font-weight: 700; color: #2f4a3b;
	background: #eef5f0; border: 1px solid #d9e6df; border-radius: 999px;
	padding: 4px 14px;
	font-variant-numeric: tabular-nums;
}
.vb-count::before { content: "\f02d"; font-family: "Font Awesome 5 Free"; font-weight: 900; font-size: .8em; color: var(--brand); }

/* Result list — compact, scannable rows */
.vb-list { display: flex; flex-direction: column; }
.vb-row {
	display: block; text-decoration: none; color: inherit;
	padding: 12px 6px; border-bottom: 1px solid #eef2ef;
	transition: background .1s ease;
}
.vb-row:hover { background: #f4f9f5; }
.vb-row:last-child { border-bottom: none; }

.vb-row__head {
	display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
}
.vb-row__word { font-size: 1.06rem; font-weight: 700; color: #16241d; }
.vb-row__jp { font-size: .92rem; font-weight: 500; color: #5a6b62; margin-left: 6px; }

.vb-row__badges { display: flex; align-items: center; gap: 7px; flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end; }
.vb-row__type {
	font-size: .74rem; font-weight: 600; color: #6b7d72; text-transform: lowercase;
	letter-spacing: .02em;
}

.vb-pill {
	display: inline-flex; align-items: center; gap: 4px;
	font-size: .72rem; font-weight: 700; padding: 2px 9px; border-radius: 999px; white-space: nowrap;
}
.vb-pill--cefr { background: #eef2f0; color: var(--brand-dark); border: 1px solid #d5ddd8; letter-spacing: .03em; }
.vb-pill--band { color: #fff; background: var(--vbband, var(--brand)); }
.vb-pill--band i { font-size: .68rem; }

.vb-row__def {
	display: block; margin-top: 3px; font-size: .9rem; line-height: 1.45; color: #4a5a52;
}

@media (max-width: 560px) {
	.vb-row__head { flex-direction: column; align-items: flex-start; gap: 5px; }
	.vb-row__badges { justify-content: flex-start; }
}

/* ---- Right rail: two-column layout + "At a glance" + "Word spotlight" -------- */
.vocab-browse .lesson-content { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; align-items: start; max-width: 1180px; margin: 0 auto; }
.vocab-browse .lesson-article { min-width: 0; }
@media (min-width: 980px) { .vocab-browse .lesson-content { grid-template-columns: minmax(0, 1fr) 290px; } }

.vb-rail { display: flex; flex-direction: column; gap: 16px; }
/* Rail is intentionally NOT sticky: a sticky panel taller than the viewport keeps
   its bottom (the Word Spotlight) permanently below the fold. Let it flow so the
   whole rail is reachable by scrolling. */
/* "sidecard" — reusable side panel: a filled brand-green header (the "tab") over
   a white body, with an optional right-aligned (count). Mirrors the teacher
   add-page sidecards (AddPagesModern.css), students green. TODO: promote to a
   shared component (per-site accent var) when this style rolls out across the 3
   subdomains. */
.sidecard { background: #fff; border: 1px solid #e1e6eb; border-radius: 14px; box-shadow: 0 1px 2px rgba(20,50,30,.06); }
.sidecard__header { display: flex; align-items: center; gap: 8px; padding: 11px 14px; background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%); color: #fff; font-weight: 700; font-size: .9rem; border-radius: 14px 14px 0 0; }
.sidecard__header i { font-size: .95rem; opacity: .95; }
.sidecard__count { margin-left: auto; font-size: .8rem; font-weight: 600; opacity: .9; }
.sidecard__body { padding: 14px 16px; }
.vb-glance__group { margin-bottom: 12px; }
.vb-glance__group:last-child { margin-bottom: 0; }
.vb-glance__label { display: block; font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: #8a978f; margin-bottom: 5px; }
.vb-glance__row { display: grid; grid-template-columns: 70px 1fr 34px; align-items: center; gap: 8px; width: 100%; background: none; border: none; cursor: pointer; padding: 3px 2px; border-radius: 6px; text-align: left; font: inherit; }
.vb-glance__row:hover { background: #f4f9f5; }
.vb-glance__name { font-size: .84rem; color: #2f4a3b; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vb-glance__bar { height: 7px; background: #eef2ef; border-radius: 4px; overflow: hidden; }
.vb-glance__bar > i { display: block; height: 100%; width: 0; background: var(--gc, var(--brand)); border-radius: 4px; transition: width .25s ease; }
.vb-glance__n { font-size: .8rem; color: #4a5a52; text-align: right; font-variant-numeric: tabular-nums; }
.vb-glance__row--zero { opacity: .38; }

.vb-spot__word { display: inline-block; font-size: 1.3rem; font-weight: 800; color: #16241d; text-decoration: none; line-height: 1.15; }
.vb-spot__word:hover { color: var(--brand); }
.vb-spot__badges { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 8px 0; }
.vb-spot__def { margin: 4px 0 10px; font-size: .88rem; line-height: 1.45; color: #4a5a52; }
.vb-spot__link { font-size: .85rem; font-weight: 600; color: var(--brand); text-decoration: none; }
.vb-spot__link:hover { text-decoration: underline; }
.vb-spot__more { margin-top: 10px; border: 1px solid #cfe0d5; background: #fff; color: var(--brand); border-radius: 8px; padding: 5px 12px; font-size: .82rem; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.vb-spot__more:hover { background: #f2f9f4; }
.vb-spot__empty { color: #6b7d72; font-size: .88rem; margin: 0; }

/* ---- Vocab list pagination ---- */
.vb-pager { display: flex; justify-content: center; align-items: center; gap: 14px; margin: 16px 0 4px; }
.vb-pager__btn { border: 1px solid #cfe0d5; background: #fff; color: var(--brand); width: 34px; height: 34px; border-radius: 8px; font-size: 1.15rem; line-height: 1; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.vb-pager__btn:hover:not(:disabled) { background: #eef5f0; }
.vb-pager__btn:disabled { opacity: .4; cursor: default; }
.vb-pager__info { font-size: .85rem; color: #4a5a52; font-weight: 600; font-variant-numeric: tabular-nums; }
.vb-pager__nav { display: flex; align-items: center; gap: 14px; }
/* Top pager: count pinned left, nav centered in the row (grid: 1fr | auto | 1fr). */
.vb-pager--top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; margin: 4px 0 10px; padding-bottom: 10px; border-bottom: 1px solid #eef2ef; }
.vb-pager--top .vb-count { justify-self: start; }
