/* Medya X / Teknik kalite turu 2 / Acik-koyu tema tutarliligi */
:root {
    --mx-theme-page:#f8fafc;
    --mx-theme-card:#ffffff;
    --mx-theme-soft:#f1f5f9;
    --mx-theme-line:#dbe5e7;
    --mx-theme-text:#0f172a;
    --mx-theme-muted:#64748b;
}

html.theme-dark {
    color-scheme:dark;
    --mx-theme-page:#171717;
    --mx-theme-card:#2a2a2a;
    --mx-theme-soft:#232726;
    --mx-theme-line:#414746;
    --mx-theme-text:#f8fafc;
    --mx-theme-muted:#cbd5e1;
}

html.theme-dark body,
html.theme-dark main { background-color:var(--mx-theme-page); }

html.theme-dark :where(input,textarea,select) { color-scheme:dark; }
html.theme-dark select option { color:#f8fafc;background:#222; }

/* Okur hesabi daha once kullanilmayan html.dark secicisine bagliydi. */
html.theme-dark .mx-reader-shell {
    --mx-ink:#f1f5f9;
    --mx-muted:#b7c3d1;
    --mx-line:#414b4a;
}

html.theme-dark .mx-reader-card,
html.theme-dark .mx-reader-mini {
    color:var(--mx-theme-text);
    border-color:var(--mx-theme-line);
    background:var(--mx-theme-card);
}

html.theme-dark .mx-reader-empty {
    color:var(--mx-theme-text);
    border-color:#4c5d5b;
    background:linear-gradient(145deg,#242a29,#202524);
}

html.theme-dark .mx-reader-item,
html.theme-dark .mx-reader-category {
    color:var(--mx-theme-text);
    border-color:var(--mx-theme-line);
    background:#242827;
}

html.theme-dark .mx-reader-item:hover,
html.theme-dark .mx-reader-category:hover {
    border-color:#4da99e;
    background:#28312f;
}

html.theme-dark .mx-reader-input {
    color:#fff!important;
    -webkit-text-fill-color:#fff!important;
    border-color:#52605f!important;
    background:#202524!important;
}

html.theme-dark .mx-reader-input:focus {
    border-color:#5eead4!important;
    background:#1c2322!important;
}

html.theme-dark .mx-reader-btn.light {
    color:#d8fffa!important;
    border-color:#49726d;
    background:#263432;
}

html.theme-dark .mx-reader-count,
html.theme-dark .mx-collection-count {
    color:#b8fff5!important;
    background:#263b38;
}

html.theme-dark .mx-reader-danger { border-color:#704646; }
html.theme-dark .mx-reader-danger summary { color:#fca5a5!important; }

/* Kisisel akis ve koleksiyonlardaki bilgi/eylem yuzeyleri. */
html.theme-dark .mx-feed-privacy {
    color:#d5fff9!important;
    border-color:#35645f!important;
    background:#203532!important;
}

html.theme-dark .mx-feed-privacy :where(h2,p) {
    color:#d5fff9!important;
    -webkit-text-fill-color:#d5fff9!important;
}

html.theme-dark .mx-collection-link.is-active {
    color:#d5fff9!important;
    border-color:#2dd4bf;
    background:#203b37;
}

html.theme-dark .mx-collection-empty-icon {
    color:#99f6e4!important;
    background:linear-gradient(135deg,#23433e,#293735);
}

/* Bulten ve tek amacli islem sayfalari. */
html.theme-dark .mx-newsletter-shell>section {
    color:var(--mx-theme-text)!important;
    border:1px solid var(--mx-theme-line);
    background:var(--mx-theme-card)!important;
}

html.theme-dark .mx-newsletter-shell :where(h1,h2,label,p,span) {
    color:var(--mx-theme-text);
}

html.theme-dark .mx-newsletter-shell :where(input:not([type="checkbox"]),textarea,select) {
    color:#fff!important;
    -webkit-text-fill-color:#fff!important;
    border-color:#52605f!important;
    background:#202524!important;
}

html.theme-dark .mx-newsletter-shell [style*="#dcfce7" i],
html.theme-dark .mx-auth-card .bg-green-50 {
    color:#bbf7d0!important;
    background:#173c2b!important;
}

html.theme-dark .mx-newsletter-shell [style*="#fee2e2" i],
html.theme-dark .mx-auth-card .bg-red-50 {
    color:#fecaca!important;
    background:#482424!important;
}

html.theme-dark .mx-auth-card .bg-amber-50 {
    color:#fde68a!important;
    background:#493817!important;
}

/* Bildirim sayfalarinda semantik durum renkleri gece modunda da ayrisir. */
html.theme-dark .mx-pref-notice {
    color:#d7eeeb;
    border-color:#48605d;
    background:#25302f;
}

html.theme-dark .mx-pref-notice.ok,
html.theme-dark .mx-history-notice.ok {
    color:#bbf7d0!important;
    border-color:#387052!important;
    background:#173c2b!important;
}

html.theme-dark .mx-pref-notice.error,
html.theme-dark .mx-history-notice.error {
    color:#fecaca!important;
    border-color:#7f4545!important;
    background:#482424!important;
}

html.theme-dark .mx-history-item small,
html.theme-dark .mx-history-item time,
html.theme-dark .mx-history-control p,
html.theme-dark .mx-pref-head p,
html.theme-dark .mx-pref-master small,
html.theme-dark .mx-pref-breaking small,
html.theme-dark .mx-pref-back {
    color:var(--mx-theme-muted)!important;
    -webkit-text-fill-color:var(--mx-theme-muted)!important;
}

/* Haber, kategori, etiket, yazar ve arama ortak ikincil kontrolleri. */
html.theme-dark :where(.category-page,.tag-page,.search-page-shell,.post-page,.author-page,.authors-page)
    :where(.badge-gray,.bg-slate-100,.bg-slate-200) {
    color:#e2e8f0!important;
    border-color:var(--mx-theme-line)!important;
    background:var(--mx-theme-soft)!important;
}

html.theme-dark :where(.category-page,.tag-page,.author-page,.authors-page)
    :where(.category-badge,.author-page-link.is-active) {
    color:#fff!important;
    -webkit-text-fill-color:#fff!important;
}

html.theme-dark .post-page .mx-post-collection__select,
html.theme-dark .search-page-shell input[type="text"] {
    color:#fff!important;
    -webkit-text-fill-color:#fff!important;
    border-color:#52605f!important;
    background:#202524!important;
}

html.theme-dark .post-page .mx-post-collection__copy :where(strong,p),
html.theme-dark .post-page .mx-commercial-notice :where(strong,p) {
    color:#fff!important;
    -webkit-text-fill-color:#fff!important;
}

html.theme-dark :where(.mx-reader-shell,.mx-newsletter-shell,.mx-pref-shell,.mx-history)
    :where(input,textarea,select,button,a):focus-visible {
    outline:3px solid #fbbf24!important;
    outline-offset:3px!important;
}

@media (prefers-contrast:more) {
    html.theme-dark { --mx-theme-line:#697573;--mx-theme-muted:#e2e8f0; }
}
