@import "./__config";

.plastic-editor-view {

  @-webkit-keyframes cursor-opacity-throbbing {
    from {
      opacity: @cursor-border-opacity1;
    }
    to {
      opacity: @cursor-border-opacity2;
    }
  }
  
  @-webkit-keyframes cursor-border-throbbing {
    from {
      border-color: @cursor-border-color1;
    }
    to {
      border-color: @cursor-border-color2;
    }
  }

  @-webkit-keyframes cursor-background-throbbing {
    from {
      background-color: @cursor-border-color1;
    }
    to {
      background-color: @cursor-border-color2;
    }
  }
  
  .cursor:not(.linebreak):before {
    pointer-events: none;
    content: '';
    position: absolute;
    z-index: 100;
    width: calc(~'100% + ' 2 * @cursor-border-width + @cursor-carret-width);
    // note: we cannot extend border around vertically => potential z-indexing problem with following scope's background
    //height: calc(~'100% + ' 2 * @cursor-border-width);
    height: 100%;

    border-style: @cursor-border-style;
    border-width: @cursor-border-width;
    border-right-width: (@cursor-border-width + @cursor-carret-width);
    padding: 0px;
    //top: -@cursor-border-width;
    top: 0px;
    left: -@cursor-border-width;

    animation: cursor-border-throbbing @cursor-throbbing-speed ease-in-out 0s infinite alternate,
               cursor-opacity-throbbing @cursor-throbbing-speed ease-in-out 0s infinite alternate;
  }
  
  .cursor.linebreak:before {
    pointer-events: none;
    content: '';
    position: absolute;
    z-index: 100;
    width: 4 + 2 * @cursor-border-width + @linebreak-carret-width;
    height: 100%;

    border-style: @cursor-border-style;
    border-width: @cursor-border-width;
    border-right-width: (@cursor-border-width + @linebreak-carret-width);
    padding: 0px;
    top: -@linebreak-top-correction;
    left: -@cursor-border-width;

    animation: cursor-border-throbbing @cursor-throbbing-speed ease-in-out 0s infinite alternate,
               cursor-opacity-throbbing @cursor-throbbing-speed ease-in-out 0s infinite alternate;
  }

} // .plastic-editor-view
