/* ---------- Colors ---------- */
body {
  background-color: #f6f9fa;
}

#note {
  background-color: #fff;
}

/* ---------- Colors (dark mode) ---------- */
@media (prefers-color-scheme: dark) {
  body {
    background-color: #111;
    color: white;
  }

  input[type="text"],
  input[type="password"] {
    background-color: #111;
    color: white;
    border: solid 1px rgba(255, 255, 255, 0.25);
  }

  button,
  input[type="submit"] {
    background-color: #444;
    color: white;
  }

  #note {
    background-color: #000;
  }
}

/* ---------- General ---------- */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  line-height: 1.4;
}

* {
  box-sizing: border-box;
}

p {
  max-width: 30em;
}

.hidden-by-default {
  display: none;
}

button,
input[type="submit"] {
  min-height: 1cm;
  min-width: 6em;
}

input {
  min-height: 1cm;
  padding: 0.5em;
}

/* ---------- Layout ---------- */

h1 {
  font-size: 0.9rem;
  font-weight: normal;
  position: fixed;
  top: 0rem;
  left: 0.5rem;
  opacity: 0.4;
}

main {
  display: grid;
  place-content: center;

  /* Make small content appear a bit heigher than the center of the page */
  min-height: 66vh;
}

.screen {
  display: none;
  padding: 1rem;
}

.screen.current {
  display: block;
}

form.one-line-form {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-gap: 0.5rem;
  align-content: center;
  width: 100%;
  justify-content: stretch;
}

#note-screen {
  width: 100vw;
  height: 100vh;
  padding: 0;
}

#note-screen > * {
  padding: 1em;
}

#note-screen.current {
  display: grid;
  grid-template-rows: auto 1fr;
}

/* Editable note element */
#note {
  overflow: auto;

  /* Make text more legible */
  letter-spacing: 0.5px;
}

.toolbar {
  display: grid;
  justify-content: end;
}

#error-screen {
  text-align: center;
}

/* Remove border around a focused contenteditable (note) */
[contenteditable]:focus {
  outline: 0px solid transparent;
}
