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

.itemTriagePane {
  margin: 5px 0;
}

/* Customize the collapsible titles */
.collapseTitle {
  background-color: transparent !important;
  > button {
    min-height: 28px;
    padding: 0 10px;

    @include phone-portrait {
      // on phone, undo how small we shrunk title bars
      min-height: 34px;
    }
  }

  & + div {
    margin: 0 10px 10px;
  }
}

@include phone-portrait {
  // and make the compare/search buttons bigger
  .controls {
    align-items: stretch !important;
    > a {
      font-size: 16px;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
    }
  }
}

.statTable {
  display: grid;
  grid-template-columns: min-content min-content auto min-content min-content;
  margin-bottom: 15px;
  & > div {
    align-self: center;
  }
}

.header {
  display: contents;
  > span {
    min-width: max-content;
    &:nth-child(n + 2) {
      text-align: center;
    }
  }
}

.headerDivider {
  grid-column-end: span 2;
  background: #888;
  height: 1px;
}

.similarItemsTable {
  display: grid;
  grid-template-columns: auto min-content min-content;
  margin-bottom: 0;
  & > div {
    align-self: center;
  }
  .header {
    :nth-child(2) {
      grid-column: 2 / 4;
    }
  }
  .headerDivider {
    grid-column-end: span 3;
  }
  .count {
    padding-left: 6px;
    padding-right: 6px;
  }
}

.tableRow {
  display: contents;
  > * {
    height: 30px;
    display: flex;
    align-items: center;
  }
  &:nth-child(n + 2) > * {
    border-top: 1px solid #5555;
    padding: 4px;
  }
}

.factorCombo {
  display: flex;
  gap: 2px;
}

.statsHeaderLeft {
  grid-column: 1 / 4;
}
.statsHeaderRight {
  grid-column: 4 / 6;
}
.statsHeaderDivider {
  grid-column: 1 / -1;
  background: #888;
  height: 1px;
}

.dimmed {
  opacity: 0.8;
}
.statValue {
  font-weight: bold;
  padding: 0 3px;
  text-align: right;
  justify-content: right;
}

.weaponSvg {
  // these have varying aspect ratios
  width: auto !important;
}

.inlineIcon {
  height: 18px;
  width: auto;
  margin: -3px 0;
}

.loadoutRow {
  display: flex;
  height: 30px;
  align-items: center;
  gap: 2px;

  .loadoutName {
    flex-grow: 1;
  }
  img {
    height: 16px;
    width: 16px;
  }
}

.controls {
  display: flex;
  align-items: center;
  align-self: stretch;
  column-gap: 4px;
  > a {
    padding: 4px 6px;
  }
}

.thumbsUp {
  position: relative !important;
  top: -3px !important;
  right: 0 !important;
  display: inline-block;
  height: 8px;
  width: 8px;
  margin: -3px 0;
  margin-left: 2px;
}

.inLoadout {
  filter: invert(1);
  height: 18px;
  width: 18px;
  position: relative;
  display: inline-block;
  margin: -3px 0;

  .collapseTitle & {
    margin-right: -2px;
    filter: invert(0.5);
  }
}

.factorCollapsedValue {
  font-weight: bold;
}

.loadoutList {
  margin: 0;
  padding: 0;
  li {
    padding: 4px;
    &:nth-child(n + 2) {
      border-top: 1px solid #5555;
    }
  }
}

.factorIcon {
  height: 20px;
  width: 20px;
}

.artificeExplanation {
  color: var(--theme-accent-primary);
}

.popupTabTitle {
  position: relative;
}
