/* One text family across classic Elementor, Atomic content and plugin controls.
 * Keep icon fonts and the WordPress admin bar independent. Elementor supplies ITSR Saira. */
html[data-itsr-site-theme="enabled"] body {
  --e-global-typography-primary-font-family: "ITSR Saira";
  --e-global-typography-secondary-font-family: "ITSR Saira";
  --e-global-typography-text-font-family: "ITSR Saira";
  --e-global-typography-accent-font-family: "ITSR Saira";
  font-family: "ITSR Saira", sans-serif;
}
html[data-itsr-site-theme="enabled"] body :is(
  h1, h2, h3, h4, h5, h6, p, a, li, dt, dd, figcaption, blockquote,
  strong, b, em, small, label, legend, button, input, textarea, select, option,
  .elementor-heading-title, .elementor-widget-text-editor, .e-heading-base, .e-paragraph-base,
  .e-n-tab-title-text, .e-n-accordion-item-title-text
):not(#wpadminbar *):not(.dashicons, .fa, .fas, .far, .fab, .fal, .fad, .eicon, .elementor-icon, [class^="eicon-"], [class*=" eicon-"], [class^="fa-"], [class*=" fa-"]) {
  font-family: "ITSR Saira", sans-serif !important;
}

.itsr-global-theme-switch {
  position: fixed;
  z-index: 1000;
  top: 16px;
  right: 16px;
  display: flex;
  gap: 4px;
  padding: 5px;
  border: 1px solid #bec9cf;
  border-radius: 9px;
  background: #fff8f2;
  box-shadow: 0 5px 18px rgb(0 0 0 / 16%);
}
.admin-bar .itsr-global-theme-switch { top: 48px; }
body:has(.itsr-machine-room) .itsr-global-theme-switch { display: none; }
.itsr-global-theme-switch button {
  border: 0 !important;
  border-radius: 5px;
  padding: 7px 10px;
  color: #172432 !important;
  background: transparent !important;
  font: 600 13px/1.3 "ITSR Saira", sans-serif;
  cursor: pointer;
}
.itsr-global-theme-switch button[aria-pressed="true"] { color: #fff !important; background: #336688 !important; }
.itsr-global-theme-switch button:focus-visible { outline: 2px solid #336688; outline-offset: 2px; }

html[data-itsr-site-theme="enabled"][data-itsr-theme="dark"] { color-scheme: dark; }
html[data-itsr-site-theme="enabled"][data-itsr-theme="dark"] body {
  --e-global-color-text: #eef5fb;
  --e-global-color-secondary: #eef5fb;
  background-color: #07111c !important;
  color: #eef5fb;
}
html[data-itsr-site-theme="enabled"][data-itsr-theme="dark"] .itsr-theme-surface {
  background-color: #0c1c2a !important;
}
html[data-itsr-site-theme="enabled"][data-itsr-theme="dark"] .itsr-theme-image-surface {
  background-color: #62788a !important;
  background-blend-mode: multiply !important;
}
html[data-itsr-site-theme="enabled"][data-itsr-theme="dark"] .itsr-theme-content :is(
  h1, h2, h3, h4, h5, h6, p, li, small, figcaption,
  .elementor-heading-title, .elementor-widget-text-editor, .e-heading-base, .e-paragraph-base,
  .e-n-tab-title-text, .e-n-accordion-item-title-text
):not(.itsr-contact-card *) { color: #eef5fb !important; }
html[data-itsr-site-theme="enabled"][data-itsr-theme="dark"] .itsr-theme-content a:not(.elementor-button):not(.e-button-base):not(.elementor-social-icon):not([data-contact-action]) {
  color: #9ac9e8 !important;
}
html[data-itsr-site-theme="enabled"][data-itsr-theme="dark"] .itsr-theme-content :is(.elementor-button, .e-button-base) {
  color: #eef5fb !important;
}
html[data-itsr-site-theme="enabled"][data-itsr-theme="dark"] .itsr-theme-content :is(.e-n-tab-title, [role="tab"], .e-n-accordion-item-title) {
  color: #eef5fb !important;
  background-color: #0c1c2a;
}
html[data-itsr-site-theme="enabled"][data-itsr-theme="dark"] .itsr-theme-content :is([role="tab"][aria-selected="true"], .e-n-tab-title[aria-selected="true"]) {
  background-color: #24455e;
  box-shadow: inset 0 -3px 0 #9ac9e8;
}
html[data-itsr-site-theme="enabled"][data-itsr-theme="dark"] .itsr-theme-content hr {
  border-color: #7894a8 !important;
  background-color: #7894a8 !important;
}
html[data-itsr-site-theme="enabled"][data-itsr-theme="dark"] .elementor-location-footer .elementor-social-icon {
  color: #eef5fb !important;
}
html[data-itsr-site-theme="enabled"][data-itsr-theme="dark"] .elementor-location-footer .elementor-social-icon svg { fill: #eef5fb; }
html[data-itsr-site-theme="enabled"][data-itsr-theme="dark"] :is(.itsr-site-navigation, .itsr-global-theme-switch) {
  background: #0c1c2a !important;
  border-color: #62788a;
}
html[data-itsr-site-theme="enabled"][data-itsr-theme="dark"] .itsr-site-navigation .menu-item > a {
  color: #eef5fb !important;
}
html[data-itsr-site-theme="enabled"][data-itsr-theme="dark"] .itsr-site-navigation :is(.current-menu-item, .current_page_item) > a {
  background: #24455e !important;
  color: #eef5fb !important;
}
html[data-itsr-site-theme="enabled"][data-itsr-theme="dark"] .itsr-global-theme-switch button { color: #eef5fb !important; }
html[data-itsr-site-theme="enabled"][data-itsr-theme="dark"] .itsr-global-theme-switch button:focus-visible { outline-color: #9ac9e8; }
html[data-itsr-site-theme="enabled"][data-itsr-theme="dark"] .itsr-site-navigation a:focus-visible { outline: 2px solid #9ac9e8; outline-offset: 2px; }
@media (max-width: 782px) {
  .itsr-global-theme-switch,
  .admin-bar .itsr-global-theme-switch { top: auto; right: 8px; bottom: 100px; }
}
