/* WISE Journal 2.4.1 — working per-journal color controls + Quick Links.
   The original 2.3.9 particleHero.less file is unchanged.
   No rules affect animation timing, particle pseudoelements, or backend OJS. */

/* Explicit palette mode only; Original preserves the existing site palette. */
html body.wise-palette-enabled {
  --wise-ui-primary: var(--wise-brand-primary);
  --wise-ui-secondary: var(--wise-brand-secondary);
  --wise-ui-accent: var(--wise-brand-accent);
}

/* THEME: Identity/background and text. Do not target ::before or ::after. */
html body.wise-palette-enabled.pkp_page_index .pkp_structure_head.kalidaka_header .kalidaka_journal_identity,
html body.wise-palette-enabled.pkp_page_index .kalidaka_journal_identity {
  background: linear-gradient(135deg,var(--wise-hero-start),var(--wise-hero-end)) !important;
}
html body.wise-palette-dark-hero.pkp_page_index .kalidaka_journal_identity .kalidaka_journal_title,
html body.wise-palette-dark-hero.pkp_page_index .kalidaka_journal_identity .kalidaka_journal_title a,
html body.wise-palette-dark-hero.pkp_page_index .kalidaka_journal_identity .kalidaka_journal_summary,
html body.wise-palette-dark-hero.pkp_page_index .kalidaka_journal_identity .kalidaka_journal_summary p,
html body.wise-palette-dark-hero.pkp_page_index .kalidaka_journal_identity .kalidaka_journal_identity_meta {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

/* Brand actions: force saved palette over hardcoded HJIE/legacy selectors. */
html body.wise-palette-enabled .pkp_structure_head.kalidaka_header.ltsm-hjie-home .kalidaka_journal_search_button,
html body.wise-palette-enabled .kalidaka_journal_search_button,
html body.wise-palette-enabled .kalidaka-overview-action--primary,
html body.wise-palette-enabled .kalidaka-home-submit,
html body.wise-palette-enabled .kalidaka-hero-submit {
  background: var(--wise-brand-primary) !important;
  border-color: var(--wise-brand-primary) !important;
  color: var(--wise-button-ink) !important;
  -webkit-text-fill-color: var(--wise-button-ink) !important;
}
html body.wise-palette-enabled .pkp_structure_head.kalidaka_header.ltsm-hjie-home .kalidaka_journal_search_button:hover,
html body.wise-palette-enabled .kalidaka_journal_search_button:hover,
html body.wise-palette-enabled .kalidaka-overview-action--primary:hover,
html body.wise-palette-enabled .kalidaka-home-submit:hover,
html body.wise-palette-enabled .kalidaka-hero-submit:hover {
  background: var(--wise-brand-secondary) !important;
  border-color: var(--wise-brand-secondary) !important;
}

/* Journal Insights: tabs and headings respond to saved scheme. */
html body.wise-palette-enabled .ltsm-discovery__heading h2,
html body.wise-palette-enabled .ltsm-discovery__country-summary strong,
html body.wise-palette-enabled .ltsm-discovery__panel-heading h3 {
  color: var(--wise-brand-primary) !important;
}
html body.wise-palette-enabled .ltsm-discovery__tab[aria-selected="true"] {
  color: var(--wise-brand-primary) !important;
}
html body.wise-palette-enabled .ltsm-discovery__tab[aria-selected="true"]::after,
html body.wise-palette-enabled .wise-research-collections__chip.is-active::after,
html body.wise-palette-enabled .wise-issue-heading-container::after {
  background: var(--wise-brand-accent) !important;
}
html body.wise-palette-enabled .ltsm-discovery__country-row.is-highlighted {
  box-shadow: inset 4px 0 0 var(--wise-brand-secondary) !important;
}
html body.wise-palette-enabled .wise-research-collections {
  --wise-rc-accent: var(--wise-brand-secondary);
  --wise-rc-ink: var(--wise-brand-primary);
}
html body.wise-palette-enabled #wise-research-collections h2,
html body.wise-palette-enabled #wise-research-collections h3,
html body.wise-palette-enabled #wise-research-collections .wise-research-collections__card h4 a,
html body.wise-palette-enabled #wise-research-collections .wise-research-collections__archive-link {
  color: var(--wise-brand-primary) !important;
}
html body.wise-palette-enabled #wise-research-collections .wise-research-collections__chip.is-active,
html body.wise-palette-enabled #wise-research-collections button.wise-research-collections__chip.is-active {
  border-color: var(--wise-brand-secondary) !important;
}

/* Primary nav accents, while keeping hover text readable on white. */
html body.wise-palette-enabled .pkp_structure_head.kalidaka_header .pkp_navigation_primary > li > a:hover,
html body.wise-palette-enabled .pkp_structure_head.kalidaka_header .pkp_navigation_primary > li > a:focus-visible,
html body.wise-palette-enabled .pkp_structure_head.kalidaka_header .pkp_navigation_primary > li > a:active {
  color: var(--wise-brand-primary) !important;
  -webkit-text-fill-color: var(--wise-brand-primary) !important;
  background: #eaf3f7 !important;
}

/* QUICK JOURNAL LINKS: independent color customizer.
   Rules are intentionally more specific than ltsmHjieHome.css !important
   declarations. They work even before the kalidaka-modern JS class is set. */
html body.wise-quicklinks-enabled.pkp_page_index .pkp_structure_head.kalidaka_header.ltsm-hjie-home .ltsm-hjie-quicklinks,
html body.wise-quicklinks-enabled.pkp_page_index .pkp_structure_head.kalidaka_header .ltsm-hjie-quicklinks,
html body.wise-quicklinks-enabled.pkp_page_index .ltsm-hjie-quicklinks {
  background: var(--wise-quick-bg) !important;
  border-color: var(--wise-quick-bg) !important;
  color: var(--wise-quick-ink) !important;
}
html body.wise-quicklinks-enabled.pkp_page_index .pkp_structure_head.kalidaka_header.ltsm-hjie-home .ltsm-hjie-quicklinks a,
html body.wise-quicklinks-enabled.pkp_page_index .pkp_structure_head.kalidaka_header.ltsm-hjie-home .ltsm-hjie-quicklinks a:link,
html body.wise-quicklinks-enabled.pkp_page_index .pkp_structure_head.kalidaka_header .ltsm-hjie-quicklinks a,
html body.wise-quicklinks-enabled.pkp_page_index .ltsm-hjie-quicklinks a,
html body.wise-quicklinks-enabled.pkp_page_index .ltsm-hjie-quicklinks a .fa {
  color: var(--wise-quick-ink) !important;
  -webkit-text-fill-color: var(--wise-quick-ink) !important;
}
html body.wise-quicklinks-enabled.pkp_page_index .pkp_structure_head.kalidaka_header.ltsm-hjie-home .ltsm-hjie-quicklinks a:hover,
html body.wise-quicklinks-enabled.pkp_page_index .pkp_structure_head.kalidaka_header.ltsm-hjie-home .ltsm-hjie-quicklinks a:focus-visible,
html body.wise-quicklinks-enabled.pkp_page_index .pkp_structure_head.kalidaka_header.ltsm-hjie-home .ltsm-hjie-quicklinks a:active,
html body.wise-quicklinks-enabled.pkp_page_index .pkp_structure_head.kalidaka_header .ltsm-hjie-quicklinks a:hover,
html body.wise-quicklinks-enabled.pkp_page_index .ltsm-hjie-quicklinks a:hover,
html body.wise-quicklinks-enabled.pkp_page_index .ltsm-hjie-quicklinks a:focus-visible {
  background: var(--wise-quick-hover-bg) !important;
  color: var(--wise-quick-hover-ink) !important;
  -webkit-text-fill-color: var(--wise-quick-hover-ink) !important;
}
html body.wise-quicklinks-enabled.pkp_page_index .pkp_structure_head.kalidaka_header.ltsm-hjie-home .ltsm-hjie-quicklinks a:hover .fa,
html body.wise-quicklinks-enabled.pkp_page_index .pkp_structure_head.kalidaka_header.ltsm-hjie-home .ltsm-hjie-quicklinks a:focus-visible .fa,
html body.wise-quicklinks-enabled.pkp_page_index .ltsm-hjie-quicklinks a:hover .fa,
html body.wise-quicklinks-enabled.pkp_page_index .ltsm-hjie-quicklinks a:focus-visible .fa {
  color: var(--wise-quick-hover-ink) !important;
  -webkit-text-fill-color: var(--wise-quick-hover-ink) !important;
}
html body.wise-quicklinks-enabled.pkp_page_index .ltsm-hjie-quicklinks a:focus-visible {
  outline: 2px solid currentColor !important;
  outline-offset: -3px !important;
}

/* No animation overrides: hero pseudo-elements retain original motion. */

/* Footer and issue accents also inherit the selected journal palette. */
html body.wise-palette-enabled .pkp_structure_footer_wrapper.kalidaka-footer {
  background: linear-gradient(135deg,var(--wise-brand-primary),var(--wise-brand-secondary)) !important;
  border-top-color: var(--wise-brand-accent) !important;
}
html body.wise-palette-enabled .kalidaka-footer__column h3::after,
html body.wise-palette-enabled .wise-issue-section-heading::after {
  background: var(--wise-brand-accent) !important;
}
html body.wise-palette-enabled .wise-issue-article__doi,
html body.wise-palette-enabled .wise-issue-article__title a:hover {
  color: var(--wise-brand-secondary) !important;
}
