/**
 * folha.css
 * Estilos da Folha de Exercícios.
 * Complementa doc.css — não o substitui.
 * As classes .doc-* (cabeçalho, meta, rodapé) são reutilizadas de doc.css.
 */

/* ── Linha de nome e nota ───────────────────────────────────────────────── */
.fh-cross-year { display: flex; align-items: center; gap: .5rem; margin: .55rem 0; font-size: .8rem; color: var(--text2); }
.fh-cross-year input { accent-color: var(--gold); }
.fh-hab-ck + label small { display: inline-block; margin: 0 .4rem 0 .15rem; font-size: .68rem; font-weight: 400; }
#fh-availability { padding: .65rem .8rem; border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); font-size: .8rem; line-height: 1.45; }
.fh-custom-item { display: grid; gap: .55rem; padding: .75rem; margin: .55rem 0; border: 1px solid var(--border); border-radius: var(--radius); }
.fh-custom-item label { display: grid; gap: .25rem; color: var(--text2); font-size: .76rem; }
.fh-custom-item textarea { width: 100%; padding: .55rem; background: var(--bg3); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius); font: inherit; resize: vertical; }
.fh-custom-item .fh-custom-remove { justify-self: start; }

.folha-nome-linha {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--doc-rule);
}

.folha-nome-label,
.folha-nota-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--doc-head);
  white-space: nowrap;
}

.folha-nome-campo {
  flex: 1;
  border-bottom: 1px solid var(--doc-head);
  min-width: 0;
}

.folha-nota-campo {
  width: 4rem;
  border-bottom: 1px solid var(--doc-head);
}

/* ── Lista de questões ──────────────────────────────────────────────────── */
.folha-questoes {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Questão individual */
.folha-q {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.folha-q-num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--doc-muted);
  min-width: 1.4rem;
  padding-top: 0.1rem;
  flex-shrink: 0;
}

.folha-q-body {
  flex: 1;
  min-width: 0;
}

.folha-q-enunciado {
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--doc-text);
  margin-bottom: 0.6rem;
}

/* ── Alternativas ───────────────────────────────────────────────────────── */
.folha-alternativas {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding-left: 0.25rem;
}

.folha-alt {
  display: flex;
  gap: 0.4rem;
  align-items: flex-start;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--doc-text);
}

.folha-alt-letra {
  font-weight: 700;
  min-width: 1.2rem;
  flex-shrink: 0;
}

/* ── Linhas de resposta (questão aberta) ────────────────────────────────── */
.folha-linhas-resposta {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding-top: 0.25rem;
}

.folha-linha {
  border-bottom: 1px solid var(--doc-rule);
  height: 1.1rem;
}

/* ── Gabarito ───────────────────────────────────────────────────────────── */
.folha-gabarito-item {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
  font-size: 0.88rem;
  line-height: 1.5;
}

.folha-gabarito-num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--doc-muted);
  min-width: 1.4rem;
  flex-shrink: 0;
  padding-top: 0.1rem;
}

/* ── Print: evita quebras ruins ─────────────────────────────────────────── */
@media print {
  .folha-q       { break-inside: avoid; }
  .folha-nome-linha { break-inside: avoid; }
}
