﻿/* Scoped to the public-site theme control; no global button overrides. */
.mode_toggle_wrap.esi-native-toggle { display: none !important; }
.esi-theme-picker {
  --esi-surface: #f4f6f5;
  --esi-border: #d5ddd8;
  --esi-text: #4a5750;
  --esi-hover: #e5ebe7;
  --esi-active-bg: #ffffff;
  --esi-active-text: #20583f;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 2px;
  padding: 4px;
  margin: 5px 0 5px 12px;
  border: 1px solid var(--esi-border);
  border-radius: 999px;
  background: var(--esi-surface);
  color: var(--esi-text);
  box-sizing: border-box;
  vertical-align: middle;
}
body.newsmatic_dark_mode .esi-theme-picker {
  --esi-surface: #222b26;
  --esi-border: #516159;
  --esi-text: #c9d4cd;
  --esi-hover: #344139;
  --esi-active-bg: #3d5044;
  --esi-active-text: #ffffff;
}
.esi-theme-picker button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 36px;
  min-height: 36px;
  width: auto;
  height: auto;
  margin: 0;
  padding: 8px;
  box-sizing: border-box;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--esi-text);
  box-shadow: none;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0;
  text-transform: none;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  appearance: none;
  transition: background-color 140ms ease, color 140ms ease, box-shadow 140ms ease;
}
.esi-theme-picker button[data-theme-mode="system"] { padding-inline: 10px; }
.esi-theme-picker button:hover { background: var(--esi-hover); color: var(--esi-active-text); }
.esi-theme-picker button[aria-pressed="true"] {
  background: var(--esi-active-bg);
  color: var(--esi-active-text);
  border-color: var(--esi-border);
  box-shadow: 0 1px 3px rgb(0 0 0 / 8%);
}
.esi-theme-picker button:focus-visible { outline: 2px solid var(--esi-active-text); outline-offset: 2px; }
.esi-theme-picker svg { display: block; width: 18px; height: 18px; flex: none; pointer-events: none; }
.esi-theme-picker button span { pointer-events: none; }
@media (pointer: coarse) {
  .esi-theme-picker button { min-width: 44px; min-height: 44px; }
}
@media (max-width: 480px) {
  .esi-theme-picker { margin-left: 6px; gap: 0; padding: 3px; }
}
@media (prefers-reduced-motion: reduce) {
  .esi-theme-picker button { transition: none; }
}
@media (forced-colors: active) {
  .esi-theme-picker { border-color: ButtonText; }
  .esi-theme-picker button[aria-pressed="true"] { border: 2px solid Highlight; }
}
/* Keep the existing navigation readable when automatic mode selects dark. */
body.newsmatic_dark_mode #site-navigation .nav-menu a,
body.newsmatic_dark_mode #site-navigation .menu-toggle,
body.newsmatic_dark_mode #site-navigation .menu_txt { color: #e1e8e3 !important; }
body.newsmatic_dark_mode #site-navigation .current_page_item > a,
body.newsmatic_dark_mode #site-navigation .nav-menu a:hover,
body.newsmatic_dark_mode #site-navigation .nav-menu a:focus-visible { color: #b3dbb8 !important; }
body.newsmatic_dark_mode #site-navigation .nav-menu ul { background-color: #17201b; }
body.newsmatic_dark_mode #newsmatic_menu_burger span { background-color: #e1e8e3 !important; }
@media (max-width: 380px) {
  .esi-theme-picker button[data-theme-mode="system"] span { display: none; }
}
