:root {
  --background-color: #ffffff;
  --text-color: #000000;
  --font-size: 1em;
  --font-family: "Roboto", sans-serif;
  --primary-color: #03a9f4;
  --primary-color-hover: #0288d1;
  --page-width: 80vw;
  --text-underline-color: rgba(0, 0, 0, 0.2);
  --table-even-row-color: #ffffff;
  --table-odd-row-color: #e6e6e6;
}

/* @media (prefers-color-scheme: dark) {
  :root {
    --background-color: #0f0f0f;
    --text-color: #ffffff;
    --text-underline-color: rgba(255, 255, 255, 0.2);
    --table-odd-row-color: #1f1f1f;
  }
} */

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

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

header,
main {
  max-width: var(--page-width);
  width: 100%;
}

header {
  margin: 0 auto;
}

main {
  margin: 0 auto 1em auto;
}

textarea {
  width: 100%;
  height: 300px;
  resize: none;

  background-color: var(--background-color);
  color: var(--text-color);
  border: 1px solid var(--text-color);
  font-size: 1rem;

  padding: 1em;
}

textarea:focus {
  outline: 1px solid var(--primary-color);
}

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

.columns.options-wrapper {
  margin-right: 0;
  margin-bottom: 0.5em;
  justify-content: space-between;
}

.options {
  display: flex;
  justify-content: flex-end;
}

.columns.options-wrapper > * {
  width: auto;
}

.options > * {
  margin: 0 1em;
}

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

.options > *:last-child {
  margin-right: 0;
}

.columns {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  justify-items: stretch;
}

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

.columns > * {
  width: 100%;
  margin: 0 1em;
}

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

.columns > *:last-child {
  margin-right: 0;
}

table {
  width: 100%;
  border: 0;
  border-spacing: 0;
}

table:not(.syntaxtree__table):not(.syntaxtab__table) tbody tr:nth-child(2n),
table:not(.syntaxtree__table):not(.syntaxtab__table) tbody tr:nth-child(2n) td {
  background-color: var(--table-even-row-color);
}

.is-even {
  background-color: var(--table-even-row-color) !important;
}

table:not(.syntaxtree__table):not(.syntaxtab__table) tbody tr:nth-child(2n + 1),
table:not(.syntaxtree__table):not(.syntaxtab__table) tbody tr:nth-child(2n + 1) td {
  background-color: var(--table-odd-row-color);
}

.is-odd {
  background-color: var(--table-odd-row-color) !important;
}

table td {
  vertical-align: top;
}

.error {
  color: #ff0000;
}

textarea.error {
  border-color: #ff0000;
}

.warning {
  color: #ffa500;
}

.correction {
  color: #00dd00;
}

#loading {
  display: none;
}

#pos-tags {
  display: none;
}

#pos-tags thead th {
  text-align: left;
  font-size: 0.8rem;
  font-weight: normal;
}

#pos-tags tbody tr td:not(:first-child) {
  font-family: courier;
}

#syntax-tree-wrapper,
#syntax-tabs-wrapper,
#verb-phrases-wrapper,
#subject-verb-phrases-wrapper,
#copula-phrases-wrapper,
#noun-phrases-wrapper,
#noun-phrase-chunks-wrapper,
#nouns-wrapper,
#verbs-wrapper,
#adjectives-wrapper,
#adverbs-wrapper,
#prepositions-wrapper,
#pronouns-wrapper,
#conjunctions-wrapper,
#subjects-wrapper,
#objects-wrapper,
#clauses-wrapper,
#main-clauses-wrapper,
#subordinate-clauses-wrapper,
#syntax-errors-wrapper,
#morphodita-analysis-wrapper {
  display: none;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-gap: 1em;
}

h2, h3 {
  display: flex;
  justify-content: space-between;
  align-items: end;
  border-bottom: 1px solid var(--text-underline-color);
}

h2 label,
h3 label {
  font-size: 0.8em;
  font-weight: normal;
}

#syntax-tree,
#syntax-tabs {
  overflow: auto;
}

#syntax-tree table,
#syntax-tabs table {
  width: auto;
}

#syntax-options {
  display: none;
}

#syntax-options.showSyntaxTree,
#syntax-options.showSyntaxTabs {
  display: block;
}

.syntaxtree-link {
  margin: 1em 0;
}

label {
  display: inline-block;
  vertical-align: middle;
  /* height: 1.5em; */
}

label > span {
  vertical-align: middle;
}

label > span:first-child {
  margin-right: 0.5em;
}

label > span:last-child {
  margin-left: 0.5em;
}

label > select,
label > input {
  vertical-align: middle;
}

.right {
  text-align: right;
}

button,
.button {
  background-color: var(--primary-color);
  color: var(--background-color);
  border: 0;
  border-radius: 4px;
  padding: 0.5em 1em;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
}

button:hover,
.button:hover {
  background-color: var(--primary-color-hover);
}

.main-area {
  display: flex;
  flex-direction: row;
}

.prediction-header {
  display: flex;
  flex-direction: column;
  justify-content: end;
  box-sizing: border-box;
  min-width: 400px;
  max-width: 400px;
  margin: 0 0 0.5em 0;
  padding: 0 1em;
}

#predictions {
  min-width: 400px;
  max-width: 400px;
  overflow: auto;
  height: 300px;
  padding-left: 1em;
}

.prediction-header > span {
  font-weight: bold;
}

.checkboxes {
  margin-top: 0.5em;
}

.hidden {
  display: none!important;
}

.dialog-positioner {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;

  display: flex;
  justify-content: center;
  align-items: center;
}

.dialog-overlay-backdrop {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: -1;
  background: rgba(0,0,0,.32);
}

.dialog {
  width: 60vw;
  height: 60vh;
  background: #ffffff;
  border-radius: 4px;
  overflow: auto;

  padding: 1em;

  /** Add a shadow to the dialog */
  box-shadow: 0px 11px 15px -7px rgba(0, 0, 0, 0.2), 0px 24px 38px 3px rgba(0, 0, 0, 0.14), 0px 9px 46px 8px rgba(0, 0, 0, 0.12);
}

#rules {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  margin-bottom: 1em;
}

#morphodita-analysis table {
  margin-bottom: 1em;
}

#morphodita-analysis table td {
  vertical-align: middle;
}

#morphodita-analysis table .is-last {
  border-bottom: 1px solid #aaaaaa
}