/*
Here are the colors from the style guide:
  #282823 - Charcoal
  #55555A - Nickel
  #F7F7F5 - Micron (light grey; almost white)
  #FFFFFF - White
  #FAAA19 - Efficient Gold
  #50648C - Vista Blue (dark blue)
  #FFDCA0 - Sweet Honey (much less aggressive gold)
  #E6EBF5 - Automate (very light blue)
*/

/* Global styles */
:root {
  font-family: Lato, Inter, system-ui, Helvetica, sans-serif;
  line-height: 1.5;
  font-weight: 500;

  color-scheme: light dark;

  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;

  color: var(--main-text-color);
  background-color: var(--main-bg-color);

  --main-text-color: #F7F7F5;
  --main-bg-color: #282823;
  --main-border-color: #55555A;
  --border-accent: #39393c;
  --aggressive-border-color: #FAAA19;
  --text-color: #F7F7F5;
  --red-color: #db5d22;
  --grid-color: #373731;
  --link-color: #FAAA19;

  --arith-color: 75, 155, 190;
  --cf-color: 116, 126, 135;
  --ls-color: 120, 180, 160;
  --str-color: 180, 100, 65;
}

[data-theme="light"] {
  --main-text-color: #282823;
  --main-bg-color: #ffffff;
  --main-border-color: #d4d4d4;
  --border-accent: #e5e3e3;
  --aggressive-border-color: #FAAA19;
  --text-color: #282823;
  --red-color: #cd490b;
  --grid-color: #F7F7F5;
  --link-color: #50648C;
}

@font-face {
  font-family: "MaisonNeueMedium";
  src: url('/fonts/MaisonNeue.woff2') format('woff2');
}

@font-face {
  font-family: "GeometrisSemiLight";
  src: url('/fonts/GeometrisSemiLight.woff2') format('woff2');
}

@font-face {
  font-family: "GeometrisNews";
  src: url('/fonts/GeometrisNews.woff2') format('woff2');
}

a,
router-link {
  font-weight: 500;
  font-family: "GeometrisNews";
  color: var(--link-color);
  cursor: pointer;
  outline: 0px solid white;
  border: 0px solid white;
}

a:hover,
router-link:hover {
  filter: brightness(115%);
}

h2 {
  font-family: "MaisonNeueMedium";
}

body {
  margin: 0;
  font-family: "GeometrisSemiLight", "Lato";
  display: flex;
  min-width: 320px;
  min-height: 100vh;
}

button {
  font-family: "GeometrisNews", "Lato";
  border-radius: 2px;
  border: 1px solid var(--aggressive-border-color);
  padding: 10px 12px;
  font-size: 1em;
  font-weight: 600;
  background-color: var(--aggressive-border-color);
  color: var(--main-bg-color);
  border-color: var(--aggressive-border-color);
  cursor: pointer;
  transition: all 0.35s;
  outline: 1px solid transparent;
}

.invertedButton {
  background-color: var(--main-bg-color);
  color: var(--aggressive-border-color);
}

.invertedButton:hover:not(:disabled) {
  background-color: color-mix(in srgb, var(--main-bg-color), black 10%);
}

button:disabled {
  background-color: var(--main-bg-color);
  border-color: var(--main-border-color);
  color: var(--main-border-color);
  pointer-events: none;
  cursor: default;
}

button:hover:not(:disabled) {
  background-color: color-mix(in srgb, var(--aggressive-border-color), black 10%);
  outline: 1px solid transparent;
}

button:focus:not(:disabled),
button:focus-visible:not(:disabled) {
  outline: 1px solid var(--main-border-color);
}

/* Safari-only rules to fix select appearance */
@supports (hanging-punctuation: first) and (font: -apple-system-body) and (-webkit-appearance: none) {
  select {
    appearance: initial;
    -webkit-appearance: initial;
    background: url(data:image/svg+xml;base64,PHN2ZyBpZD0iTGF5ZXJfMSIgZGF0YS1uYW1lPSJMYXllciAxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA0Ljk1IDEwIj48ZGVmcz48c3R5bGU+LmNscy0ye2ZpbGw6IzQ0NDt9PC9zdHlsZT48L2RlZnM+PHRpdGxlPmFycm93czwvdGl0bGU+PHBvbHlnb24gY2xhc3M9ImNscy0yIiBwb2ludHM9IjEuNDEgNC42NyAyLjQ4IDMuMTggMy41NCA0LjY3IDEuNDEgNC42NyIvPjxwb2x5Z29uIGNsYXNzPSJjbHMtMiIgcG9pbnRzPSIzLjU0IDUuMzMgMi40OCA2LjgyIDEuNDEgNS4zMyAzLjU0IDUuMzMiLz48L3N2Zz4=) no-repeat 95% 50%;
  }
}

select {
  color: var(--main-text-color);
  border-radius: 2px;
  border: 1px solid var(--main-border-color);
  padding: 10px 12px;
  font-size: 1em;
  font-weight: 500;
  font-family: inherit;
  background-color: var(--main-bg-color);
  transition: border-color 0.25s;
}

select:hover {
  border-color: 1px solid var(--aggressive-border-color);
}

select:focus,
select:focus-visible {
  outline: 1px solid var(--main-border-color);
}


input.textfield,
textarea {
  padding: 4px;
  border: 1px solid var(--main-border-color);
  background-color: var(--main-bg-color);
  color: var(--main-text-color);
  font-size: 16px;
  outline: 0px;
}

input.textfield:focus,
input.textfield:focus-within,
input.textfield:focus-visible,
textarea.textfield:focus,
textarea.textfield:focus-within,
textarea.textfield:focus-visible {
  border: 1px solid var(--aggressive-border-color) !important;
  background-color: var(--main-bg-color);
}

.error {
  color: var(--red-color);
}

/* Creates a div with a line through it. Use it like so:
<div class="line"><span>Don't have an account?</span></dive>
 */
.line {
  text-align: center;
  position: relative;
  margin: 10px 0;
}

.line:before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  height: 1.8px;
  background: var(--main-text-color);
  width: 100%;
  transform: translateY(-50%);
}

.line span {
  font-family: MaisonNeueMedium;
  text-transform: uppercase;
  font-weight: 400;
  font-size: .8em;
  position: relative;
  top: -1px;
  padding: 0px 8px;
  z-index: 10;
  background-color: var(--main-bg-color);
}

/* We don't want this control flow component to render anything visually. */
if-admin {
  display: contents;
}

#login {
  width: 100%;
  /* 24px is padding top/bottom */
  min-height: calc(100vh - 24px);
  display: grid;
  align-items: center;
  justify-content: center;
  justify-items: center;
}

.login-form {
  width: 400px;
}

.formCard {
  border: solid 1px var(--main-border-color);
  border-radius: 2px;
  padding: 24px;
}

.efficientLogo {
  text-align: center;
}

h1 {
  text-align: center;
  font-family: "MaisonNeueMedium";
  margin: 0px;
  margin-bottom: 12px;
  font-size: 1.7em;
}

.description {
  text-align: center;
  margin-top: 0px;
}

.field {
  position: relative;
  margin-bottom: 14px;
}

.field input {
  width: 100%;
  box-sizing: border-box;
  height: 48px;
  border-radius: 2px;
  padding: 4px 18px;
}

.field .label {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 18px;
  display: flex;
  align-items: center;
  pointer-events: none;
}

.field .label {
  transition: all 0.15s ease-out;
  color: grey;
}

/*,
:not(.field input:invalid)+.label


*/

/* .field textarea:focus+.label,
:not(.field textarea:placeholder-shown)+.label {
  font-size: 12px;
  transform: translate(0, -50%);
  background-color: var(--main-bg-color);
  height: 12px;
  padding-left: 4px;
  padding-right: 4px;
} */

.field input:focus+.label,
.field textarea:focus+.label,
:not(.field input:placeholder-shown, .field textarea:placeholder-shown)+.label{
  font-size: 12px;
  transform: translate(0, -50%);
  background-color: var(--main-bg-color);
  height: 12px;
  padding-left: 4px;
  padding-right: 4px;
}

.field input:focus+.label,
.field textarea:focus+.label {
  color: var(--aggressive-border-color);
}

.request-link {
  width: 100%;
  height: 48px;
}

.invertedButton:hover {
  color: var(--aggressive-border-color) !important;
  background-color: var(--main-bg-color) !important;
}

#login .logoImg {
  height: 60px;
}

@media (max-width: 450px) {
  #login .inputRow {
    flex-direction: column;
  }
}

#createAccount {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

#createAccount .maxWidth {
  display: flex;
  max-width: 700px;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  gap: 24px;
  padding: 24px;
}

#createAccount .description {
  text-align: left;
}

#createAccount .inputRow {
  display: flex;
  flex-direction: row;
  width: 100%;
  gap: 12px;
}

#createAccount .field {
  display: flex;
  flex: 1;
  flex-direction: column;
}


#createAccount .inputRow label {
  vertical-align: top;
}

#createAccount form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#createAccount .logoImg {
  height: 60px;
}

#createAccount .subtitle {
  font-size: 28px;
  margin-top: -10px;
  font-family: 'Roboto';
  font-weight: 300;
}

@media (max-width: 450px) {
  #createAccount .inputRow {
    flex-direction: column;
  }
}

.hidden {
  display: none;
}

.required {
  color: #FAAA19;
}

.invertedButton:hover {
  color: var(--aggressive-border-color) !important;
  background-color: var(--main-bg-color) !important;
}

button {
  padding: unset;
}