/* =====================================================
   TERMINE: Ablauf + Ganzjahres-Modal
   ===================================================== */

.termine-karte.is-abgelaufen {
    display: none !important;
}

/* --- Button vor der Terminliste --- */
.termine-before {
    margin: 0 0 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.termine-button {
    display: inline-flex;
    align-items: center;
    padding: 0.6rem 1.4rem;
    background-color: #9d2429;
    color: #ffffff;
    border: 0;
    border-bottom: 3px solid #caa674;
    border-radius: 0.25rem;
    font-size: 1rem;
    line-height: 1.2;
    cursor: pointer;
    transition: background-color 150ms ease-in-out;
}

.termine-button:hover,
.termine-button:focus-visible {
    background-color: #8b0c13;
}

.termine-button.ist-aktiv {
    background-color: #8b0c13;
    border-bottom-color: #ffffff;
}

/* --- Hinweiszeile im Vergangen-Modus --- */
.termine-vergangen-status {
    margin: 0 0 1.25rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    color: #7f1d1d;
    background-color: rgba(255, 255, 255, 0.6);
    border-left: 3px solid #caa674;
}

/* Vergangene Termine gedämpft darstellen */
.termine-karte.is-vergangen {
    opacity: 0.72;
    filter: grayscale(0.35);
}

/* --- Modal / Overlay --- */
.termine-modal[hidden] {
    display: none !important;
}

@keyframes termine-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes termine-zoom-in {
    from { opacity: 0; transform: scale(0.92); }
    to   { opacity: 1; transform: scale(1); }
}

@keyframes termine-fade-out {
    from { opacity: 1; }
    to   { opacity: 0; }
}

@keyframes termine-zoom-out {
    from { opacity: 1; transform: scale(1); }
    to   { opacity: 0; transform: scale(0.92); }
}

.termine-modal {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: flex;
    justify-content: center;
    overflow-y: auto;
}

.termine-modal-backdrop {
    position: fixed;
    inset: 0;
    background-color: rgba(239, 224, 207, 0.9);
    animation: termine-fade-in 220ms ease-out;
}

.termine-modal-panel {
    position: relative;
    width: 100%;
    max-width: 1024px;
    padding: 2.5rem 1.5rem 2rem;
    animation: termine-zoom-in 280ms ease-out;
}

.termine-modal.termine-modal-verlassen .termine-modal-backdrop {
    animation: termine-fade-out 200ms ease-in forwards;
}

.termine-modal.termine-modal-verlassen .termine-modal-panel {
    animation: termine-zoom-out 200ms ease-in forwards;
}

.termine-modal-titel {
    margin: 0 0 1rem;
    font-size: 1.5rem;
    line-height: 1.2;
    color: #8b0c13;
}

.termine-modal-close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 2.25rem;
    height: 2.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 0;
    border-radius: 0.25rem;
    font-size: 1.75rem;
    line-height: 1;
    color: #8b0c13;
    cursor: pointer;
}

.termine-modal-close:hover,
.termine-modal-close:focus-visible {
    background-color: rgba(139, 12, 19, 0.1);
}

.termine-modal-liste .termine-karte {
    margin: 0 0 1.25rem;
}

body.termine-modal-offen {
    overflow: hidden;
}