/* Einheitliche Event-Optik */
.fc-event {
  display: flex !important;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  text-align: center;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --- Freie Slots (klickbar, grün) --- */
.fc .free-slot,
.pbs-calendar .fc-event.free-slot {
  background-color: #4CAF50 !important;
  border-color: #388E3C !important;
  color: #ffffff !important;
  cursor: pointer;
}
.fc .free-slot .fc-event-time { display: none !important; }

/* --- Rest-Slots (zu kurze Restzeit, hellgrün) --- */
.fc .rest-slot,
.pbs-calendar .fc-bg-event.rest-slot {
  background-color: #B2E5B2 !important;
  border-color: #B2E5B2 !important;
  opacity: 1 !important;
  pointer-events: none;
}
.fc .rest-slot .fc-event-time,
.fc .rest-slot .fc-event-title {
  display: none !important;
}

/* --- Belegte Slots (rot) --- */
.pbs-calendar .fc-bg-event.belegt,
.pbs-calendar .fc-bg-event .belegt,
.pbs-calendar .fc-bg-event[style*="#F44336"],
.pbs-calendar .fc-bg-event[style*="#f44336"] {
  background-color: #F44336 !important;
  border-color: #D32F2F !important;
  opacity: 1 !important;
  color: #fff !important;
}

/* --- Geschlossene Tage (grau) --- */
.pbs-calendar .fc-bg-event.closed-day {
  background-color: #E0E0E0 !important;
  border-color: #BDBDBD !important;
  opacity: 1 !important;
}

/* --- Vergangene Tage (Frontend, Kundenansicht) --- */
.fc-day.fc-past {
  background-color: #e0e0e0 !important;
  opacity: 0.6;
  pointer-events: none;
}
.fc .past-slot {
  opacity: 0.7;
  cursor: not-allowed;
}

/* --- Allgemeine Stabilität gegen Theme-Konflikte --- */
.pbs-calendar .fc-bg-event {
  opacity: 1 !important;
  background-color: inherit !important;
}

/* Titel mittig (auch bei Kundennamen) */
.pbs-calendar .fc-event .fc-event-title,
.pbs-calendar .fc-bg-event .fc-event-title {
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#pbs-calendar {
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  padding: 8px;
  background: #fff;
  margin-bottom: 12px;
}