/* ------------------------------------------------------------------
   Humans of Code — interface refit
   Accent #B3E418 sampled from the HoC logo mark.

   SCOPE, deliberately narrow:
   - Public site keeps its light theme. Only the accent changes.
   - The community's dark grounds are owned by the FluentCommunity
     customizer (Portal > Dark Mode) and are left alone — they're good.
     The customizer declares its tokens on <body>, which beats anything
     set on <html>, so we style components here rather than fight it.
   - FluentBoards has no customizer, so its dark tokens are set below.

   Remove by deleting wp-content/mu-plugins/hoc-refit-v3.php + hoc-refit/
   ------------------------------------------------------------------ */

:root{
  --hoc-lime:#B3E418;
  --hoc-lime-hi:#C8F03A;
  --hoc-lime-dim:rgba(179,228,24,.13);
  --hoc-ink:#0B0D09;
}

/* --- Public site accent: was #0062e3, stock Tecology blue -----------
   Set here rather than in theme.json, because tecology-fse-2024
   ships to every Tecology site.                                      */
:root{
  --wp--preset--color--accent:#B3E418;
  --wp--preset--color--accent-2:#C8F03A;
}

/* ==================================================================
   Community portal — components only, grounds untouched
   ================================================================== */

/* Primary actions carry the accent. Lime is a light hue, so the label
   must be dark ink; white on lime fails contrast badly. */
html.dark .el-button--primary,
html[data-color-mode="dark"] .el-button--primary,
.fcom_primary_btn,
.fcom_btn_primary{
  background-color:var(--hoc-lime) !important;
  border-color:var(--hoc-lime) !important;
  color:var(--hoc-ink) !important;
  font-weight:600;
}
html.dark .el-button--primary:hover,
html[data-color-mode="dark"] .el-button--primary:hover,
.fcom_primary_btn:hover,
.fcom_btn_primary:hover{
  background-color:var(--hoc-lime-hi) !important;
  border-color:var(--hoc-lime-hi) !important;
  color:var(--hoc-ink) !important;
}

/* Active sidebar item gets an accent rail — cheapest way to show
   "you are here" without recolouring the whole nav. */
html.dark .fcom_menu_item.fcom_active,
html.dark li.fcom_active > a,
html[data-color-mode="dark"] .fcom_menu_item.fcom_active,
html[data-color-mode="dark"] li.fcom_active > a{
  box-shadow:inset 2px 0 0 var(--hoc-lime);
}

/* ==================================================================
   FluentBoards — no customizer, so tokens are set directly.
   Dark tokens live on .fluent_theme_dark, .fluent_boards_theme_dark, .fbs-dark
   ================================================================== */

.fbs-dark,
.fluent_theme_dark,
.fluent_boards_theme_dark{
  --fbs-primary-color:var(--hoc-lime);
  --fbs-primary-button:var(--hoc-lime);
  --fbs-primary-button-color:var(--hoc-ink);
  --fbs-board-border-hover:var(--hoc-lime);

  --el-color-primary:var(--hoc-lime);
  --el-color-primary-light-3:var(--hoc-lime-hi);
  --el-color-primary-light-5:rgba(179,228,24,.5);
  --el-color-primary-light-7:rgba(179,228,24,.3);
  --el-color-primary-light-8:rgba(179,228,24,.2);
  --el-color-primary-light-9:var(--hoc-lime-dim);
}

.fbs-dark .el-button--primary,
.fluent_theme_dark .el-button--primary,
.fluent_boards_theme_dark .el-button--primary{
  --el-button-text-color:var(--hoc-ink);
  --el-button-hover-text-color:var(--hoc-ink);
  --el-button-active-text-color:var(--hoc-ink);
  font-weight:600;
}
