.termine-calendar-wrapper {
    display: flex;
    flex-wrap: wrap;
    flex-direction: column;
    gap: 30px;
    max-width: 100%;
    margin-bottom: 30px;
}

.termine-calendar-container {
    flex: 0 0 65%;
    min-width: 280px;
}

.calendar-loading {
    text-align: center;
    padding: 20px;
    font-style: italic;
    min-height: 307px;
}

.calendar-error {
    text-align: center;
    padding: 20px;
    color: #ff0000;
}

.termine-event-details {
    flex: 1;
    min-width: 280px;
    padding: 20px;
}

.termine-calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.termine-calendar-header h2 {
    margin: 0;
    text-align: center;
}

.calendar-nav {
    text-decoration: none;
    font-size: 1.0em;
    color: #333;
    cursor: pointer;
    background-color: #F99502;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: 0.3s;
    padding-top: 4px;
}
.calendar-nav:hover {
    text-decoration: none !important;
    transform: scale(1.1);
}

table.termine-calendar {
    width: 100%;
    border-collapse: collapse;
}

table.termine-calendar th {
    background-color: #f0f0f0;
    padding: 8px;
    text-align: center;
    border: 1px solid #ddd;
}

table.termine-calendar td {
    padding: 0 !important;
    text-align: center;
    border: 1px solid #ddd;
    height: 40px;
    width: 40px;
}

table.termine-calendar td.empty {
    background-color: #f9f9f9;
}

table.termine-calendar td.today {
    background-color: #FCE0B8 !important;
    font-weight: bold;
}

table.termine-calendar td.today .event-day:focus {
    outline: 2px solid #F99502 !important;
}

table.termine-calendar td.has-event {
    background-color: #FCE0B8;
}

.event-day {
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: #0066cc;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
}

.event-date-heading {
    margin-top: 0;
    background: #FCE0B8;
    padding: 5px 20px;
    margin-bottom: 0;
}

.event-item {
    padding: 5px 20px;
    border-bottom: 1px solid black;
}

.event-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.event-time {
    display: flex;
    margin-top: 5px;
    margin-bottom: 5px;
}

.event-description {
    margin: 10px 0;
}

.event-link {
    margin-top: 10px;
}

.event-link a {
    font-weight: bold;
    text-decoration: none;
}

/* Datum-Navigation im Event-Details */
.event-date-nav-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #FCE0B8;
    padding: 0.5em 1em;
    margin-bottom: 1em;
}

.event-date-prev,
.event-date-next {
    background: none;
    border: none;
    font-size: 1.5em;
    line-height: 1;
    color: #333;
    cursor: pointer;
    padding: 0 0.5em;
    transition: color 0.2s;
}
.event-date-prev:hover,
.event-date-next:hover {
    color: #F99502;
}
.event-date-prev:disabled,
.event-date-next:disabled {
    opacity: 0.4;
    cursor: default;
}

/* Fokus-Rahmen für ausgewählten Tag im Kalender */
table.termine-calendar .event-day:focus {
    outline: 2px solid #000000 !important;
}

table.termine-calendar .today .event-day:focus {
    outline: 2px solid #F99502 !important;
}

/* Visueller Fokus/Selektionsrahmen für Tage ohne Events */
table.termine-calendar td.focused-day {
    outline: 2px solid #000 !important;
}

/* orange Hintergrund für Tage mit Highlight-Events */
table.termine-calendar td.highlighted-day {
    background-color: #F99502;
}
table.termine-calendar td.highlighted-day .event-day {
    color: #fff;
}

/* Abgesagte Termine (TE_FaelltAus=true) durchgestrichen darstellen */
.event-item.event-cancelled .event-title,
.event-item.event-cancelled .event-title,
.event-item.event-cancelled .event-time,
.event-item.event-cancelled .event-description {
    text-decoration: line-through;
    opacity: 0.6;
}

/* Abstand für das Uhr-Icon */
.event-time-icon {
    margin-right: 10px;
    margin-top: -2px;
}

/* Icon selbst anpassen */
.event-time-icon svg {
    display: inline-block;
    vertical-align: middle;
}

/* Hervorgehobene Termine (aus Einstellungen) hervorheben */
   .event-item.event-highlighted {
    background-color: #F99502;
    border: 4px solid #000000;
}

/* Hinweis für ausgefallene Termine */
.event-item.event-cancelled .cancelled-note {
    color: red;
    font-weight: bold;
    float: right;
    margin-top: 10px;
}

/* Zusatz für Ort und Zusatzinformation */
.event-location {
  margin-bottom: .25em;
}
.event-extra-info {
  margin-bottom: .5em;
}
