/**
 * Dark theme extensions — complements style.css .dark-theme rules.
 * Activated via html.dark-theme (set by theme switcher + localStorage).
 */

html.dark-theme {
    color-scheme: dark;
    --black-color2: #0f172a;
    --light-color: #94a3b8;
}

/* Keep nav/footer dark bars dark (menu-area uses --title-dark) */
html.dark-theme {
    --title-dark: #0a0a0a;
}

html.dark-theme .menu-area {
    background-color: var(--title-dark) !important;
}

html.dark-theme .main-menu > ul > li > a {
    color: var(--white-color);
}

html.dark-theme .theme-switcher button {
    left: calc(100% - 24px);
}

/* Boxed layout outer shell */
html.dark-theme body.boxed {
    background-color: #121212;
}

html.dark-theme body.boxed #container {
    box-shadow: 0 0 48px rgba(0, 0, 0, 0.45);
}

/* Headers that ship with a static dark bar (layout 2/3/5) */
html.dark-theme .th-header.header-layout2,
html.dark-theme .th-header.header-layout5,
html.dark-theme .header-layout3 .header-top.dark-theme {
    --body-bg: #1e1e1e;
    --border-color: #3f3f46;
}

/* Light headers in dark mode */
html.dark-theme .header-layout1 .header-top,
html.dark-theme .header-layout4 .header-top {
    background-color: var(--body-bg);
    border-color: var(--border-color);
}

html.dark-theme .th-menu-area {
    background-color: #1a1a1a;
}

html.dark-theme .th-mobile-menu a {
    color: var(--body-color);
}

html.dark-theme .th-mobile-menu a[style*="color:#000"],
html.dark-theme .th-mobile-menu a[style*="color: #000"] {
    color: var(--body-color) !important;
}

/* Bootstrap & forms */
html.dark-theme .form-control,
html.dark-theme .form-select,
html.dark-theme textarea,
html.dark-theme .input-box {
    background-color: #2a2a2a;
    border-color: var(--border-color);
    color: var(--title-color);
}

html.dark-theme .form-control:focus,
html.dark-theme .form-select:focus,
html.dark-theme textarea:focus,
html.dark-theme .input-box:focus {
    background-color: #2f2f2f;
    border-color: #6b7280;
    color: var(--title-color);
}

html.dark-theme .form-control::placeholder,
html.dark-theme textarea::placeholder {
    color: #9ca3af;
}

html.dark-theme .quote-form-box,
html.dark-theme .contact-form-box,
html.dark-theme .woocommerce-form-login,
html.dark-theme .woocommerce-form-register {
    background-color: #262626;
    border-color: var(--border-color);
}

html.dark-theme .modal-content {
    background-color: #262626;
    border-color: var(--border-color);
    color: var(--body-color);
}

html.dark-theme .modal-header,
html.dark-theme .modal-footer {
    border-color: var(--border-color);
}

html.dark-theme .dropdown-menu {
    background-color: #262626;
    border-color: var(--border-color);
}

html.dark-theme .dropdown-item {
    color: var(--body-color);
}

html.dark-theme .dropdown-item:hover,
html.dark-theme .dropdown-item:focus {
    background-color: #333;
    color: var(--title-color);
}

html.dark-theme .pagination .page-link {
    background-color: #262626;
    border-color: var(--border-color);
    color: var(--body-color);
}

html.dark-theme .pagination .page-link:hover,
html.dark-theme .pagination .page-item.active .page-link {
    background-color: var(--theme-color);
    border-color: var(--theme-color);
    color: #fff;
}

/* Blog cards & sidebars */
html.dark-theme .blog-style2,
html.dark-theme .blog-style3,
html.dark-theme .blog-style4,
html.dark-theme .blog-style5,
html.dark-theme .blog-style6,
html.dark-theme .blog-style7,
html.dark-theme .blog-style8,
html.dark-theme .blog-style9,
html.dark-theme .th-blog,
html.dark-theme .sidebar-wrap,
html.dark-theme .widget,
html.dark-theme .widget_title {
    color: var(--body-color);
}

html.dark-theme .sidebar-wrap {
    background-color: transparent;
}

/* Sidebar widgets — one card per blueprint block (title + body together) */
html.dark-theme .sidebar-area > [class*="widget-blueprint-"] {
    --sidebar-widget-bg: #262626;
    background-color: var(--sidebar-widget-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.15rem 1.25rem 1.25rem;
}

html.dark-theme .sidebar-area [class*="widget-blueprint-"] .widget {
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    margin-bottom: 0 !important;
    padding: 0 !important;
}

html.dark-theme .sidebar-area [class*="widget-blueprint-"] .widget-body {
    padding-top: 0.25rem !important;
    padding-bottom: 0 !important;
}

html.dark-theme .sidebar-area [class*="widget-blueprint-"] .widget_title {
    margin-bottom: 1rem;
}

/* Title underline animation uses outline — must match widget card, not page body */
html.dark-theme .sidebar-area [class*="widget-blueprint-"] .widget_title::after {
    outline-color: var(--sidebar-widget-bg, #262626);
}

html.dark-theme .popup-subscribe .widget_title::after,
html.dark-theme .tt-popup-box .widget_title::after {
    outline-color: #262626;
}

html.dark-theme .sidebar-area .widget_title {
    border-color: var(--border-color);
    color: var(--title-color);
}

/* Cookie & subscribe overlays */
html.dark-theme .cookie-alert .rounded {
    border: 1px solid var(--border-color);
}

html.dark-theme .popup-subscribe {
    border: 1px solid var(--border-color);
}

/* Frontend shell / popups */
html.dark-theme .tt-popup-box {
    background-color: #262626;
    color: var(--body-color);
}

html.dark-theme .tt-popup-close-btn {
    background: rgba(255, 255, 255, 0.12);
    color: #f8fafc;
}

html.dark-theme .tt-popup-image-side {
    background-color: #1f2937;
}

/* Article (NewsPress) */
html.dark-theme .np-single-post-wrap {
    --np-text: #e2e8f0;
    --np-muted: #94a3b8;
    --np-border: #3f3f46;
    --np-bg-soft: #1f2937;
    --np-surface: #262626;
    --np-accent-soft: rgba(99, 102, 241, 0.18);
}

html.dark-theme .np-single-post-wrap .np-article-card,
html.dark-theme .np-single-post-wrap .np-share-rail,
html.dark-theme .np-single-post-wrap .np-author-box,
html.dark-theme .np-single-post-wrap .np-related-card,
html.dark-theme .np-single-post-wrap .np-toc,
html.dark-theme .np-single-post-wrap .np-reaction-bar,
html.dark-theme .np-single-post-wrap .np-meta-chip,
html.dark-theme .np-single-post-wrap .np-tag,
html.dark-theme .np-single-post-wrap .np-comment-card,
html.dark-theme .np-single-post-wrap .np-sidebar-card,
html.dark-theme .np-single-post-wrap .np-author-card.blog-author,
html.dark-theme .np-single-post-wrap .tnews-reaction-mothership-card,
html.dark-theme .np-single-post-wrap .tnews-reaction-mothership-card.tnews-comments-mothership-card,
html.dark-theme .np-single-post-wrap .np-related .blog-style1,
html.dark-theme .np-single-post-wrap .np-external-feed .blog-style1,
html.dark-theme .np-single-post-wrap .np-author-more__card {
    background: var(--np-surface) !important;
    border-color: var(--np-border) !important;
    color: var(--np-text);
}

html.dark-theme .np-single-post-wrap .np-external-feed__placeholder {
    background: linear-gradient(
        135deg,
        var(--np-bg-soft) 0%,
        color-mix(in srgb, var(--np-accent) 18%, var(--np-bg-soft)) 100%
    );
    color: var(--np-muted);
}

html.dark-theme .np-single-post-wrap .np-share-icons a,
html.dark-theme .np-single-post-wrap .np-share-icons-row a {
    background: var(--np-surface) !important;
    border-color: var(--np-border) !important;
    color: var(--np-muted) !important;
}

html.dark-theme .np-single-post-wrap .np-share-icons a:hover,
html.dark-theme .np-single-post-wrap .np-share-icons-row a:hover {
    background: var(--np-accent-soft) !important;
    border-color: var(--np-accent) !important;
    color: var(--np-accent) !important;
}

html.dark-theme .np-single-post-wrap .np-read-indicator__panel {
    background: var(--np-surface);
    border-color: var(--np-border);
}

html.dark-theme .np-single-post-wrap .np-read-indicator.is-complete .np-read-indicator__panel {
    background: linear-gradient(180deg, #262626 0%, #1a2e1f 100%);
    border-color: #166534;
}

html.dark-theme .np-single-post-wrap .np-article-title,
html.dark-theme .np-single-post-wrap .np-section-title,
html.dark-theme .np-single-post-wrap h1,
html.dark-theme .np-single-post-wrap h2,
html.dark-theme .np-single-post-wrap h3,
html.dark-theme .np-single-post-wrap h4 {
    color: var(--np-text);
}

html.dark-theme .np-single-post-wrap .np-article-body,
html.dark-theme .np-single-post-wrap .np-article-body p,
html.dark-theme .np-single-post-wrap .np-article-body li {
    color: #cbd5e1;
}

html.dark-theme .np-single-post-wrap .np-meta-line,
html.dark-theme .np-single-post-wrap .np-muted,
html.dark-theme .np-single-post-wrap .np-read-time {
    color: var(--np-muted);
}

html.dark-theme .np-single-post-wrap .np-toc a {
    color: #cbd5e1;
}

html.dark-theme .np-single-post-wrap blockquote {
    background: #1f2937;
    border-color: var(--np-accent);
    color: #e2e8f0;
}

html.dark-theme .np-single-post-wrap pre,
html.dark-theme .np-single-post-wrap code {
    background: #111827;
    color: #e5e7eb;
}

/* Comments (Reddit-style) */
html.dark-theme .reddit-comment-box,
html.dark-theme .reddit-comment-child-replies-box {
    background-color: #262626 !important;
    border-color: var(--border-color) !important;
}

html.dark-theme .reddit-comment-author,
html.dark-theme .reddit-comment-body,
html.dark-theme .reddit-comment-meta {
    color: var(--body-color) !important;
}

html.dark-theme .vote-trigger-btn:hover {
    background-color: #333 !important;
}

/* Forum — core surfaces */
html.dark-theme #forum-tw .forum-civis-block,
html.dark-theme #forum-tw .forum-civis-panel,
html.dark-theme #forum-tw .forum-civis-post,
html.dark-theme #forum-tw .forum-civis-compose,
html.dark-theme #forum-tw .forum-civis-member-hero,
html.dark-theme #forum-tw .forum-civis-member-stat-card,
html.dark-theme #forum-tw .forum-civis-podium__card,
html.dark-theme #forum-tw .forum-civis-tabs,
html.dark-theme #forum-tw .forum-dropdown-menu,
html.dark-theme #forum-tw .forum-civis-search-dropdown {
    background: #262626 !important;
    border-color: #3f3f46 !important;
    color: #e5e7eb;
}

html.dark-theme #forum-tw .forum-civis-block__head,
html.dark-theme #forum-tw .forum-civis-block__head--section,
html.dark-theme #forum-tw .forum-civis-post__user,
html.dark-theme #forum-tw .forum-civis-post__head,
html.dark-theme #forum-tw .forum-civis-post__foot,
html.dark-theme #forum-tw .forum-civis-compose__head,
html.dark-theme #forum-tw .forum-civis-member-table-head,
html.dark-theme #forum-tw .forum-civis-leader-head,
html.dark-theme #forum-tw .forum-civis-block__foot {
    background: #1f2937 !important;
    border-color: #3f3f46 !important;
    color: #d1d5db !important;
}

html.dark-theme #forum-tw .forum-civis-header__title,
html.dark-theme #forum-tw .forum-civis-thread-title,
html.dark-theme #forum-tw .forum-civis-row__title,
html.dark-theme #forum-tw .forum-civis-post__username,
html.dark-theme #forum-tw .forum-civis-member-link,
html.dark-theme #forum-tw .forum-civis-member-row__name,
html.dark-theme #forum-tw .forum-civis-top-user__name,
html.dark-theme #forum-tw .forum-civis-side-link__title,
html.dark-theme #forum-tw .forum-civis-latest__title,
html.dark-theme #forum-tw .forum-civis-stat__value,
html.dark-theme #forum-tw .forum-civis-member-hero__name,
html.dark-theme #forum-tw .forum-civis-podium__name,
html.dark-theme #forum-tw .forum-civis-leader-row__name,
html.dark-theme #forum-tw .forum-civis-activity-item__title,
html.dark-theme #forum-tw .forum-civis-search-hit__title,
html.dark-theme #forum-tw .forum-civis-section-link {
    color: #f3f4f6 !important;
}

html.dark-theme #forum-tw .forum-civis-header__sub,
html.dark-theme #forum-tw .forum-civis-row__desc,
html.dark-theme #forum-tw .forum-civis-latest__meta,
html.dark-theme #forum-tw .forum-civis-author,
html.dark-theme #forum-tw .forum-civis-post__content,
html.dark-theme #forum-tw .forum-civis-thread-meta,
html.dark-theme #forum-tw .forum-civis-stats-list__row dt,
html.dark-theme #forum-tw .forum-civis-member-row__username,
html.dark-theme #forum-tw .forum-civis-side-link__meta {
    color: #9ca3af !important;
}

html.dark-theme #forum-tw .forum-civis-row,
html.dark-theme #forum-tw .forum-civis-member-row,
html.dark-theme #forum-tw .forum-civis-leader-row {
    border-color: #3f3f46 !important;
}

html.dark-theme #forum-tw .forum-civis-row:hover,
html.dark-theme #forum-tw .forum-civis-member-row:hover,
html.dark-theme #forum-tw .forum-civis-leader-row:hover,
html.dark-theme #forum-tw .forum-civis-search-hit:hover,
html.dark-theme #forum-tw .forum-civis-cat-link:hover,
html.dark-theme #forum-tw .forum-civis-top-user:hover {
    background: #2d3748 !important;
}

html.dark-theme #forum-tw .forum-civis-top-user.is-leader {
    background: #422006 !important;
    border-color: #92400e !important;
}

html.dark-theme #forum-tw .forum-civis-top-user__link:hover .forum-civis-top-user__name {
    color: #fdba74 !important;
}

html.dark-theme #forum-tw .forum-civis-panel__title {
    color: #f3f4f6 !important;
}

html.dark-theme #forum-tw .forum-civis-side-cta {
    background: #374151 !important;
    border-color: #4b5563 !important;
    color: #e5e7eb !important;
}

html.dark-theme #forum-tw .forum-civis-side-cta:hover {
    background: #4b5563 !important;
    color: #fff !important;
}

html.dark-theme #forum-tw .forum-civis-search__input,
html.dark-theme #forum-tw .forum-civis-search__select,
html.dark-theme #forum-tw .forum-civis-side-search,
html.dark-theme #forum-tw .forum-civis-compose textarea,
html.dark-theme #forum-tw .tagify {
    background: #1f2937 !important;
    border-color: #4b5563 !important;
    color: #f3f4f6 !important;
}

html.dark-theme #forum-tw .forum-civis-btn--ghost {
    background: #374151 !important;
    border-color: #4b5563 !important;
    color: #e5e7eb !important;
}

html.dark-theme #forum-tw .forum-civis-btn--ghost:hover {
    background: #4b5563 !important;
}

html.dark-theme #forum-tw .forum-btn--ghost,
html.dark-theme #forum-tw .forum-btn--toolbar,
html.dark-theme #forum-tw .forum-vote,
html.dark-theme #forum-tw .forum-toggle {
    background: #374151 !important;
    border-color: #4b5563 !important;
    color: #d1d5db !important;
}

html.dark-theme #forum-tw .forum-toggle__icon {
    background: #1f2937 !important;
    border-color: #4b5563 !important;
    color: #9ca3af !important;
}

html.dark-theme #forum-tw .forum-civis-tab {
    color: #9ca3af !important;
}

html.dark-theme #forum-tw .forum-civis-tab:hover {
    background: #374151 !important;
    color: #e5e7eb !important;
}

html.dark-theme #forum-tw .forum-civis-tag,
html.dark-theme #forum-tw .forum-civis-post__tag,
html.dark-theme #forum-tw .forum-civis-cat-link__count,
html.dark-theme #forum-tw .forum-civis-cat-icon {
    background: #374151 !important;
    color: #d1d5db !important;
}

html.dark-theme #forum-tw .forum-civis-category-hero-icon {
    background: #262626 !important;
    border-color: #3f3f46 !important;
}

html.dark-theme #forum-tw .forum-civis-post__avatar,
html.dark-theme #forum-tw .forum-civis-member-row__avatar,
html.dark-theme #forum-tw .forum-civis-leader-row__avatar {
    border-color: #4b5563 !important;
    background: #1f2937;
}

html.dark-theme #forum-tw .forum-civis-post.is-deleted {
    background: #1f1f1f !important;
}

html.dark-theme .forum-civis-modal .forum-civis-modal__content {
    background: #262626;
    border-color: #3f3f46;
}

html.dark-theme .forum-civis-modal .forum-civis-modal__title {
    color: #f3f4f6;
}

html.dark-theme .forum-civis-modal .forum-civis-modal__text {
    color: #9ca3af;
}

html.dark-theme .forum-civis-modal .forum-civis-modal__actions {
    background: #1f2937;
    border-color: #3f3f46;
}

/* Tables */
html.dark-theme table {
    color: var(--body-color);
}

html.dark-theme .table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--body-color);
    --bs-table-border-color: var(--border-color);
}

html.dark-theme .table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: rgba(255, 255, 255, 0.03);
}

/* Toastr */
html.dark-theme #toast-container > .toast {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
}

/* Sidebar tag widgets */
html.dark-theme .sidebar-area .tagcloud {
    margin-right: 0;
    margin-bottom: 0;
}

html.dark-theme .sidebar-area .tagcloud .interactive-tag-item {
    background-color: rgba(255, 255, 255, 0.06) !important;
    border-color: var(--border-color) !important;
    color: #e2e8f0 !important;
    margin-right: 8px;
    margin-bottom: 8px;
}

html.dark-theme .sidebar-area .tagcloud .interactive-tag-item:hover {
    background-color: var(--theme-color) !important;
    border-color: var(--theme-color) !important;
    color: #fff !important;
}

html.dark-theme .sidebar-area .tag-badge-count {
    background-color: rgba(255, 255, 255, 0.12);
    color: #e2e8f0;
}

html.dark-theme .sidebar-area .interactive-tag-item:hover .tag-badge-count {
    background-color: rgba(255, 255, 255, 0.25);
    color: #fff;
}

/* Fallback for tags outside sidebar */
html.dark-theme .interactive-tag-item {
    background-color: #374151;
    border-color: #4b5563;
    color: #e2e8f0;
}

html.dark-theme .tag-badge-count {
    background-color: #4b5563;
    color: #e5e7eb;
}

/* Gallery & listing cards with smoke backgrounds */
html.dark-theme .bg-smoke,
html.dark-theme .smoke-bg,
html.dark-theme [class*="bg-smoke"] {
    background-color: var(--smoke-color) !important;
}

html.dark-theme .th-pagination a,
html.dark-theme .th-pagination span {
    background-color: #262626;
    border-color: var(--border-color);
    color: var(--body-color);
}

html.dark-theme .newsletter-form .form-control {
    background-color: #2a2a2a;
}

html.dark-theme .popup-subscribe .footer-text,
html.dark-theme .popup-subscribe .widget_title {
    color: inherit;
}

/* Article reactions (comment.css) */
html.dark-theme .np-single-post-wrap .tnews-reaction-mothership-card,
html.dark-theme .tnews-reaction-mothership-card {
    background: #262626 !important;
    border-color: #3f3f46 !important;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
}

html.dark-theme .tnews-reaction-main-title,
html.dark-theme .tnews-comments-section-subtitle {
    color: #e2e8f0 !important;
}

html.dark-theme .tnews-reaction-item-node {
    background: #1f2937 !important;
    border-color: #3f3f46 !important;
}

html.dark-theme .tnews-reaction-item-node:hover {
    background: #2d3748 !important;
    border-color: #4b5563 !important;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
}

html.dark-theme .tnews-reaction-item-node.active-node {
    background: rgba(99, 102, 241, 0.15) !important;
    border-color: var(--theme-color, #6366f1) !important;
}

html.dark-theme .tnews-reaction-label {
    color: #94a3b8 !important;
}

html.dark-theme .active-node .tnews-reaction-label {
    color: #e2e8f0 !important;
}

html.dark-theme .tnews-progress-track {
    background: #374151 !important;
}

html.dark-theme .tnews-comment-compose-card {
    background: linear-gradient(180deg, #1f2937 0%, #262626 100%) !important;
    border-color: #3f3f46 !important;
}

html.dark-theme .tnews-comments-thread-viewport {
    border-top-color: #3f3f46 !important;
}

html.dark-theme .reddit-comments-master-container .cmt-btn--load {
    background: #262626 !important;
    border-color: #4b5563 !important;
    color: #e2e8f0 !important;
}

html.dark-theme .reddit-comments-master-container .cmt-btn--load:hover:not(:disabled) {
    background: #374151 !important;
    border-color: var(--theme-color) !important;
    color: #fff !important;
}

html.dark-theme .np-single-post-wrap .reddit-comments-master-container.tnews-comments-inner-shell {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

html.dark-theme .reddit-comments-master-container .comment-score-lbl,
html.dark-theme .reddit-comments-master-container .comment-author-name-tag,
html.dark-theme .reddit-comments-master-container .comment-body-content-canvas {
    color: #e2e8f0 !important;
}

html.dark-theme .reddit-comments-master-container .comment-meta-header-row {
    color: #94a3b8 !important;
}

html.dark-theme .reddit-comments-master-container .comment-avatar-node-circle {
    background-color: #374151 !important;
    color: #e2e8f0 !important;
    border-color: #4b5563 !important;
}

html.dark-theme .reddit-comments-master-container .reddit-comment-child-replies-box {
    border-left-color: #3f3f46 !important;
}

html.dark-theme .reddit-comments-master-container .vote-trigger-btn:hover {
    background-color: #374151 !important;
}

html.dark-theme .tnews-comments-toolbar .input-group-text.bg-white {
    background-color: #2a2a2a !important;
    border-color: var(--border-color) !important;
    color: var(--body-color) !important;
}

html.dark-theme .tnews-comments-toolbar .form-control,
html.dark-theme .tnews-comments-toolbar .form-select {
    background-color: #2a2a2a !important;
    border-color: var(--border-color) !important;
    color: var(--title-color) !important;
}

html.dark-theme .badge.bg-light {
    background-color: #374151 !important;
    color: #cbd5e1 !important;
    border-color: #4b5563 !important;
}

html.dark-theme .np-single-post-wrap .text-muted {
    color: var(--np-muted) !important;
}

/* Sidebar poll widget */
html.dark-theme .abad-sidebar-poll {
    --sp-border: #3f3f46;
    --sp-text: #e2e8f0;
    --sp-muted: #94a3b8;
    background: #262626 !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25) !important;
}

html.dark-theme .abad-sidebar-poll__option-label {
    background: #1f2937 !important;
    border-color: #374151 !important;
    color: #e2e8f0 !important;
}

html.dark-theme .abad-sidebar-poll__option-label:hover {
    background: #2d3748 !important;
    border-color: #4b5563 !important;
}

html.dark-theme .abad-sidebar-poll__radio:checked + .abad-sidebar-poll__option-label {
    background: rgba(99, 102, 241, 0.18) !important;
    border-color: #6366f1 !important;
}

html.dark-theme .abad-sidebar-poll__question {
    color: #f1f5f9 !important;
}

html.dark-theme .abad-sidebar-poll__footer {
    background: #1f2937 !important;
    border-top-color: #3f3f46 !important;
}

/* Blog audio player */
html.dark-theme .abad-ap-stack {
    background: linear-gradient(145deg, #262626 0%, #1f2937 55%, #1e1b4b 100%) !important;
    border-color: #3f3f46 !important;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.35) !important;
}

html.dark-theme .abad-ap {
    --abad-ap-text: #e2e8f0;
    --abad-ap-muted: #94a3b8;
    --abad-ap-border: #3f3f46;
}

html.dark-theme .abad-ap__progress-track,
html.dark-theme .abad-ap__volume-track {
    background: #374151 !important;
}

html.dark-theme .abad-ap__btn--pill,
html.dark-theme .abad-ap__volume {
    background: #1f2937 !important;
    border-color: #4b5563 !important;
}

html.dark-theme .abad-ap__speed-menu {
    background: #262626 !important;
    border-color: #3f3f46 !important;
}

html.dark-theme .np-media-caption--below-audio {
    background: rgba(31, 41, 55, 0.9) !important;
    border-top-color: #3f3f46 !important;
    color: #cbd5e1;
}

html.dark-theme .np-single-post-wrap .abad-voice-block {
    background: linear-gradient(180deg, #262626 0%, #1f2937 100%);
    border-color: #3f3f46;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.04) inset,
        0 8px 24px rgba(0, 0, 0, 0.28);
}

html.dark-theme .np-single-post-wrap .abad-voice-block__caption {
    color: #e2e8f0;
}

/* Footer stays dark */
html.dark-theme .footer-wrapper {
    background-color: var(--title-dark) !important;
}

html.dark-theme .copyright-wrap {
    border-top-color: var(--border-color);
}

/* Footer widgets — reset sidebar/card styles that leak in */
html.dark-theme .footer-wrapper .widget-area,
html.dark-theme .footer-wrapper .widget-body,
html.dark-theme .footer-wrapper .footer-widget-block,
html.dark-theme .footer-wrapper [class*="widget-blueprint-"],
html.dark-theme .footer-wrapper .widget.footer-widget,
html.dark-theme .footer-wrapper .th-widget-about {
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

html.dark-theme .footer-wrapper .widget_title {
    color: var(--white-color) !important;
    padding-bottom: 0 !important;
    overflow: visible !important;
}

html.dark-theme .footer-wrapper .widget_title::before,
html.dark-theme .footer-wrapper .widget_title::after {
    display: none !important;
}

html.dark-theme .footer-wrapper .footer-widget.widget_nav_menu a,
html.dark-theme .footer-wrapper .footer-widget.widget_meta a,
html.dark-theme .footer-wrapper .footer-widget.widget_pages a,
html.dark-theme .footer-wrapper .footer-widget.widget_archive a,
html.dark-theme .footer-wrapper .footer-widget.widget_categories a,
html.dark-theme .footer-wrapper .footer-widget.widget_nav_menu a::before,
html.dark-theme .footer-wrapper .footer-widget.widget_meta a::before,
html.dark-theme .footer-wrapper .footer-widget.widget_pages a::before,
html.dark-theme .footer-wrapper .footer-widget.widget_archive a::before,
html.dark-theme .footer-wrapper .footer-widget.widget_categories a::before {
    background-color: transparent !important;
    transform: none !important;
}

html.dark-theme .footer-wrapper .footer-widget.widget_nav_menu a,
html.dark-theme .footer-wrapper .footer-widget.widget_meta a,
html.dark-theme .footer-wrapper .footer-widget.widget_pages a,
html.dark-theme .footer-wrapper .footer-widget.widget_archive a,
html.dark-theme .footer-wrapper .footer-widget.widget_categories a {
    color: var(--body-color) !important;
    padding: 0 0 0 18px !important;
    margin-bottom: 16px !important;
    border-radius: 0 !important;
    font-weight: 400 !important;
}

html.dark-theme .footer-wrapper .footer-widget.widget_nav_menu a::after,
html.dark-theme .footer-wrapper .footer-widget.widget_meta a::after,
html.dark-theme .footer-wrapper .footer-widget.widget_pages a::after,
html.dark-theme .footer-wrapper .footer-widget.widget_archive a::after,
html.dark-theme .footer-wrapper .footer-widget.widget_categories a::after {
    background-color: transparent !important;
    color: inherit !important;
}

html.dark-theme .footer-wrapper .footer-widget.widget_nav_menu a:hover,
html.dark-theme .footer-wrapper .footer-widget.widget_meta a:hover,
html.dark-theme .footer-wrapper .footer-widget.widget_pages a:hover,
html.dark-theme .footer-wrapper .footer-widget.widget_archive a:hover,
html.dark-theme .footer-wrapper .footer-widget.widget_categories a:hover {
    background-color: transparent !important;
    color: var(--theme-color) !important;
}

html.dark-theme .footer-wrapper .footer-widget.widget_nav_menu a:hover::before,
html.dark-theme .footer-wrapper .footer-widget.widget_meta a:hover::before,
html.dark-theme .footer-wrapper .footer-widget.widget_pages a:hover::before,
html.dark-theme .footer-wrapper .footer-widget.widget_archive a:hover::before,
html.dark-theme .footer-wrapper .footer-widget.widget_categories a:hover::before {
    transform: none !important;
}

html.dark-theme .footer-wrapper .footer-widget.widget_nav_menu a:hover::after,
html.dark-theme .footer-wrapper .footer-widget.widget_meta a:hover::after,
html.dark-theme .footer-wrapper .footer-widget.widget_pages a:hover::after,
html.dark-theme .footer-wrapper .footer-widget.widget_archive a:hover::after,
html.dark-theme .footer-wrapper .footer-widget.widget_categories a:hover::after {
    background-color: transparent !important;
    color: var(--theme-color) !important;
}

html.dark-theme .footer-wrapper .footer-widget li > span {
    color: var(--body-color) !important;
    background-color: transparent !important;
}

html.dark-theme .footer-wrapper .th-widget-about .about-text,
html.dark-theme .footer-wrapper .footer-text,
html.dark-theme .footer-wrapper .copyright-text {
    color: var(--body-color) !important;
}

html.dark-theme .footer-wrapper .sidebar-gallery {
    background: transparent !important;
}

html.dark-theme .footer-wrapper .sidebar-gallery a {
    color: var(--theme-color) !important;
}

html.dark-theme .footer-wrapper .th-social.style-black a {
    background-color: rgba(255, 255, 255, 0.08) !important;
    color: var(--white-color) !important;
    border: 1px solid rgba(255, 255, 255, 0.14);
}

html.dark-theme .footer-wrapper .th-social.style-black a:hover {
    background-color: var(--theme-color) !important;
    border-color: var(--theme-color) !important;
    color: var(--white-color) !important;
}

html.dark-theme .footer-wrapper .footer-links a,
html.dark-theme .footer-wrapper .footer-menu a {
    color: var(--body-color) !important;
}

html.dark-theme .footer-wrapper .footer-links a:hover,
html.dark-theme .footer-wrapper .footer-menu a:hover {
    color: var(--theme-color) !important;
}

html.dark-theme .sidebar-area .widget_nav_menu a,
html.dark-theme .sidebar-area .widget_meta a,
html.dark-theme .sidebar-area .widget_pages a,
html.dark-theme .sidebar-area .widget_archive a,
html.dark-theme .sidebar-area .widget_categories a,
html.dark-theme .sidebar-area .wp-block-categories a {
    background-color: var(--theme-color) !important;
    color: var(--title-color) !important;
}

html.dark-theme .sidebar-area .widget_nav_menu a::before,
html.dark-theme .sidebar-area .widget_meta a::before,
html.dark-theme .sidebar-area .widget_pages a::before,
html.dark-theme .sidebar-area .widget_archive a::before,
html.dark-theme .sidebar-area .widget_categories a::before,
html.dark-theme .sidebar-area .wp-block-categories a::before {
    background-color: var(--smoke-color) !important;
}

html.dark-theme .sidebar-area .widget_nav_menu a::after,
html.dark-theme .sidebar-area .widget_meta a::after,
html.dark-theme .sidebar-area .widget_pages a::after,
html.dark-theme .sidebar-area .widget_archive a::after,
html.dark-theme .sidebar-area .widget_categories a::after,
html.dark-theme .sidebar-area .wp-block-categories a::after {
    background-color: var(--body-bg) !important;
    color: var(--title-color) !important;
}

html.dark-theme .sidebar-area .widget_nav_menu a:hover,
html.dark-theme .sidebar-area .widget_meta a:hover,
html.dark-theme .sidebar-area .widget_pages a:hover,
html.dark-theme .sidebar-area .widget_archive a:hover,
html.dark-theme .sidebar-area .widget_categories a:hover,
html.dark-theme .sidebar-area .wp-block-categories a:hover {
    background-color: var(--theme-color) !important;
    color: var(--white-color) !important;
}

html.dark-theme .sidebar-area .widget_nav_menu a:hover::before,
html.dark-theme .sidebar-area .widget_meta a:hover::before,
html.dark-theme .sidebar-area .widget_pages a:hover::before,
html.dark-theme .sidebar-area .widget_archive a:hover::before,
html.dark-theme .sidebar-area .widget_categories a:hover::before,
html.dark-theme .sidebar-area .wp-block-categories a:hover::before {
    transform: scaleY(0);
}

html.dark-theme .sidebar-area .widget_nav_menu a:hover::after,
html.dark-theme .sidebar-area .widget_meta a:hover::after,
html.dark-theme .sidebar-area .widget_pages a:hover::after,
html.dark-theme .sidebar-area .widget_archive a:hover::after,
html.dark-theme .sidebar-area .widget_categories a:hover::after,
html.dark-theme .sidebar-area .wp-block-categories a:hover::after {
    background-color: var(--white-color) !important;
    color: var(--theme-color) !important;
}

html.dark-theme .sidebar-area .widget_categories > ul > li.has-children > .children {
    border-left-color: rgba(99, 102, 241, 0.45) !important;
}

/* Navigation widget (custom menu list) */
html.dark-theme .navigation-widget-menu-links .nav-link {
    color: var(--body-color) !important;
}

html.dark-theme .navigation-widget-menu-links .nav-link:hover {
    color: var(--theme-color) !important;
    background-color: rgba(255, 255, 255, 0.06) !important;
}

html.dark-theme .navigation-widget-menu-links .border-light {
    border-color: var(--border-color) !important;
}

/* Article tools — AI summary, reading settings, TOC */
html.dark-theme .np-single-post-wrap .tnews-ai-summary-mothership-card,
html.dark-theme .tnews-ai-summary-mothership-card {
    background: #262626 !important;
    border-color: #3f3f46 !important;
}

html.dark-theme .tnews-ai-summary-trigger-header {
    background: #1f2937 !important;
}

html.dark-theme .tnews-ai-summary-trigger-header:hover {
    background: #2d3748 !important;
}

html.dark-theme .tnews-ai-summary-main-label {
    color: #f1f5f9 !important;
}

html.dark-theme .tnews-ai-summary-content-drawer {
    background: #262626 !important;
}

html.dark-theme .tnews-ai-summary-body-inner-padded {
    border-top-color: #3f3f46 !important;
}

html.dark-theme .tnews-ai-summary-bullet-item {
    color: #cbd5e1 !important;
}

html.dark-theme .np-single-post-wrap .tnews-upper-tools-toolbar,
html.dark-theme .tnews-upper-tools-toolbar {
    background: #262626 !important;
    border-color: #3f3f46 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
}

html.dark-theme .tnews-upper-tools-title {
    color: #e2e8f0 !important;
}

html.dark-theme .tnews-tool-btn {
    background: #1f2937 !important;
    border-color: #4b5563 !important;
    color: #e2e8f0 !important;
}

html.dark-theme .tnews-tool-btn:hover,
html.dark-theme .tnews-tool-btn.active-tool,
html.dark-theme .np-single-post-wrap .tnews-tool-btn:hover,
html.dark-theme .np-single-post-wrap .tnews-tool-btn.active-tool {
    background: var(--theme-color) !important;
    color: #fff !important;
    border-color: var(--theme-color) !important;
}

html.dark-theme .np-single-post-wrap .tnews-toc-mothership-container,
html.dark-theme .tnews-toc-mothership-container {
    background: #262626 !important;
    border-color: #3f3f46 !important;
}

/* Article meta bar (votes, rating, QR) */
html.dark-theme .np-single-post-wrap .blog-meta,
html.dark-theme .np-article-header .blog-meta {
    color: var(--np-muted);
}

html.dark-theme .article-rating-widget-wrapper {
    background: #1f2937 !important;
    border-color: #3f3f46 !important;
}

html.dark-theme .article-rating-widget-wrapper > div {
    color: #e2e8f0 !important;
}

html.dark-theme #article-score-badge-counter {
    color: #e2e8f0 !important;
}

html.dark-theme .blog-info {
    color: var(--body-color) !important;
}

html.dark-theme .alignment-qr-telemetry-wrapper .dropdown-menu {
    background: #262626 !important;
}

html.dark-theme .alignment-qr-telemetry-wrapper .bg-light {
    background: #1f2937 !important;
    border-color: #3f3f46 !important;
}

/* Focus mode in dark theme */
html.dark-theme body.tnews-focus-mode-active #tnewsTargetArticleBodyContainer {
    background: #1e1e1e !important;
}
