.panel--online-calendar {
  display: flex;
  justify-content: center;
}


:root {
  --header-w: 250px;
  --footer-h: 120px;
  --gap: 60px;
}


main#main {
  padding-top: 150px;
}

@media (min-width: 1251px) {
.calendar-title {
  position: fixed;
  top: 0px;          /* gleicher Bezug wie der Kalender */
  left: 250px;
  width: calc(100% - 250px);
  text-align: center;
  z-index: 20;              /* höher als der Kalender */
  
  font-family: "Pacifico", cursive;
  font-size: clamp(28px, 3.2vw, 44px);
  color: #fff;
  text-shadow: 0 0 1px rgba(0, 0, 0, 0.99), 0 0 10px rgba(209, 182, 98, 0.99), 0 0 15px rgba(209, 182, 98, 0.88), 0 0 20px rgba(209, 182, 98, 0.77) !important;
}
}


/* ===== Kalender-Container ===== */
.calendar-section {
  background: rgba(255,255,255,0.3);
  backdrop-filter: blur(6px) saturate(130%);
  -webkit-backdrop-filter: blur(6px) saturate(130%);
  border: 3px solid rgba(209,182,98,0.85);
  border-radius: 22px;
  padding: 20px;
  box-sizing: border-box;
  max-width: 1000px;
  min-height: 230px;
  margin: 0 auto;
  position: fixed;
  top: var(--gap);
  left: calc(var(--header-w) + var(--gap));
  right: var(--gap);
  bottom: calc(var(--footer-h) + var(--gap));
  transform: translateY(+50px);
}

/* ===== Header ===== */
.fc .fc-toolbar-title {
  font-family: "Pacifico", cursive;
  font-size: 1.8rem;
  color: #fff;
  text-shadow:
    0 0 1px rgba(0,0,0,.9),
    0 0 10px rgba(209,182,98,.9),
    0 0 18px rgba(209,182,98,.7);
}

.fc .fc-button {
  background: rgba(255, 255, 255, 0.2) !important;
  border: 1px solid rgba(209,182,98,0.9) !important;
  color: rgba(255, 255, 255, 0.95) !important;
  border-radius: 999px !important;
  padding: 6px 12px !important;
}

.fc .fc-button:hover {
  background: rgba(209,182,98,0.15) !important;
}

/* ===== Monatsraster ===== */
.fc-theme-standard .fc-scrollgrid {
  border: none;
}

.fc-theme-standard th,
.fc-theme-standard td {
  border: 1px solid rgba(255,255,255,0.15);
}

/* Wochentage */
.fc-col-header-cell-cushion {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.85);
  text-decoration: none;
}

/* Tageszahlen */
.fc-daygrid-day-number {
  color: #fff;
  font-size: 0.9rem;
  opacity: 1;
      text-shadow: 0 0 10px rgba(100, 73, 0, 0.3), 0 0 5px rgba(54, 40, 0, 0.2), 0 0 5px rgba(54, 40, 0, 0.1) !important;
}

/* Heute */
.fc-day-today {
  background: rgba(209,182,98,0.12) !important;
}

/* ===== Termine (anklickbar!) ===== */
.fc-event {
  background: rgba(209,182,98,0.7) !important;
  border: none !important;
  border-radius: 999px !important;
  padding: 2px 8px !important;
  font-size: 0.7rem;
  font-weight: 600;
  color: #fff !important;
  cursor: pointer;
  box-shadow:
    0 0 1px rgba(209,182,98,0.8),
    0 0 3px rgba(209,182,98,0.4);
}

.fc-event:hover {
  background: rgba(209,182,98,1) !important;
}

/* Event-Text */
.fc-event-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ===== Mobil ===== */
@media (max-width: 600px) {
  .calendar-section {
    padding: 14px;
  }

  .fc .fc-toolbar-title {
    font-size: 1.4rem;
  }
}

.fc-daygrid-event-dot {
  border: calc(var(--fc-daygrid-event-dot-width) / 2) solid #0e6b2a;
}

/* ===== Wochentage sichtbar machen ===== */
.fc .fc-col-header-cell-cushion {
  color: rgba(255,255,255,0.9) !important;
  font-weight: 500;
  text-shadow:
    0 0 6px rgba(0,0,0,0.6),
    0 0 10px rgba(209,182,98,0.35);
}

/* Tabelle + Header transparent machen */
.fc-theme-standard .fc-scrollgrid,
.fc-theme-standard thead,
.fc-theme-standard th {
  background: transparent !important;
}

/* eigentliche Leiste färben */
.fc .fc-col-header-cell {
  background: rgba(8, 77, 25, 0.125) !important;
}

.fc .fc-day-today {
  background: rgba(209,182,98,0.3) !important; /* stärkeres Gold */
  box-shadow:
    inset 0 0 0 0.25px rgba(209,182,98,0.9),
    0 0 4px rgba(209,182,98,0.45);
}

/* ===== Toolbar sauber & stabil ===== */
.fc .fc-header-toolbar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
}

/* Titel bleibt exakt mittig */
.fc .fc-toolbar-title {
  justify-self: center;
}

/* Buttons bleiben an ihren Seiten */
.fc .fc-toolbar-chunk {
  display: flex;
  align-items: center;
}

/* ===== Titel wirklich zentrieren ===== */
.fc .fc-toolbar-title {
  margin: 0 auto !important;
  text-align: center;
}


/* Referenziert: dein aktuelles kalender HTML/CSS/JS */
/* Regeln: keine Experimente • nur exakt auf Anweisung • keine ungefragten Fixes/Änderungen */

/* Box (die „Kalender-Box“) muss Inhalt clippen */
.calendar-section {
  overflow: hidden;          /* wichtig */
}

/* Kalender selbst soll die Box-Breite sauber nutzen */
#calendar {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* FullCalendar-Grid ebenfalls clippen (falls die Überstände aus dem Scrollgrid kommen) */
#calendar .fc-scrollgrid,
#calendar .fc-scrollgrid-section,
#calendar .fc-scrollgrid table {
  width: 100%;
  max-width: 100%;
}

#calendar .fc-scrollgrid {
  overflow: hidden;          /* zusätzlicher Clip */
}

/* Referenziert: dein aktuelles kalender HTML/CSS/JS */
/* Regeln: keine Experimente • nur exakt auf Anweisung • keine ungefragten Fixes/Änderungen */

@media (min-width: 1251px) and (max-height: 760px) {
  /* Kalender-Box wird scrollbar, wenn die Viewport-Höhe zu klein ist */
  .calendar-section {
    max-height: 100vh;
    overflow-y: auto;
  }

  /* Kalender füllt die Box (scrollt dann innerhalb der Section) */
  #calendar {
    max-height: 100%;
  }
}

@media (max-width: 1250px){
main#main {
    display: block;
    padding-bottom: 100px;
  }
}

@media (max-width: 1250px) {

  .calendar-section {
    margin: 0 auto;
    position: relative;      /* ← DAS ist der entscheidende Punkt */
    top: auto;               /* fixed-Offsets neutralisieren */
    left: auto;
    right: auto;
    bottom: auto;

    /* deine bewährten Abstände */
    margin-left: 8vw;
    margin-right: 8vw;
    margin-bottom: 0;

    transform: none;
  }

.calendar-title {
  margin-bottom: 20px;
  text-align: center; 
  top: 0px; 
  left: 0; 
  width: 100%;

  font-family: "Pacifico", cursive;
  font-size: clamp(28px, 3.2vw, 44px);
  color: #fff;
  text-shadow: 0 0 1px rgba(0, 0, 0, 0.99), 0 0 10px rgba(209, 182, 98, 0.99), 0 0 15px rgba(209, 182, 98, 0.88), 0 0 20px rgba(209, 182, 98, 0.77) !important;

}

}


@media (max-width: 724px) {

  /* Event-TEXT ausblenden */
  .fc-daygrid-event .fc-event-title {
    display: none;
  }

  /* Event bleibt sichtbar (Punkt/Balken) */
  .fc-daygrid-event {
    min-height: 6px;
    padding: 0;
  }
}

@media (max-width: 500px) {

  /* Event komplett unsichtbar im Raster */
  .fc-daygrid-event-dot {
    display: none;
  }
}

@media (max-width: 390px) {

  /* Zellen etwas höher → Luft zum Tippen */
  .fc-daygrid-day-frame {
    min-height: 52px;
  }

  /* Tageszahlen kleiner & ruhiger */
  .fc-daygrid-day-number {
    font-size: 0.65rem;
    opacity: 0.7;
  }

  /* Event-Balken extrem reduziert */
  .fc-daygrid-event {
    font-size: 0.55rem;
    padding: 1px 4px;
    border-radius: 999px;
  }

  /* Header kompakter */
  .fc .fc-toolbar-title {
    font-size: 1.2rem;
  }

  .fc .fc-button {
    padding: 4px 8px !important;
    font-size: 0.7rem !important;
  }

    .calendar-section {
    margin-left: 5vw;
    margin-right: 5vw;

  }

}

@media (max-width: 330px) {
    .calendar-section {
    margin-left: 2vw;
    margin-right: 2vw;
  }

}


@media (max-width: 300px) {

  /* Kalender darf niemals horizontal sprengen */
  .calendar-section {
    overflow-x: hidden;
  }

  /* Toolbar extrem kompakt */
  .fc .fc-toolbar-title {
    font-size: 1.05rem;
  }

  .fc .fc-button {
    padding: 3px 6px !important;
    font-size: 0.65rem !important;
  }

  /* Tageszellen minimal größer für Tap */
  .fc-daygrid-day-frame {
    min-height: 46px;
  }
}



/*---------------- 
---PLATZHALTER CSS
----------------*/ 


/* Gate-Box (nur dein Platzhalter) */
#extCalendarGate {
    margin: 0 auto;
    display: flex;
    padding: clamp(14px, 2.2vw, 22px);
    border-radius: 18px;
    flex-direction: column;
    height: 100%;
    width: 100%;
    background: rgba(10, 10, 12, 0.40);
    -webkit-backdrop-filter: blur(5px) saturate(110%);
    backdrop-filter: blur(5px) saturate(110%);
    border: 1px solid rgba(209, 182, 98, 0.85);
    box-sizing: border-box;
    text-align: center;
    justify-content: center;
    align-items: center;
}

/* Referenziert: dein aktuelles kalender HTML/CSS/JS */
/* Regeln: keine Experimente • nur exakt auf Anweisung • keine ungefragten Fixes/Änderungen */

[hidden] {
  display: none !important;
}


/* Text */
#extCalendarGate p {
  margin: 0 0 12px;
  line-height: 1.5;
  color:rgba(255, 255, 255, 1)
}

/* Button */
#extCalendarGate button {
  appearance: none;
  border: 1px solid rgba(209, 182, 98, 0.85);
  background: rgba(209, 182, 98, 0.9);
  color:rgba(255, 255, 255, 1);

  padding: 10px 14px;
  border-radius: 12px;
  
  font: inherit;
  cursor: pointer;

  transition: transform 120ms ease, background 160ms ease, border-color 160ms ease;
}

#extCalendarGate button:hover {
  background: rgba(209, 182, 98, 0.26);
}

#extCalendarGate button:active {
  transform: translateY(1px);
}

#extCalendarGate button:focus-visible {
  outline: 2px solid rgba(209, 182, 98, 0.85);
  outline-offset: 3px;
}

/* Checkbox-Zeile */
#extCalendarGate label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  text-align: left;
  color:rgba(255, 255, 255, 1);
}

#extCalendarGate input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: rgba(209, 182, 98, 0.85);
}

/* Datenschutz-Link */
#extCalendarGate a {
  color: rgba(209, 182, 98, 0.95);
  text-decoration: underline;
  text-underline-offset: 3px;
}

#extCalendarGate a:hover {
  text-decoration-thickness: 2px;
}