{% extends "emails/gobii_base.html" %}

{% block content %}
  <h1 style="margin: 0 0 12px; font-size: 20px; line-height: 1.4; color: #0f172a;">Daily task limit reached</h1>
  <p style="margin: 0 0 12px; font-size: 14px; color: #334155;">
    {{ agent.name }} hit its daily task limit and paused work for today.
  </p>
  <p style="margin: 0 0 18px; font-size: 14px; color: #334155;">
    Increase the limit now with just one click, or open the agent settings to review details.
  </p>
  <table role="presentation" cellpadding="0" cellspacing="0" style="margin: 0 0 14px;">
    <tr>
      <td style="padding: 0 10px 10px 0;">
        <a href="{{ double_limit_url }}" style="display: inline-block; background: #0ea5e9; color: #ffffff; text-decoration: none; padding: 12px 16px; border-radius: 8px; font-weight: 600; font-size: 14px;">Double daily limit</a>
      </td>
      <td style="padding: 0 0 10px 0;">
        <a href="{{ unlimited_limit_url }}" style="display: inline-block; background: #ffffff; color: #0ea5e9; text-decoration: none; padding: 12px 16px; border-radius: 8px; border: 1px solid #0ea5e9; font-weight: 600; font-size: 14px;">Make unlimited</a>
      </td>
    </tr>
  </table>
  <p style="margin: 0 0 16px; font-size: 13px; color: #475569;">
    <a href="{{ settings_url }}" style="color: #2563eb; text-decoration: none;">Open agent settings</a>
  </p>
  {% if upgrade_url %}
    <div style="margin: 0 0 12px; padding: 12px 14px; background: #eff6ff; border-radius: 8px; font-size: 13px; color: #1e3a8a;">
      Running out of credits? <a href="{{ upgrade_url }}" style="color: #1d4ed8; text-decoration: none;">Upgrade your plan</a> to allow your agents to do more work for you.
    </div>
  {% elif task_pack_url %}
    <div style="margin: 0 0 12px; padding: 12px 14px; background: #ecfdf3; border-radius: 8px; font-size: 13px; color: #14532d;">
      Need more capacity today? <a href="{{ task_pack_url }}" style="color: #15803d; text-decoration: underline;">Purchase a task pack</a> to add extra credits for this billing period.
    </div>
  {% endif %}
  <p style="margin: 16px 0 0; font-size: 12px; color: #64748b;">
    You are receiving this because {{ agent.name }} is an agent on your Gobii account.
  </p>
{% endblock %}
