{{!
    This file is part of Moodle - http://moodle.org/

    Moodle is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    Moodle is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with Moodle.  If not, see <http://www.gnu.org/licenses/>.

    @template block_mwa_dashboard/student_calendar
    @copyright 2026 Bruno Porto
    @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
}}
<div class="sp-calendar-wrap">
  <div style="display:inline-block;">
    <div style="display:flex;margin-bottom:4px;margin-left:20px;gap:0;">
      {{#months}}
        <div style="width:15px;font-size:.55rem;color:var(--muted);">{{label}}</div>
      {{/months}}
    </div>
    <div style="display:flex;gap:0;">
      <div style="display:flex;flex-direction:column;gap:3px;margin-right:4px;">
        {{#days}}
          <div style="height:12px;font-size:.55rem;color:var(--muted);line-height:12px;">{{label}}</div>
        {{/days}}
      </div>
      {{#weeks}}
        <div style="display:flex;flex-direction:column;gap:3px;margin-right:3px;">
          {{#items}}
            <div title="{{title}}" style="width:12px;height:12px;border-radius:2px;background:{{color}};cursor:default;transition:transform .1s;" onmouseover="this.style.transform='scale(1.4)'" onmouseout="this.style.transform='scale(1)'"></div>
          {{/items}}
        </div>
      {{/weeks}}
    </div>
    <div class="sp-calendar-legend">
      {{less}}
      {{#legend}}
        <span class="sp-cal-box" style="background:{{color}};"></span>
      {{/legend}}
      {{more}}
    </div>
  </div>
</div>
