@import url("merriweather.css");

:root {
  --bg-color: rgb(230, 220, 100);
  --bg-color-alt: rgb(238, 229, 133);
  --ocean-blue: rgb(77, 156, 242);
  --ocean-deep-blue: #4070fe;
  --rock-gray: rgb(171, 178, 188);
  --dark-rock-gray: rgb(143, 153, 165);
  --a-color: black;
  --a-hover-color: rgb(123, 121, 63);
  --gold-star-yellow: rgb(191, 172, 74);
}

body {
  width: 100%;
  height: 100%;
}

html,
body {
  margin: 0;
  padding: 0;
  background-color: var(--ocean-blue);
  overflow-x: hidden;
}

.header {
  padding-top: 1px;
  padding-bottom: 0.5em;
  margin-bottom: 1em;
  border-bottom: 0.5em solid white;
  background-color: var(--bg-color);
}

p {
  margin: 0;
}

p + p {
  margin-top: 0.5rem;
}

nav {
  display: flex !important;
  flex-wrap: wrap;
  justify-content: space-between;
}

nav > div {
  display: inline-block;
}

nav .flex-right {
  margin-left: auto;
}

.mbot {
  margin-bottom: 0.5em;
}

.mleft {
  margin-left: 0.5em;
}

a,
a:visited {
  color: var(--a-color);
}
a:hover {
  color: var(--a-hover-color);
}
nav a.active {
  font-weight: 800;
}

h2 {
  margin: 0;
}

h3 {
  margin: 0 0 0.5em 0;
}

h4 {
  margin: 0 0 0.3em 0;
}

.center {
  display: block;
  margin: 0 auto;
  padding: 0 0.5em;
  max-width: 100%;
  box-sizing: border-box;
}

.main-content-width {
  max-width: 80ch;
}

#notifications {
  position: fixed;
  top: 1em;
  right: 1em;
}

#notifications dialog {
  margin-right: 0;
  margin-left: auto;
  min-width: 30ch;
  max-width: 50ch;
  position: static;
}

.box {
  background-color: var(--bg-color);
  border: 1px solid white;
  border-top: 0.5em solid white;
  border-bottom: 0.5em solid white;
  padding: 0.5em;
}

.box .box {
  background-color: var(--bg-color-alt);
}

.box .box .box {
  background-color: var(--bg-color);
}

.form-item + .form-item {
  margin-top: 0.5em;
}

.form-item input[type="text"],
.form-item input[type="password"] {
  width: 100%;
  box-sizing: border-box;
}

input {
  accent-color: var(--ocean-deep-blue);
  border: 2px solid white;
  border-radius: 5px;
}

input[type="submit"],
input[type="button"] {
  font-size: 1em;
  padding: 5px 10px;
  box-sizing: border-box;
  margin: 2px;
}

input[type="submit"]:active,
input[type="button"]:active {
  border-width: 3px;
  margin: 1px;
}

input[type="button"] {
  color: white;
  background-color: var(--dark-rock-gray);
}

input[type="button"]:hover {
  background-color: var(--rock-gray);
}

input[type="button"]:active {
  background-color: var(--dark-rock-gray);
}

input[type="submit"] {
  background-color: var(--ocean-deep-blue);
  color: white;
}

input[type="submit"]:hover {
  background-color: var(--ocean-blue);
  color: white;
}

input[type="submit"]:active {
  background-color: var(--ocean-deep-blue);
  color: white;
}

table {
  text-align: left;
  width: 100%;
}

.gold-stars::after {
  color: var(--gold-star-yellow);
  content: "★";
  text-shadow:
    0.05em 0 white,
    0 0.05em white,
    -0.05em 0 white,
    0 -0.05em white,
    -0.05em -0.05em white,
    -0.05em 0.05em white,
    0.05em -0.05em white,
    0.05em 0.05em white;
}

.form-button {
  display: inline;
}

hr {
  color: white;
  border: 1px solid white;
}

.link {
  border: 0 !important;
  padding: 0 !important;
  text-decoration: underline;
  font: inherit;
  cursor: pointer;
  display: inline;
  background: inherit;
  color: var(--a-color) !important;
  background-color: transparent !important;
}

.link:hover {
  color: var(--a-hover-color) !important;
}

.chat-bubble {
  position: absolute;
  border-radius: 0.5rem;
  border: 1px solid #bbbbbb;
  background: white;
  padding: 5px;
  opacity: 1;
  max-width: 30ch;
  transition: opacity 1s ease-out;
  z-index: 1001;
}

#chat-toggle-button {
  cursor: pointer;
  border: none;
  background: none;
  position: fixed;
  bottom: 10px;
  left: 10px;
  font-size: 32px;
}

#chat-bar {
  position: fixed;
  display: flex;
  width: 100%;
  bottom: 0px;
  padding-left: 62px;
  vertical-align: middle;
  box-sizing: border-box;
  justify-content: center;
}

#chat-bar > form {
  display: flex;
  flex: 1;
  max-width: 70ch;
  height: 32px;
}

#chat-bar input[type="submit"] {
  margin: 0 0 0 0.5em;
}

.entry-content h2 {
  margin: 1em 0 0.2em 0 !important;
}

.entry-content h3 {
  margin: 1em 0 0.2em 0 !important;
}

.entry-content h4 {
  margin: 1em 0 0.2em 0 !important;
}

.entry-content figure {
  max-width: 80%;
  margin: 0.5em auto;
}

.entry-content video {
  display: block;
  max-width: 100%;
  margin: auto;
  border: 2px solid white;
}

.entry-content img {
  display: block;
  max-width: 100%;
  margin: auto;
  border: 2px solid white;
}

.entry-content p {
  text-align: justify;
}

textarea {
  width: 100%;
  box-sizing: border-box;
  height: auto;
  tab-size: 4;
}

.preview {
  background-color: lightblue;
  padding: 0.5em;
}

#content,
#content-highlights {
  font-size: 1em;
  font-family: monospace;
  position: absolute;
}

#content-highlights {
  z-index: 1;
  padding: 6px;
  width: 100%;
  height: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

.syntax-highlight #content {
  color: transparent;
  background: transparent;
  z-index: 2;
  height: 100%;
  min-height: 100%;
  max-height: 100%;
  max-width: 100%;
  min-width: 100%;
  padding: 4px;
  border: 2px solid white;
  margin: 0 auto;
  white-space: nowrap;
}

.syntax-highlight {
  background-color: rgb(45, 35, 5);
  width: 100%;
  height: 400px;
  position: relative;
  caret-color: white;
  color: #f0f0f0;
}

.html-comment {
  color: rgb(50, 170, 30);
}

.html-tab {
  display: inline-block;
  width: 4ch;
}

.html-tag-begin,
.html-tag-end {
  color: rgb(98, 142, 224);
}

.html-tag-attr {
  color: rgb(131, 189, 223);
}

.html-string-literal {
  color: rgb(200, 150, 20);
}

.note {
  margin-block: 0.5em;
  margin-inline: 1em;
  padding: 0.5em;
  border-left: 2px solid white;
}

.username {
  font-family: monospace;
  font-size: 1.2em;
}

.username-flag {
  display: inline-block;
  vertical-align: middle;
  height: 14px;
  width: 20px;
  border: 1px solid white;
  border-radius: 4px;
  font-size: 8px;
  font-family: monospace;
}

.username-flag > span {
  display: inline-block;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  border: 2px solid;
  border-radius: 3px;
  text-align: center;
  user-select: none;
}

.big-flag {
  image-rendering: pixelated;
  width: 100px;
  border: 2px solid white;
  border-radius: 5px;
}

/* color picker */
.color-row {
  display: flex;
  flex-direction: row;
}

.color-row-item {
  flex: 1;
  display: block;
}

.color-row-item * {
  display: block;
  width: 90%;
  margin: 0 auto;
}

.color-bg {
  position: relative;
  flex: 1;
  border: 2px solid white;
  border-radius: 5px;
}

.color-bg label {
  display: block;
  width: 100%;
  height: 100%;
  text-align: center;
  align-content: center;
}

.color-bg label > div {
  border: 1px solid white;
  background-color: #ffd000;
  padding: 0.2em;
  border-radius: 5px;
  display: inline-block;
  user-select: none;
  font-size: 0.8em;
}

.color-bg label > div > * {
  margin: 0;
  vertical-align: middle;
}

.color-bg-original {
  border: 1px solid white;
  border-radius: 5px;
  width: 20px;
  height: 20px;
  position: absolute;
  left: 5px;
  top: 5px;
}

.color-picker-display {
  display: flex;
  gap: 5px;
}

#color-picker-display-lilboat {
  width: 32px;
  height: 32px;
  padding: 1em;
  border: 2px solid white;
  border-radius: 5px;
  background-color: #ffd000;
}
