* {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  box-sizing: border-box;
  font-size: 18px;
}

body {
  background: #fefefe;
  margin: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
}

html {
  height: 100%;
}

li {
  margin: 4px 0;
}

.rule>span:first-child {
  width: 30%;
}

.delete {
  margin-right: 10px;
}

button {
  border-radius: 2px;
  cursor: pointer;
}

button:hover {
  background: rgba(1, 1, 1, 0.1)
}

#rules ol {
  overflow: hidden;
}

.add-rule {
  margin: 20px 0;
  display: block;
  clear: both;
}

.rule span:last-child {
  color: rgb(154, 154, 154);
  /* background: white; */
}

#app {
  padding: 20px;
  padding-top: 0;
  flex-grow: 1;
}

@media screen and (min-width: 900px) {
  div#app {
    display: grid;
    grid-column-gap: 20px;
    grid-row-gap: 0px;
    grid-template-columns: repeat(2, minmax(200px, 1fr));
  }
}


#app> :nth-child(1) {
  grid-area: 3 / 1 / 4 / 2;
}

#app> :nth-child(2) {
  grid-area: 4 / 1 / 5 / 2;
}

#app> :nth-child(3) {
  grid-area: 1 / 1 / 2 / 2;
}

#app> :nth-child(4) {
  grid-area: 2 / 1 / 3 / 2;
}

#app> :nth-child(5) {
  grid-row: auto / span 1;
}

#app> :nth-child(6) {
  grid-row: auto / span 5;
}

pre {
  white-space: pre-wrap;
  color: #212121;
  font-family: 'ubuntu mono', Consolas, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, Bitstream Vera Sans Mono, Courier New;

}

button.delete {
  background: none;
  border: 0;
  margin: 0;
}

button.delete:after {
  opacity: 0.5;
  content: '🗑️';
  color: black;
  font-size: initial;
}

button.delete {
  color: transparent;
  font-size: 0;
}

button.delete:hover:after {
  opacity: 1;
}

textarea#source {
  display: block;
  width: 100%;
  height: 20vh;
  width: 100% !important;
  padding: 8px;
  font-size: 100%;
  opacity: 0.5;
  transition: opacity 50ms ease-out;
}

#source:focus,
#source:hover {
  opacity: 1;
}

header, footer {
  display: flex;
  justify-content: space-between;
  padding: 20px;
  background: #5D5D5D;
  font-weight: bold;
  color: #fefefe;
  margin-bottom: 20px;
}

footer {
  margin: 0;
  margin-top: 20px;
  font-weight: normal;
}

header a, footer a {
  color: #fff;
}

header p, footer p {
  margin: 0;
}

header p:last-child {
  margin-left: 20px;
}

.error input {
  background: #FFCDD2;
}

.copy {
  border: 0;
  background: none;
  text-decoration: underline;
  font-weight: normal;
  margin-left: 8px;
  border-radius: 2px;
  color: #999;
}

.copy:hover {
  color: #000;
}

/* I feel utterly ashamed of myself for doing this… */
.copy:after {
  content: 'y';
}

.copy:active:after {
  content: 'ied';
}
