/* Dark mode — Community Bassanonet */

html.dark {
    color-scheme: dark;
    --text-muted: #a8b4cc;
    --text-meta: #8f9bb5;
    --grey-color: #a8b4cc;
    --yellow-color-2: rgba(235, 205, 70, 0.12);
    --form-input-border: rgba(255, 255, 255, 0.14);
    --form-input-bg: #161e36;
    --form-input-color: #eef2f8;
    --form-label-color: #a8b4cc;
    --form-focus-ring: 0 0 0 3px rgba(235, 205, 70, 0.18);
    --cm-page: #0f1528;
    --cm-surface: #161e36;
    --cm-surface-hover: #1f2a48;
    --cm-surface-active: #243052;
    --cm-ink: #eef2f8;
    --cm-line: rgba(255, 255, 255, 0.1);
}

html.dark body {
    background: var(--cm-page);
    color: var(--text-dark-color);
}

html.dark body.community-body {
    background: var(--cm-page);
    color: var(--cm-ink);
}

html.dark body.community-body::before {
    background: rgba(235, 205, 70, 0.14);
}

html.dark body.community-body #main {
    color: var(--cm-ink);
}

html.dark body.community-body #main :is(
    h1,
    h2,
    h3,
    .cm-page-title,
    .cm-detail-head h1,
    .cm-profile-name,
    .cm-home-box-head h2,
    .cm-rail-block h2,
    .cm-comments-head h2
) {
    color: var(--cm-ink);
}

html.dark body.community-body #main :is(
    .cm-stream-body h3 a,
    .cm-catalog-item h3 a,
    .cm-home-list-copy strong,
    .cm-person h3,
    .cm-person-link strong,
    .cm-breadcrumb a,
    .cm-detail-byline a strong
) {
    color: var(--cm-ink);
}

html.dark body.community-body #main :is(
    .cm-stream-body h3 a,
    .cm-catalog-item h3 a,
    .cm-home-list-item:hover strong,
    a.cm-person:hover h3,
    a.cm-person-link:hover strong,
    .cm-detail-byline a:hover strong
):hover {
    color: var(--yellow-color);
}

html.dark body.community-body .cm-stream-body p,
html.dark body.community-body .cm-detail-body,
html.dark body.community-body .cm-comment-body,
html.dark body.community-body .cm-intro,
html.dark body.community-body .cm-home-list-copy span,
html.dark body.community-body .cm-home-list-copy .cm-home-list-meta,
html.dark body.community-body .cm-home-list-copy .cm-preview-meta {
    color: #d5dceb;
}

html.dark body.community-body .cm-stream-meta,
html.dark body.community-body .cm-detail-meta,
html.dark body.community-body .cm-catalog-meta,
html.dark body.community-body .cm-rail-note,
html.dark body.community-body .cm-home-box-head p,
html.dark body.community-body .cm-person p {
    color: var(--text-muted);
}

/* Superfici bianche hardcoded */
html.dark body.community-body .cm-home-box,
html.dark body.community-body .cm-rail,
html.dark body.community-body .cm-panel,
html.dark body.community-body .cm-catalog-cards .cm-catalog-item,
html.dark body.community-body .cm-people-grid .cm-person {
    background: var(--cm-surface);
    border-color: var(--cm-line);
    box-shadow: none;
}

html.dark body.community-body .cm-stream-boxed .cm-stream-body {
    background: var(--cm-surface);
    border: 1px solid var(--cm-line);
}

html.dark body.community-body .cm-stream-boxed .cm-stream-body:hover {
    background: var(--cm-surface-hover);
}

html.dark body.community-body .cm-stream-dot {
    background: var(--cm-surface);
    border-color: var(--cm-line);
}

html.dark body.community-body .cm-detail.cm-panel .cm-detail-body {
    border-top-color: var(--cm-line);
}

html.dark body.community-body .cm-comment {
    border-bottom-color: var(--cm-line);
}

html.dark body.community-body .cm-comment-form textarea {
    background: var(--cm-surface);
    color: var(--cm-ink);
    border-color: var(--cm-line);
}

html.dark body.community-body .cm-comment-toolbar button {
    background: var(--cm-surface-hover);
    border-color: var(--cm-line);
    color: var(--cm-ink);
}

/* Filtri categoria */
html.dark body.community-body #main .cm-filters :is(a, button) {
    background: var(--cm-surface);
    border-color: var(--cm-line);
    color: var(--cm-ink);
}

html.dark body.community-body #main .cm-filters :is(a, button):hover,
html.dark body.community-body #main .cm-filters :is(a, button).is-active {
    background: var(--cm-surface-hover);
    color: var(--yellow-color);
}

html.dark body.community-body #main .cm-filters-select {
    background-color: var(--cm-surface);
    border-color: var(--cm-line);
    color: var(--cm-ink);
}
html.dark body.community-body #main .cm-filters-select-label {
    color: var(--cm-ink);
}

html.dark body.community-body .cm-comments-pages a:hover {
    background: var(--cm-surface-hover);
    color: var(--yellow-color);
}

html.dark body.community-body #main .cm-profile-tab-value {
    color: var(--yellow-color) !important;
}

html.dark body.community-body #main .cm-profile-tab-icon {
    color: var(--yellow-color);
}

html.dark body.community-body #main .cm-profile-actions .cm-btn.cm-btn-ghost,
html.dark body.community-body #main .cm-profile-actions a.cm-btn.cm-btn-ghost,
html.dark body.community-body #main .cm-profile-actions button.cm-btn.cm-btn-ghost {
    color: var(--yellow-color) !important;
    border-color: rgba(235, 205, 70, 0.45) !important;
    background: transparent !important;
}

html.dark body.community-body #main .cm-profile-actions .cm-btn.cm-btn-ghost:hover,
html.dark body.community-body #main .cm-profile-actions a.cm-btn.cm-btn-ghost:hover,
html.dark body.community-body #main .cm-profile-actions button.cm-btn.cm-btn-ghost:hover {
    color: var(--yellow-color) !important;
    border-color: var(--yellow-color) !important;
    background: rgba(235, 205, 70, 0.12) !important;
}

html.dark body.community-body #main .cm-profile-actions .cm-btn.cm-btn-ghost i {
    color: var(--yellow-color) !important;
}

html.dark input,
html.dark select,
html.dark textarea,
html.dark button:not(.header-icon-btn):not(.theme-toggle):not(.account-avatar-trigger):not(.account-panel-close):not(.apps-trigger):not(.password-toggle):not(.cm-btn):not(.cm-btn-primary):not(.cm-btn-accent):not(.cm-btn-ghost):not(.cm-btn-comment-post):not(.cm-cal-view-btn):not(.cm-comment-cancel):not(.cm-comment-reply-btn):not(.cm-mine):not(.cm-profile-tab) {
    background: var(--form-input-bg);
    color: var(--form-input-color);
    border-color: var(--form-input-border);
}

html.dark .theme-toggle[aria-pressed="true"] {
    background: rgba(235, 205, 70, 0.18);
    color: var(--yellow-color);
}

html.dark body.community-body .cm-horo-card,
html.dark body.community-body .cm-horo-pager a,
html.dark body.community-body .cm-horo-mini a {
    background: var(--cm-surface);
    border-color: var(--cm-line);
    color: var(--cm-ink);
}
html.dark body.community-body .cm-horo-card:hover,
html.dark body.community-body .cm-horo-pager a:hover,
html.dark body.community-body .cm-horo-mini a:hover,
html.dark body.community-body .cm-horo-mini a.is-active,
html.dark body.community-body .cm-horo-mini a.is-mine {
    background: var(--cm-surface-hover);
    border-color: rgba(235, 205, 70, 0.35);
}
html.dark body.community-body .cm-horo-card-copy strong,
html.dark body.community-body .cm-horo-detail-head h1,
html.dark body.community-body .cm-horo-lead,
html.dark body.community-body .cm-horo-luck dd,
html.dark body.community-body .cm-horo-aspects h2,
html.dark body.community-body .cm-horo-advice p,
html.dark body.community-body .cm-horo-pager strong,
html.dark body.community-body .cm-horo-rail-copy strong {
    color: var(--cm-ink);
}
html.dark body.community-body .cm-horo-teaser,
html.dark body.community-body .cm-horo-dates,
html.dark body.community-body .cm-horo-aspects p,
html.dark body.community-body .cm-horo-rail-copy span {
    color: #d5dceb;
}
html.dark body.community-body .cm-horo-luck > div {
    background: var(--cm-page);
}
html.dark body.community-body .cm-horo-advice {
    background: rgba(235, 205, 70, 0.08);
}
html.dark body.community-body .cm-horo-mine.is-active {
    background: rgba(235, 205, 70, 0.12);
    border-color: var(--yellow-color);
    color: var(--yellow-color) !important;
}
html.dark body.community-body .cm-horo-swatch {
    box-shadow: 0 0 0 2px var(--cm-surface), 0 0 0 3px rgba(255, 255, 255, 0.18);
}

html.dark body.community-body .cm-ad-unit {
    background: var(--cm-surface);
    border-color: rgba(255, 255, 255, 0.12);
    color: #8f9bb5;
}
html.dark body.community-body .cm-ad-slot > .adv,
html.dark body.community-body .cm-ad-leaderboard .adv,
html.dark body.community-body .cm-ad-billboard-inner > .adv {
    color: #8f9bb5;
}
html.dark body.community-body .cm-ad-billboard--footer {
    background: var(--cm-surface);
    border-top-color: var(--cm-line);
}
