$bgcolor: #d10000;

.validate-error {
  border-color: $bgcolor !important;
}

.validate-popup {
  transition: all ease 300ms;
  cursor: pointer;
  position: absolute;
  background-color: $bgcolor;
  color: white;
  font-size: 12px;
  line-height: 1;
  padding: 8px 12px;
  z-index: -1;
  opacity: 0;
  &.active {
    z-index: 99999;
    opacity: 1;
  }
  &:after {
    position: absolute;
    bottom: 0;
    right: 0;
    content: '';
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 5px 5px 0 5px;
    border-color: $bgcolor transparent transparent transparent;
    margin-right: 8px;
    margin-bottom: -5px;
  }

  &.short-version {
    &:after {
      left: 0;
      margin-left: 8px;
    }
  }
}

/**
 * Validation based on className, for iframe solutions
 */

.validate-class {
  position: relative;
}

.validate-class:before,
.validate-class:after {
  content: '';
  opacity: 0;
  transition: opacity ease 300ms;
  position: absolute;
  right: 0;
  top: -36px;
}

.validate-class:before {
  background-color: $bgcolor;
  color: white;
  font-size: 12px;
  line-height: 1;
  padding: 8px 12px;
  white-space: nowrap;
}

.validate-class:after {
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 5px 5px 0 5px;
  border-color: $bgcolor transparent transparent transparent;
  margin-top: 28px;
  margin-right: 10px;
}
