/* Alleen de nieuwe kalender; bestaande site.css blijft ongewijzigd. */
.calendar {
  width: min(100%, 700px);
  margin: 2rem auto;
  font-family: system-ui, sans-serif;
  color: #172334;
}

.calendar-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.calendar-toolbar h2 {
  margin: 0;
  font-size: 1.5rem;
}

#calendar-today {
  border: 1px solid #b7c7d9;
  border-radius: 0.5rem;
  background: #fff;
  color: #172334;
  padding: 0.6rem 0.8rem;
  cursor: pointer;
}

#calendar-today:hover { background: #edf4ff; }
#calendar-today:focus-visible,
.calendar-scroll:focus-visible { outline: 3px solid #4083d8; outline-offset: 3px; }

.calendar-hint { margin: 0.6rem 0 1rem; font-size: 0.9rem; opacity: 0.8; }

.calendar-scroll {
  position: relative;
  height: min(65vh, 580px);
  min-height: 300px;
  overflow-y: auto;
  overflow-anchor: none; /* scrollpositie zelf behouden bij uitbreiden */
  overscroll-behavior: contain;
  border: 1px solid #d9e0e8;
  border-radius: 0.85rem;
  background: #fff;
  box-shadow: 0 4px 18px rgb(0 0 0 / 7%);
  scrollbar-gutter: stable;
}

.calendar-month { padding: 1rem 1rem 1.25rem; }
.calendar-month + .calendar-month { border-top: 1px solid #d9e0e8; }
.calendar-month h3 {
  margin: 0 0 0.7rem;
  text-transform: capitalize;
  font-size: 1.16rem;
}

.calendar-grid {
  width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 2px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.calendar-grid th,
.calendar-grid td { padding: 0.6rem 0.2rem; font-size: 0.93rem; }
.calendar-grid thead th { font-size: 0.82rem; color: #516478; font-weight: 600; }
.calendar-grid .calendar-week {
  color: #516478;
  background: #edf2f8;
  border-radius: 0.3rem;
  font-size: 0.82rem;
  font-weight: 600;
}
.calendar-grid .is-outside { color: #aab2bc; }
.calendar-grid .is-today {
  border-radius: 0.5rem;
  background: #1f6fc1;
  color: #fff;
  font-weight: 700;
}

@media (max-width: 480px) {
  .calendar-month { padding: 0.8rem 0.4rem 1rem; }
  .calendar-grid th, .calendar-grid td { padding: 0.55rem 0.05rem; font-size: 0.85rem; }
  .calendar-toolbar h2 { font-size: 1.3rem; }
  #calendar-today { font-size: 0.85rem; }
}
