body.grimlock-dark-mode--on #preheader {
  color: var(--grimlock-preheader-color) !important;
  border-top-color: var(--grimlock-preheader-border-top-color) !important;
  border-bottom-color: var(--grimlock-preheader-border-bottom-color) !important;
}

body.grimlock-dark-mode--on #preheader .region__inner {
  background-color: var(--grimlock-preheader-background-color) !important;
}

body.grimlock-dark-mode--on #custom_header {
  color: var(--grimlock-custom-header-title-color) !important;
  border-top-color: var(--grimlock-custom-header-border-top-color) !important;
  border-bottom-color: var(--grimlock-custom-header-border-bottom-color) !important;
}

body.grimlock-dark-mode--on #custom_header .region__inner {
  background-color: var(--grimlock-custom-header-background-color) !important;
}

body.grimlock-dark-mode--on #custom_header .region__inner .grimlock-section__title {
  color: var(--grimlock-custom-header-title-color) !important;
}

body.grimlock-dark-mode--on #custom_header .region__inner .grimlock-section__subtitle {
  color: var(--grimlock-custom-header-subtitle-color) !important;
}

body.grimlock-dark-mode--on #prefooter {
  color: var(--grimlock-prefooter-color) !important;
  border-top-color: var(--grimlock-prefooter-border-top-color) !important;
  border-bottom-color: var(--grimlock-prefooter-border-bottom-color) !important;
}

body.grimlock-dark-mode--on #prefooter .region__inner {
  background-color: var(--grimlock-prefooter-background-color) !important;
}

body.grimlock-dark-mode--on #footer {
  color: var(--grimlock-footer-color) !important;
  border-top-color: var(--grimlock-footer-border-top-color) !important;
  border-bottom-color: var(--grimlock-footer-border-bottom-color) !important;
}

body.grimlock-dark-mode--on #footer .region__inner {
  background-color: var(--grimlock-footer-background-color) !important;
}

button.grimlock-dark-mode__toggle {
  width: 50px;
  height: 50px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

button.grimlock-dark-mode__toggle:not(.grimlock-dark-mode__toggle--navigation):not(.grimlock-dark-mode__toggle--shortcode) {
  position: fixed;
  z-index: 10000;
}

button.grimlock-dark-mode__toggle:not(.grimlock-dark-mode__toggle--navigation):not(.grimlock-dark-mode__toggle--shortcode).grimlock-dark-mode__toggle--bottom-left {
  bottom: 20px;
  left: 20px;
}

button.grimlock-dark-mode__toggle:not(.grimlock-dark-mode__toggle--navigation):not(.grimlock-dark-mode__toggle--shortcode).grimlock-dark-mode__toggle--bottom-right {
  bottom: 20px;
  right: 20px;
}

button.grimlock-dark-mode__toggle:before {
  font-family: var(--grimlock-icon-moon-font-family) !important;
  content: var(--grimlock-icon-moon);
  font-weight: 100;
  font-style: normal;
  text-rendering: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.grimlock-dark-mode--on button.grimlock-dark-mode__toggle:before {
  font-family: var(--grimlock-icon-sun-font-family) !important;
  content: var(--grimlock-icon-sun);
  font-weight: 100;
  font-style: normal;
  text-rendering: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.grimlock-dark-mode__toggle-icon--lightbulb button.grimlock-dark-mode__toggle:before {
  font-family: var(--grimlock-icon-lightbulb-font-family) !important;
  content: var(--grimlock-icon-lightbulb);
  font-weight: 100;
  font-style: normal;
  text-rendering: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.grimlock-dark-mode__toggle-icon--lightbulb.grimlock-dark-mode--on button.grimlock-dark-mode__toggle:before {
  font-family: var(--grimlock-icon-lightbulb-on-font-family) !important;
  content: var(--grimlock-icon-lightbulb-on);
  font-weight: 100;
  font-style: normal;
  text-rendering: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.grimlock-dark-mode__toggle-icon--adjust button.grimlock-dark-mode__toggle:before {
  font-family: var(--grimlock-icon-adjust-font-family) !important;
  content: var(--grimlock-icon-adjust);
  font-weight: 100;
  font-style: normal;
  text-rendering: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.grimlock-dark-mode__toggle-icon--adjust.grimlock-dark-mode--on button.grimlock-dark-mode__toggle:before {
  transform: scaleX(-1);
}

#navigation button.grimlock-dark-mode__toggle,
#preheader button.grimlock-dark-mode__toggle {
  width: var(--grimlock-navigation-icon-size);
  height: var(--grimlock-navigation-icon-size);
  margin: 0;
  padding: 0 !important;
  font-size: var(--grimlock-navigation-icon-font-size);
  text-align: center;
  cursor: pointer;
  border-radius: 100%;
  -webkit-user-select: none;
     -moz-user-select: none;
      -ms-user-select: none;
          user-select: none;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  letter-spacing: 0;
  transition: all 0.2s ease-in-out;
  position: relative;
  font-size: inherit;
  border: none;
}

#navigation button.grimlock-dark-mode__toggle:hover, #navigation button.grimlock-dark-mode__toggle:focus, #navigation button.grimlock-dark-mode__toggle:active,
#preheader button.grimlock-dark-mode__toggle:hover,
#preheader button.grimlock-dark-mode__toggle:focus,
#preheader button.grimlock-dark-mode__toggle:active {
  color: var(--grimlock-button-primary-hover-color);
  background-color: var(--grimlock-button-primary-hover-background-color);
  opacity: 1;
}

#navigation button.grimlock-dark-mode__toggle:not(:hover),
#preheader button.grimlock-dark-mode__toggle:not(:hover) {
  background: var(--grimlock-color-faded);
  color: inherit !important;
}

#navigation .navbar-nav.grimlock-navbar-nav--dark-mode-toggle {
  order: 200;
  margin-left: 1rem;
}

#navigation:not(.vertical-navbar) .navbar-nav.grimlock-navbar-nav--dark-mode-toggle > .menu-item {
  height: 100%;
}

body:not(.grimlock-dark-mode--on) #navigation .grimlock-dark-mode-logo, body:not(.grimlock-dark-mode--on)
#vertical-navigation .grimlock-dark-mode-logo {
  display: none;
}

.grimlock-dark-mode--on #navigation .grimlock-dark-mode-logo + .custom-logo-link, .grimlock-dark-mode--on
#vertical-navigation .grimlock-dark-mode-logo + .custom-logo-link {
  display: none;
}

.grimlock-dark-mode--on .wp-block-grimlock-wrapper[style*="dark-mode-wrapper-background-color"] {
  --grimlock-wrapper-background-color: var(--grimlock-dark-mode-wrapper-background-color) !important;
}

.grimlock-dark-mode--on .wp-block-grimlock-wrapper[style*="dark-mode-wrapper-text-color"] {
  --grimlock-wrapper-text-color: var(--grimlock-dark-mode-wrapper-text-color) !important;
}

.grimlock-dark-mode--on .wp-block-grimlock-wrapper[style*="dark-mode-wrapper-background-overlay-color"] {
  --grimlock-wrapper-background-overlay-color: var(--grimlock-dark-mode-wrapper-background-overlay-color) !important;
}

.grimlock-dark-mode--on .wp-block-grimlock-wrapper[style*="dark-mode-wrapper-headings-color"] {
  --grimlock-wrapper-headings-color: var(--grimlock-dark-mode-wrapper-headings-color) !important;
}

.grimlock-dark-mode--on .wp-block-grimlock-wrapper[style*="dark-mode-wrapper-border-top-color"] {
  border-top-color: var(--grimlock-dark-mode-wrapper-border-top-color);
}

.grimlock-dark-mode--on .wp-block-grimlock-wrapper[style*="dark-mode-wrapper-border-right-color"] {
  border-right-color: var(--grimlock-dark-mode-wrapper-border-right-color);
}

.grimlock-dark-mode--on .wp-block-grimlock-wrapper[style*="dark-mode-wrapper-border-bottom-color"] {
  border-bottom-color: var(--grimlock-dark-mode-wrapper-border-bottom-color);
}

.grimlock-dark-mode--on .wp-block-grimlock-wrapper[style*="dark-mode-wrapper-border-left-color"] {
  border-left-color: var(--grimlock-dark-mode-wrapper-border-left-color);
}

.grimlock-dark-mode--on .wp-block-grimlock-wrapper.grimlock-dark-mode--force-heading-color :where(h1, h2, h3, h4, h5, h6):not(.has-background) {
  color: var(--grimlock-dark-mode-wrapper-headings-color) !important;
}

.grimlock-dark-mode--on .wp-block-grimlock-wrapper.grimlock-dark-mode--force-text-color :where(p):not(.has-background).has-text-color,
.grimlock-dark-mode--on .wp-block-grimlock-wrapper.grimlock-dark-mode--force-text-color :where(p):not(.has-background)[style="color"] {
  color: var(--grimlock-dark-mode-wrapper-text-color) !important;
}

.grimlock-dark-mode--on .grimlock-divider[style*="dark-mode-divider-shape-color"] {
  --grimlock-divider-shape-color: var(--grimlock-dark-mode-divider-shape-color) !important;
}

.grimlock-dark-mode--on .grimlock-divider[style*="dark-mode-divider-icon-color"] {
  --grimlock-divider-icon-color: var(--grimlock-dark-mode-divider-icon-color) !important;
}

.grimlock-dark-mode--on .grimlock-divider[style*="dark-mode-divider-background-color"] {
  --grimlock-divider-background-color: var(--grimlock-dark-mode-divider-background-color) !important;
}

body.grimlock-dark-mode--on .grimlock-section[class*="wp-block"][style*="dark-mode-section-border-top-color"] {
  border-top-color: var(--grimlock-dark-mode-section-border-top-color) !important;
}

body.grimlock-dark-mode--on .grimlock-section[class*="wp-block"][style*="dark-mode-section-border-bottom-color"] {
  border-bottom-color: var(--grimlock-dark-mode-section-border-bottom-color) !important;
}

body.grimlock-dark-mode--on .grimlock-section[class*="wp-block"][style*="dark-mode-section-color"] {
  color: var(--grimlock-dark-mode-section-color) !important;
}

body.grimlock-dark-mode--on .grimlock-section[class*="wp-block"][style*="dark-mode-section-title-color"] .grimlock-section__title {
  color: var(--grimlock-dark-mode-section-title-color) !important;
}

body.grimlock-dark-mode--on .grimlock-section[class*="wp-block"][style*="dark-mode-section-subtitle-color"] .grimlock-section__subtitle {
  color: var(--grimlock-dark-mode-section-subtitle-color) !important;
}

body.grimlock-dark-mode--on .grimlock-section[class*="wp-block"][style*="dark-mode-section-background-color"] .region__inner {
  background-color: var(--grimlock-dark-mode-section-background-color) !important;
}

body.grimlock-dark-mode--on .grimlock-section[class*="wp-block"][style*="dark-mode-section-background-gradient"] .region__inner {
  background-image: var(--grimlock-dark-mode-section-background-gradient) !important;
}

.grimlock-dark-mode--on .grimlock-dark-mode--hidden {
  display: none !important;
}

body:not(.grimlock-dark-mode--on) .grimlock-dark-mode--visible {
  display: none !important;
}

.grimlock-dark-mode--on .grimlock-dark-mode--invert {
  filter: invert(1) brightness(100);
}

.grimlock-dark-mode--on h1 a, .grimlock-dark-mode--on h2 a, .grimlock-dark-mode--on h3 a, .grimlock-dark-mode--on h4 a, .grimlock-dark-mode--on h5 a, .grimlock-dark-mode--on h6 a {
  color: inherit;
}

body.grimlock-dark-mode--on .yoast-breadcrumb,
body.grimlock-dark-mode--on .yoast-breadcrumb a {
  color: inherit !important;
}

.grimlock-dark-mode--on {
  --grimlock-color-faded:     var(--grimlock-table-striped-background-color);
  --grimlock-color-primary:   var(--grimlock-button-primary-background-color);
  --grimlock-color-secondary: var(--grimlock-button-secondary-background-color);
}

