/* Koyu mod — core/functions/frontend/sb_dark_mode.php. Tüm kurallar html[data-theme="dark"] altındadır. */

/* Üst bar anahtarı: Açık | Koyu */
.nw-theme-switch { display: inline-flex; align-items: center; gap: 2px; padding: 2px; border-radius: 999px; background: rgba(255,255,255,.1); box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
.nw-theme-switch button { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 12px; border: 0; border-radius: 999px; background: transparent; color: rgba(255,255,255,.7); font: 600 12px/1 var(--nw-font); cursor: pointer; transition: background .15s, color .15s; }
.nw-theme-switch button i { font-size: 13px; }
.nw-theme-switch button:hover { color: #fff; }
.nw-theme-switch button:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
html:not([data-theme="dark"]) .nw-theme-switch [data-nw-theme-set="light"] { background: #fff; color: #111827; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
html[data-theme="dark"] .nw-theme-switch [data-nw-theme-set="dark"] { background: var(--nw-red); color: #fff; box-shadow: 0 2px 8px rgba(255,59,71,.45); }
.nw-logo .nw-logo-dark { display: none; }

html[data-theme="dark"] {
    color-scheme: dark;
    --nw-ink: #eef1f5;
    --nw-text: #c3c9d2;
    --nw-muted: #8c95a3;
    --nw-line: #252c37;
    --nw-soft: #1a2029;
    --nw-card: #131820;
    --nw-page: #0b0f15;
    --nw-dark: #0e131a;
    --nw-darker: #080b10;
    --sb-site-background-color: #0b0f15;
    --sb-primary: #131820;
    --sb-white: #131820;
    --sb-black: #eef1f5;
    --sb-font-body-color: #c3c9d2;
    --sb-font-heading-color: #eef1f5;
    --sb-font-main-menu-color: #e6e9ee;
    --sb-font-sub-menu-color: #c3c9d2;
    --sb-font-top-menu-color: #c3c9d2;
    --sb-font-mobile-menu-color: #e6e9ee;
    --sb-font-breadcrumb-color: #9aa3b0;
    --sb-font-slogan-color: #9aa3b0;
    --sb-border-color: #252c37;
    --sb-card-color: #131820;
    --sb-footer-background-color: #0e131a;
    --sb-footer-left-background-color: #131820;
    --sb-footer-text-color: #9aa3b0;
    --sb-footer-text-hover-color: #ffffff;
    --sb-footer-title-text-color: #eef1f5;
    --bs-body-bg: #0b0f15;
    --bs-body-color: #c3c9d2;
    --bs-heading-color: #eef1f5;
    --bs-border-color: #252c37;
    --bs-secondary-bg: #1a2029;
    --bs-tertiary-bg: #131820;
    --bs-emphasis-color: #fff;
    --bs-secondary-color: #8c95a3;
    --bs-link-color: #ff4d57;
    --bs-link-hover-color: #ff7a82;
}
html[data-theme="dark"] body { background: var(--nw-page); color: var(--nw-text); }
html[data-theme="dark"] h1, html[data-theme="dark"] h2, html[data-theme="dark"] h3,
html[data-theme="dark"] h4, html[data-theme="dark"] h5, html[data-theme="dark"] h6 { color: var(--nw-ink); }

/* Logo */
html[data-theme="dark"] .nw-logo:not(:has(.nw-logo-dark)) .nw-logo-light { filter: brightness(0) invert(1); }
html[data-theme="dark"] .nw-logo:has(.nw-logo-dark) .nw-logo-light { display: none; }
html[data-theme="dark"] .nw-logo .nw-logo-dark { display: block; }

/* Görseller: koyu zeminde hafif kısılır, üzerine gelince tam parlaklık */
html[data-theme="dark"] .nw-article-body img { filter: brightness(.92); }

/* Formlar */
html[data-theme="dark"] input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]),
html[data-theme="dark"] textarea, html[data-theme="dark"] select { background-color: var(--nw-soft); color: var(--nw-ink); border-color: var(--nw-line); }
html[data-theme="dark"] ::placeholder { color: #6b7380; }

/* Kaydırma çubuğu */
html[data-theme="dark"] { scrollbar-color: #2b333f var(--nw-page); }

/* Footer (Footer 4 / referans) */
html[data-theme="dark"] .sb-footer-reference { --sfr-bg: #0e131a; --sfr-heading: #eef1f5; --sfr-text: #9aa3b0; --sfr-border: #252c37; --sb-card-color: #131820; }

/* Mobil menü çekmecesi */
html[data-theme="dark"] .mm-drawer {
    --p-pale: #1d2531; --text: #eef1f5; --text2: #d6dbe2; --text3: #8c95a3; --text4: #6b7380;
    --bg: #0b0f15; --card: #131820; --card2: #161c25; --border: rgba(255,255,255,.07); --sep: rgba(255,255,255,.06);
    --shadow-sm: none; --shadow-md: 0 4px 16px rgba(0,0,0,.4); --shadow-lg: 0 8px 32px rgba(0,0,0,.5);
}

/* Masaüstü mega menü */
html[data-theme="dark"] .mm-close:hover { background: #1d2531; }
html[data-theme="dark"] .mm-trigger { border-color: rgba(255,255,255,.18); }
html[data-theme="dark"] .mm-trigger:hover { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.3); }
html[data-theme="dark"] .mega-posts-menu { background: var(--nw-card) !important; }
html[data-theme="dark"] .mega-row + .mega-row { border-top-color: var(--nw-line) !important; }
html[data-theme="dark"] .mega-col-card { color: var(--nw-text); border-color: var(--nw-line); }
html[data-theme="dark"] .mega-col-card:hover, html[data-theme="dark"] .mega-col--active .mega-col-card { background: rgba(255,255,255,.04); }
html[data-theme="dark"] .mega-col-icon, html[data-theme="dark"] .mega-post-cat-item button:hover { background: var(--nw-soft); }
html[data-theme="dark"] .mega-col-icon i { color: #fff; }   /* tema ana rengi (lacivert) koyu zeminde görünmüyor */
html[data-theme="dark"] .mega-col-card:hover .mega-col-icon, html[data-theme="dark"] .mega-col--active .mega-col-icon { background: var(--nw-red); }
html[data-theme="dark"] .mega-col-desc, html[data-theme="dark"] .mega-post-card-date, html[data-theme="dark"] .mega-posts-empty { color: var(--nw-muted); border-color: var(--nw-line); }
html[data-theme="dark"] .mega-col-header, html[data-theme="dark"] .mega-link-item a { border-color: var(--nw-line); }
html[data-theme="dark"] .mega-link-item a, html[data-theme="dark"] .mega-post-cat-item button { color: var(--nw-text); }
html[data-theme="dark"] .mega-post-cat-item button:hover, html[data-theme="dark"] .mega-post-card-title a { color: var(--nw-ink); }
html[data-theme="dark"] .mega-post-card-img { background: var(--nw-soft); }
html[data-theme="dark"] .mega-posts-next { background: var(--nw-soft); border-color: var(--nw-line); color: var(--nw-text); }

/* Koyu düğme/rozet zeminleri (açık modda mürekkep rengi) koyu modda yükseltilmiş yüzey olur */
html[data-theme="dark"] {
    --nw-solid: #2a3342;
    --nw-body: #d3d8df;
    --nw-red: #ff3b47;
}

/* Görsel üstündeki beyaz rozet ve düğmelerde yazı koyu kalsın */
html[data-theme="dark"] .nw-sidefeed-cat,
html[data-theme="dark"] .nw-sidevideos-play,
html[data-theme="dark"] .nw-postnav-arrow { color: #0b0f15; }
html[data-theme="dark"] .nw-postnav-arrow { background: #e6e9ee; box-shadow: 0 0 0 3px var(--nw-card) !important; }

/* Paylaşım düğmeleri: koyu zeminde marka renginin koyu tonu */
html[data-theme="dark"] .nw-share a { --brand-bg: color-mix(in srgb, var(--brand, #888) 20%, var(--nw-card)); }
html[data-theme="dark"] .nw-share-x { --brand: #e7e9ea; }
html[data-theme="dark"] .nw-share-x:hover { color: #0b0f15 !important; }

/* Sayfa başlığı / sayfa yolu (sb-breadcrumb.css) */
html[data-theme="dark"] .sbc { --bc-ink: #eef1f5; --bc-muted: #8c95a3; --bc-line: #252c37; }
html[data-theme="dark"] .sbc.sbc-1 { background: #11161e; border-color: #252c37; }
html[data-theme="dark"] .sbc.sbc-2 { background: var(--nw-card); }
html[data-theme="dark"] .sbc-icon { background: var(--nw-soft) !important; border-color: #2b333f !important; }
html[data-theme="dark"] .sbc-trail--dark .breadcrumb-item a { color: #9aa3b0; }
html[data-theme="dark"] .sbc-trail--dark .breadcrumb-item.active { color: var(--nw-ink); }

/* Açık tonlu degrade ve vurgu zeminleri */
html[data-theme="dark"] .nw-header .nw-category-nav { background: #0f141b; border-top-color: var(--nw-line); }
html[data-theme="dark"] .nw-sidetoday .is-canli { background: linear-gradient(90deg, rgba(255,59,71,.14), transparent 75%); }
html[data-theme="dark"] .nw-meta-chips .is-updated,
html[data-theme="dark"] .nw-sidenl-msg.is-error { background: rgba(255,59,71,.14); }
html[data-theme="dark"] .nw-update-note { background: rgba(245,158,11,.12); color: #fcd9a6; }
html[data-theme="dark"] .nw-comment.bypostauthor > .nw-comment-box { background: rgba(255,59,71,.06); box-shadow: inset 0 0 0 1px rgba(255,59,71,.3); }
html[data-theme="dark"] .nw-sidenl-msg { background: rgba(16,185,129,.14); color: #6ee7b7; }

/* Mobil menünün altındaki anahtar */
.mm-theme-toggle { display: flex; align-items: center; gap: 12px; width: 100%; margin-bottom: 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--card2); color: var(--text2); font: 600 15px/1 var(--font); cursor: pointer; }
.mm-theme-toggle i { font-size: 18px; }
.mm-theme-toggle span:first-of-type { flex: 1; text-align: left; }
.mm-theme-switch { position: relative; flex: none; width: 44px; height: 26px; border-radius: 999px; background: #cfd5de; transition: background .2s; }
.mm-theme-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s; }
.mm-theme-toggle[aria-pressed="true"] .mm-theme-switch { background: var(--nw-red, #e30613); }
.mm-theme-toggle[aria-pressed="true"] .mm-theme-switch::after { transform: translateX(18px); }
html[data-theme="dark"] .mm-header-logo img { filter: brightness(0) invert(1); }
