/* ═══════════ A2 — Banco de Questões BNCC ═══════════ */

.qb-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
}
.qb-filters .form-row {
  min-width: 120px;
  margin: 0;
}

.qb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 12px;
}

.qb-card {
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: 8px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color 0.15s ease;
}
.qb-card:hover { border-color: var(--gold); }

.qb-card-hd {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.qb-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  flex: 1;
  min-width: 0;
  align-items: center;
}

.qb-badge {
  display: inline-block;
  padding: 2px 7px;
  background: var(--bg);
  border: 1px solid var(--border2);
  border-radius: 10px;
  font-size: 0.66rem;
  font-weight: 700;
}
.qb-badge-type { color: var(--teal); }

.qb-source {
  font-size: 0.85rem;
  cursor: help;
  opacity: 0.7;
}

.qb-card-actions {
  display: flex;
  gap: 3px;
  flex-shrink: 0;
}

.qb-statement {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--fg);
  line-height: 1.4;
  margin-top: 2px;
}

.qb-alts {
  list-style: none;
  padding: 0;
  margin: 4px 0 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.qb-alts li {
  font-size: 0.74rem;
  color: var(--muted);
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--bg);
}
.qb-alts li.qb-alt-correct {
  color: var(--green);
  font-weight: 700;
  background: rgba(52, 211, 153, 0.08);
}

.qb-vf {
  font-size: 0.76rem;
  color: var(--muted);
  padding: 4px 8px;
  background: var(--bg);
  border-radius: 4px;
}
.qb-vf strong { color: var(--gold); }

.qb-card-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin-top: auto;
  padding-top: 6px;
  border-top: 1px dashed var(--border2);
  min-height: 24px;
  align-items: center;
}
.qb-tag {
  display: inline-block;
  padding: 1px 6px;
  background: var(--bg);
  color: var(--muted2);
  border-radius: 8px;
  font-size: 0.62rem;
  font-weight: 600;
}

/* ─── Modal edição ─── */
.qb-alt-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 6px;
  align-items: center;
}
.qb-alt-row .form-ctrl { margin: 0; }

.qb-alt-radio {
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: 6px;
  padding: 4px 8px;
  cursor: pointer;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 800;
  font-size: 0.78rem;
  color: var(--gold);
  user-select: none;
}
.qb-alt-radio input[type=radio] {
  accent-color: var(--gold);
  margin: 0;
}
.qb-alt-radio:has(input:checked) {
  background: rgba(245, 200, 66, 0.1);
  border-color: var(--gold);
}

@media (max-width: 600px) {
  .qb-grid { grid-template-columns: 1fr; }
  .qb-filters .form-row { min-width: 100%; }
}
