<div class="card clipped-bot" {{#if item_uuid}} data-uuid="{{item_uuid}}" {{/if}} style="margin: 0px;">
  <div class="lancer-header {{#if invade}}lancer-tech{{else}}lancer-weapon{{/if}} medium">
    {{#if icon}}
      <i class="{{icon}} i--4 i--light"> </i>
    {{else}}
      <i class="cci cci-large-beam i--4 i--light"> </i>
    {{/if}}
    <span>{{ title }}</span>
  </div>

  {{!-- Reliable damage --}}
  {{#if reliable_results}}
    <div class="lancer-mini-header" >{{localize "lancer.chat-card.title.reliable"}}</div>
  {{/if}}
  <div>
    {{#each reliable_results as |damage key|}}
      {{{lancer-dice-roll damage.roll damage.tt (concat "cci cci-" (lower-case damage.d_type) " i--4 damage--" (lower-case damage.d_type))}}}
    {{/each}}
  </div>
  {{!-- Miss/reliable damage targets only --}}
  {{#if targets.length}}
    <div class="lancer-damage-targets">
      {{#each targets as |target key|}}
        {{#if (and (not target.hit) (not target.crit))}}
          {{{damage-target target ../this}}}
        {{/if}}
      {{/each}}
    </div>
  {{/if}}

  {{!-- Regular damage --}}
  {{#if (or (and damage_results.length crit_damage_results.length) (and damage_results.length reliable_results.length))}}
    <div class="lancer-mini-header" >{{localize "lancer.chat-card.title.damage"}}</div>
  {{/if}}
  <div>
    {{#each damage_results as |damage key|}}
      {{#if (not damage.target)}}
        <div class="flexrow">
          {{#if damage.bonus}} <span class="lancer-damage-tag" style="flex-grow: 0" data-tooltip="This row is bonus damage">BONUS</span> {{/if}}
          {{{lancer-dice-roll damage.roll damage.tt (concat "cci cci-" (lower-case damage.d_type) " i--4 damage--" (lower-case damage.d_type))}}}
        </div>
      {{/if}}
    {{/each}}
  </div>
  {{!-- Regular damage targets only --}}
  {{#if targets.length}}
    <div class="lancer-damage-targets">
      {{#each targets as |target key|}}
        {{#if (and target.hit (not target.crit))}}
          {{{damage-target target ../this}}}
        {{/if}}
      {{/each}}
    </div>
  {{/if}}

  {{!-- Crit damage --}}
  {{#if crit_damage_results}}
    <div class="lancer-mini-header">{{localize "lancer.chat-card.title.crit-damage"}}</div>
    <div>
      {{#each crit_damage_results as |damage key|}}
        {{#if (not damage.target)}}
          <div class="flexrow">
            {{#if damage.bonus}} <span class="lancer-damage-tag" style="flex-grow: 0" data-tooltip="This row is bonus damage">BONUS</span> {{/if}}
            {{{lancer-dice-roll damage.roll damage.tt (concat "cci cci-" (lower-case damage.d_type) " i--4 damage--" (lower-case damage.d_type))}}}
          </div>
        {{/if}}
      {{/each}}
    </div>
  {{/if}}
  {{!-- Crit damage targets only --}}
  {{#if targets.length}}
    <div class="lancer-damage-targets">
      {{#each targets as |target key|}}
        {{#if target.crit}}
          {{{damage-target target ../this}}}
        {{/if}}
      {{/each}}
    </div>
  {{/if}}

  {{#if message}}
    <div>
      <span class="effect-text">{{message}}</span>
    </div>
  {{/if}}

  {{#if overkill_heat}}
    <div class="card clipped">
      <div class="lancer-mini-header collapse-trigger" data-collapse-id="{{_uuid}}-self-heat">{{localize "lancer.chat-card.title.self-heat"}}</div>
      <div class="collapse" data-collapse-id="{{_uuid}}-self-heat">
        <div class="flexrow">
          <span style="text-align: left; margin-left: 5px; flex: 3;">{{localize "lancer.chat-card.exclamation.overkill"}}</span>
          <span class="dice-total major">{{ overkill_heat }} <i class="cci cci-heat i--4 damage--heat"></i></span>
        </div>
      </div>
    </div>
  {{/if}}
</div>
