@use '../variables.scss' as *;

.archetype {
  margin-bottom: 4px;
}

.perks {
  position: relative; // to help contain the displayStyleButton
}

.stats {
  color: var(--theme-text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.displayStyleButton {
  composes: resetButton from '../dim-ui/common.m.scss';
  position: absolute;
  right: 10px;
  top: 8px;
  border-radius: 50%;
  padding: 4px;
  width: 24px;
  height: 24px;
  z-index: 1;
  background-color: rgb(255, 255, 255, 0.2);
  color: var(--theme-text);
  text-shadow: 1px 1px 3px rgb(0, 0, 0, 0.25);

  @include interactive($hover: true, $active: true) {
    background-color: var(--theme-accent-primary) !important;
    color: var(--theme-text-invert) !important;
  }
}

// For when perks are displayed in a grid
.grid {
  composes: flexRow from '../dim-ui/common.m.scss';
  // in the item popup, when the archetype row is shown, inset the perks
  &:nth-child(n + 2) {
    padding: 8px 10px;
  }
  > div {
    padding-right: 2px;
    padding-left: 2px;
    &:first-child {
      padding-left: 0;
    }
  }
  &.gridLines > div {
    border-right: 0.5px solid #444;
    padding-right: 5px;
    padding-left: 5px;
    &:last-child {
      border-right: none;
    }
    &:first-child {
      padding-left: 0;
    }
  }
}
