:root {
  --text-color: #000000;
  --bg-color: #fff;
  --bg-secondary-color: #f0f0f0;
  --bg-tertiary-color: #ccc;
  --button-active-color: #999;
}

@media (prefers-color-scheme: dark) {
  :root {
    --text-color: #ffffff;
    --bg-color: #000;
    --bg-secondary-color: #222;
    --bg-tertiary-color: #888;
    --button-active-color: #111;
  }
}

body {
  font-family: Arial, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
}

#tool-panel {
  width: 2em;
  background-color: var(--bg-secondary-color);
  border-right: 1px solid var(--bg-tertiary-color);
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 0.5em;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  border-radius: 4px;
}

#tool-panel > button {
  border: none;
}

button {
  background: none;
  margin: 0.5em 0;
  cursor: pointer;
  font-size: 1.5em;
  border: 2px var(--text-color) solid;
  border-radius: 4px;
  color: var(--text-color);
}

button:hover {
  background-color: var(--bg-tertiary-color);
}

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

#status {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: #222;
  color: #fff;
  padding: 0.5em;
  font-size: 0.9em;
  justify-content: space-between;
  height: 7em;
}

#status-text {
  text-align: right;
  position: absolute;
  right: 2em;
  bottom: 0;
  color: #4dff4d;
  cursor: pointer;
}

#status-text.error {
  color: #ff4d4d;
}

#status-text.warning {
  color: #ffff4d;
}

#construction-site {
  background-color: var(--bg-secondary-color);
  margin-left: 4em;
  overflow: auto;
  border-radius: 15px;
  margin-bottom: 7em;
  padding-bottom: 1em;
}

#construction-site > * {
  margin-left: 1em;
}

.widget-container {
  border: 1px dashed var(--bg-tertiary-color);
  padding: 0.5em;
  margin: 0.5em 0;
  border-radius: 4px;
}

.widget-container > button {
  border: 0;
}

.widget-container > img {
  cursor: pointer;
}

.widget-img-container > img {
  display: block;
}

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

.rich-text-tabs > button {
  color: var(--text-color);
  border: 2px solid var(--bg-tertiary-color);
  border-radius: 4px;
}

textarea,
input,
pre {
  background-color: var(--bg-secondary-color);
  color: var(--text-color);
  border: 2px solid var(--bg-tertiary-color);
  border-radius: 4px;
}

#export-controls > * {
  background: none;
  border: 2px black solid;
  cursor: pointer;
  font-size: 1.5em;
  border-radius: 4px;
  margin: 0.5em 0;
}

#export-controls > *:hover {
  background-color: var(--bg-tertiary-color);
}

#export-controls > *:active {
  background-color: var(--button-active-color);
}

#export-controls > a:link,
a:visited,
a:hover,
a:focus,
a:active {
  color: var(--text-color);
  text-decoration: none;
}

body {
  text-align: left !important;
}

article {
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
  padding-top: 2em;
  padding-bottom: 2em;
}

article > img,
video {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
}

#darken {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 10;
}

.hidden {
  display: none;
}

#stash-file-list {
  font-size: 1em;
}

#stash-file-list > li > button {
  margin-left: auto;
  font-size: 1em;
}

#stash-file-list > li {
  background-color: var(--bg-secondary-color);
  display: flex;
  flex-direction: row;
  text-align: center;
  justify-content: center;
  align-items: center;
  overflow: auto;
}

#stash-file-list > li:nth-child(odd) {
  background-color: var(--bg-tertiary-color);
}

#stash-file-list > li:nth-child(odd) > button:hover {
  background-color: var(--bg-secondary-color);
}

#stash-file-list > li:nth-child(odd) > button:active {
  background-color: var(--bg-color);
}

.panel {
  position: fixed;
  z-index: 1000;
  justify-content: center;
  align-items: center;
  top: 10%;
  left: 10%;
  width: 80%;
  height: 80%;
  background-color: var(--bg-color);
  border: var(--text-color) 4px dashed;
  border-radius: 4px;
  padding: 1em;
}
