.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: 0.2s ease;
    z-index: 9999;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal {
    background: var(--color-white);
    border-radius: 10px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    animation: modalPop 0.18s ease;
}

/* Größen */
.modal-s  { width: 400px; max-width: 90%; }
.modal-m  { width: 600px; max-width: 92%; }
.modal-l  { width: 900px; max-width: 95%; }
.modal-xl { width: 1200px; max-width: 98%; }


.modal-header {
    position: relative;
    padding: 18px 24px;
    border-bottom: 1px solid var(--color-8);
}

.modal-header h2 {
    margin: 0;
    text-align: center;
    font-size: 1.2rem;
    font-weight: 600;
}

.modal-close {
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    opacity: 0.6;
    transition: 0.15s ease;
}

.modal-close:hover {
    opacity: 1;
}




.modal-footer {    
    padding: 15px 20px;
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
}

.modal code {
    background: var(--color-7);
    padding: 3px 8px;
    border-radius: 4px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.9em;
    color: var(--color-1);
}

body.modal-open {
    overflow: hidden;
}

@keyframes modalPop {
    from { transform: scale(0.96); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
}
