.collection-calendar .rbc-calendar {
  font-family: inherit;
  color: var(--foreground);
}

/* Base surfaces/borders */
.collection-calendar .rbc-toolbar {
  margin-bottom: 0.75rem;
  gap: 0.5rem;
}

.collection-calendar .rbc-toolbar-label {
  font-weight: 600;
  color: var(--foreground);
}

.collection-calendar .rbc-btn-group > button {
  border: 1px solid var(--border);
  background: var(--background);
  color: var(--foreground);
  padding: 0.375rem 0.625rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  border-radius: calc(var(--radius) - 2px);
  box-shadow: none;
}

.collection-calendar .rbc-btn-group > button:hover {
  background: var(--accent);
  color: var(--accent-foreground);
}

.collection-calendar .rbc-btn-group > button.rbc-active,
.collection-calendar .rbc-btn-group > button:active {
  background: var(--color-primary);
  color: var(--color-primary-foreground, var(--primary-foreground));
  border-color: var(--color-primary);
}

.collection-calendar .rbc-month-view,
.collection-calendar .rbc-time-view,
.collection-calendar .rbc-agenda-view {
  background: var(--card);
  color: var(--card-foreground);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.collection-calendar .rbc-header,
.collection-calendar .rbc-time-header-cell,
.collection-calendar .rbc-time-header-gutter {
  background: var(--secondary);
  color: var(--secondary-foreground);
  border-bottom: 1px solid var(--border);
}

.collection-calendar .rbc-header {
  padding: 0.5rem 0.375rem;
  font-weight: 600;
}

.collection-calendar .rbc-time-content,
.collection-calendar .rbc-time-header-content,
.collection-calendar .rbc-month-row + .rbc-month-row,
.collection-calendar .rbc-day-bg + .rbc-day-bg {
  border-color: var(--border);
}

.collection-calendar .rbc-timeslot-group {
  border-bottom: 1px solid var(--border);
}

.collection-calendar .rbc-time-gutter,
.collection-calendar .rbc-time-gutter .rbc-timeslot-group,
.collection-calendar .rbc-time-gutter .rbc-time-slot {
  background: var(--card);
  color: var(--muted-foreground);
}

/* Today highlight */
.collection-calendar .rbc-today {
  background: color-mix(in oklab, var(--accent) 35%, transparent);
}

/* Events */
.collection-calendar .rbc-event,
.collection-calendar .rbc-day-slot .rbc-event {
  background: var(--color-primary);
  border: 1px solid color-mix(in oklab, var(--color-primary) 70%, var(--border));
  color: var(--color-primary-foreground, var(--primary-foreground));
  border-radius: calc(var(--radius) - 4px);
  padding: 0.125rem 0.375rem;
  box-shadow: none;
}

.collection-calendar .rbc-event:focus,
.collection-calendar .rbc-day-slot .rbc-event:focus {
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--ring) 40%, transparent);
}

.collection-calendar .rbc-event.rbc-selected {
  background: color-mix(in oklab, var(--color-primary) 85%, black);
}

.collection-calendar .rbc-event-label,
.collection-calendar .rbc-event-content {
  font-size: 0.8125rem;
}

/* Agenda */
.collection-calendar .rbc-agenda-date-cell,
.collection-calendar .rbc-agenda-time-cell,
.collection-calendar .rbc-agenda-event-cell {
  border-bottom: 1px solid var(--border);
  padding: 0.5rem 0.75rem;
}

.collection-calendar .rbc-agenda-table thead th {
  background: var(--secondary);
  color: var(--secondary-foreground);
  border-bottom: 1px solid var(--border);
  padding: 0.5rem 0.75rem;
  font-weight: 600;
}

/* Off-range days in month view */
.collection-calendar .rbc-off-range-bg {
  background: color-mix(in oklab, var(--muted) 50%, transparent);
}

.collection-calendar .rbc-off-range {
  color: var(--muted-foreground);
}

