@font-face {
  font-family: 'Fira Code';
  font-style: normal;
  font-weight: normal;
  src: url('fonts/FiraCode-Regular.woff2') format('woff2');
}

@font-face {
  font-family: 'Fira Code';
  font-style: normal;
  font-weight: bold;
  src: url('fonts/FiraCode-Bold.woff2') format('woff2');
}

@font-face {
  font-family: 'Karla';
  font-style: normal;
  font-weight: normal;
  src: url(https://fonts.gstatic.com/s/karla/v14/qkBIXvYC6trAT55ZBi1ueQVIjQTD-JqaE0lK.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Helvetica Neue';
  font-style: normal;
  font-weight: normal;
  src: url('fonts/HelveticaNeue-Regular.woff2') format('woff2');
}

@font-face {
  font-family: 'Helvetica Neue';
  font-style: normal;
  font-weight: bold;
  src: url('fonts/HelveticaNeue-Bold.woff2') format('woff2');
}

@font-face{
  font-family: 'Source Code Pro';
  font-weight: normal;
  font-style: normal;
  font-stretch: normal;
  src: url('fonts/SourceCodePro-Regular.otf.woff2') format('woff2');
}

@font-face{
  font-family: 'Source Code Pro';
  font-weight: bold;
  font-style: normal;
  font-stretch: normal;
  src: url('fonts/SourceCodePro-Bold.otf.woff2') format('woff2');
}

@font-face{
  font-family: 'Source Code Pro';
  font-weight: 900;
  font-style: normal;
  font-stretch: normal;
  src: url('fonts/SourceCodePro-Black.otf.woff2') format('woff2');
}

:root {

  --base-radius: 0.1em;
  --main_background-color: #e8e2ff;

}

/* furl */

* {
  box-sizing: border-box;
}

body {
  background-image: radial-gradient(#f9a7fe 0.5px, #e8e2ff 1px);
  background-size: 1.6rem 1.6rem;
}

#root {
  min-height: 100vh;
  padding: 5em;
  font-family: 'Press Start 2P', monospace;
  font-size: 1.6rem;
  display: flex;
  justify-content: center;
}

.title {
  position: fixed;
  top: 0;
  left: 0;
  font-size: 1.5em;
  display: flex;
  height: 3em;
  transform: scale(66%) skewY(2deg) skewX(17deg);
}
.title-f {
  position: relative;
  color: #9699f6;
  background-color: #e1d8fd;
  border-bottom-left-radius: 1em;
  text-shadow: 3px 0 #7d346b;
}
.title *:hover {
  transform: skewY(7deg) scale(1.3);
  text-shadow: 3px 0 #fe00be;
  box-shadow: 6px 0px #edff00;
}
.title-u {
  position: relative;
  top: 4px;
  right: -2px;
  color: #f56197;
  background-color: #d3dcff;
  text-shadow: 3px 0 #00ffee;
}
.title-r {
  position: relative;
  top: -4px;
  right: -2px;
  color: rgb(44 210 196);
  background-color: #fdd6f6;
  text-shadow: 3px 0 #00ffee;
}
.title-l {
  position: relative;
  top: 1px;
  right: -3px;
  color: rgb(255 180 64);
  background-color: #caf1cd;
  border-bottom-right-radius: 3em;
  text-shadow: 3px 0 #009aff;
}

.cells-view {
  width: 38em;
  height: fit-content;
  padding: 1em 0 1em 0;
}

.cell-view {
  display: flex;
  justify-content: space-between;
  /*height: 1.5em;*/
  border-radius: var(--base-radius);
  padding-left: 1em; /* HACK */
  cursor: pointer;
}

.cell-view.on-path {
  background-color: #d1ccf877;
  outline: solid 0.2em #d1ccf877;
  border-radius: 0px;
}
.cell-view:hover {
  background-color: #caa2ff22;
  outline: solid 0.2em #caa2ff22;
}
.cell-view.focussed {
  background-color: #fffa9d;
  outline: solid 0.2em #fff881;
  border-radius: 0px;
  box-shadow: 0.2em 0.15em 0 0.2em #9799f6;
}
.cell-view.focussed .expression-view.expr-app,
.cell-view.focussed .exp-atom-operator {
  background-color: #fffff1;
  outline: solid 0.3em #fffff0;
  box-shadow: 0px 4px 0px 0.3em #9699f6;
}

.expression-view, .pattern-view, .value-view {
  display: flex;
  /*gap: 1em;*/
  height: 0.8em;
  align-items: center;
}

.pattern-view {
}

.pattern-atom.pat-atom-var.unused {
  color: #b0b2e3;
  text-shadow: 4px 2px #f3f3f3;
}
.pattern-atom.pat-atom-var.single-use {
  color: #f56197;
  /*text-shadow: 3px 2px #00fff1;*/
}
.pattern-atom.pat-atom-var.many-uses {
  color: #f56197;
  /*text-shadow: 3px 2px #00fff1;*/
  text-decoration: underline;
}

.pattern-atom.pat-atom-var.use-selected {
  color: #e4ff03 !important;
  text-shadow: 2px 2px #140614, -2px -2px #cbc6cb;
}

.expression-view {
  position: relative;
}

.expression-view.expr-app {
  background-color: #efe9fe;
  outline: solid 0.3em #efe9fe;
  box-shadow: 1px 1px 0px 0.3em #dcd6eb;
  border-top-left-radius: 0.1em;
  /* border-bottom-left-radius: 0.3em;*/
}
.expression-view.expr-app .expression-atom:nth-child(2) {
  color: #83b8c9;
}

.value-view {
  color: rgb(44 210 196);
  /*text-shadow: 2px 1px #184a35;*/
}

.value-atom.value-unknown {
  color: var(--main_background-color);
  background-color: rgb(44 210 196);
  outline: solid 1px rgb(44 210 196);
}

.expression-atom {
  color: #194b57;
}

.expression-atom, .pattern-atom {
  display: inline-block;
  cursor: pointer;
}

.expression-atom.binder-selected {
  color: #e4ff03;
  text-shadow: 2px 2px #140614, -2px -2px #cbc6cb;
}

.expression-atom.exp-atom-unbound,
.expression-atom.exp-atom-formless {
  background-color: #a9a1cd;
  color: #e7e2fd;
  outline: solid 1px #a9a1cd;
}
.expression-atom.exp-atom-unbound.focussed,
.expression-atom.exp-atom-formless.focussed {
  background-color: rgb(68 62 84);
  color: #e4ff03;
  outline: solid 1px rgb(68 62 84);
}

.expression-atom.exp-atom-unbound::after, .expression-atom.exp-atom-formless::after {
  content: "?";
}

.expression-atom.exp-atom-operator{
  background-color: #efe9fe;
  outline: solid 0.1em #efe9fe;
  box-shadow: 1px 1px 0px 0.1em #d5cfe3;
  color: #83b8c9;
  border-radius: 0.3em 0.3em 0.3em 0em;
}

.expression-atom.active-drop-target {
  color: #ff0000 !important;
    background-color: rgba(51 0 87 / 60%) !important;
    outline: none !important;
    transform: skew(10deg, 2deg) rotate(-5deg);
    text-decoration: line-through;
    /*transform: scale(135%);*/
}

.atom.on-path, .atom.focussed {
  outline: solid 2px #e4ff00;
  background-color: #e4ff00;
  /*color: #9799f6 !important;*/
  border-radius: 0em;
  box-shadow: 6px 3px #9799f6;
  text-shadow: none !important;
  /* temp, replace with random: */
  transform: skewX(12deg) skewY(-1.4deg);
}

 .atom:hover,
 .pattern-atom.pat-atom-var:hover,
 .expression-view.expr-app .expression-atom:hover {
  color: #00fbf1;
  text-shadow: 1px 2px #1ecdbb;
  transform: scale(1.13);
}

.word-separator{
  display: flex;
  color: #0000;
  border-radius: var(--base-radius);
  cursor: cell;
  justify-content: center;
}

.word-separator:only-child{
  width: 14em;
}

.word-separator:last-child{
  position: absolute;
  right: -2em;
  width: 2em;
}
.word-separator:first-child{
  position: absolute;
  left: -2em;
  width: 2em;
}

.word-separator:hover{
  color: #9799f6;
}

.word-separator.active-drop-target {
  background-color: beige;
  outline: double 1em beige;
  border-radius: 0.1em;
}

.expression-atom.active-drop-target {
  background-color: beige;
  outline: double 1em beige;
  border-radius: 0.1em;
}

.cell-separator {
    height: 0.9em;
    border-radius: 0.1em;
}

.cell-separator.active-drop-target {
  background-color: beige;
  border-radius: 0.1em;
}

.cell-separator:first-child, .cell-separator:last-child {
  height: 0.8em;
}

.cell-separator:hover:first-child, .cell-separator:hover:last-child {
  /*outline: double 0.5em rgba(245 245 220 / 33%);*/
}
.cell-separator:hover:not(:first-child):not(:last-child) {
  border-radius: 0.5em;
}
.cell-separator:hover{ 
  background-color: rgb(245 245 220 / 33%);
  cursor: row-resize;
}

.toolbar {
  position: fixed;
  z-index: 1;
  top: 0.6em;
  right: 0.6em;
  background-color: #c4b4ff55;
  transform: skew(-3deg, 1deg);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5em;
  border-radius: 1em 0 1em 0;
  padding: 0.2em;
  float: right;
  color: #bdfff6;
  text-shadow: 1px 1px #fe19b9;
  width: 9em;
  justify-content: space-around;
  box-shadow: -1px -1px 0px 0px #d9f5f9, 1px 1px 0px 0px #e3b9f1;
}

.toolbar-atom:hover {
  text-shadow: 3px 2px #00fff1;
  color: #e4ff00;
}

.trash-item {
  opacity: 0.1;
  text-decoration-line: line-through;
  transform: skewX(-20deg) skewY(3deg);
  color: #3500ff;
}

.trash-panel {
  position: fixed;
  top: 0.5em;
  left: 5.8em;
  z-index: 1;
  cursor: pointer;
}

.trash-panel:hover {
  transform: rotate(35deg);
  text-shadow: 9px 4px yellow;
}

.anim-control-panel {
  position: fixed;
  top: 0.5em;
  left: 7.5em;
  z-index: 1;
  cursor: pointer;
}

.cell-control-panel {
  position: fixed;
  top: 0.7em;
  left: 9.3em;
  z-index: 1;
  cursor: pointer;
  color: #f56197;
}

.trash-panel:hover,
.cell-control-panel:hover,
.anim-control-panel:hover {
  transform: rotate(35deg);
  text-shadow: 9px 4px yellow;
}

.panel-off {
  opacity: 21%;
}