.ex,
.check {
  display: none;
  position: absolute;
  right: 0;
}

.validate:invalid ~ .ex,
.validate:valid ~ .check {
  display: inline;
}

.check:before,
.ex:before,
.ex:after {
  content: "";
  position: absolute;
  z-index: 1;
}

.check:before {
  -moz-border-bottom-colors: none;
  -moz-border-left-colors: none;
  -moz-border-right-colors: none;
  -moz-border-top-colors: none;
  border-color: #006699;
  border-image: none;
  border-style: solid;
  border-width: 0 0 3px 3px;
  height: 4px;
  right: 12px;
  top: 13px;
  transform: rotate(-45deg);
  width: 10px;
}

.success:valid ~ .check:before {
  border-color: #4f8e28;
}

.ex:before,
.ex:after {
  background: none repeat scroll 0 0 #cc0066;
  height: 12px;
  right: 16px;
  top: 13px;
  transform: rotate(45deg);
  width: 3px;
}

.ex:after {
  transform: rotate(-45deg);
}

.success.validate:valid {
  background: none repeat scroll 0 0 #e2fbca;
  border-color: #92c058;
  color: #435c26;
}

.success:valid:focus {
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.15) inset,
    0 0 8px rgba(121, 185, 0, 0.7);
}

.success:valid,
.validate:invalid {
  text-shadow: 0 1px rgba(255, 255, 255, 0.7);
}

.validate:invalid:focus {
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.15) inset,
    0 0 8px rgba(228, 70, 52, 0.7);
}

.validate:invalid {
  background: none repeat scroll 0 0 #fcdacd;
  border-color: #e44634;
  border: 1px solid #db6c6c;
  color: #800000;
}

.ex:before,
.ex:after {
  background: none repeat scroll 0 0 #ad3925;
}

.validate:focus {
  position: relative;
  z-index: 2;
}

.validate:valid {
  background: none repeat scroll 0 0 #ebf7fc;
  border: 1px solid #3ea9df;
  color: #1a719d;
}
