/* MFPA Modal – Leistungsfinder Modal
 * Design angelehnt an das bestehende WP Post Modal Styling */

.mfpa-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(130, 130, 130, 0.4);
    display: none;
    overflow: auto;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.mfpa-modal-overlay.is-active {
    display: block;
}

.mfpa-modal-overlay.is-visible {
    opacity: 1;
}

body.mfpa-modal-open {
    position: fixed;
    overflow: hidden;
    width: 100%;
    /* top wird per JS gesetzt: -scrollY px */
}

.mfpa-modal {
    position: relative;
    background: #fefefe;
    margin: 10vh auto;
    padding: 20px;
    width: 80%;
    max-width: 760px;
    border: 1px solid #888;
    transform: translateY(20px);
    transition: transform 0.2s ease;
}

.mfpa-modal-overlay.is-visible .mfpa-modal {
    transform: translateY(0);
}

/* Close Button */
.mfpa-modal__close {
    position: absolute;
    top: 10px;
    right: 14px;
    z-index: 10;
    border: 0;
    background: transparent;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
    color: rgb(81, 110, 133);
    padding: 4px 8px;
}

.mfpa-modal__close:hover {
    color: #333;
}

.mfpa-modal__close:focus {
    outline: 1px dashed skyblue;
    border-radius: 5px;
}

/* Content */
.mfpa-modal__content {
    padding: 0 0.7em 0 0.5em;
}

.mfpa-modal__title {
    font-size: 2em;
    margin: 0.3em 0;
    color: #1a1a1a;
}

.mfpa-modal__body {
    font-size: 16px;
    line-height: 1.5em;
    color: #333;
    text-rendering: optimizeLegibility;
}

.mfpa-modal__body p {
    font-size: 16px;
    line-height: 1.5em;
    margin-bottom: 0.8em;
}

.mfpa-modal__body img {
    max-width: 100%;
    height: auto;
}

.mfpa-modal__body h2 { font-size: 2em; margin: 0.3em 0; }
.mfpa-modal__body h3 { font-size: 1.75em; margin: 0.3em 0; }
.mfpa-modal__body h4 { font-size: 1.5em; margin: 0.3em 0; }
.mfpa-modal__body h5 { font-size: 1.25em; margin: 0.3em 0; }
.mfpa-modal__body h6 { font-size: 1em; margin: 0.3em 0; line-height: 1.5em; }

.mfpa-modal__body ul li,
.mfpa-modal__body ol li {
    line-height: 1em;
    padding-bottom: 0.5em;
    text-align: justify;
}

.mfpa-modal__body ul li {
    list-style: disc;
    margin-left: 30px;
}

.mfpa-modal__body ol li {
    list-style: decimal;
    margin-left: 30px;
}

.mfpa-modal__body table {
    color: #757575;
    font-size: 1em;
    line-height: 2;
    margin: 0 0 24px;
    width: 100%;
}

/* Loader */
.mfpa-modal__loader {
    display: flex;
    justify-content: center;
    padding: 25vh 0;
}

.mfpa-modal__loader::after {
    content: '';
    width: 36px;
    height: 36px;
    border: 3px solid #e0e0e0;
    border-top-color: rgb(81, 110, 133);
    border-radius: 50%;
    animation: mfpa-spin 0.6s linear infinite;
}

@keyframes mfpa-spin {
    to { transform: rotate(360deg); }
}

/* --- Meta Box View Content (lf-content) --- */

/* Im Modal den "weiter zum Leistungsfinder"-Link ausblenden */
.mfpa-modal .hide-in-modal {
    display: none !important;
}

/* Kontaktbereich */
.mfpa-modal .lf-content .contact {
    margin: 1.2em 0;
    padding: 0.8em 0;
    border-top: 1px solid #e0e0e0;
    font-size: 15px;
    line-height: 1.6;
    color: #333;
}

.mfpa-modal .lf-content .contact b {
    color: #1a1a1a;
}

.mfpa-modal .lf-content .contact a {
    color: rgb(81, 110, 133);
    text-decoration: none;
}

.mfpa-modal .lf-content .contact a:hover {
    text-decoration: underline;
}

/* Normen */
.mfpa-modal .lf-content .normen {
    margin: 0.8em 0;
    font-size: 14px;
    color: #555;
}

/* Rubrik-Badges mit Hintergrundbildern */
.mfpa-modal .lf-content .rubrik {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 1.2em 0;
}

.mfpa-modal .lf-content .rubrik_term {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px 6px 36px;
    background-repeat: no-repeat;
    background-position: 8px center;
    background-size: 22px 22px;
	font-weight:bold;
    font-size: 13px;
    color: #333;
    white-space: nowrap;
}

/* Responsive */
@media (max-width: 600px) {
    .mfpa-modal {
        width: 95%;
        margin: 5vh auto;
    }
}
