.calendar-host {
  position: relative;
  min-height: 620px;
}

.calendar-host.calendar-loading::before {
  position: absolute;
  inset: 0;
  z-index: 5;
  border-radius: 8px;
  background: rgba(255, 255, 255, .92);
  content: "";
}

.calendar-host.calendar-loading::after {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 6;
  width: 34px;
  height: 34px;
  margin: -17px 0 0 -17px;
  border: 3px solid #fee4e2;
  border-top-color: #e41f13;
  border-radius: 50%;
  content: "";
  animation: calendar-loading-spin .75s linear infinite;
}

@keyframes calendar-loading-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .calendar-host.calendar-loading::after { animation-duration: 1.5s; }
}

:root[data-bs-theme="dark"] .calendar-host.calendar-loading::before { background: rgba(16, 20, 26, .92); }
:root[data-bs-theme="dark"] .calendar-host.calendar-loading::after { border-color: #3b4653; border-top-color: var(--bs-primary); }

/* Calendar toolbar: keep the "today" button readable in dark mode */
:root[data-bs-theme="dark"] .fc .fc-today-button,
:root[data-bs-theme="dark"] .fc .fc-today-button:disabled{background-color:#7a1d17;border-color:#7a1d17;color:#fff;opacity:.9}
:root[data-bs-theme="dark"] .fc .fc-today-button:not(:disabled):hover{background-color:var(--bs-primary);border-color:var(--bs-primary)}
