/* Custom title bar for PWA */
/* https://web.dev/window-controls-overlay/ */

/*.light-theme {
  --background-color: #f9f9f9;
  --section-background-color: white;
  --text-color: #000000c7;
  --border-color: #f7f5f5;
}
.dark-theme {
  --background-color: #202124;
  --section-background-color: var(--background-color);
  --text-color: white;
  --border-color: #5f6368;
}*/

:root {
  scrollbar-face-color: rgb(210, 210, 210);
  /* Firefox 63 compatibility */
  scrollbar-track-color: rgb(46, 54, 69);
  /* Firefox 63 compatibility */
  scrollbar-color: rgba(0, 0, 0, .4) rgba(140, 140, 140, 0.1);
  scrollbar-width: thin;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background-color: #202124;
    --section-background-color: var(--background-color);
    --text-color: white;
    --border-color: #5f6368;
  }
}

@media (prefers-color-scheme: light) {
  :root {
    --background-color: #f9f9f9;
    --section-background-color: white;
    --text-color: #000000c7;
    --border-color: #ddd;
  }
}

body {
  background-color: var(--background-color);
  color: var(--text-color);
  font-family: Arial, sans-serif;
  font-size: 14px;
  text-align: center;
  margin: 0;
}

main {
  /*display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;*/
  margin: auto;
  width: 100%;
  margin-top: 36px;
}

header {
  display: flex;
  justify-content: center;
  gap: 24px;
  padding-top: 8px;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1;
  background: var(--background-color);
  padding-bottom: 8px;
}

nav {
  /* position: absolute;
  text-align: left;
  padding-top: 12px;
  padding-left: 8px;
  line-height: 24px; */
  /* padding-top: 4px; */
}

nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 8px;
}

nav ul li {
  cursor: pointer;
  /* text-decoration: underline; */
  /* margin: 8px; */
  flex-grow: 1;
}

nav ul li button {
  padding: 4px;
  /* margin-left: 4px; */
  background-color: var(--background-color);
  color: var(--text-color);
  border: var(--border-color) 1px solid;
  border-radius: 8px;
  /* transition-duration: 0.4s; */
}

nav ul li button:hover {
  filter: brightness(1.3)
}

nav ul li button:active {
  filter: brightness(2.7)
}

/* #remotestorage-widget {
  position: absolute;
  top: 5px;
  right: 5px;
}

.rs-widget {
  margin: 0 !important;
  padding: 5px !important;
} */

#search {
  /* margin-bottom: 15px; */
  background-color: var(--background-color);
  border: 1px solid var(--border-color);
  /* border-radius: 5px; */
  color: inherit;
  /* font-size: inherit; */
  /* height: inherit; */
  /* font: inherit; */
  padding: 4px;
}

#createSectionButton {
  border: 1px solid var(--border-color);
  background-color: var(--background-color);
  /* width: 42px; */
  /* height: 42px; */
  border-radius: 8px;
  /* font-size: 1.1rem; */
  padding: 4px;
  cursor: pointer;
  color: var(--text-color);
  /* display: block; */
  /* margin: auto; */
}

#createSectionButton:hover {
  background-color: #525356;
}

#createSectionButton:active {
  background-color: #2b5096;
}

section {
  background-color: var(--section-background-color);
  display: block;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  margin: 15px;
  padding: 12px 16px;
  width: 240px;
  /*resize: horizontal;*/
  overflow: auto;
  transition: all 0.218s ease-in-out;
}

section h1 {
  margin: 0;
  font-size: 16px;
  margin-bottom: 5px;
  display: flex;
  gap: 8px;
}

section h1 input[type="text"] {
  width: 100%;
}

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

section ul li:first-child input[type="checkbox"] {
  visibility: hidden;
}

section ul li {
  display: flex;
  margin-bottom: 5px;
}

.task {
  /*margin-bottom: 12px;*/
}

.task-title {
  resize: none;
  overflow: hidden;
}

input[type="checkbox"] {
  /* opacity: .54; */
  margin-right: 10px;
  align-self: flex-start;
  cursor: pointer;
}

/* Checkbox */
/* input[type=checkbox] {
              -webkit-appearance: none;
              -moz-appearance: none;
              -ms-appearance: none;
              border-radius: 3px;
              min-height: 14px;
              min-width: 14px;
              background: transparent;
              border: 2px solid var(--border-color);
              margin-top: 3px;
              margin-bottom: 0;
            } */

/* TODO checkbox checked */

/* ==== INLINE-INPUT ==== */
.inline-input {
  border: none;
  background-color: transparent;
  color: inherit;
  font-size: inherit;
  height: inherit;
  font: inherit;
  margin-bottom: 0;
  /* min-width: 6em; */
  width: 100%;
}

.inline-input:focus {
  border: none;
  box-shadow: none;
}

textarea.task-title.inline-input {
  line-height: 1;
}