* {
  box-sizing: border-box;
}

body,
html {
  margin: 0;
}

html {
  height: 100%;
}

body {
  font-family: sans-serif;

  display: flex;
  flex-direction: column;
  gap: 15px;
  padding: 10px;
  height: 100%;
}

pre {
  margin: 0;
  overflow: hidden;
}

main {
  flex: 1;

  display: flex;
  flex-direction: column;
  gap: 5px;
}

fieldset {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 7.5px;
  border: 2px outset #333;
  margin: 0;
}

#editor {
  position: relative;
  flex: 1;
  border: 1px outset #333;
}

#editor > * {
  line-height: 1.25;
  tab-size: 4;
  padding: 10px;

  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;

  font-family: "Fira Code", monospace;
  word-wrap: break-word;
  white-space: pre;
  overflow-wrap: break-word;

  font-size: 0.9rem;
}

#editor-textarea {
  resize: none;
  border: none;
  color: transparent;
  background: transparent;
  z-index: 1;
  caret-color: black;
  overflow: auto;
}

#editor-textarea::selection {
  background: #67b4fb5d;
}

#editor-textarea:focus {
  outline: none;
}

#logs {
  flex: 1;

  padding: 10px 5px;
  border: 2px outset #333;
  background: #eee;
  font-family: monospace;
}

#logs__container {
  height: 100%;
  overflow-y: auto;

  display: grid;
  grid-template-columns: 5ch 10em 1fr;
  grid-auto-rows: min-content;
}

.log__timestamp {
  font-family: monospace;
  color: #666;
  text-align: right;
  padding: 2px 10px;
  border-right: 1px solid #333;
  margin-right: 5px;
}

.log__text {
  font-family: sans-serif;
}

h3 {
  margin: 0 0 5px;
  padding-bottom: 7.5px;
  border-bottom: 1px solid #333;
}

.secondary {
  color: black;
  background: none;
  border: 1px transparent;
}

.secondary:hover {
  text-decoration: underline;
}

.copied:after {
  content: "Copied!";
  position: absolute;
  margin-left: 5px;
  color: rgb(48, 48, 48);
  padding: 1.5px 3px;
  margin-top: -1.5px;
  border-radius: 2px;
  background: lime;

  animation: bounce 0.25s ease-in-out;
}

@keyframes bounce {
  0% {
    transform: scale(0.95) translateY(3px);
  }
  30% {
    transform: scale(1.05) translateY(-5px);
  }
  100% {
    transform: scale(1) translateY(0);
  }
}
