<div class="oh-roll-dialog oh-armor-dialog">

  {{!-- Armor header --------------------------------------------------------}}
  <div class="spell-header">
    <img src="{{armorImg}}" class="weapon-img-sm" alt="{{armorName}}" />
    <div class="spell-header-info">
      <span class="weapon-name-lg">{{armorName}}</span>
      <div class="weapon-badges">
        <span class="dv-badge">AV {{av}}</span>
        {{#if isReinforced}}<span class="ritual-badge">{{localize "OATHHAMMER.ArmorTrait.Reinforced"}} 🔴</span>{{/if}}
      </div>
    </div>
  </div>

  <fieldset class="attack-options-block">
    <legend>{{localize "OATHHAMMER.Dialog.ArmorRollOptions"}}</legend>

    <div class="pool-info-line">
      AV {{av}}
      {{#if isReinforced}} · {{localize "OATHHAMMER.Dialog.ReinforcedHint"}}{{/if}}
    </div>

    {{!-- AP penalty from attacker's weapon ----------------------------------}}
    <div class="roll-option-row">
      <label>{{localize "OATHHAMMER.Dialog.APPenalty"}}</label>
      <select name="ap">
        {{#each apOptions}}<option value="{{value}}"{{#if selected}} selected{{/if}}>{{label}}</option>{{/each}}
      </select>
      <span class="roll-option-hint">{{localize "OATHHAMMER.Dialog.APHint"}}</span>
    </div>

    {{!-- Manual bonus -------------------------------------------------------}}
    <div class="roll-option-row">
      <label>{{localize "OATHHAMMER.Dialog.Modifier"}}</label>
      <select name="bonus">
        {{#each bonusOptions}}<option value="{{value}}"{{#if selected}} selected{{/if}}>{{label}}</option>{{/each}}
      </select>
    </div>

    <div class="roll-option-row">
      <label>{{localize "OATHHAMMER.Dialog.DiceColor"}}</label>
      <select name="colorOverride">
        {{#each colorOptions}}<option value="{{value}}"{{#if selected}} selected{{/if}}>{{label}}</option>{{/each}}
      </select>
      <span class="roll-option-hint">{{localize "OATHHAMMER.Dialog.DiceColorHint"}}</span>
    </div>

    <div class="roll-option-row roll-option-check">
      <label for="armorExplodeOn5">{{localize "OATHHAMMER.Dialog.ExplodeOn5"}}</label>
      <input type="checkbox" id="armorExplodeOn5" name="explodeOn5" />
      <span class="roll-option-hint">{{localize "OATHHAMMER.Dialog.ExplodeOn5Hint"}}</span>
    </div>

    {{#if availableLuck}}
    <div class="roll-option-row roll-option-luck">
      <label>{{localize "OATHHAMMER.Dialog.LuckSpend"}} <i class="fa-solid fa-clover luck-icon"></i></label>
      <select name="luckSpend">
        {{#each luckOptions}}<option value="{{value}}"{{#if selected}} selected{{/if}}>{{label}}</option>{{/each}}
      </select>
      <label class="luck-human-label" for="armorLuckIsHuman">{{localize "OATHHAMMER.Dialog.LuckHuman"}}</label>
      <input type="checkbox" id="armorLuckIsHuman" name="luckIsHuman" value="true" {{#if isHuman}}checked{{/if}} />
      <span class="roll-option-hint">{{localize "OATHHAMMER.Dialog.LuckHint"}} ({{availableLuck}} {{localize "OATHHAMMER.Dialog.Available"}})</span>
    </div>
    {{/if}}

  </fieldset>

  {{!-- Visibility -----------------------------------------------------------}}
  <fieldset class="roll-visibility-block">
    <legend>{{localize "OATHHAMMER.Dialog.Visibility"}}</legend>
    <select name="visibility">
      {{selectOptions rollModes selected=visibility localize=true}}
    </select>
  </fieldset>

</div>
