<div class="shop-row">
    <div class="shop-info">
        <strong>Defense: {{ farm.defense_tier_name }} (level {{ farm.defense_level }})</strong>
        <span>{% if farm.defense_upkeep_daily %}Costs {{ format_coins(farm.defense_upkeep_daily) }}/day upkeep. If you cannot pay you lose one level - never your whole balance.{% else %}No upkeep at level 0.{% endif %}</span>
    </div>
    <div class="shop-actions">
        {% if farm.defense_next_cost %}
        <form method="post" action="/game/defense/upgrade" data-game-action="defense">
            <button type="submit" class="btn btn-sm btn-primary">Upgrade ({{ format_coins(farm.defense_next_cost) }})</button>
        </form>
        {% else %}
        <span class="perk-maxed">Maxed</span>
        {% endif %}
        {% if farm.defense_downgrade_available %}
        <form method="post" action="/game/defense/downgrade" data-game-action="defense-downgrade">
            <button type="submit" class="btn btn-sm" data-confirm="Drop to the next defense tier down? Lower upkeep, less protection.">Downgrade</button>
        </form>
        {% endif %}
    </div>
</div>
