/* Grüne Termine – Modal */

.gt-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    backdrop-filter: blur(4px);
}

.gt-modal-overlay[hidden] {
    display: none;
}

.gt-modal {
    background: var(--gt-card-bg, #fff);
    border-radius: 16px;
    max-width: 600px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    animation: gtModalSlideIn 0.3s ease;
    scrollbar-width: none;
}

.gt-modal::-webkit-scrollbar {
    display: none;
}

.gt-modal::after {
    content: '';
    display: block;
    position: sticky;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), var(--gt-card-bg, #fff));
    pointer-events: none;
    margin-top: -40px;
    transition: opacity 0.3s;
}

.gt-modal.scrolled-bottom::after {
    opacity: 0;
}

@keyframes gtModalSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.gt-modal__header {
    background: linear-gradient(135deg, var(--gt-primary, #005538), var(--gt-accent, #46962b));
    color: #fff;
    padding: 32px 32px 28px;
    border-radius: 16px 16px 0 0;
    position: relative;
}

.gt-modal__title {
    font-size: 24px;
    margin-bottom: 6px;
    color: #fff;
}

.gt-modal__date {
    opacity: 0.85;
    font-size: 15px;
    margin: 0;
}

.gt-modal__close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.gt-modal__close:hover {
    background: rgba(255, 255, 255, 0.35);
}

.gt-modal__body {
    padding: 28px 32px 32px;
}

.gt-modal__body p {
    color: var(--gt-muted, #666);
    line-height: 1.7;
    margin-bottom: 12px;
}

.gt-modal__location {
    color: var(--gt-primary, #005538);
    font-weight: 700;
    margin-bottom: 16px;
}

.gt-modal__map {
    width: 100%;
    height: 250px;
    border-radius: 12px;
    margin-top: 20px;
    overflow: hidden;
}

.gt-modal__ical {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    background: var(--gt-accent, #46962b);
    color: #fff;
    padding: 12px 24px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 15px;
    transition: background 0.2s, transform 0.2s;
}

.gt-modal__ical:hover {
    background: var(--gt-primary, #005538);
    color: #fff;
    transform: translateY(-2px);
}

@media (max-width: 640px) {
    .gt-modal__header {
        padding: 24px 20px 20px;
    }

    .gt-modal__body {
        padding: 20px;
    }

    .gt-modal__title {
        font-size: 20px;
    }
}
