/* BFP Veranstaltungen (Terminliste aus dem Google-Kalender) */

.bfp-events__month {
  margin: 1.75rem 0 0.75rem;
  font-size: 1rem;
  font-weight: 700;
  color: #1b2e18;
}
.bfp-events__month:first-child {
  margin-top: 0;
}

.bfp-event {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.75rem;
  padding: 0.9rem 1rem;
  background: #ffffff;
  border: 1px solid rgba(27, 46, 24, 0.15);
  border-radius: 4px;
  color: #1b2e18;
}

/* Datums-Badge links */
.bfp-event__date {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 0 0 auto;
  min-width: 3.2rem;
  padding: 0.45rem 0.4rem;
  background: #1b2e18;
  border-radius: 4px;
  color: #ffffff;
  line-height: 1;
}
.bfp-event__day {
  font-size: 1.25rem;
  font-weight: 700;
}
.bfp-event__mon {
  margin-top: 0.2rem;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.bfp-event__body {
  min-width: 0;
}
.bfp-event__title {
  margin: 0 0 0.2rem;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
}
.bfp-event__meta {
  margin: 0;
  font-size: 0.8125rem;
  opacity: 0.75;
}
.bfp-event__desc {
  margin: 0.35rem 0 0;
  font-size: 0.875rem;
  line-height: 1.5;
}

.bfp-events__empty {
  opacity: 0.75;
}

/* --- Topbar-Notification: laufender/naechster Termin --- */

.bfp-events-topbar,
.topbar-notification a.bfp-events-topbar {
  display: inline-block;
  max-width: 100%;
  color: inherit;
  /* Gleiche Groesse wie der Widget-Text (.topbar-notification p) */
  font-size: 0.825rem;
  line-height: 1.6;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity 0.4s ease;
}
/* Rotation: nur der erste Termin ist initial sichtbar (JS blendet um).
   Selektor muss die display:inline-block-Regel oben ueberbieten. */
.bfp-events-topbar + .bfp-events-topbar,
.topbar-notification a.bfp-events-topbar + a.bfp-events-topbar {
  display: none;
}
.bfp-events-topbar:hover,
.topbar-notification a.bfp-events-topbar:hover {
  color: inherit;
  text-decoration: none;
  opacity: 0.85;
}
.bfp-events-topbar strong {
  font-weight: 600;
}
.bfp-events-topbar__more {
  margin-left: 0.5rem;
  text-decoration: underline;
  text-underline-offset: 2px;
}
@media (max-width: 575px) {
  .bfp-events-topbar__more {
    display: none;
  }
  /* Auf schmalen Screens umbrechen statt am Rand abschneiden */
  .bfp-events-topbar,
  .topbar-notification a.bfp-events-topbar {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }
}

/* --- Monatskalender (nur Desktop, Mobil zeigt die Liste) --- */

.bfp-cal {
  display: none;
  position: relative;
}
@media (min-width: 992px) {
  .bfp-cal {
    display: block;
  }
  .bfp-events--has-cal .bfp-events__list {
    display: none;
  }
}

.bfp-cal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}
.bfp-cal__title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1b2e18;
}
.bfp-cal__nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 1px solid rgba(27, 46, 24, 0.25);
  border-radius: 4px;
  background: #ffffff;
  color: #1b2e18;
  cursor: pointer;
}
.bfp-cal__nav svg {
  width: 1.25rem;
  height: 1.25rem;
}
.bfp-cal__nav:hover:not(:disabled) {
  background: rgba(27, 46, 24, 0.08);
}
.bfp-cal__nav:disabled {
  opacity: 0.35;
  cursor: default;
}

.bfp-cal__hdr {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  background: #1b2e18;
  border-radius: 4px 4px 0 0;
  overflow: hidden;
}
.bfp-cal__wd {
  padding: 0.4rem;
  color: #ffffff;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-align: center;
}

.bfp-cal__weeks {
  border: 1px solid rgba(27, 46, 24, 0.15);
  border-top: 0;
  border-radius: 0 0 4px 4px;
  overflow: hidden;
}
.bfp-cal__week {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  min-height: 5.75rem;
}
.bfp-cal__week + .bfp-cal__week {
  border-top: 1px solid rgba(27, 46, 24, 0.15);
}
.bfp-cal__bgcell {
  grid-row: 1 / -1;
  background: #ffffff;
  border-right: 1px solid rgba(27, 46, 24, 0.15);
}
.bfp-cal__bgcell--last {
  border-right: 0;
}
.bfp-cal__bgcell--out {
  background: #fafaf8;
}
.bfp-cal__bgcell.is-today {
  background: rgba(27, 46, 24, 0.05);
}

.bfp-cal__num {
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: start;
  width: 1.5rem;
  height: 1.5rem;
  margin: 0.25rem 0 0.1rem 0.25rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #1b2e18;
}
.bfp-cal__num.is-today {
  background: #1b2e18;
  color: #ffffff;
}

/* Mehrtaegige Termine: durchgehender Balken pro Wochenzeile */
.bfp-cal__bar {
  z-index: 1;
  margin: 1px 4px;
  padding: 0.15rem 0.4rem;
  border: 0;
  border-radius: 3px;
  background: #1b2e18;
  color: #ffffff;
  font-size: 0.6875rem;
  line-height: 1.3;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}
.bfp-cal__bar:hover {
  background: #2f4d29;
}
/* Termin laeuft ueber die Wochengrenze hinaus: Kante offen lassen */
.bfp-cal__bar--cl {
  margin-left: 0;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}
.bfp-cal__bar--cr {
  margin-right: 0;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.bfp-cal__chips {
  z-index: 1;
  align-self: start;
  min-width: 0;
  padding: 0 0.3rem 0.3rem;
}

.bfp-cal__chip {
  display: block;
  width: 100%;
  margin-top: 0.15rem;
  padding: 0.15rem 0.4rem;
  border: 0;
  border-radius: 3px;
  background: #1b2e18;
  color: #ffffff;
  font-size: 0.6875rem;
  line-height: 1.3;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}
.bfp-cal__chip:hover {
  background: #2f4d29;
}
.bfp-cal__chip--more {
  background: transparent;
  color: #1b2e18;
  font-weight: 600;
}
.bfp-cal__chip--more:hover {
  background: rgba(27, 46, 24, 0.08);
}

/* Detail-Layer ueber dem Kalender */
.bfp-cal__layer {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(27, 46, 24, 0.3);
  border-radius: 4px;
}
.bfp-cal__layer[hidden] {
  display: none;
}
.bfp-cal__card {
  position: relative;
  width: 90%;
  max-width: 26rem;
  max-height: 85%;
  overflow: auto;
  padding: 1.25rem 1.25rem 1rem;
  background: #ffffff;
  border-radius: 4px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  color: #1b2e18;
}
.bfp-cal__close {
  position: absolute;
  top: 0.4rem;
  right: 0.55rem;
  border: 0;
  background: none;
  color: #1b2e18;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}
.bfp-cal__detail h4 {
  margin: 0 0 0.25rem;
  font-size: 1rem;
}
.bfp-cal__detail + .bfp-cal__detail {
  margin-top: 0.9rem;
  padding-top: 0.9rem;
  border-top: 1px solid rgba(27, 46, 24, 0.15);
}
.bfp-cal__meta {
  margin: 0;
  font-size: 0.8125rem;
  opacity: 0.75;
}
.bfp-cal__desc {
  margin: 0.4rem 0 0;
  font-size: 0.875rem;
  line-height: 1.5;
}
