/*
Theme Name: ZAX-TOON
Template: madara
Author: Lingin
Version: 1.0.1.0
Text Domain: madara-child
*/


:root{
  --mc-primary:#ff4d4f;
  --mc-secondary:#9c27b0;
  --mc-accent:#00bcd4;
  --mc-success:#22c55e;
  --mc-warning:#f59e0b;
  --mc-danger:#ef4444;
  --mc-info:#3b82f6;

  --mc-bg:#0b0c0f;
  --mc-surface:#101215;
  --mc-surface-2:#15181d;
  --mc-surface-3:#1b1f26;
  --mc-card-bg:#101215;
  --mc-header-bg:#0d0f12;
  --mc-footer-bg:#0d0f12;

  --mc-text:#ffffff;
  --mc-text-muted:#9aa3b2;
  --mc-link:#e5e7eb;
  --mc-link-hover:#ffffff;

  --mc-border:#2a2f36;
  --mc-highlight:#ffe082;

  --mc-cta-start:#ff5033;
  --mc-cta-end:#ff8a3d;
  --mc-pill-start:#ff6b4a;
  --mc-pill-end:#ff914d;

  --mc-gradient-cta: linear-gradient(180deg, var(--mc-cta-start), var(--mc-cta-end));
  --mc-gradient-pill: linear-gradient(180deg, var(--mc-pill-start), var(--mc-pill-end));
}


.text              { color: var(--mc-text) !important; }
.text-muted        { color: var(--mc-text-muted) !important; }
.text-primary      { color: var(--mc-primary) !important; }
.text-secondary    { color: var(--mc-secondary) !important; }
.text-accent       { color: var(--mc-accent) !important; }
.text-success      { color: var(--mc-success) !important; }
.text-warning      { color: var(--mc-warning) !important; }
.text-danger       { color: var(--mc-danger) !important; }
.text-info         { color: var(--mc-info) !important; }
.text-link         { color: var(--mc-link) !important; }
.text-link:hover   { color: var(--mc-link-hover) !important; }


.bg                { background: var(--mc-bg) !important; }
.bg-surface        { background: var(--mc-surface) !important; }
.bg-surface-2      { background: var(--mc-surface-2) !important; }
.bg-surface-3      { background: var(--mc-surface-3) !important; }
.bg-card           { background: var(--mc-card-bg) !important; }
.bg-header         { background: var(--mc-header-bg) !important; }
.bg-footer         { background: var(--mc-footer-bg) !important; }

.bg-primary        { background: var(--mc-primary) !important; color:#fff !important; }
.bg-secondary      { background: var(--mc-secondary) !important; color:#fff !important; }
.bg-accent         { background: var(--mc-accent) !important; color:#001018 !important; }
.bg-success        { background: var(--mc-success) !important; color:#021006 !important; }
.bg-warning        { background: var(--mc-warning) !important; color:#1b1300 !important; }
.bg-danger         { background: var(--mc-danger) !important; color:#2a0000 !important; }
.bg-info           { background: var(--mc-info) !important; color:#001332 !important; }


.bg-cta            { background: var(--mc-gradient-cta) !important; color:#fff !important; }
.bg-pill           { background: var(--mc-gradient-pill) !important; color:#fff !important; }


.bc                { border-color: var(--mc-border) !important; }
.bc-primary        { border-color: var(--mc-primary) !important; }
.bc-secondary      { border-color: var(--mc-secondary) !important; }
.bc-accent         { border-color: var(--mc-accent) !important; }
.bc-success        { border-color: var(--mc-success) !important; }
.bc-warning        { border-color: var(--mc-warning) !important; }
.bc-danger         { border-color: var(--mc-danger) !important; }
.bc-info           { border-color: var(--mc-info) !important; }


.outline-primary   { outline-color: var(--mc-primary) !important; }
.outline-accent    { outline-color: var(--mc-accent) !important; }
.caret-primary     { caret-color: var(--mc-primary) !important; }
.caret-accent      { caret-color: var(--mc-accent) !important; }


.fill-primary      { fill: var(--mc-primary) !important; }
.fill-accent       { fill: var(--mc-accent) !important; }
.stroke-primary    { stroke: var(--mc-primary) !important; }
.stroke-accent     { stroke: var(--mc-accent) !important; }


::selection{ background: color-mix(in oklab, var(--mc-primary) 35%, transparent); color:#fff; }

/* ==================== Dark/Light Mode Text Visibility Fixes ==================== */

/* Ensure body and HTML have proper text color */
html[data-theme="light"],
html[data-theme-mode="light"],
html[data-theme="light"] body,
html[data-theme-mode="light"] body,
body.light-mode {
  color: var(--mc-text, #212529) !important;
}

html[data-theme="dark"],
html[data-theme-mode="dark"],
html[data-theme="dark"] body,
html[data-theme-mode="dark"] body,
body.dark-mode {
  color: var(--mc-text, #e9ecef) !important;
}

/* ==================== WordPress Admin Bar Isolation ==================== */
/* Completely isolate admin bar from theme CSS - restore WordPress defaults */
#wpadminbar {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  min-width: 0 !important;
  z-index: 999999 !important;
  background: #23282d !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif !important;
  font-size: 13px !important;
  line-height: 2.46153846 !important;
  height: 32px !important;
  color: #a0a5aa !important;
}

#wpadminbar *,
#wpadminbar *::before,
#wpadminbar *::after {
  box-sizing: border-box !important;
}

#wpadminbar a,
#wpadminbar .ab-item,
#wpadminbar .ab-empty-item {
  color: #a0a5aa !important;
  text-decoration: none !important;
  font-size: 13px !important;
  line-height: 2.46153846 !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif !important;
}

#wpadminbar a:hover,
#wpadminbar .ab-item:hover,
#wpadminbar .ab-empty-item:hover {
  color: #00a0d2 !important;
}

#wpadminbar .ab-icon,
#wpadminbar .ab-icon::before {
  color: #a0a5aa !important;
  font-size: 20px !important;
}

#wpadminbar .ab-sub-wrapper,
#wpadminbar .ab-submenu {
  background: #32373c !important;
  box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2) !important;
}

#wpadminbar .ab-submenu .ab-item {
  color: #b4b9be !important;
}

#wpadminbar .ab-submenu .ab-item:hover {
  color: #00a0d2 !important;
  background: #2c3338 !important;
}

/* Navbar/Navigation Links - Always Visible */
.site-header,
.site-header *,
.frx-hd,
.frx-hd *,
.main-navbar,
.main-navbar *,
.frx-hd__nav,
.frx-hd__nav *,
.frx-hd__navwrap,
.frx-hd__navwrap *,
nav.navbar,
nav.navbar * {
  color: #212529 !important;
}

html[data-theme="dark"] .site-header,
html[data-theme-mode="dark"] .site-header,
html[data-theme="dark"] .site-header *,
html[data-theme-mode="dark"] .site-header *,
html[data-theme="dark"] .frx-hd,
html[data-theme-mode="dark"] .frx-hd,
html[data-theme="dark"] .frx-hd *,
html[data-theme-mode="dark"] .frx-hd *,
html[data-theme="dark"] .main-navbar,
html[data-theme-mode="dark"] .main-navbar,
html[data-theme="dark"] .main-navbar *,
html[data-theme-mode="dark"] .main-navbar *,
html[data-theme="dark"] .frx-hd__nav,
html[data-theme-mode="dark"] .frx-hd__nav,
html[data-theme="dark"] .frx-hd__nav *,
html[data-theme-mode="dark"] .frx-hd__nav *,
html[data-theme="dark"] .frx-hd__navwrap,
html[data-theme-mode="dark"] .frx-hd__navwrap,
html[data-theme="dark"] .frx-hd__navwrap *,
html[data-theme-mode="dark"] .frx-hd__navwrap *,
html[data-theme="dark"] nav.navbar,
html[data-theme-mode="dark"] nav.navbar,
html[data-theme="dark"] nav.navbar *,
html[data-theme-mode="dark"] nav.navbar * {
  color: var(--mc-text, #e9ecef) !important;
}

/* Navigation Menu Links */
.frx-hd__nav a,
.frx-hd__nav li a,
.main-navbar a,
.main-navbar li a,
.nav-menu a,
.nav-menu li a,
.menu-item a,
.nav-link,
.navbar-nav a,
header a,
.header a,
.site-header a {
  color: #212529 !important;
  transition: color 0.3s ease !important;
}

html[data-theme="dark"] .frx-hd__nav a,
html[data-theme-mode="dark"] .frx-hd__nav a,
html[data-theme="dark"] .frx-hd__nav li a,
html[data-theme-mode="dark"] .frx-hd__nav li a,
html[data-theme="dark"] .main-navbar a,
html[data-theme-mode="dark"] .main-navbar a,
html[data-theme="dark"] .main-navbar li a,
html[data-theme-mode="dark"] .main-navbar li a,
html[data-theme="dark"] .nav-menu a,
html[data-theme-mode="dark"] .nav-menu a,
html[data-theme="dark"] .nav-menu li a,
html[data-theme-mode="dark"] .nav-menu li a,
html[data-theme="dark"] .menu-item a,
html[data-theme-mode="dark"] .menu-item a,
html[data-theme="dark"] .nav-link,
html[data-theme-mode="dark"] .nav-link,
html[data-theme="dark"] .navbar-nav a,
html[data-theme-mode="dark"] .navbar-nav a,
html[data-theme="dark"] header a,
html[data-theme-mode="dark"] header a,
html[data-theme="dark"] .header a,
html[data-theme-mode="dark"] .header a,
html[data-theme="dark"] .site-header a,
html[data-theme-mode="dark"] .site-header a {
  color: var(--mc-link, #e5e7eb) !important;
}

.frx-hd__nav a:hover,
.frx-hd__nav li a:hover,
.main-navbar a:hover,
.main-navbar li a:hover,
.nav-menu a:hover,
.nav-menu li a:hover,
.menu-item a:hover,
.nav-link:hover,
.navbar-nav a:hover {
  color: var(--mc-link-hover, #000000) !important;
}

html[data-theme="dark"] .frx-hd__nav a:hover,
html[data-theme-mode="dark"] .frx-hd__nav a:hover,
html[data-theme="dark"] .frx-hd__nav li a:hover,
html[data-theme-mode="dark"] .frx-hd__nav li a:hover,
html[data-theme="dark"] .main-navbar a:hover,
html[data-theme-mode="dark"] .main-navbar a:hover,
html[data-theme="dark"] .main-navbar li a:hover,
html[data-theme-mode="dark"] .main-navbar li a:hover,
html[data-theme="dark"] .nav-menu a:hover,
html[data-theme-mode="dark"] .nav-menu a:hover,
html[data-theme="dark"] .nav-menu li a:hover,
html[data-theme-mode="dark"] .nav-menu li a:hover,
html[data-theme="dark"] .menu-item a:hover,
html[data-theme-mode="dark"] .menu-item a:hover,
html[data-theme="dark"] .nav-link:hover,
html[data-theme-mode="dark"] .nav-link:hover,
html[data-theme="dark"] .navbar-nav a:hover,
html[data-theme-mode="dark"] .navbar-nav a:hover {
  color: var(--mc-link-hover, #ffffff) !important;
}

/* Search Bar - Input Text */
.search-form input[type="text"],
.search-form input[type="search"],
.search-form input.search-field,
#blog-post-search input[type="text"],
#blog-post-search input[type="search"],
.frx-search-form-wrap input,
.search-navigation input,
.search-modal input,
.search-dialog input,
input.search-field,
input[type="search"] {
  color: var(--mc-text, #212529) !important;
  background-color: var(--mc-surface, #f8f9fa) !important;
  border-color: var(--mc-border, #dee2e6) !important;
}

html[data-theme-mode="dark"] .search-form input[type="text"],
html[data-theme-mode="dark"] .search-form input[type="search"],
html[data-theme-mode="dark"] .search-form input.search-field,
html[data-theme-mode="dark"] #blog-post-search input[type="text"],
html[data-theme-mode="dark"] #blog-post-search input[type="search"],
html[data-theme-mode="dark"] .frx-search-form-wrap input,
html[data-theme-mode="dark"] .search-navigation input,
html[data-theme-mode="dark"] .search-modal input,
html[data-theme-mode="dark"] .search-dialog input,
html[data-theme-mode="dark"] input.search-field,
html[data-theme-mode="dark"] input[type="search"] {
  color: var(--mc-text, #e9ecef) !important;
  background-color: var(--mc-surface, #1a1b23) !important;
  border-color: var(--mc-border, #495057) !important;
}

/* Search Placeholder */
.search-form input::placeholder,
#blog-post-search input::placeholder,
.frx-search-form-wrap input::placeholder,
.search-navigation input::placeholder,
.search-modal input::placeholder,
input.search-field::placeholder,
input[type="search"]::placeholder {
  color: var(--mc-text-muted, #6c757d) !important;
}

html[data-theme-mode="dark"] .search-form input::placeholder,
html[data-theme-mode="dark"] #blog-post-search input::placeholder,
html[data-theme-mode="dark"] .frx-search-form-wrap input::placeholder,
html[data-theme-mode="dark"] .search-navigation input::placeholder,
html[data-theme-mode="dark"] .search-modal input::placeholder,
html[data-theme-mode="dark"] input.search-field::placeholder,
html[data-theme-mode="dark"] input[type="search"]::placeholder {
  color: var(--mc-text-muted, #adb5bd) !important;
}

/* Latest Releases Content */
.latest-releases,
.latest-releases *,
.manga-listing,
.manga-listing *,
.manga-item,
.manga-item *,
.item-summary,
.item-summary *,
.post-title,
.post-title *,
.manga-card,
.manga-card *,
.item-title,
.item-title *,
.chapter-item,
.chapter-item *,
.chapter-list,
.chapter-list * {
  color: var(--mc-text, #212529) !important;
}

html[data-theme-mode="dark"] .latest-releases,
html[data-theme-mode="dark"] .latest-releases *,
html[data-theme-mode="dark"] .manga-listing,
html[data-theme-mode="dark"] .manga-listing *,
html[data-theme-mode="dark"] .manga-item,
html[data-theme-mode="dark"] .manga-item *,
html[data-theme-mode="dark"] .item-summary,
html[data-theme-mode="dark"] .item-summary *,
html[data-theme-mode="dark"] .post-title,
html[data-theme-mode="dark"] .post-title *,
html[data-theme-mode="dark"] .manga-card,
html[data-theme-mode="dark"] .manga-card *,
html[data-theme-mode="dark"] .item-title,
html[data-theme-mode="dark"] .item-title *,
html[data-theme-mode="dark"] .chapter-item,
html[data-theme-mode="dark"] .chapter-item *,
html[data-theme-mode="dark"] .chapter-list,
html[data-theme-mode="dark"] .chapter-list * {
  color: var(--mc-text, #e9ecef) !important;
}

/* Chapter Links */
.chapter-item a,
.chapter-list a,
.chapter-link,
.chapter-title,
.chapter-title a {
  color: var(--mc-link, #212529) !important;
}

html[data-theme-mode="dark"] .chapter-item a,
html[data-theme-mode="dark"] .chapter-list a,
html[data-theme-mode="dark"] .chapter-link,
html[data-theme-mode="dark"] .chapter-title,
html[data-theme-mode="dark"] .chapter-title a {
  color: var(--mc-link, #e5e7eb) !important;
}

/* Latest Releases — force white titles with theme hover */
.latest-releases .post-title,
.latest-releases .post-title a,
.latest-releases .item-title,
.latest-releases .item-title a,
.latest-releases .manga-item .post-title a,
.latest-releases .manga-card .post-title a {
  color: #fff !important;
  transition: color .2s ease;
}
.latest-releases .post-title a:hover,
.latest-releases .item-title a:hover,
.latest-releases .manga-item .post-title a:hover,
.latest-releases .manga-card .post-title a:hover {
  color: var(--mc-link-hover, var(--mc-primary)) !important;
}

/* General Content Text */
.page-content,
.page-content *,
.post-content,
.post-content *,
.entry-content,
.entry-content *,
.content-area,
.content-area *,
.site-content,
.site-content * {
  color: var(--mc-text, #212529) !important;
}

html[data-theme-mode="dark"] .page-content,
html[data-theme-mode="dark"] .page-content *,
html[data-theme-mode="dark"] .post-content,
html[data-theme-mode="dark"] .post-content *,
html[data-theme-mode="dark"] .entry-content,
html[data-theme-mode="dark"] .entry-content *,
html[data-theme-mode="dark"] .content-area,
html[data-theme-mode="dark"] .content-area *,
html[data-theme-mode="dark"] .site-content,
html[data-theme-mode="dark"] .site-content * {
  color: var(--mc-text, #e9ecef) !important;
}

/* Headings */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6,
.post-title,
.post-title a,
.entry-title,
.entry-title a {
  color: var(--mc-text, #212529) !important;
}

html[data-theme-mode="dark"] h1,
html[data-theme-mode="dark"] h2,
html[data-theme-mode="dark"] h3,
html[data-theme-mode="dark"] h4,
html[data-theme-mode="dark"] h5,
html[data-theme-mode="dark"] h6,
html[data-theme-mode="dark"] .h1,
html[data-theme-mode="dark"] .h2,
html[data-theme-mode="dark"] .h3,
html[data-theme-mode="dark"] .h4,
html[data-theme-mode="dark"] .h5,
html[data-theme-mode="dark"] .h6,
html[data-theme-mode="dark"] .post-title,
html[data-theme-mode="dark"] .post-title a,
html[data-theme-mode="dark"] .entry-title,
html[data-theme-mode="dark"] .entry-title a {
  color: var(--mc-text, #e9ecef) !important;
}

/* Paragraphs and General Text */
p, span, div, li, td, th, label {
  color: inherit !important;
}

/* Ensure links inherit but can be overridden */
a {
  color: var(--mc-link, #212529) !important;
}

html[data-theme="dark"] a,
html[data-theme-mode="dark"] a,
body.dark-mode a {
  color: var(--mc-link, #e5e7eb) !important;
}

a:hover {
  color: var(--mc-primary, #ff4d4f) !important;
}

html[data-theme="dark"] a:hover,
html[data-theme-mode="dark"] a:hover,
body.dark-mode a:hover {
  color: var(--mc-link-hover, #ffffff) !important;
}

/* ==================== Specific Component Fixes for Light Mode ==================== */

/* fns-title-link - Featured Novel Slider Title Links */
.fns-title-link {
  color: #212529 !important;
}

html[data-theme="dark"] .fns-title-link,
html[data-theme-mode="dark"] .fns-title-link,
body.dark-mode .fns-title-link {
  color: var(--mc-link, #e5e7eb) !important;
}

.fns-title-link:hover {
  color: var(--mc-primary, #ff4d4f) !important;
}

html[data-theme="dark"] .fns-title-link:hover,
html[data-theme-mode="dark"] .fns-title-link:hover,
body.dark-mode .fns-title-link:hover {
  color: var(--mc-link-hover, #ffffff) !important;
}

/* 927fx-title-link - Banner Slider Title Links */
[class~="927fx-title-link"],
.927fx-title-link {
  color: #212529 !important;
}

html[data-theme="dark"] [class~="927fx-title-link"],
html[data-theme-mode="dark"] [class~="927fx-title-link"],
body.dark-mode [class~="927fx-title-link"],
html[data-theme="dark"] .927fx-title-link,
html[data-theme-mode="dark"] .927fx-title-link,
body.dark-mode .927fx-title-link {
  color: var(--mc-text, #e9ecef) !important;
}

[class~="927fx-title-link"]:hover,
.927fx-title-link:hover {
  color: var(--mc-primary, #ff4d4f) !important;
}

html[data-theme="dark"] [class~="927fx-title-link"]:hover,
html[data-theme-mode="dark"] [class~="927fx-title-link"]:hover,
body.dark-mode [class~="927fx-title-link"]:hover,
html[data-theme="dark"] .927fx-title-link:hover,
html[data-theme-mode="dark"] .927fx-title-link:hover,
body.dark-mode .927fx-title-link:hover {
  color: var(--mc-link-hover, #ffffff) !important;
}

/* series-chapter-item - Chapter List Items */
.series-chapter-item {
  color: #212529 !important;
  /* Boxed Design - Light Theme */
  background: #f8f9fa !important;
  border: 1px solid #e9ecef !important;
  border-radius: 8px !important;
  padding: 4px 8px !important;
  margin-bottom: 4px !important;
  transition: all 0.2s ease !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
}

.series-chapter-item:hover {
  background: #ffffff !important;
  border-color: #dee2e6 !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08) !important;
  transform: translateY(-1px) !important;
}

html[data-theme="dark"] .series-chapter-item,
html[data-theme-mode="dark"] .series-chapter-item,
body.dark-mode .series-chapter-item {
  color: var(--mc-text, #e9ecef) !important;
  /* Boxed Design - Dark Theme */
  background: var(--mc-surface-2, #15181d) !important;
  border: 1px solid var(--mc-border, #2a2f36) !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
  padding: 4px 8px !important;
  margin-bottom: 4px !important;
}

html[data-theme="dark"] .series-chapter-item:hover,
html[data-theme-mode="dark"] .series-chapter-item:hover,
body.dark-mode .series-chapter-item:hover {
  background: var(--mc-surface-3, #1b1f26) !important;
  border-color: var(--mc-primary, #ff4d4f) !important;
  box-shadow: 0 2px 8px rgba(255, 77, 79, 0.15) !important;
}

.series-chapter-item:last-child {
  margin-bottom: 0 !important;
}

.series-chapter-item * {
  color: inherit !important;
}

.series-chapter-item a {
  color: #212529 !important;
  text-decoration: none !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  width: 100% !important;
}

html[data-theme="dark"] .series-chapter-item a,
html[data-theme-mode="dark"] .series-chapter-item a,
body.dark-mode .series-chapter-item a {
  color: var(--mc-link, #e5e7eb) !important;
}

.series-chapter-item a:hover {
  color: var(--mc-primary, #ff4d4f) !important;
  text-decoration: none !important;
}

html[data-theme="dark"] .series-chapter-item a:hover,
html[data-theme-mode="dark"] .series-chapter-item a:hover,
body.dark-mode .series-chapter-item a:hover {
  color: var(--mc-link-hover, #ffffff) !important;
  text-decoration: none !important;
}

/* General Link Fixes for Light Mode */
html[data-theme="light"] a,
html[data-theme-mode="light"] a,
body.light-mode a,
html[data-theme="light"] .nav-link,
html[data-theme-mode="light"] .nav-link,
body.light-mode .nav-link,
html[data-theme="light"] .menu-item a,
html[data-theme-mode="light"] .menu-item a,
body.light-mode .menu-item a,
html[data-theme="light"] header a,
html[data-theme-mode="light"] header a,
body.light-mode header a,
html[data-theme="light"] .header a,
html[data-theme-mode="light"] .header a,
body.light-mode .header a,
html[data-theme="light"] .site-header a,
html[data-theme-mode="light"] .site-header a,
body.light-mode .site-header a {
  color: #212529 !important;
}

html[data-theme="light"] a:hover,
html[data-theme-mode="light"] a:hover,
body.light-mode a:hover {
  color: var(--mc-primary, #ff4d4f) !important;
}

/* Ensure all text elements are visible in light mode */
html[data-theme="light"] body,
html[data-theme-mode="light"] body,
body.light-mode,
html[data-theme="light"] p,
html[data-theme-mode="light"] p,
body.light-mode p,
html[data-theme="light"] span,
html[data-theme-mode="light"] span,
body.light-mode span,
html[data-theme="light"] div,
html[data-theme-mode="light"] div,
body.light-mode div,
html[data-theme="light"] li,
html[data-theme-mode="light"] li,
body.light-mode li,
html[data-theme="light"] td,
html[data-theme-mode="light"] td,
body.light-mode td,
html[data-theme="light"] th,
html[data-theme-mode="light"] th,
body.light-mode th {
  color: #212529 !important;
}
