/*
 * 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: #18823e / #0e6630.
 */

.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; gap: 7px;
	margin: 12px 0 2px;
}
.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: #18823e; color: #18823e; }
.vb-typechip.is-on { background: #18823e; border-color: #18823e; color: #fff; }

.vb-count { margin: 12px 0 0; font-size: .85rem; color: #6b7d72; font-weight: 600; }

/* 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: #0e6630; border: 1px solid #d5ddd8; letter-spacing: .03em; }
.vb-pill--band { color: #fff; background: var(--vbband, #18823e); }
.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; }
@media (min-width: 980px) {
	.vb-rail { position: sticky; top: 14px; max-height: calc(100vh - 28px); overflow-y: auto; scrollbar-gutter: stable; }
}
.vb-glance, .vb-spotlight { background: #fff; border: 1px solid #e1e6eb; border-radius: 14px; padding: 15px 16px; box-shadow: 0 1px 2px rgba(20,50,30,.05); }
.vb-rail__title { display: flex; align-items: center; gap: 7px; margin: 0 0 10px; font-size: .95rem; font-weight: 700; color: #16241d; }
.vb-rail__title i { color: #18823e; }

.vb-glance__total { margin: -4px 0 12px; font-size: .8rem; color: #6b7d72; }
.vb-glance__total strong { color: #18823e; font-size: 1.05rem; }
.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, #18823e); 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: #18823e; }
.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: #18823e; text-decoration: none; }
.vb-spot__link:hover { text-decoration: underline; }
.vb-spot__more { margin-top: 10px; border: 1px solid #cfe0d5; background: #fff; color: #18823e; 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; }
