:root {
/* theme will go here*/
  color-scheme: light dark;
  --c-danger: red;

  --body-space: 4px;
  --finger-size: 40px;
  --text-font-size: 14px;
  --action-font-size: 18px;

  --c-l-bg: 255,255,255;
  --c-d-bg: 0,0,0;

  /* light by default */
  --c-bg: rgb(var(--c-l-bg));
}

@media (prefers-color-scheme: dark) {
  :root {
    --c-bg: rgb(var(--c-d-bg));
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0 var(--body-space) var(--body-space) var(--body-space);
}

nav {
  display: flex;
  justify-content: center;
  align-items: center;
  position: sticky;
  top: 0;
  background: var(--c-bg);
  padding: var(--body-space) 0;
}

nav details summary {
  font-size: var(--action-font-size); 
  min-width: 100px;
  max-width: 100vw;
}
nav details a {
  font-size: var(--action-font-size); 
}

nav details {
  display: flex;
}

body {
  color: rgb(var(--text-color));
  font-size: var(--text-font-size);
}

#main {
  max-width: 1000px;
  margin: 0 auto;
}

button {
  border-radius: 10px;
  padding: 10px 3px;
  border-style: none;
  text-align: center;
  min-width: 40px;
  font-weight: 600;
  font-size:  var(--action-font-size);
}

a {
  text-decoration: none;
}

a:visited {
}

button:disabled {
}

.longform-text {
  white-space: break-spaces;
}

.overtake {
  position: fixed;
  top: 0;
}

.overtake:before {
  content: '';
  background: var(--c-bg);
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  top: 0;
  left: 0;
  right: 0;
  position: absolute;
  z-index: -1;
}

@media (min-width: 800px) {
  #main {
    margin-left: auto;
    margin-right: auto;
    padding: 0 var(--body-space);
    max-width: 800px;
  }
}

input {
  padding: 11px 4px;
}

#search {
  min-width: 264px;
}

input[type="checkbox"] {
  padding: initial;
  width: var(--finger-size);
  height: var(--finger-size);
  
}

.form {
  display: flex;
  flex-direction: column;
}

.form > * {
  width: 100%;
  margin-bottom: var(--finger-size);
}

.form textarea, .form input:not([type="checkbox"]) {
  width: 100%;
}

.form > *:last-child {
  margin-bottom: 0;
}

.form textarea {
  resize: vertical;
}

.form button {
  padding: 10px 4px;
}

h1 button:nth-child(2) {
  margin-left: var(--body-space);
}

.actions {
  text-align: right;
}

.actions > * {
  margin-left: var(--finger-size);
}

.actions > *:first-child {
  margin-left: 0;
}

.error {
  color: var(--c-danger);
}

.content {
  display: flex;
  flex-direction: column;
}

ul {
  margin: 0;
  padding: 0;
  list-style-type: none;
}

ul li {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
}

ul li a {
  margin-left: 2px;
  padding: calc((var(--finger-size) - var(--text-font-size)) / 2);
}

.action {
  width: 100%;
}

.configure-search {
  padding-top: 10px;
}

.configure-search label {
  display: flex;
  align-items: center;
}

.configure-search label input {
  margin-right: 10px;
}

.group-checkbox {
  display: flex;
  align-items: center;
}

.group-checkbox input {
  margin-right: 8px;
}

.toaster {
  position: fixed;
  top: 32px;
  left: 0;
  width: 100vw;
  overflow: hidden;
}

.toaster > div {
  padding: 8px;
  margin: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.toaster > div.info {
  background: green;
}
.toaster > div.warn {
background: mustard;
}
.toaster > div.error {
  background: var(--c-danger);
  color: black;
}

.toaster button {
  width: var(--finger-size);
  height: var(--finger-size);
}

#edit-notes-placeholder {
  position: relative;
  cursor: pointer;
}

#edit-notes-placeholder::after {
  content: '✏️';
  position: absolute;
  top: 0;
  right: 0;
  border-radius: 10px;
  padding: 10px 3px;
  border-style: none;
  text-align: center;
  min-width: 40px;
  font-weight: 600;
  font-size:  var(--action-font-size);
}
