/* Modal Trigger Styles - Eigene Klassen die Elementor nicht kennt */
.mep-trigger-wrapper {
    display: inline-block;
}

/* MEP Button - Elementor kann diese Klasse nicht überschreiben */
.mep-trigger-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    font-family: inherit;
    font-weight: 500;
    line-height: 1;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    border: none;
    outline: none;
    transition: all 0.3s ease;
    box-sizing: border-box;
    user-select: none;
    -webkit-user-select: none;
}

/* Button Icon */
.mep-btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: all 0.3s ease;
}

.mep-btn-icon svg {
    display: block;
    width: 1em;
    height: 1em;
}

.mep-btn-icon i {
    line-height: 1;
}

.mep-btn-text {
    display: inline-block;
    line-height: inherit;
}

/* Kein genereller Hover-Effekt - nur die Elementor-Einstellungen zählen */

.mep-trigger-btn:focus {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

.mep-trigger-btn:active {
    transform: scale(0.98);
}

/* MEP Link - Elementor kann diese Klasse nicht überschreiben */
.mep-trigger-link {
    display: inline;
    cursor: pointer;
    text-decoration: underline;
    transition: all 0.3s ease;
}

.mep-trigger-link:hover {
    text-decoration: none;
    /* opacity entfernt - nur Elementor-Einstellungen zählen */
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5) !important;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 20px;
    box-sizing: border-box;
}

.modal-overlay.active {
    opacity: 1;
}

/* Modal Content */
.modal-content {
    position: relative;
    background-color: #ffffff !important;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    transform: scale(0.7);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

/* Modal Header Bar */
.modal-header-bar {
    width: 100%;
    background-color: #61ce70; /* Fallback - kann von Elementor überschrieben werden */
    flex-shrink: 0;
}

/* Modal Body */
.modal-body {
    padding: 30px;
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    max-height: calc(90vh - 20px);
}

/* Custom Scrollbar für Modal Body */
.modal-body::-webkit-scrollbar {
    width: 10px;
}

.modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 5px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 5px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.modal-body h1,
.modal-body h2,
.modal-body h3,
.modal-body h4,
.modal-body h5,
.modal-body h6 {
    margin-top: 0;
}

.modal-body p:last-child {
    margin-bottom: 0;
}

/* Modal Footer Bar */
.modal-footer-bar {
    width: 100%;
    background-color: #61ce70; /* Fallback - kann von Elementor überschrieben werden */
    flex-shrink: 0;
}

/* Close Button */
.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 30px;
    height: 30px;
    background-color: #61ce70; /* Fallback - kann von Elementor überschrieben werden */
    color: #ffffff; /* Fallback - kann von Elementor überschrieben werden */
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    line-height: 1;
    z-index: 10;
    transition: all 0.3s ease;
    border-radius: 3px;
    padding: 0;
}

.modal-close:hover {
    transform: rotate(90deg);
    /* Kein opacity mehr - nur Elementor-Einstellungen */
}

.modal-close:focus {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

.modal-close span {
    display: block;
    line-height: 1;
}

/* Prevent body scroll when modal is open */
body.modal-open {
    overflow: hidden;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .modal-content {
        width: 100% !important;
        max-width: 100%;
        margin: 0 10px;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .modal-close {
        top: 10px;
        right: 10px;
    }
}

/* Smooth Scrolling */
.modal-body {
    scroll-behavior: smooth;
}

/* Firefox Scrollbar */
.modal-body {
    scrollbar-width: thin;
    scrollbar-color: #888 #f1f1f1;
}

/* Animation for modal */
@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes modalScaleIn {
    from {
        transform: scale(0.7);
    }
    to {
        transform: scale(1);
    }
}

