@import './var.less';
@import './css-variables.less';
@import './normalize.less';
@import './animation.less';
@import './mixins/ellipsis.less';
@import './mixins/hairline.less';

.@{rv-prefix}-ellipsis {
  .ellipsis();
}

.@{rv-prefix}-multi-ellipsis--l2 {
  .multi-ellipsis(2);
}

.@{rv-prefix}-multi-ellipsis--l3 {
  .multi-ellipsis(3);
}

.@{rv-prefix}-safe-area-top {
  padding-top: constant(safe-area-inset-top);
  padding-top: env(safe-area-inset-top);
}

.@{rv-prefix}-safe-area-bottom {
  padding-bottom: constant(safe-area-inset-bottom);
  padding-bottom: env(safe-area-inset-bottom);
}

[class*='rv-hairline'] {
  &::after {
    .hairline();
  }
}

.@{rv-prefix}-hairline {
  &,
  &--top,
  &--left,
  &--right,
  &--bottom,
  &--surround,
  &--top-bottom {
    position: relative;
  }

  &--top::after {
    border-top-width: @border-width-base;
  }

  &--left::after {
    border-left-width: @border-width-base;
  }

  &--right::after {
    border-right-width: @border-width-base;
  }

  &--bottom::after {
    border-bottom-width: @border-width-base;
  }

  &,
  &-unset {
    &--top-bottom::after {
      border-width: @border-width-base 0;
    }
  }

  &--surround::after {
    border-width: @border-width-base;
  }
}

[class*='rv-shadow'] {
  &:hover,
  &:active {
    box-shadow: rgba(0, 0, 0, 0.2) 0 2px 4px -1px,
      rgba(0, 0, 0, 0.14) 0 4px 5px 0, rgba(0, 0, 0, 0.12) 0 1px 10px 0;
  }
}

.@{rv-prefix}-shadow {
  &--1 {
    box-shadow: rgba(0, 0, 0, 0.2) 0 2px 1px -1px,
      rgba(0, 0, 0, 0.14) 0 1px 1px 0, rgba(0, 0, 0, 0.12) 0 1px 3px 0;
  }

  &--2 {
    box-shadow: rgba(0, 0, 0, 0.2) 0 3px 1px -2px,
      rgba(0, 0, 0, 0.14) 0 2px 2px 0, rgba(0, 0, 0, 0.12) 0 1px 5px 0;
  }

  &--3 {
    box-shadow: rgba(0, 0, 0, 0.2) 0 3px 3px -2px,
      rgba(0, 0, 0, 0.14) 0 3px 4px 0, rgba(0, 0, 0, 0.12) 0 1px 8px 0;
  }
}

.@{rv-prefix}-icon {
  &--spin {
    animation: rv-spin 1.5s infinite linear;
  }
}
