/* Banco ENEM: the site's look (style.css) plus question rendering (render.js, .q-* classes) on the dark theme */
[hidden] { display: none !important; }
body.bank { justify-content: flex-start; padding: 4rem 1rem 4rem; box-sizing: border-box; }
body.bank h1 { margin-bottom: 0.25rem; }
#search-view, #question-view { width: min(48rem, 100%); display: flex; flex-direction: column; align-items: center; }

#query { width: min(36rem, 100%); box-sizing: border-box; padding: 0.75rem 1rem; font-size: 1.1rem; margin-top: 0.5rem; }
#query::placeholder { color: rgba(255, 255, 255, 0.35); }
.filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem 1rem; margin: 1rem 0 0; font-size: 0.95rem; }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.35rem; }
.chips button, #year, .more {
    font: inherit; color: inherit; background: rgb(40, 40, 40); border: none; border-radius: 8px;
    padding: 0.3rem 0.7rem; cursor: pointer; opacity: 0.6; transition: opacity 0.2s, background 0.2s;
}
.chips button.on { opacity: 1; background: rgb(70, 70, 70); }
@media (hover: hover) { .chips button:hover, #year:hover, .more:hover { opacity: 1; } }
#year, .temas select { -webkit-appearance: none; appearance: none; text-align: center; }
.temas { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.35rem; width: 100%; }
.temas select { font: inherit; color: inherit; background: rgb(40, 40, 40); border: none; border-radius: 8px; padding: 0.3rem 0.7rem; cursor: pointer; max-width: 100%; text-overflow: ellipsis; }
.temas select:first-child:has(option:checked[value=""]) { opacity: 0.6; }
#status { margin: 1.25rem 0 0.5rem; font-size: 0.95rem; min-height: 1.2em; }
.more { margin: 1.5rem 0 0; opacity: 0.8; padding: 0.5rem 1.25rem; }

#results, .cards { display: grid; gap: 0.75rem; width: 100%; }

/* result card: what the question asks, the start of its text, its figure, and how hard it is */
.qcard { padding: 0.9rem 1.1rem; }
.qcard-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 0.4rem; }
.label { display: inline-flex; flex-wrap: wrap; gap: 0 0.9em; font-size: 0.8em; opacity: 0.55; }
.qcard-body { display: flex; gap: 1rem; align-items: center; }
.qcard-words { flex: 1; min-width: 0; }
.qcard .ask { margin: 0 0 0.3rem; opacity: 1; font-size: 1rem; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.qcard .text { margin: 0; font-size: 0.9rem; line-height: 1.45; opacity: 0.55; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.qcard .topic { margin: 0.45rem 0 0; font-size: 0.8rem; opacity: 0.4; }
.qcard .q-math .katex { font-size: 1em; }

/* figure mosaic: square, cropped to fill; 2 = halves, 3 = one tall + two stacked, 4 = 2x2 */
.mosaic { flex: none; width: 6.5rem; height: 6.5rem; display: grid; gap: 3px; border-radius: 10px; overflow: hidden; background: rgb(40, 40, 40); }
.mosaic img { width: 100%; height: 100%; object-fit: cover; background: white; display: block; min-height: 0; }
.mosaic.m2 { grid-template-columns: 1fr 1fr; }
.mosaic.m3 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.mosaic.m3 img:first-child { grid-row: span 2; }
.mosaic.m4 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }

.meter { display: inline-flex; align-items: center; gap: 3px; flex: none; }
.meter i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255, 255, 255, 0.15); }
.meter i.on { background: rgba(255, 255, 255, 0.85); }
.meter b { font-weight: 400; font-size: 0.85rem; opacity: 0.7; margin-left: 0.4rem; }

/* question view */
#question-view .back { position: fixed; }
#question { width: 100%; text-align: left; }
.qhead { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 0.75rem; }
.qhead .label { font-size: 0.9em; }
.path { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0 0 0.9rem; }
.path button { font: inherit; font-size: 0.85rem; color: inherit; background: rgb(40, 40, 40); border: none; border-radius: 8px; padding: 0.25rem 0.6rem; cursor: pointer; opacity: 0.65; transition: opacity 0.2s; }
@media (hover: hover) { .path button:hover { opacity: 1; } }
.qbox { background: rgb(40, 40, 40); border-radius: 12px; padding: 1.25rem 1.5rem; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3); }
.sim-title { font-size: 1.2rem; margin: 2.5rem 0 1rem; }

.bank {
    --q-ink: rgb(240, 240, 240);
    --q-ink-2: rgba(255, 255, 255, 0.75);
    --q-ink-3: rgba(255, 255, 255, 0.5);
    --q-line: rgba(255, 255, 255, 0.14);
    --q-surface: transparent;
    --q-hover: rgba(255, 255, 255, 0.06);
    --q-accent: rgb(200, 200, 200);
    --q-ok: rgb(74, 187, 120);
    --q-ok-bg: rgba(74, 187, 120, 0.14);
    --q-bad: rgb(232, 98, 86);
    --q-bad-bg: rgba(232, 98, 86, 0.14);
    --q-font: "Inconsolata", monospace;
}
.bank .q-item { max-width: none; font-size: 1.05rem; line-height: 1.6; }
.bank .q-figure img { background: white; border-radius: 8px; padding: 0.4rem; box-sizing: border-box; }
.bank .q-selected { border-color: rgb(240, 240, 240); background: rgba(255, 255, 255, 0.08); }
.bank .q-selected .q-letter { background: rgb(240, 240, 240); border-color: rgb(240, 240, 240); color: rgb(18, 18, 18); }
/* after answering: the key in solid white, a wrong pick dashed; only the verdict text is colored */
.bank .q-correct, .bank .q-answered .q-correct:hover { border-color: rgb(240, 240, 240); background: rgba(255, 255, 255, 0.08); }
.bank .q-correct .q-letter { background: rgb(240, 240, 240); border-color: rgb(240, 240, 240); color: rgb(18, 18, 18); }
.bank .q-wrong, .bank .q-answered .q-wrong:hover { border: 1px dashed rgba(255, 255, 255, 0.45); background: none; }
.bank .q-wrong .q-letter { background: none; border-color: rgba(255, 255, 255, 0.45); color: inherit; text-decoration: line-through; }
.bank .q-submit { font: inherit; color: rgb(18, 18, 18); background: rgb(240, 240, 240); border: none; border-radius: 8px; padding: 0.5rem 1.25rem; cursor: pointer; }
.bank .q-submit:disabled { opacity: 0.35; cursor: default; }
.bank .q-actions { display: flex; align-items: center; gap: 1rem; margin-top: 1rem; }
.bank .q-verdict.ok { color: var(--q-ok); }
.bank .q-verdict.bad { color: var(--q-bad); }
.bank .q-table th { background: rgba(255, 255, 255, 0.06); }

@media (max-width: 480px) {
    body.bank { padding-top: 3.5rem; }
    .qbox { padding: 1rem; }
    .mosaic { width: 4.5rem; height: 4.5rem; }
    #question-view .back { position: absolute; }
}
