@use "sass:math";

@import '~styles/config';

.invoiceBoxItem {
  @include grid-col();

  margin-bottom: $gutter*2;

  @media (min-width: $min-540) {
    @include grid-col(percentage(math.div(6, 12)));
  }

  @media (min-width: $min-840) {
    @include grid-col(percentage(math.div(4, 12)));
  }

  @media (min-width: $min-desktop) {
    @include grid-col(percentage(math.div(3, 12)));
  }

  &:hover,
  &:focus {
    cursor: pointer;
  }

  &:hover &,
  &:focus & {
    &__wrapper {
      box-shadow: inset 0 0 0 4px;
    }

    &__content {
      padding: 0 calc(#{$gutter} - 4px) 20px;
      margin: 0 4px;
    }
  }

  &__container {
    position: relative;
    z-index: 4;
    height: 100%;

    &::after {
      content: '';

      position: absolute;
      top: 40px;
      right: -$gutter * 0.5;
      bottom: -20px;
      left: $gutter * 0.5;
      z-index: 1;

      width: 100%;

      pointer-events: none;

      opacity: 0.2;
      background: url('/assets/black-dot-opaque.svg') repeat;
      background-size: 10px;
    }
  }

  &__shadow {
    position: relative;
    height: 100%;

    border-width: 1px;
    border-style: solid;
    border-color: $color-grey100;

    &::after {
      content: '';

      position: absolute;
      bottom: 0;
      left: 0;
      right: 0;
      z-index: 1;

      height: 60px;

      box-shadow: 0 3px 65px 0 rgba(32, 32, 32, 0.125);

      @media (min-width: $min-tablet) {
        box-shadow: 0 5px 65px 0 rgba(32, 32, 32, 0.125);
      }
    }
  }

  &__wrapper {
    display: flex;
    align-content: space-between;
    flex-wrap: wrap;
    position: relative;
    z-index: 5;

    height: 100%;
    text-decoration: none;
    background-color: #fff;

    transition: box-shadow 220ms ease-in-out;
    box-shadow: inset 0 0 0 0 transparent;

    @include colorify('color');
  }

  &__head {
    padding: $gutter;
    width: 100%;
  }

  &__content {
    padding: 0 $gutter 20px;

    width: 100%;
  }

  &__contentSubtext {
    @include responsive-font(13, 14);
    font-family: $font-heading;
    color: $color-grey500;
  }

  &__download {
    position: absolute;
    bottom: 21px;
    right: 30px;
    height: 23px;

    rect, path { // stylelint-disable-line
      fill: $color-grey500;
    }
  }

  &__edit {
    display: flex;
    justify-content: center;
    align-items: center;

    position: absolute;

    top: 23px;
    right: 10px;

    height: 40px;
    width: 40px;

    cursor: pointer;
  }
}
