{% import 'macros/links.html' as links %}

{# Confirmed Entries - vertical on mobile, horizontal with arrows on desktop #}
<div class="flex flex-col sm:flex-row sm:items-center gap-2 border-r border-stone-200 mr-2 sm:max-w-2xl"
     id="day-entries-nav-wrapper">
  {% from 'macros/scrolling_menu.html' import scrolling_menu with context %}
  {% call(entry) scrolling_menu('day-entries-container', confirmed_entries) %}
    <a
      href="{{ url_for('calendars.calendar.day.calendar_entries.calendar_entry.get',
                       slug=post.slug,
                       calendar_slug=calendar.slug,
                       year=day_date.year,
                       month=day_date.month,
                       day=day_date.day,
                       entry_id=entry.id) }}"
      class="flex items-center gap-2 px-3 py-2 hover:bg-stone-100 rounded transition text-sm border sm:whitespace-nowrap sm:flex-shrink-0">
      <div class="flex-1 min-w-0">
        <div class="font-medium truncate">{{ entry.name }}</div>
        <div class="text-xs text-stone-600 truncate">
          {{ entry.start_at.strftime('%H:%M') }}
          {% if entry.end_at %} – {{ entry.end_at.strftime('%H:%M') }}{% endif %}
        </div>
      </div>
    </a>
  {% endcall %}
</div>

{# Admin link #}
{% if g.rights.admin %}
    {% from 'macros/admin_nav.html' import admin_nav_item %}
    {{admin_nav_item(
      url_for(
        'calendars.calendar.day.admin.admin',
        slug=post.slug,
        calendar_slug=calendar.slug,
        year=day_date.year,
        month=day_date.month,
        day=day_date.day
      )
    )}}
{% endif %}