/* Public question catalogue only. Loaded after the legacy page styles. */
body[data-questions-theme="dark"] {
    --q-surface: #111a30;
    --q-raised: #1a2942;
    --q-hover: #253956;
    --q-text: #f1f5ff;
    --q-muted: #c0cee3;
    --q-border: #7589a6;
    --q-primary: #1859bf;
    --q-selected: #203f68;
    --q-success-bg: #123d30;
    --q-success-text: #a6f3cc;
    --q-error-bg: #48252f;
    --q-error-text: #ffc1ca;
    --q-warning-bg: #443519;
    --q-warning-text: #ffe0a3;
    --quest-blue: #9cc7ff;
    color-scheme: dark;
}

body[data-questions-theme="dark"] :is(.filter-panel, .questoes-results__bar, .ds-question, .questoes-empty, .pagination, .questoes-auth__menu) {
    background: var(--q-surface) !important;
    border-color: var(--q-border) !important;
    color: var(--q-text) !important;
}
body[data-questions-theme="dark"] :is(.ds-question__body__statement, .ds-question__body__statement *, .ds-option__text, .ds-option__text *, .filter-group label, .questoes-auth__item, .questoes-auth__identity strong) {
    color: var(--q-text) !important;
}
body[data-questions-theme="dark"] :is(.questoes-breadcrumb, .questoes-breadcrumb span, .ds-question__header__bottom__info, .ds-question__header__top__subject, .pagination-meta, .adsense-inline-placeholder) {
    color: var(--q-muted) !important;
}
body[data-questions-theme="dark"] :is(.questoes-breadcrumb a, .ds-question__header__top__id) {
    color: #9cc7ff !important;
}
body[data-questions-theme="dark"] :is(.result-chip, .result-chip.is-fixed, .filter-panel__count, .ds-question__header__badge, .questoes-auth__avatar, .ds-option__letter) {
    background: var(--q-raised) !important;
    color: var(--q-text) !important;
    border-color: var(--q-border) !important;
}
body[data-questions-theme="dark"] :is(.filter-group input, .filter-group select, .filter-group option, .filter-clear, .comment-toggle, .page-link, .questoes-auth__button, .ds-option) {
    background: var(--q-raised) !important;
    color: var(--q-text) !important;
    border-color: var(--q-border) !important;
}
body[data-questions-theme="dark"] input::placeholder {
    color: var(--q-muted) !important;
    opacity: 1;
}
body[data-questions-theme="dark"] :is(.filter-clear:hover, .comment-toggle:hover, .page-link:not(.disabled):hover, .questoes-auth__item:hover, .ds-option:hover) {
    background: var(--q-hover) !important;
    color: var(--q-text) !important;
    border-color: #9cc7ff !important;
}
body[data-questions-theme="dark"] .ds-option:has(input:checked),
body[data-questions-theme="dark"] .ds-option:has(input:checked):hover {
    background: var(--q-selected) !important;
    border-color: #9cc7ff !important;
    box-shadow: inset 0 0 0 1px #9cc7ff;
}
body[data-questions-theme="dark"] .ds-option:has(input:checked) .ds-option__letter {
    background: var(--q-primary) !important;
    color: #ffffff !important;
}
body[data-questions-theme="dark"] :is(a, button, input, select):focus-visible,
body[data-questions-theme="dark"] .ds-option:has(input:focus-visible) {
    outline: 3px solid #9cc7ff !important;
    outline-offset: 3px;
}
body[data-questions-theme="dark"] :is(.filter-submit, .answer-button, .questoes-auth__link--primary, .lgpd-consent-btn.primary) {
    background: var(--q-primary) !important;
    color: #ffffff !important;
}
body[data-questions-theme="dark"] :is(.filter-submit:hover, .answer-button:not(:disabled):hover, .questoes-auth__link--primary:hover, .lgpd-consent-btn.primary:hover) {
    background: #124ba5 !important;
}
body[data-questions-theme="dark"] :is(.answer-button:disabled, .page-link.disabled) {
    background: var(--q-raised) !important;
    color: var(--q-muted) !important;
    border-color: var(--q-border) !important;
    box-shadow: none !important;
    opacity: 1;
    cursor: not-allowed;
}
body[data-questions-theme="dark"] .answer-feedback {
    background: var(--q-raised) !important;
    color: var(--q-text) !important;
}
body[data-questions-theme="dark"] .answer-feedback.is-success {
    background: var(--q-success-bg) !important;
    color: var(--q-success-text) !important;
    border-color: var(--q-success-text) !important;
}
body[data-questions-theme="dark"] .answer-feedback.is-error {
    background: var(--q-error-bg) !important;
    color: var(--q-error-text) !important;
    border-color: var(--q-error-text) !important;
}
body[data-questions-theme="dark"] :is(.answer-feedback.is-warning, .answer-comment) {
    background: var(--q-warning-bg) !important;
    color: var(--q-warning-text) !important;
    border-color: var(--q-warning-text) !important;
}
body[data-questions-theme="dark"] :is(.answer-feedback, .answer-comment) * {
    color: inherit !important;
}
body[data-questions-theme="dark"] .inline-ads-slot {
    background: var(--q-surface) !important;
    border-color: var(--q-border) !important;
}
/* Preserve contrast in diagrams rather than inverting their pixels. */
body[data-questions-theme="dark"] .ds-question__body__image {
    background: #ffffff;
}
body[data-questions-theme="dark"] .questoes-auth__bars,
body[data-questions-theme="dark"] .questoes-auth__bars::before,
body[data-questions-theme="dark"] .questoes-auth__bars::after,
body[data-questions-theme="dark"] .questoes-auth__bars span {
    background: var(--q-text);
}
body[data-questions-theme="dark"] :is(.ds-question, .questoes-results, .questoes-results__bar, .pagination-links) {
    min-width: 0;
}
body[data-questions-theme="dark"] :is(.ds-question__body__statement, .ds-option__text, .result-chip) {
    overflow-wrap: anywhere;
}
@media (max-width: 640px) {
    body[data-questions-theme="dark"] .pagination-links { flex-wrap: wrap; }
    body[data-questions-theme="dark"] .ds-question__body__options { margin-inline: 0; }
}
