
// @optional decorators/blurred/blurred.scss
// @optional decorators/disabled/disabled.scss
// @require decorators/z_depths/z_depths.scss

// The maximum `z-depth` value cannot be raised since we don't provide any greater `z-depth` value
// It raises even if the `z-depth-0` class has not been included

/* RAISABLE */

//FIXME: Are we sure this is the best/cleanest way to implement it?
// In order to always animate the box-shadow transition
// Transitioning `opacity` in order to support `disabled`
// Transitioning `filter`  in order to support `blurred`

* {
  transition: opacity $disabled-animation-duration,
              filter $blurred-animation-duration,
              box-shadow $raisable-animation-duration;
}

%raisable {

  /* BASE */

  &:not(.disabled) {
    &:hover,
    &:focus {
      @include z-depth ( raisable-next( 0 ), true, true );
    }
  }

  /* STEPS */

  @each $depth, $shadow in $z-depths {

    @if $depth > 0 {

      &%z-depth-#{$depth}:not(.disabled) {
        &:hover,
        &:focus {
          @include z-depth ( raisable-next( $depth ), true, true );
        }
      }

    }

  }

}

.raisable {
  @extend %raisable;
}
