@charset "utf-8";

* {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, "Helvetica Neue", sans-serif;
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0) !important;
}

html {
  overflow-y: scroll;
}

h1 {
  text-align: center;
  padding: 0 10px;
}

h2 {
  padding: 10px;
  text-align: center;
}

h3 {
  padding: 0 10px 7px 10px;
}

section {
  padding: 10px;
  max-width: 600px;
  width: 100%;
  margin: auto;
  padding-bottom: 30px;
  text-align: center;
}

section h3:not(:first-child) {
  padding-top: 20px;
}

section p {
  padding: 10px;
}

footer {
  padding: 10px 10px 20px 10px;
  text-align: center;
}

a {
  color: inherit;
  text-decoration: underline;
  -webkit-text-underline-position: under;
  -ms-text-underline-position: below;
  text-underline-position: under;
  cursor: pointer;
  transition: all .3s ease;
}

a:focus {
  outline: none;
}

button {
  display: block;
  padding: 5px 10px;
  background: #ededed;
  color: #000;
  border-radius: 5px;
  text-decoration: none;
  margin: 10px auto;
  transition: all .3s ease;
  font-size: 20px;
  border: none;
  cursor: pointer;
  border: 1px solid #ededed;
  transition: all .3s ease;
}

button:hover {
  background: #e5e5e5;
  border-color: #e5e5e5;
}

button:focus {
  outline: none;
  border-color: #a9a9a9;
}

button p {
  padding: 0;
  line-height: 1.5;
}

ul {
  padding-left: 30px;
}

li {
  padding: 5px;
}

table {
  border-collapse: collapse;
  margin: auto;
}

th, td {
  padding: 15px;
  text-align: center;
  border: 1px solid lightgray;
}

td.true {
  background: #daffda;
}

td.false {
  background: #ffdbd9;
}

.left-align {
  text-align: left;
}

.input-container {
  margin: 10px auto;
  text-align: center;
  padding-bottom: 0;
}

.input-container p {
  padding: 5px 10px 10px;
}

.input {
  display: block;
  padding: 10px 20px;
  border: 1px solid #d3d3d3;
  resize: none;
  width: 100%;
  max-width: 600px;
  height: 54px;
  border-radius: 5px;
  font-size: 20px;
  margin: auto;
  transition: all .3s ease;
}

.input:focus {
  border-color: #999999;
  outline: none;
}

.output {
  text-align: left;
}

.output::before,
.output::after {
  display: block;
  content: "";
  clear: both;
}

.output p {
  padding: 0;
  padding-bottom: 5px;
}

.output h3, .output h4 {
  padding: 0 0 7px 0;
}

.container {
  width: 50%;
  float: left;
  padding: 10px;
}

.canvas-container, .debug-container {
  width: 100%;
  float: left;
}

.debug-container {
  padding: 10px;
}

.center {
  text-align: center;
}

.error-color {
  color: #F44336;
}

.error-msg {
  color: #F44336;
  text-align: center;
}

.error-input {
  border-color: #F44336;
}

.hide {
  display: none;
}

.guide-step, .history-entry {
  display: inline-block;
  font-size: 16px;
  margin: 10px;
}

.locale-switch-warning {
  padding: 10px;
}

.locale-switch-warning-container {
  position: relative;
  text-align: center;
  padding: 5px;
  border: 1px solid #d3d3d3;
  border-radius: 7px;
}

.locale-switch {
  padding: 5px 10px;
  margin: 5px;
  display: inline-block;
}

.locale-switch-warning-container .locale-switch {
  margin: 0;
  display: initial;
}

.locale-switch.active {
  background: #000;
  color: #fff;
  border-radius: 999px;
  text-decoration: none;
  font-weight: bold;
}

.locale-switch-warning-close {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  padding: 0;
  margin: 0;
  background: transparent;
  width: 20px;
  height: 20px;
  border: none;
}

.locale-switch-warning-close:hover {
  background: transparent;
}

.locale-switch-warning-close svg {
  width: 20px;
  height: 20px;
  margin: 0;
  padding: 0;
  fill: #333;
  transition: all .3s ease;
}

.locale-switch-warning-close:hover svg {
  opacity: 0.7;
}


canvas {
  width: 100%;
}

@media only screen and (max-width: 600px) {
  .container {
    width: 100%;
    text-align: center;
  }
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
  body {
    background-color: #1a1a1a;
    color: #f0f0f0;
  }

  a, p, h1, h2, h3, h4 {
    color: #f0f0f0;
  }

  button {
    background: #333;
    border-color: #333;
    color: #f0f0f0;
  }

  button:hover {
    background: #444;
    border-color: #444;
  }

  button:focus {
    border-color: #666;
  }

  th, td {
    border-color: #333;
  }

  td.true {
    background: #062007;
  }
  
  td.false {
    background: #230706;
  }

  .input {
    background-color: #1a1a1a;
    border-color: #333;
    color: #f0f0f0;
  }

  .input:focus {
    border-color: #4a4a4a;
  }

  .locale-switch-warning-container {
    border-color: #333;
  }

  .locale-switch.active {
    background: #fff;
    color: #000;
  }

  .locale-switch-warning-close svg {
    fill: #ccc;
  }
}