:root{
  --text-color: hsl(300, 40%, 90%);
  --main-color: hsl(200, 60%, 10%);
  --pale-pumpkin: hsl(30, 70%, 70%);
  --darkened: hsla(0, 0%, 0%, 40%);
  --darker-gray: hsl(0, 0%, 20%);
  --light-blue-l75: hsla(190, 100%, 75%, 40%);
  --warning-red-l70: hsl(0, 100%, 70%);
  --warning-red-l80: hsl(0, 100%, 80%);
}

html{
  background-color: var(--main-color);
  color: var(--text-color);
  font-family: arial;
  height: 100%;
}

body{
  margin: 0;
  display: grid;
  grid-template-columns: clamp(40ch, 100%, 80ch);
  grid-template-rows: max-content auto 1fr max-content max-content;
  height: calc(100% - 2ch);
  justify-content: center;
  padding: 1ch;
}

a{
  color: var(--pale-pumpkin);
}

#tab-container{
  grid-area: 1 / 1 / 2 / 2;
  padding-bottom: 1ch;
  overflow-x: auto;
  position: relative;
  border-left: 1px solid gray;
  border-right: 1px solid gray;
}

#tab-container>button{
  margin-left: -1px;
  position: relative;
  font-size: medium;
}

#tab-container>span:first-child{
  display: none;
}

.flex-grow{
  flex-grow: 1;
}

#tab-container>span{
  border-bottom: 1px solid gray;
  background-color: var(--main-color);
}

#tab-container>button.selected{
  border-bottom-color: transparent;
  padding: 1ch 3ch 0ch;
}

#tab-container>button#settings{
  justify-self: end;
  position: sticky;
  right: 0;
  border-right: none;
  background-color: var(--main-color);
  font-weight: bold;
}

#tab-container>button#settings:only-of-type{
  flex-grow: 1;
  border-left: none;
}

select{
  background-color: transparent;
  color: var(--text-color);
  border: 1px solid gray;
}

#tab-options-container{
  font-size: medium;
  grid-area: 2 / 1 / 3 / 2;
  border-left: 1px solid gray;
  border-right: 1px solid gray;
  gap: 3ch;
  max-height: 70ch; 
  overflow-y: auto;
  position: relative;
}

#tab-options-container>*{
  padding: 0 2ch;
}

#tab-options-container>div:first-child{
  padding-top: 2ch;
}
#tab-options-container>div:last-child{
  position: sticky;
  bottom: 0;
  background: var(--main-color);
  padding: 1ch 2ch;
  border-top: 1px solid var(--darker-gray)
}

label[for="tab-name"]{
}

input#tab-name{
  font-size: medium;
}

#tab-options-container input[type="number"]{
  width: 7ch;
}

#tab-options-container>details>div:first-of-type{
  margin-top: 1ch;
}

#tab-options-container>details>div{
  margin-bottom: -1px;
  border: 1px solid var(--darker-gray);
  padding: 2ch 1ch;
  font-size: small;
}

#tab-options-container>details>div.nested-radio-option{
  gap: .8ch;
}

#task-container{
  position: relative;
  grid-area: 3 / 1 / 4 / 2;
  padding: 1ch;
  background-color: var(--darkened);
  overflow-y: auto;
  border: 1px solid gray;
}

#task-node-template.overdue{
  border: 1px solid var(--warning-red-l70);
  color: var(--warning-red-l80);
}

#task-node-template.overdue>p>span.task-due-date{
  border-bottom: 1px solid var(--warning-red-l70);
}

#task-node-template.complete{
  background: var(--main-color);
  border-color: var(--darker-gray);
  color: var(--light-blue-l75);
  opacity: 70%;
}

.task-node-template{
  padding: 2ch;
  padding-bottom: 1ch;
  margin-bottom: 1ch;
  background-color: var(--main-color);
  border: 1px solid var(--light-blue-l75);
}

.task-editor-node-template{
  padding: 2ch;
  margin-bottom: 1ch;
  background-color: var(--main-color);
  border: 1px solid var(--darker-gray);
}

.task-editor-node-template>div:not(.buttons){
  margin-bottom: 2ch;
}

.task-node-template>details>summary{
  font-size: large;
}

.task-node-template>details{
  font-size: normal;
}

.task-due-date{
  margin-left: 1ch;
}

.due-date-none{
  font-size: smaller;
  color: gray;
}

.task-tags{
  margin: 1ch 0 1ch 1ch;
  background: transparent;
  border: none;
  flex-grow: 1;
  color: inherit;
  letter-spacing: inherit;
  font-size: smaller;
  font-family: inherit;
}

.task-tags,
textarea#tags{
  word-spacing: 1ch;
}

.task-editor-node-template>.buttons{
  margin-top: 3ch;
  justify-content: space-between;
}

.flex{
  display: flex;
}

.row{
  flex-direction: row;
}

.column{
  flex-direction: column;
}

.task-node-template>.options{
  margin: 1ch 0;
}

.task-node-template>.options>button{
  margin-right: 1ch;
}

.hidden{
  display: none !important;
}

#task-editor-node-template>div.textarea-input-container{
  display: flex;
  gap: .4ch;
  flex-direction: column;
}

textarea#title,
textarea#tags{
  min-height: 2.4ch;
  height: 2.4ch;
}

textarea,
input[type="search"],
input[type="text"]{
  padding: .4ch .8ch;
}

textarea#details{
  height: 12ch;
}

div.selection-input-container{
  display: flex;
  flex-direction: column;
  gap: .4ch;
}

input#dueDate{
  margin-top: 1ch;
  margin-left: 1ch;
}

.prerequisite-container>ul>li{
  color: gray;
  font-size: small;
}
.prerequisite-container>ul{
  padding-left: 3ch;
  margin-top: .8ch;
}

.prerequisite-container>p{
  margin-bottom: -.2ch;
}

#search-results>p{
  border: 1px solid var(--darker-gray);
  font-size: smaller;
  padding: .4ch .6ch;
  margin: 0;
  color: inherit;
  flex-grow: 1;
}

#search-results>p:before{
  content: "\25CB\00A0";
  white-space: nowrap;
}

#search-results>p.selected:before{
  content: "\25CF\00A0"
}

#search-results{
  padding: .6ch .6ch calc(.6ch + 1px);
  border: 1px solid var(--darker-gray);
  border-top: none;
  height: 20ch;
  overflow-y: scroll;
}

#prerequisite-selector>div:first-child{
  display: flex;
  flex-direction: row;
  border: 1px solid var(--darker-gray);
  border-bottom: none;
}

#prerequisite-selector>div:first-child>label{
  opacity: 70%;
  font-size: small;
  white-space: nowrap;
  color: gray;
  flex-grow: 1;
  align-self: center;
  text-align: center;
  padding-left: 1ch;
}

#prerequisite-selector>div:first-child>button{
  border: none;
  border-left: 1px solid var(--darker-gray);
  padding: .6ch .8ch;
}

#search-results>p{
  display: flex;
  flex-direction: row;
  margin-bottom: -1px;
  color: gray;
}

#search-results>p:hover{
  background-color: silver;
  color: black;
}

#prerequisite-selector>button#view-selected-tasks{
  width: 100%;
  color: gray;
  border: 1px solid var(--darker-gray);
  border-top: none;
}

textarea,
input,
select{
  background: var(--darkened);
  border: 1px solid var(--darker-gray);
  color: var(--text-color);
}

#write-task-button-container{
  grid-area: 4 / 1 / 5 / 2;
  border: 1px solid gray;
  border-top: none;
  margin-top: -1px;
  justify-content: center;
}

footer{
  grid-area: 5 / 1 / 6 / 2;
  color: gray;
}

button{
  background-color: transparent;
  color: gray;
  border: 1px solid var(--darker-gray);
  font-size: x-small;
  white-space: nowrap;
  padding: .5ch 2ch;
}

button:hover{
  cursor: pointer;
}

button:active{
  background-color: var(--darker-gray);
}

#tab-container>button,
#write-task{
  color: silver;
  border-color: gray;
}

#write-task{
  font-size: medium;
  border: none;
}

button:disabled{
  opacity: 50%;
}

#storage-quota{
  width: calc(100% - 2px);
  background-color: transparent;
  height: 1ch;
  border-color: gray;
  opacity: 70%;
}

div.local-storage-progress-container{
}

input#task-search{
  width: 100%;
}

#settings-container{
  font-size: medium;
  position: relative;
  padding: 1ch;
}

#settings-container>details{
  margin-bottom: 4ch;
}

#settings-container>details>div{
  padding: .4ch 2ch;
}

button#erase-all-data{
  background: maroon;
  border: 3px ridge maroon;
  color: white;
  letter-spacing: 1px;
}

#copywrite{
  color: gray;
  font-size: small;
}

#introduction{
  position: absolute;
  width: calc(100% - 2ch);
  height: calc(100% - 2ch);
  justify-content: center;
  align-items: center;
  background-color: var(--main-color);
}

#introduction>div{
  background: var(--darkened);
  padding: 2ch 3ch;
}

button#hide-introduction{
  width: 100%;
  margin-top: 3ch;
}

select:disabled,
input:disabled,
textarea:disabled{
  color: gray;
}

input[type="number"]#days-before,
input[type="number"]#days-after{
  width: 7ch;
}

.indent{
  padding-left: 4ch;
}

.sub-info{
  margin-left: 1ch;
  margin-top: .4ch;
  opacity: 70%;
}

.inline-block{
  display: inline-block;
}

button#add-tab,
button#add-pending,
button#add-today,
button#add-completed{
  font-size: small;
  color: silver;
  margin-bottom: 1ch;
  display: block;
}

input[type="date"]{
  min-width: 15.2ch;
}
