<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--m i--light"> </i>
    {{else}}
      <i class="cci cci-large-beam i--m 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--m 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--m 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--m 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="lancer-dice-total flexrow">
          <span style="text-align: left; margin-left: 5px;">{{localize "lancer.chat-card.exclamation.overkill"}}</span>
          <span class="dice-total lancer-dice-total major">{{ overkill_heat }}</span>
          <i class="cci cci-heat i--m damage--heat"> </i>
        </div>
      </div>
    </div>
  {{/if}}
</div>
