/* Suchformular */
.termine-suche { position: relative; width: 100%; }
.termine-auf, .termine-knopf { display: none; }
.termine-filter {
    display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; width: 100%; padding: 16px;
    background: #fff; border: 1px solid rgba(24, 7, 20, .1); border-radius: 12px;
}
.termine-filter label { display: flex; flex: 1 1 9em; flex-direction: column; gap: 4px; min-width: 0; margin: 0; font-size: .8em; font-weight: 700; line-height: 1.4; }
.termine-filter label:has(input[type=search]) { flex: 2 1 14em; }
.termine-filter label:has(select) { flex: 1.5 1 12em; }
.termine-filter label input, .termine-filter label select {
    box-sizing: border-box; width: 100%; min-width: 0; height: 46px; padding: 0 12px; line-height: normal;
    font: inherit; font-size: max(16px, 1.15em); font-weight: 400; color: inherit; background-color: #fff;
    border: 1px solid rgba(24, 7, 20, .2); border-radius: 8px;
}
.termine-filter label input:focus, .termine-filter label select:focus { border-color: #a42d88; outline: 2px solid rgba(164, 45, 136, .35); outline-offset: 0; }
.termine-filter button {
    display: inline-flex; align-items: center; justify-content: center; height: 46px; padding: 0 24px; font: inherit; font-weight: 700; line-height: 1; color: #fff; cursor: pointer;
    background: #a42d88; border: 1px solid #a42d88; border-radius: 8px;
}
.termine-filter button:hover, .termine-filter button:focus-visible { background: #84246d; }
.termine-filter a { display: inline-flex; align-items: center; justify-content: center; height: 46px; border: 0; box-shadow: none; color: #a42d88; text-decoration: underline; }

@media (max-width: 767px) {
    .termine-filter { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding: 12px; }
    .termine-filter label:has(input[type=search]), .termine-filter label:has(select), .termine-filter button, .termine-filter a { grid-column: 1 / -1; }
}

/* Handy: Formular erst nach Druck auf den Knopf zeigen. */
@media (max-width: 767px) {
    .termine-suche .termine-auf { display: block; position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; }
    .termine-suche .termine-knopf {
        display: flex; align-items: center; justify-content: space-between; min-height: 46px; margin: 0; padding: 0 16px;
        font-weight: 700; color: #a42d88; cursor: pointer; background: #fff; border: 1px solid #a42d88; border-radius: 8px;
    }
    .termine-knopf::after { content: "+"; font-size: 1.4em; line-height: 1; }
    .termine-auf:checked + .termine-knopf::after { content: "−"; }
    .termine-auf:focus-visible + .termine-knopf { outline: 2px solid #a42d88; outline-offset: 2px; }
    .termine-auf:not(:checked) ~ .termine-filter { display: none; }
    .termine-auf:checked ~ .termine-filter { margin-top: 10px; }
}

/* Kalender. Farbe anpassen: .termine-kalender { --termine-farbe: #123456; } */
.termine-kalender {
    --termine-farbe: #a42d88;
    --termine-hell: rgba(164, 45, 136, .08);
    --termine-linie: rgba(24, 7, 20, .1);
    width: 100%;
    scroll-margin-top: 6em;
}
/* Link-Unterstreichungen des Themes ausschalten. */
.termine-kalender a { border: 0; box-shadow: none; background-image: none; text-decoration: none; }

.termine-nav { display: flex; justify-content: space-between; align-items: center; gap: 1em; margin-bottom: 1em; }
.termine-nav strong { font-family: "Ibarra Real Nova", serif; font-size: 1.6em; font-weight: 600; line-height: 1.2; color: var(--termine-farbe); text-align: center; }
.termine-kalender .termine-nav a {
    display: flex; flex: none; align-items: center; justify-content: center;
    width: 44px; height: 44px; border: 1px solid var(--termine-farbe); border-radius: 50%; color: var(--termine-farbe); line-height: 1;
}
.termine-kalender .termine-nav a:hover, .termine-kalender .termine-nav a:focus-visible { background: var(--termine-farbe); color: #fff; }

.termine-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.termine-head { padding-bottom: .25em; font-size: .75em; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; text-align: center; opacity: .6; }
.termine-day { min-height: 7.5em; padding: .4em; background: #fff; border: 1px solid var(--termine-linie); border-radius: 10px; }
.termine-day.is-empty { background: none; border: 0; }
.termine-day.is-free { background: rgba(255, 255, 255, .5); }
.termine-day.is-today { border: 2px solid var(--termine-farbe); }
.termine-num { display: inline-flex; align-items: center; justify-content: center; min-width: 1.8em; height: 1.8em; border-radius: 1em; font-size: .85em; font-weight: 700; }
.is-today .termine-num { background: var(--termine-farbe); color: #fff; }
.termine-weekday, .termine-leer { display: none; }

.termine-kalender a.termine-event {
    display: block; margin-top: 4px; padding: .3em .45em; border-left: 3px solid var(--termine-farbe); border-radius: 4px;
    background: var(--termine-hell); color: inherit; font-size: .78em; line-height: 1.3; overflow-wrap: anywhere; hyphens: auto;
}
.termine-kalender a.termine-event:hover, .termine-kalender a.termine-event:focus-visible { background: var(--termine-farbe); color: #fff; }
.termine-event time { display: block; font-weight: 700; color: var(--termine-farbe); }
.termine-kalender a.termine-event:hover time, .termine-kalender a.termine-event:focus-visible time { color: inherit; }
.termine-event.is-cancelled span { text-decoration: line-through; }
.termine-event.is-cancelled { opacity: .6; }
.termine-event.is-moved span { font-style: italic; }

/* Handy und kleines Tablet: Liste der Tage mit Terminen, Datum links. */
@media (max-width: 767px) {
    .termine-grid { display: flex; flex-direction: column; gap: 10px; }
    .termine-head, .termine-day.is-empty, .termine-day.is-free { display: none; }
    .termine-day { display: grid; grid-template-columns: 52px minmax(0, 1fr); column-gap: 10px; align-content: start; min-height: 0; padding: 10px; }
    .termine-num {
        grid-column: 1; grid-row: 1 / span 20; align-self: start; flex-direction: column; height: auto; min-height: 56px;
        border-radius: 8px; background: var(--termine-hell); color: var(--termine-farbe); font-size: 1.3em; line-height: 1.1;
    }
    .termine-weekday { display: block; font-size: .55em; text-transform: uppercase; letter-spacing: .06em; }
    .termine-day.is-past { opacity: .55; }
    .termine-kalender a.termine-event { grid-column: 2; display: flex; align-items: center; gap: .6em; min-height: 44px; margin: 0; font-size: .95em; }
    .termine-event time { flex: none; min-width: 3em; }
    .termine-kalender a.termine-event + a.termine-event { margin-top: 6px; }
    .termine-leer { display: block; text-align: center; opacity: .7; }
}

/* Gemeindebrief */
.gemeindebrief { display: flex; flex-direction: column; width: 100%; max-width: 360px; overflow: hidden; background: #fff; border: 1px solid rgba(24, 7, 20, .1); border-radius: 12px; color: #a42d88; }
.gemeindebrief canvas { display: none; width: 100%; height: auto; }
.gemeindebrief.hat-bild canvas { display: block; }
.gemeindebrief span { padding: 12px 16px; font-weight: 700; }
.gemeindebrief:hover, .gemeindebrief:focus-visible { border-color: #a42d88; }
