/* وطن ۲۴ — حالت تاریک.
 * فعال‌سازی: صفت data-theme="dark" روی <html> (با دکمه سوییچ، یا طبق تنظیم سیستم کاربر).
 * بخش‌های «خودکار» با اسکریپت از روی style.css و home-gn.css ساخته شده‌اند؛
 * اگر در آن فایل‌ها پس‌زمینه سفید یا رنگ تأکید تازه‌ای اضافه کردید، همین‌جا هم اضافه کنید.
 */

/* انتقال نرم هنگام تغییر حالت (فقط لحظه‌ی کلیک) */
html.w-theme-anim,html.w-theme-anim *,html.w-theme-anim *::before,html.w-theme-anim *::after{transition:background-color .25s ease,color .25s ease,border-color .25s ease!important}
@media(prefers-reduced-motion:reduce){html.w-theme-anim,html.w-theme-anim *{transition:none!important}}

/* ---------- دکمه تغییر حالت ---------- */
.w-theme .w-ico-sun{display:none}
html[data-theme="dark"] .w-theme .w-ico-sun{display:inline-flex}
html[data-theme="dark"] .w-theme .w-ico-moon{display:none}
.w-theme .w-ico-sun,.w-theme .w-ico-moon{align-items:center;justify-content:center}
.w-theme--tb{flex:none;margin-inline-start:auto;width:36px;height:36px;border:0;background:none;color:#C9C9C9;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;padding:0}
.w-theme--tb:hover{color:#fff}
.w-tb__soc+.w-theme--tb{margin-inline-start:0}
.w-theme--tb svg{width:18px;height:18px}
@media(max-width:960px){.w-theme--tb{display:none}}

/* ---------- لوگوی تصویری ---------- */
.w-logo__d{display:none}

@media screen{
html[data-theme="dark"]{
  color-scheme:dark;
  --accent:var(--accent-lt,#FF6B6B);
  --ink:#F1F2F4;--text:#D9DCE1;--muted:#9BA2AD;
  --line:#2D323A;--line2:#252930;--ls:#4A505A;
  --bg:#0F1114;--soft:#171A1F;--tint:#2C1719;--surface:#171A1F;--dk:#08090B;
}

/* ===== خودکار: پس‌زمینه‌های سفید ===== */
html[data-theme="dark"] .w-btn,
html[data-theme="dark"] .w24 .button,
html[data-theme="dark"] .w-fld,
html[data-theme="dark"] .w24 .comment-form input[type=text],
html[data-theme="dark"] .w24 .comment-form input[type=email],
html[data-theme="dark"] .w24 .comment-form input[type=url],
html[data-theme="dark"] .w24 .comment-form textarea,
html[data-theme="dark"] .w-filter select,
html[data-theme="dark"] .w-hd,
html[data-theme="dark"] .w-search,
html[data-theme="dark"] .w-search input[type=search],
html[data-theme="dark"] .w-navbar,
html[data-theme="dark"] .w-tick,
html[data-theme="dark"] .page-numbers,
html[data-theme="dark"] .w-strip a,
html[data-theme="dark"] .w-empty__ic,
html[data-theme="dark"] .w-news input[type=email],
html[data-theme="dark"] .w-oc__panel,
html[data-theme="dark"] .w-tabbar,
html[data-theme="dark"] .w-actionbar,
html[data-theme="dark"] .gn-trend__nav button,
html[data-theme="dark"] .gn-nl input{background:var(--surface)}

/* ===== خودکار: رنگ تأکید (دکمه‌ها و برچسب‌ها) — بعد از بلوک سفید، تا برنده شود ===== */
html[data-theme="dark"] .w-btn--p,
html[data-theme="dark"] .w-logo__b,
html[data-theme="dark"] .w-search button,
html[data-theme="dark"] .w-tick__l,
html[data-theme="dark"] .w-page-h::before,
html[data-theme="dark"] .w-hash,
html[data-theme="dark"] .page-numbers.current,
html[data-theme="dark"] .w-strip a.on,
html[data-theme="dark"] .w-news button,
html[data-theme="dark"] .comment-form .submit,
html[data-theme="dark"] .gn-cat,
html[data-theme="dark"] .gn-trend__l,
html[data-theme="dark"] .gn-badge,
html[data-theme="dark"] .gn-nl button,
html[data-theme="dark"] .gn-pop__n,
html[data-theme="dark"] .gn-side .w-pop .w-num{background:var(--accent-base)}

/* ===== خودکار: حاشیه فیلدها ===== */
html[data-theme="dark"] .w-fld,
html[data-theme="dark"] .w24 .comment-form input[type=text],
html[data-theme="dark"] .w24 .comment-form input[type=email],
html[data-theme="dark"] .w24 .comment-form input[type=url],
html[data-theme="dark"] .w24 .comment-form textarea,
html[data-theme="dark"] .w-filter select,
html[data-theme="dark"] .w-search,
html[data-theme="dark"] .w-news input[type=email]{border-color:var(--ls)}

/* ===== دستی: جاهایی که --ink پس‌زمینه است (در حالت تاریک باید تیره بماند) ===== */
html[data-theme="dark"] .w-tb,
html[data-theme="dark"] .w-ft,
html[data-theme="dark"] .gn-ft,
html[data-theme="dark"] .w-video{background:var(--dk)}
html[data-theme="dark"] .w-ft,
html[data-theme="dark"] .gn-ft{border-top:1px solid var(--line)}
html[data-theme="dark"] .gn-hero,
html[data-theme="dark"] .gn-hero__tx{background:#14171C}

/* حالت hover دکمه‌ها (در حالت روشن مشکی می‌شدند) */
html[data-theme="dark"] .w-btn:hover,
html[data-theme="dark"] .w-btn--p:hover,
html[data-theme="dark"] a.page-numbers:hover,
html[data-theme="dark"] .w-tag:hover,
html[data-theme="dark"] .tagcloud a:hover,
html[data-theme="dark"] .w-search button:hover,
html[data-theme="dark"] .w-news button:hover,
html[data-theme="dark"] .comment-form .submit:hover,
html[data-theme="dark"] .gn-nl button:hover,
html[data-theme="dark"] .gn-trend__nav button:hover{background:#3A404A;border-color:#3A404A;color:#fff}

/* دکمه‌ها و حاشیه‌ها */
html[data-theme="dark"] .w-btn,
html[data-theme="dark"] .w24 .button,
html[data-theme="dark"] .page-numbers{border-color:var(--ls)}
html[data-theme="dark"] .w-btn--p{border-color:var(--accent-base)}
html[data-theme="dark"] .page-numbers.current{border-color:var(--accent-base)}
html[data-theme="dark"] .w-strip a.on{border-color:var(--accent-base)}
html[data-theme="dark"] .w-ad--ph{border-color:#3A404A}
html[data-theme="dark"] .gn-trend__nav button{border-color:#3A404A}
html[data-theme="dark"] .gn-nl input,
html[data-theme="dark"] .gn-side .w-news input[type=email]{border-color:var(--line)}
html[data-theme="dark"] .gn-loadmore::before,
html[data-theme="dark"] .gn-loadmore::after{background:var(--line)}
html[data-theme="dark"] .gn-pop__n{border-color:var(--bg)}

/* لوگوی متنی: بلوک اول سفید با نوشته‌ی تیره (مثل فوتر) */
html[data-theme="dark"] .w-logo__a,
html[data-theme="dark"] .w-ft .w-logo__a,
html[data-theme="dark"] .gn-ft .w-logo__a{background:#fff;color:#141414}

/* لوگوی تصویری */
html[data-theme="dark"] .w-logo--dk .w-logo__l{display:none}
html[data-theme="dark"] .w-logo--dk .w-logo__d{display:inline-block}
html[data-theme="dark"] .w-logo:not(.w-logo--dk) img{background:#fff;padding:4px 10px;border-radius:6px}

/* تگ‌ها، جایگزین تصویر و خبرنامه */
html[data-theme="dark"] .w-tag,
html[data-theme="dark"] .tagcloud a{background:#242830}
html[data-theme="dark"] .w-thumb,
html[data-theme="dark"] .w-ov{background:#1C2026}
html[data-theme="dark"] .w-ph{background:#232830;color:#98A0AB}
html[data-theme="dark"] .w-ph--1{background:#2A2F37}
html[data-theme="dark"] .w-ph--2{background:#30353E}
html[data-theme="dark"] .w-ph--3{background:#1F2329}
html[data-theme="dark"] .gn-side .w-news{background:var(--soft)!important}

/* متن */
html[data-theme="dark"] .w-lede{color:var(--text)}
html[data-theme="dark"] mark{background:#FFE98A;color:#141414}
html[data-theme="dark"] .w-exl{color:#9FB4E6}
}
