/*
 * blu.css — blue mage spellbook checklist. Builds on ../styles.css:
 * same two-accent rule (aether cyan = interactive/brand, gil gold = money —
 * unused here), same raised-panel surfaces.
 */

.wordmark a {
  color: inherit;
  text-decoration: none;
}

/* Controls stay reachable while scrolling a 30-section checklist. */
.blu-controls {
  position: sticky;
  top: 0.5rem;
  z-index: 10;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.blu-progress {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.8rem;
}

.blu-progress-track {
  flex: 1;
  height: 8px;
  border-radius: 999px;
  background: var(--bg);
  border: 1px solid var(--border);
  overflow: hidden;
}

.blu-progress-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--aether), var(--aether-bright));
  transition: width 0.25s ease;
}

.blu-progress-text {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.blu-filter-label { flex: 1; }
#text-filter { width: 100%; min-width: 11rem; }
#max-lv { width: 5rem; }

#hide-learned.on {
  color: var(--aether);
  border-color: var(--aether);
  background: rgba(111, 215, 232, 0.08);
}

/* ---------- sections ---------- */

.blu-exp-title {
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--aether);
  margin: 1.8rem 0.2rem 0.7rem;
}

.blu-section { margin-bottom: 1rem; }

.blu-section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.8rem;
  margin: 0 0.2rem 0.4rem;
}

.blu-section-head h3 {
  margin: 0;
  font-size: 1rem;
}

.blu-count {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.blu-count.done { color: var(--green); }

/* ---------- rows ---------- */

/* Checklist tables read fine narrow — undo the market table's min-width. */
.blu-table { min-width: 0; }

.check-cell {
  width: 2.1rem;
  text-align: center;
}

.check-cell input[type="checkbox"] {
  width: 1.05rem;
  height: 1.05rem;
  padding: 0;
  accent-color: var(--aether);
  cursor: pointer;
  vertical-align: middle;
}

tr.spell-row { cursor: pointer; }
tr.spell-row:hover td { background: var(--bg-hover); }

/* Focused rows scrolled into view must land below the sticky controls. */
.check-cell input,
.spell-name {
  scroll-margin-top: 11rem;
}

/* Dim learned rows by recoloring, not opacity — muted-on-raised keeps
 * WCAG AA contrast while opacity would sink secondary text below it. */
tr.spell-row.learned td,
tr.spell-row.learned .spell-name {
  color: var(--text-muted);
}

tr.spell-row.learned .spell-name {
  text-decoration: line-through;
  text-decoration-color: var(--text-muted);
  border-bottom-color: transparent;
}

tr.spell-row.learned .badge { opacity: 0.6; }

.spell-cell { white-space: nowrap; }

.spell-name {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px dotted var(--border);
}

.spell-name:hover {
  color: var(--aether);
  border-bottom-color: var(--aether);
}

.spell-no {
  font-family: var(--mono);
  font-size: 0.72em;
  color: var(--text-muted);
  margin-left: 0.4rem;
}

.src-note { color: var(--text-muted); font-size: 0.88em; }
.src-sep { color: var(--text-muted); }

.loc {
  font-family: var(--mono);
  font-size: 0.8em;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Where-to-get badges: FATEs and leves are timing/errand quirks (amber-ish),
 * hunts roam (red-ish) — all informational, none interactive. */
.badge.srckind { margin-left: 0.15rem; }
.badge.fate { background: rgba(217, 180, 91, 0.14); color: var(--amber); }
.badge.leve { background: rgba(195, 205, 226, 0.14); color: var(--home); }
.badge.hunt { background: rgba(224, 122, 122, 0.14); color: var(--red); }

.blu-empty {
  color: var(--text-muted);
  text-align: center;
  padding: 2rem 1rem;
}

/* ---------- responsive ---------- */

@media (max-width: 620px) {
  .blu-controls { position: static; }
  .blu-filter-label { min-width: 100%; }
  .spell-cell { white-space: normal; }
  .blu-table th, .blu-table td { padding: 0.45rem 0.5rem; }
}
