:root {
  --color-ok-bg: rgb(238, 255, 228);
  --color-ok-border: #a8ff93;
  --color-ok-text: #074d07;
  --color-ok-accent: #68bf0b;

  --color-warn-bg: #fffadd;
  --color-warn-border: #e0e37b;
  --color-warn-text: #4d4707;
  /* --color-warn-accent */

  --color-error-bg: #fdd;
  --color-error-border: #ff9393;
  --color-error-text: #4d0707;
  /* --color-error-accent */

  --color-consider-bg: #D8EFF3;
  /* --color-consider-border */
  --color-consider-text: #326067;
  /* --color-consider-accent */

  --color-text: #444446;
  --color-text-accent: #222;

  --color-border: lightgray;
  --color-border-broken: #555;

  --color-bg: white;

  --color-link: blue;
  --color-link-dark: #f77e39;

  --color-pc-button-bg: #0881c6;
  --color-pc-button-bg-hover: #076696;
  --color-pc-button-bg-click: #055075;
  --color-pc-button-text: white;
  --color-pc-button-text-click: #eee;

  --color-imp-button-bg: #ff003c;
  --color-imp-button-bg-hover: #ff2457;
  --color-imp-button-bg-click: #f21347;

  --color-unobstrusive-button-bg: var(--color-bg);
  --color-unobstrusive-button-bg-hover: #ddd;
  --color-unobstrusive-button-bg-click: #aaa;
  --color-unobstrusive-button-text: var(--color-text);
  --color-unobstrusive-button-text-click: #111;
}

body {
  color: var(--color-text);
  background-color: var(--color-bg);

  position: relative;

  min-width: 100%;
  height: 100%;

  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

@media (max-width: 767px) {
  body {
    background-image: none;
  }
}

body {
  font-family: "Montserrat", sans-serif;
}

/* input elements are weird about their font */
input {
  font-family: inherit;
  font-size: inherit;
}

/* Dark mode color variables */
[data-theme="dark"] {
  --color-ok-bg: #1a3320;
  --color-ok-border: #2d6b2d;
  --color-ok-text: #90c090;
  --color-ok-accent: #68bf0b;

  --color-warn-bg: #2a2500;
  --color-warn-border: #5a5500;
  --color-warn-text: #c0b060;

  --color-error-bg: #2a1010;
  --color-error-border: #6b2020;
  --color-error-text: #c06060;

  --color-consider-bg: #1a2a2d;
  --color-consider-text: #70b0b8;

  --color-text: #d0d0d2;
  --color-text-accent: #f0f0f2;

  --color-border: #3a3a3e;
  --color-border-broken: #6a6a6e;

  --color-bg: #1a1a1e;

  --color-link: #5b9bd5;

  --color-unobstrusive-button-bg: #1a1a1e;
  --color-unobstrusive-button-bg-hover: #2a2a2e;
  --color-unobstrusive-button-bg-click: #3a3a3e;
  --color-unobstrusive-button-text: #d0d0d2;
  --color-unobstrusive-button-text-click: #fff;
}

/* Dark mode overrides for hardcoded colors */
[data-theme="dark"] .bordered {
  border-color: #3a3a3e;
}

[data-theme="dark"] .overlay {
  background-color: rgba(0, 0, 0, 0.85);
}

[data-theme="dark"] .checkmark {
  background-color: #444;
}

[data-theme="dark"] .cb-container:hover input ~ .checkmark {
  background-color: #555;
}

[data-theme="dark"] header nav .nav-hover-dropdown {
  border-color: rgba(80, 80, 80, 1);
}

[data-theme="dark"] .dropdown-menu .menu {
  box-shadow: 0px 8px 10px #111, -10px 8px 15px #111, 10px 8px 15px #111;
}

/* Dark mode toggle button */
#dark-mode-toggle {
  cursor: pointer;
  font-size: 1.1em;
}

#dark-mode-toggle:hover {
  opacity: 0.7;
}

/* If element to scroll to is selected by id in URL, add offset to account for nav bar */
:target:before {
  content: "";
  display: block;
  height: calc(90px + 0.6em); /* fixed header height*/
  margin-top: calc(-90px - 0.6em); /* negative fixed header height */
}
