/* =============================================================================
   KARANLIK MOD — Türkiye Ajans
   html[data-theme="dark"] altında çalışır. Tercih: js/dark-mode.js
   Bu dosya tüm diğer stillerden SONRA yüklenir (functions.php, öncelik 999).
   ============================================================================= */

/* -----------------------------------------------------------------------------
   1) Düğme (her iki modda görünür)
   ----------------------------------------------------------------------------- */
.ta-theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  background: none;
  color: var(--white);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  border: 1.5px solid rgba(255,255,255,.6);
  border-radius: 50%;
  transition: background .2s, transform .3s;
}
.ta-theme-toggle:hover { background: rgba(255,255,255,.15); }
.ta-theme-toggle:active { transform: rotate(20deg) scale(.94); }
.ta-theme-toggle:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* Aydınlık modda ay, karanlık modda güneş görünür */
.ta-theme-toggle .ta-icon-sun { display: none; }
html[data-theme="dark"] .ta-theme-toggle .ta-icon-moon { display: none; }
html[data-theme="dark"] .ta-theme-toggle .ta-icon-sun  { display: inline-block; }

/* Mobil düğme masaüstünde gizli */
.ta-theme-toggle--mobile { display: none; }
@media (max-width: 768px) {
  .ta-theme-toggle--mobile { display: flex; width: 36px; height: 36px; font-size: 16px; }
}

/* Tema geçişi yumuşak olsun (hareket azaltma tercihine saygı) */
@media (prefers-reduced-motion: no-preference) {
  html.tajas-theme-anim,
  html.tajas-theme-anim body,
  html.tajas-theme-anim .news-item,
  html.tajas-theme-anim .single-post,
  html.tajas-theme-anim .tahc-section {
    transition: background-color .25s ease, color .25s ease;
  }
}

/* -----------------------------------------------------------------------------
   2) Değişkenler
   (--white metin rengi olarak da kullanıldığı için DEĞİŞTİRİLMEZ;
    kartlar ve formlar aşağıda tek tek koyulaştırılır.)
   ----------------------------------------------------------------------------- */
html[data-theme="dark"] {
  color-scheme: dark;

  --black:     #e6e8ec;   /* ana metin */
  --gray-bg:   #12141a;   /* sayfa zemini */
  --gray-line: #2f3441;   /* çizgiler */
  --blue:      #7db3ff;   /* bağlantılar */

  --dm-surface:   #1c1f27;  /* kart zemini */
  --dm-surface-2: #242833;  /* ikinci seviye zemin (input, blockquote vb.) */
  --dm-border:    #353b49;
  --dm-text:      #e6e8ec;
  --dm-muted:     #a3abb8;
  --dm-red-text:  #ff6b6b;  /* koyu zeminde okunur kırmızı */
}

html[data-theme="dark"],
html[data-theme="dark"] body {
  background: var(--gray-bg);
  color: var(--dm-text);
}

html[data-theme="dark"] ::selection { background: rgba(255, 107, 107, .35); color: #fff; }
html[data-theme="dark"] ::placeholder { color: #7d8594; opacity: 1; }

/* Header kırmızı kalır; koyu modda biraz daha sönük, göz yormaz */
html[data-theme="dark"] .ta-header-top { background: #a80000; }
html[data-theme="dark"] .ta-nav-list > li > a:hover,
html[data-theme="dark"] .ta-nav-list > li.current-menu-item > a { background: #8a0000; }
html[data-theme="dark"] .ta-nav-list > li > ul.sub-menu,
html[data-theme="dark"] .ta-search-dropdown,
html[data-theme="dark"] .ta-mobile-menu { background: #8a0000; }
html[data-theme="dark"] .ta-search-form input { background: #1c1f27; color: var(--dm-text); }
html[data-theme="dark"] .ta-search-form button { background: #6e0000; }

/* -----------------------------------------------------------------------------
   3) Ana sayfa: haber kartları, kategori blokları, kenar çubuğu
   ----------------------------------------------------------------------------- */
html[data-theme="dark"] .news-item,
html[data-theme="dark"] .news-item.size-1,
html[data-theme="dark"] .news-item.size-2,
html[data-theme="dark"] .news-item.size-3,
html[data-theme="dark"] .news-item.size-4,
html[data-theme="dark"] .tahc-section {
  background: var(--dm-surface);
  box-shadow: 0 2px 10px rgba(0,0,0,.35);
}
html[data-theme="dark"] .news-item:hover { box-shadow: 0 8px 22px rgba(0,0,0,.5); }
html[data-theme="dark"] .news-item h3 a { color: var(--blue); }
html[data-theme="dark"] .news-item h3 a:hover { color: var(--dm-red-text); }

html[data-theme="dark"] .manset-alti-area,
html[data-theme="dark"] .tajas-sidebar-placeholder {
  background: var(--dm-surface);
  border-color: var(--dm-border);
  color: var(--dm-muted);
}

html[data-theme="dark"] .tahc-head h2 a { color: var(--dm-text); }
html[data-theme="dark"] .tahc-head h2 a:hover,
html[data-theme="dark"] .tahc-more { color: var(--dm-red-text); }
html[data-theme="dark"] .tahc-more:hover { color: #ff9a9a; }
html[data-theme="dark"] .tahc-section h3,
html[data-theme="dark"] .tahc-section h4 { color: var(--dm-text); }
html[data-theme="dark"] .tahc-section a:hover h3,
html[data-theme="dark"] .tahc-section a:hover h4,
html[data-theme="dark"] .tahc-text a:hover { color: var(--dm-red-text); }
html[data-theme="dark"] .tahc-hero h3,
html[data-theme="dark"] .tahc-hero a:hover h3 { color: #fff !important; }
html[data-theme="dark"] .tahc-thumb,
html[data-theme="dark"] .tahc-row-thumb,
html[data-theme="dark"] .tahc-hero-img { background: var(--dm-surface-2); }
html[data-theme="dark"] .tahc-noimg { background: linear-gradient(135deg, #2a2f3b, #343b4a); }
html[data-theme="dark"] .tahc-text li { border-bottom-color: var(--dm-border); }
html[data-theme="dark"] .tahc-text-2col li { border-bottom-color: var(--dm-border) !important; }
html[data-theme="dark"] .tahc-text time { color: var(--dm-muted); }

html[data-theme="dark"] .tajas-sidebar .widget-title,
html[data-theme="dark"] .tajas-sidebar .widgettitle { color: var(--dm-text); }
html[data-theme="dark"] .tajas-sidebar .widget,
html[data-theme="dark"] .tajas-sidebar .widget a { color: var(--dm-text); }
html[data-theme="dark"] .tajas-sidebar .widget a:hover { color: var(--dm-red-text); }

/* Kategori / etiket / arama başlıkları */
html[data-theme="dark"] .category-title,
html[data-theme="dark"] .search-title,
html[data-theme="dark"] .grup-basligi { color: var(--dm-text); }
html[data-theme="dark"] .no-results { color: var(--dm-muted); }

/* Sayfalama */
html[data-theme="dark"] .tag-pagination .page-numbers,
html[data-theme="dark"] .pagination .page-numbers {
  background: var(--dm-surface-2);
  color: var(--blue);
}
html[data-theme="dark"] .tag-pagination .page-numbers:hover,
html[data-theme="dark"] .pagination .page-numbers:hover { background: #2f3646; }
html[data-theme="dark"] .tag-pagination .current,
html[data-theme="dark"] .pagination .current { background: var(--blue); color: #10131a; }

html[data-theme="dark"] .loading { color: var(--dm-muted); }

/* -----------------------------------------------------------------------------
   4) Arama çubuğu
   ----------------------------------------------------------------------------- */
html[data-theme="dark"] .tajas-search-bar {
  background: rgba(255,255,255,.03);
  border-bottom-color: var(--dm-border);
}
html[data-theme="dark"] .tajas-search-wrap {
  background: var(--dm-surface);
  border-color: var(--dm-border);
}
html[data-theme="dark"] .tajas-search-wrap:focus-within {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(255, 90, 90, .18);
}
html[data-theme="dark"] .tajas-search-icon,
html[data-theme="dark"] .tajas-voice-btn,
html[data-theme="dark"] .tajas-voice-status,
html[data-theme="dark"] .tajas-tags-label { color: var(--dm-muted); }
html[data-theme="dark"] .tajas-voice-btn { border-left-color: var(--dm-border); }
html[data-theme="dark"] .tajas-voice-btn:hover { color: var(--dm-red-text); }
html[data-theme="dark"] .tajas-search-input { color: var(--dm-text); }
html[data-theme="dark"] .tajas-search-input::placeholder { color: #7d8594; }
html[data-theme="dark"] .tajas-tag-pill {
  background: var(--dm-surface);
  border-color: var(--dm-border);
  color: var(--dm-text);
}
html[data-theme="dark"] .tajas-tag-pill:hover {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

/* -----------------------------------------------------------------------------
   5) Tek yazı & sayfa
   ----------------------------------------------------------------------------- */
html[data-theme="dark"] .single-post,
html[data-theme="dark"] .single-page,
html[data-theme="dark"] .post-taxonomies {
  background: var(--dm-surface);
  box-shadow: 0 2px 10px rgba(0,0,0,.35);
}
html[data-theme="dark"] .post-title { background: #a80000; }
html[data-theme="dark"] .post-meta-desktop,
html[data-theme="dark"] .post-meta-mobile {
  background: var(--dm-surface-2);
  color: var(--dm-muted);
}
html[data-theme="dark"] .post-content,
html[data-theme="dark"] .page-content { color: #d9dce2; }
html[data-theme="dark"] .post-content a,
html[data-theme="dark"] .page-content a { color: var(--blue); }
html[data-theme="dark"] .post-content h1,
html[data-theme="dark"] .post-content h2,
html[data-theme="dark"] .post-content h3,
html[data-theme="dark"] .post-content h4,
html[data-theme="dark"] .post-content h5,
html[data-theme="dark"] .post-content h6,
html[data-theme="dark"] .page-header,
html[data-theme="dark"] .page-header h1 { color: #f1f3f6; }
html[data-theme="dark"] .post-content blockquote {
  background: var(--dm-surface-2);
  color: #d9dce2;
  border-left-color: var(--dm-red-text);
}
html[data-theme="dark"] .post-content blockquote::before { color: var(--dm-red-text); }
html[data-theme="dark"] .post-content p.ilk-paragraf::first-letter { color: var(--blue); }
html[data-theme="dark"] .post-content hr { border-color: var(--dm-border); }
html[data-theme="dark"] .post-content table { border-color: var(--dm-border); }
html[data-theme="dark"] .post-content th,
html[data-theme="dark"] .post-content td { border-color: var(--dm-border); }
html[data-theme="dark"] .post-content th { background: var(--dm-surface-2); }
html[data-theme="dark"] .post-content pre,
html[data-theme="dark"] .post-content code {
  background: var(--dm-surface-2);
  color: #f1f3f6;
}
html[data-theme="dark"] .wp-caption-text,
html[data-theme="dark"] .post-content figcaption { color: var(--dm-muted); }

/* Görseller koyu zeminde çok parlak kalmasın (hafif kısma) */
html[data-theme="dark"] .post-content img,
html[data-theme="dark"] .news-item img,
html[data-theme="dark"] .featured-image { filter: brightness(.92); }

/* Sosyal paylaşım */
html[data-theme="dark"] .social-share {
  background: var(--dm-surface-2);
  border-color: var(--dm-border);
}
html[data-theme="dark"] .social-share h4 { color: var(--dm-text); }
html[data-theme="dark"] .social-share-list li a:hover {
  background: var(--dm-surface);
  color: var(--blue);
  border-color: var(--blue);
}

/* Kategori & etiket bağlantıları */
html[data-theme="dark"] .post-categories a,
html[data-theme="dark"] .post-tags a { color: var(--dm-red-text); }
html[data-theme="dark"] .post-categories a:hover,
html[data-theme="dark"] .post-tags a:hover { color: #ff9a9a; }

/* Uyarı kutusu */
html[data-theme="dark"] .warning-notice {
  background: #2e2616;
  border-left-color: #e0a030;
  color: #e9d6ae;
}

/* Bağış */
html[data-theme="dark"] .copy-btn { background: var(--dm-surface); color: var(--dm-red-text); }
html[data-theme="dark"] .copy-btn:hover { background: var(--dm-surface-2); }

/* Sayfa bağlantıları, yazı gezintisi */
html[data-theme="dark"] .post-navigation { border-color: var(--dm-border); }
html[data-theme="dark"] .nav-previous a,
html[data-theme="dark"] .nav-next a {
  color: var(--dm-red-text);
  border-color: var(--dm-red-text);
}
html[data-theme="dark"] .nav-previous a:hover,
html[data-theme="dark"] .nav-next a:hover {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}
html[data-theme="dark"] .page-links,
html[data-theme="dark"] .page-links-title { color: var(--dm-muted); }

/* -----------------------------------------------------------------------------
   6) Yorumlar
   ----------------------------------------------------------------------------- */
html[data-theme="dark"] .comments-section { border-top-color: var(--dm-border); }
html[data-theme="dark"] .comments-section h3,
html[data-theme="dark"] .comment-content { color: var(--dm-text); }
html[data-theme="dark"] .comment { border-bottom-color: var(--dm-border); }
html[data-theme="dark"] .comment-meta { color: var(--dm-muted); }
html[data-theme="dark"] .no-comments,
html[data-theme="dark"] .comments-closed {
  background: var(--dm-surface-2);
  color: var(--dm-muted);
}
html[data-theme="dark"] .comment-respond { background: var(--dm-surface-2); }
html[data-theme="dark"] .comment-respond label,
html[data-theme="dark"] .comment-reply-title { color: var(--dm-text); }
html[data-theme="dark"] .comment-form-comment textarea,
html[data-theme="dark"] .comment-form-author input,
html[data-theme="dark"] .comment-form-email input,
html[data-theme="dark"] .comment-form-url input {
  background: var(--dm-surface);
  border-color: var(--dm-border);
  color: var(--dm-text);
}
html[data-theme="dark"] .form-submit input { background: #b30000; }
html[data-theme="dark"] .form-submit input:hover { background: #cc0000; }

/* -----------------------------------------------------------------------------
   7) Slider, ticker, video şeridi
   ----------------------------------------------------------------------------- */
html[data-theme="dark"] .thumbnail-item { background: #232733; }
html[data-theme="dark"] .thumbnail-item.active,
html[data-theme="dark"] .thumbnail-item:hover { background: var(--red); }

/* "Açık" ticker teması koyu zeminde göz almasın */
html[data-theme="dark"] .tcwt-light {
  background: var(--dm-surface);
  color: var(--dm-text);
  border-color: var(--dm-border);
}
html[data-theme="dark"] .tcwt-light .tcwt-sk-block {
  background: linear-gradient(90deg, rgba(255,255,255,.06) 25%, rgba(255,255,255,.14) 37%, rgba(255,255,255,.06) 63%);
  background-size: 400% 100%;
}

/* Video şeridi: yönetici rengi (satır içi stil) korunur; sadece başlık şeridi netleşir */
html[data-theme="dark"] .tvs-title { background: #0c0e12; }

/* -----------------------------------------------------------------------------
   8) Üye haber ekleme formu
   ----------------------------------------------------------------------------- */
html[data-theme="dark"] .tms-form,
html[data-theme="dark"] .tms-login-box,
html[data-theme="dark"] .tms-success {
  background: var(--dm-surface);
  border-color: var(--dm-border);
  box-shadow: 0 2px 10px rgba(0,0,0,.35);
}
html[data-theme="dark"] .tms-field > label { color: var(--dm-text); }
html[data-theme="dark"] .tms-field input[type="text"],
html[data-theme="dark"] .tms-field textarea {
  background: var(--dm-surface-2);
  border-color: var(--dm-border);
  color: var(--dm-text);
}
html[data-theme="dark"] .tms-field input[type="text"]:focus,
html[data-theme="dark"] .tms-field textarea:focus {
  border-color: var(--dm-red-text);
  box-shadow: 0 0 0 3px rgba(255, 107, 107, .18);
}
html[data-theme="dark"] .tms-counter,
html[data-theme="dark"] .tms-note,
html[data-theme="dark"] .tms-clean-hint,
html[data-theme="dark"] .tms-drop-empty span,
html[data-theme="dark"] .tms-drop-empty small,
html[data-theme="dark"] .tms-preview-bar,
html[data-theme="dark"] .tms-login-box p,
html[data-theme="dark"] .tms-success p,
html[data-theme="dark"] .tms-undo-btn { color: var(--dm-muted); }
html[data-theme="dark"] .tms-stt-timer {
  background: var(--dm-surface-2);
  border-color: var(--dm-border);
  color: var(--dm-muted);
}
html[data-theme="dark"] .tms-stt-btn.is-recording {
  background: #3a1a1a;
  border-color: var(--dm-red-text);
  color: var(--dm-red-text);
}
html[data-theme="dark"] .tms-drop {
  background: var(--dm-surface-2);
  border-color: #4a5160;
}
html[data-theme="dark"] .tms-drop:hover,
html[data-theme="dark"] .tms-drop:focus { border-color: var(--dm-red-text); }
html[data-theme="dark"] .tms-drop.is-drag { background: #33202a; border-color: var(--dm-red-text); }
html[data-theme="dark"] .tms-drop.is-loading::after { background: rgba(18, 20, 26, .8); color: var(--dm-text); }
html[data-theme="dark"] .tms-preview img { background: var(--dm-surface-2); }
html[data-theme="dark"] .tms-field.has-error input[type="text"],
html[data-theme="dark"] .tms-field.has-error textarea,
html[data-theme="dark"] .tms-field.has-error .tms-drop { background: #2d1c1f; border-color: var(--dm-red-text); }
html[data-theme="dark"] .tms-error { color: var(--dm-red-text); }
html[data-theme="dark"] .tms-alert { background: #3a1a1a; border-color: #7a2b2b; color: #ffb4ae; }
html[data-theme="dark"] .tms-btn-light {
  background: var(--dm-surface-2);
  border-color: var(--dm-border);
  color: var(--dm-text);
}
html[data-theme="dark"] .tms-btn-light:hover { border-color: var(--dm-red-text); color: var(--dm-red-text); }
html[data-theme="dark"] .tms-btn-danger {
  background: var(--dm-surface-2);
  border-color: #7a2b2b;
  color: var(--dm-red-text);
}
html[data-theme="dark"] .tms-btn-danger:hover { background: #3a1a1a; }
html[data-theme="dark"] .tms-success > i { color: #4cd37b; }

/* -----------------------------------------------------------------------------
   9) Footer (zaten koyu; satır içi açık renkli tanıtım kutusu uyarlanır)
   ----------------------------------------------------------------------------- */
html[data-theme="dark"] footer { background: linear-gradient(135deg, #0e1015, #080a0d); }
html[data-theme="dark"] .ta-footer-promo {
  background: var(--dm-surface) !important;
  border-color: var(--dm-border) !important;
}
html[data-theme="dark"] .ta-footer-promo-title { color: #f1f3f6 !important; }
html[data-theme="dark"] .ta-footer-promo-text  { color: var(--dm-muted) !important; }

/* -----------------------------------------------------------------------------
   10) Kaydırma çubuğu (WebKit / Firefox)
   ----------------------------------------------------------------------------- */
html[data-theme="dark"] { scrollbar-color: #3a4152 var(--gray-bg); }
html[data-theme="dark"] ::-webkit-scrollbar { width: 12px; height: 12px; }
html[data-theme="dark"] ::-webkit-scrollbar-track { background: var(--gray-bg); }
html[data-theme="dark"] ::-webkit-scrollbar-thumb {
  background: #3a4152;
  border-radius: 6px;
  border: 2px solid var(--gray-bg);
}
html[data-theme="dark"] ::-webkit-scrollbar-thumb:hover { background: #4b546a; }
