#canvas {
  position: absolute;
  left: 10px;
  bottom: 40px;
  width: 100%;
  height: 100%;
}

body, aVar, input, addConstraintButton, bottom, relaxButton {
  font-family: "PT Sans", Arial, Helvetica, sans-serif;
  font-size: 14pt;
  color: #444;
}

aVar, aConstraint, addConstraintButton, relaxButton, bottom {
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
}

app {
  position: absolute;
  pointer-events: none;
  top: 8pt;
  bottom: 8pt;
  left: 8pt;
  right: 8pt;
}

left, right, bottom {
  display: inline-block;
  position: absolute;
}

left {
  left: 0;
  width: 300px;
}

right {
  right: 0;
  width: 400px;
}

addConstraintButton::before {
  pointer-events: auto;
  content: url(images/noun_33942_cc.svg);
  width: 12pt;
  height: 12pt;
  opacity: .8;
}

addConstraintButton {
  pointer-events: auto;
  padding: 0 3pt;
  background: #f8f8f8;
}

addConstraintButton:active {
  box-shadow: 1px 1px 1px 0px rgba(0, 0, 0, .2);
}

addConstraintButton::after {
  pointer-events: auto;
  content: 'add constraint';
}

bottom {
  left: 0;
  right: 0;
  bottom: 0;
}

relaxButton {
  pointer-events: auto;
  display: inline-block;
  position: absolute;
  _min-width: 100px;
  text-align: center;
  right: 0pt;
  bottom: 0pt;
  padding: 1pt 2pt;
  border-radius: 10pt;
  background: #fee;
  border: 1px solid #ffe8e8;
  color: #777;
}

errorValue {
  pointer-events: auto;
  padding-left: 2px;
  color: #ff3333;
}

relaxButton::before {
  pointer-events: auto;
  display: inline-block;
  content: url(images/noun_32380_cc.svg);
  opacity: .5;
  width: 12pt;
  height: 12pt;
}

app.relaxed relaxButton {
  pointer-events: auto;
  background: #efe;
  border: 1px solid #e8ffe8;
}

app relaxButton:active, app.relaxing relaxButton {
  pointer-events: auto;
  box-shadow: 1px 1px 1px 0px rgba(0, 0, 0, .2);
  -webkit-animation: glow 1.5s ease-in-out infinite;
  animation: glow 1.5s ease-in-out infinite;
}

@-webkit-keyframes glow {
  0%   { background: #efe; border-color: #e8ffe8; }
  50%  { background: #fee; border-color: #ffe8e8; }
  100% { background: #efe; border-color: #e8ffe8; }
}

@keyframes glow {
  0%   { background: #efe; border-color: #e8ffe8; }
  50%  { background: #fee; border-color: #ffe8e8; }
  100% { background: #efe; border-color: #e8ffe8; }
}

app relaxButton:active::after, app.relaxing relaxButton::after {
  -webkit-animation: levitate 2s linear infinite;
  animation: levitate 2s linear infinite;
}

@-webkit-keyframes levitate {
  0%   { transform: translate(0, 0); }
  25%  { transform: translate(0, -1pt); }
  75%  { transform: translate(0, 1pt); }
  100% { transform: translate(0, 0); }
}

@keyframes levitate {
  0%   { transform: translate(0, 0); }
  25%  { transform: translate(0, -1pt); }
  75%  { transform: translate(0, 1pt); }
  100% { transform: translate(0, 0); }
}

app relaxButton::after {
  display: inline-block;
  padding-left: 2pt;
  content: url(images/noun_86100_cc.svg);
  opacity: .5;
  padding-bottom: 2pt;
}

app.relaxed relaxButton::after {
  content: url(images/noun_58521_cc.svg);
}

app relaxButton:hover::after, app.relaxing relaxButton::after {
  content: url(images/noun_61520.svg);
  opacity: .8;
}

aConstraint, aVar, addConstraintButton, relaxButton {
  pointer-events: auto;
  display: inline-block;
  box-shadow: 1px 1px 2px 0px rgba(0, 0, 0, .5);
  border-radius: 4pt;
  clear: both;
}

aConstraint, aVar {
  margin-bottom: 6pt;
}

aConstraint > *, aVar > * {
  padding: 0 1pt;
}

input {
  pointer-events: auto;
  -webkit-user-select: text;
  -moz-user-select: text;
  user-select: text;
  width: 100px;
  border: none;
  outline: none;
  background: none;
  padding: 3pt 0pt;
  text-overflow: ellipsis;
}

aConstraint, addConstraintButton {
  float: right;
  border: #f9f9f9;
}

aConstraint {
  overflow: hidden;
  max-width: 322px;
  background: #efe;
}

aConstraint > input {
  padding-left: 4pt;
  width: 300px;
}

aConstraint > input {
  color: #444;
}

aVar > input {
  color: #77e;
}

aConstraint > error {
  display: none;
}

aConstraint.withError > error {
  display: block;
  padding: 2pt;
  background: #fcf68b;
  color: #928f63;
  font-size: 12pt;
}

aConstraint > error label {
  font-weight: bold;
}

aConstraint > error description {
  color: maroon;
  font-weight: bold;
}

aConstraint > error light {
  opacity: 0.5;
}

aConstraint > error literal {
  white-space: nowrap;
}

aConstraint > error code {
  opacity: 1;
  color: maroon;
  font-family: Monaco, "Lucida Console", monospace;
}

aVar {
  float: left;
  background: #f8f8f8;
  border: #f5f5f5;
}

aVar.locked {
  background: #f0f0f0;
  color: #333;
}

aVar.locked > input {
  color: #333;
}

aVar > name {
  display: inline-block;
  white-space: nowrap;
  width: 75px;
  max-width: 75px;
}

aVar > input {
  text-align: right;
  width: 100px;
}

aVar.dirty > name, aVar.dirty > input, aConstraint.dirty > input {
  color: #c55;
  font-weight: bold;
}

aVar > lockButton {
  width: 12pt;
  height: 12pt;
}

aVar > lockButton::after {
  display: inline-block;
  content: url(images/noun_1560_cc.svg);
  width: 12pt;
  height: 12pt;
}

aVar.locked > lockButton::after {
  content: url(images/noun_1559_cc.svg);
  width: 12pt;
  height: 12pt;
}

aVar > barsButton {
  width: 12pt;
  height: 12pt;
  margin-right: 2pt;
}

aVar > barsButton::after {
  display: inline-block;
  content: url(images/noun_29229_cc.svg);
  width: 12pt;
  height: 12pt;
}

aConstraint > deleteButton, aVar > deleteButton {
  width: 14pt;
  height: 14pt;
}

aConstraint > deleteButton::after, aVar > deleteButton::after {
  display: inline-block;
  content: url(images/noun_33853_cc.svg);
  width: 14pt;
  height: 14pt;
}

aVar > lockButton,
aVar > barsButton,
aVar > deleteButton,
aConstraint > deleteButton {
  opacity: .5;
}

aVar > lockButton:hover,
aVar.hasBar > barsButton,
aVar > deleteButton:hover,
aConstraint > deleteButton:hover {
  opacity: .8;
}

app about {
  display: inline-block;
  max-width: 300px;
  float: left;
  cursor: default;
}

about::before {
  font-size: 10pt;
  color: #77e;
  content: '[about]';
}

about contents {
  display: none;
}

about:hover::before {
  display: none;
}

about:hover contents {
  font-size: 10pt;
  display: block;
  background: #efe;
  padding: 4pt;
  border-radius: 4pt;
  box-shadow: 1px 1px 1px 0px rgba(0, 0, 0, .2);
}

about contents main {
  display: block;
  margin-bottom: 2pt;
}

iconInfo {
  display: block;
  font-size: 8pt;
  color: #444;
}

about appName {
  font-weight: bold;
  color: #928f63;
}

about contents a {
  text-decoration: none;
}

addConstraintButton, deleteButton, lockButton, relaxButton {
  cursor: pointer;
}

icons {
  font-size: 8pt;
}
