@import "../sass/config";

.talent {
  position: absolute;
  width: 40px;
  height: 40px;
  border-radius: 5px;
  transition: filter .1s linear;
  filter: none;
  cursor: pointer;

  &--available {
    .talent__status::after {
      // background-color: rgba($color-green, .8);
      box-shadow: inset 0px 0px 6px 3px rgba($color-green, .8);
    }

    .point-label {
      color: $color-green;
    }
  }

  &--maxed {
    .talent__status::after {
      box-shadow: inset 0px 0px 6px 3px rgba($color-yellow, .8);
    }

    .point-label {
      color: $color-yellow;
    }
  }

  &--disabled {
    filter: grayscale(100%);

    .talent__status { 
      opacity: .7;
    }
  }

  // Rows
  @for $i from 0 through 6 {
    &[data-row="#{$i}"] {
      top: $row-offset + (($i) * $row-distance);
    }
  }

  // Columns
  @for $i from 0 through 3 {
    &[data-col="#{$i}"] { 
      left: $col-offset + ($col-distance * $i); 
    }
  }

  &__status {
    position: absolute;
    width: 48px;
    height: 46px;
    bottom: -1px;
    left: -4px;
    background-image: url('../images/icons/large/default.png');
    background-size: cover;

    &:after {
      content: '';
      position: absolute;
      width: 44px;
      height: 44px;
      top: 2px;
      left: 2px;
      border-radius: 5px;
    }
  }
}

.point-label {
  position: absolute;
  bottom: -5px;
  right: -5px;
  min-width: 7px;
  text-align: center;
  padding: 1px 3px;
  color: #999;
  font-size: 11px;
  font-family: Arial, Helvetica, sans-serif;
  background: #111;
  border-radius: 4px;
  user-select: none;

  &--enabled {
    color: white;
  }
}