/* QGabarito | Banco de Questões: melhorias locais de ergonomia | 2026-09-16 v1
   Escopo intencional: somente .questions-page-shell / questions.php. */
.questions-page-shell .qg-bank-filter-toggle[hidden] { display: none !important; }
.questions-page-shell .qg-bank-filter-toggle:not([hidden]) { display: inline-flex; }
.questions-page-shell .filter-card.qg-bank-filters-collapsed [data-qg-bank-filter-content] { display: none; }
.questions-page-shell .filter-card.qg-bank-filters-collapsed { padding-bottom: 17px; }
.questions-page-shell .filter-card.qg-bank-filters-collapsed .filter-card-heading { margin-bottom: 0; }
.questions-page-shell .qg-bank-filter-toggle { min-height: 38px; font-size: .85rem; white-space: nowrap; }
.questions-page-shell .qg-incidence-highlight {
    display: inline-flex; gap: 8px; align-items: center;
    color: var(--brand); border-color: color-mix(in srgb, var(--brand) 32%, var(--border));
    background: color-mix(in srgb, var(--brand) 5%, var(--surface));
}
.questions-page-shell .qg-incidence-highlight:hover,
.questions-page-shell .qg-incidence-highlight:focus-visible {
    border-color: var(--brand);
    background: color-mix(in srgb, var(--brand) 10%, var(--surface));
}
.questions-page-shell .qg-incidence-highlight svg { flex: 0 0 17px; }
/* Material de apoio: superfície discreta, imagem sem moldura visual extra.
   Bordas que façam parte dos próprios pixels da imagem original são preservadas. */
.questions-page-shell .qg-bank-support-materials .support-material-public {
    border: 1px solid var(--border) !important;
    background: var(--surface) !important;
    border-radius: 10px !important;
}
.questions-page-shell .qg-bank-support-materials .support-body {
    color: var(--text) !important;
    background: transparent;
    line-height: 1.65;
    overflow-wrap: anywhere;
}
.questions-page-shell .qg-bank-support-materials .support-body img {
    max-width: 100%; height: auto;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
}
.questions-page-shell .qg-bank-support-expand > summary {
    margin-top: 10px; padding: 11px 12px;
    border: 1px solid var(--border); border-radius: 8px;
    background: var(--surface); color: var(--brand);
    font: inherit; font-weight: 800; cursor: pointer;
}
.questions-page-shell .qg-bank-support-expand[open] > summary { margin-bottom: 10px; }
.questions-page-shell .qg-bank-support-expand > summary:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--brand) 25%, transparent); outline-offset: 2px;
}
/* Ferramenta de riscar: colada ao final do texto, sem viajar até o extremo direito do card. */
.questions-page-shell .question-result-card .option.qg-elimination-option {
    display: flex !important; align-items: center; justify-content: flex-start;
    gap: 10px; padding-right: 14px !important;
}
.questions-page-shell .question-result-card .option.qg-elimination-option > input[type='radio'] {
    flex: 0 0 18px; margin: 0;
}
.questions-page-shell .question-result-card .option.qg-elimination-option > .option-key { flex: 0 0 auto; }
.questions-page-shell .question-result-card .option.qg-elimination-option > span:not(.option-key):not(.sr-only) {
    flex: 0 1 auto; min-width: 0; overflow-wrap: anywhere;
}
.questions-page-shell .question-result-card .option.qg-elimination-option > .qg-elimination-toggle {
    position: static; top: auto; right: auto; transform: none;
    flex: 0 0 38px; width: 38px; min-width: 38px; height: 38px; min-height: 38px;
    margin-left: 2px;
}
/* Histórico pessoal junto aos metadados, sem faixa independente entre resposta e ferramentas. */
.questions-page-shell .question-result-top .meta-row { min-width: 0; }
.questions-page-shell .question-result-top .personal-state-row {
    display: inline-flex; align-items: center; flex-wrap: wrap;
    margin: 0; gap: 5px 6px;
}
.questions-page-shell .question-result-top .personal-chip {
    padding: 3px 7px; font-size: .72rem; line-height: 1.2;
}
@media (max-width: 760px) {
    .questions-page-shell .filter-card-heading { flex-wrap: wrap; }
    .questions-page-shell .filter-card-heading .qg-target-context-actions { flex-wrap: wrap; }
    .questions-page-shell .qg-bank-filter-toggle { white-space: normal; }
    .questions-page-shell .question-result-card .option.qg-elimination-option > .qg-elimination-toggle {
        flex-basis: 44px; width: 44px; min-width: 44px; height: 44px; min-height: 44px;
    }
}
@media print {
    .questions-page-shell .qg-bank-filter-toggle { display: none !important; }
    .questions-page-shell .filter-card.qg-bank-filters-collapsed [data-qg-bank-filter-content] { display: block; }
    .questions-page-shell .qg-bank-support-expand > .support-body { display: block !important; }
}
