.mm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.mm-modal {
    background: #fff;
    border-radius: 10px;
    width: min(480px, 92vw);
    max-height: 85vh;
    overflow: auto;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
}

.mm-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    border-bottom: 1px solid #eee;
    font-weight: 600;
    font-size: 15px;
}

.mm-close {
    background: none;
    border: none;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    color: #888;
    padding: 4px 8px;
}
.mm-close:hover { color: #333; }

.mm-modal-body { padding: 18px; }

.mm-type-options { display: flex; gap: 12px; }
.mm-type-card {
    flex: 1;
    border: 1.5px solid #ddd;
    border-radius: 8px;
    padding: 16px;
    background: #fafafa;
    cursor: pointer;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: border-color 0.15s, background 0.15s;
}
.mm-type-card:hover { border-color: #27ae60; background: #f2fbf5; }
.mm-type-card strong { font-size: 15px; }
.mm-type-card span { font-size: 12.5px; color: #777; }

.mm-toolbar { display: flex; gap: 4px; margin-bottom: 8px; }
.mm-toolbar button {
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 5px;
    width: 32px;
    height: 32px;
    cursor: pointer;
    font-size: 13px;
}
.mm-toolbar button:hover { background: #f2f2f2; }

.mm-wysiwyg {
    min-height: 120px;
    border: 1.5px solid #ddd;
    border-radius: 6px;
    padding: 10px 12px;
    font-size: 14px;
    line-height: 1.5;
}
.mm-wysiwyg:focus { outline: none; border-color: #27ae60; }

.mm-search-input {
    width: 100%;
    box-sizing: border-box;
    padding: 9px 12px;
    border: 1.5px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 10px;
}
.mm-search-input:focus { outline: none; border-color: #27ae60; }

.mm-product-list {
    max-height: 320px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mm-product-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border: 1px solid transparent;
    border-radius: 6px;
    background: none;
    cursor: pointer;
    text-align: left;
    font-size: 14px;
    width: 100%;
}
.mm-product-item:hover { background: #f2fbf5; border-color: #d5eee0; }
.mm-product-item img,
.mm-product-noimg {
    width: 36px;
    height: 36px;
    border-radius: 4px;
    object-fit: cover;
    background: #eee;
    flex-shrink: 0;
}

.mm-hint { color: #888; font-size: 13px; padding: 8px 2px; }

.mm-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 14px;
}
.mm-btn-primary, .mm-btn-secondary {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13.5px;
    cursor: pointer;
    border: 1.5px solid transparent;
}
.mm-btn-primary { background: #27ae60; color: #fff; }
.mm-btn-primary:hover { background: #219150; }
.mm-btn-secondary { background: #fff; border-color: #ddd; color: #444; }
.mm-btn-secondary:hover { background: #f5f5f5; }

.mm-map-id-badge {
    font-size: 12px;
    color: #777;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
/* 2D/3D-Umschalter */
.mm-view-toggle { display: inline-flex; border: 1.5px solid #ddd; border-radius: 6px; overflow: hidden; }
.mm-view-toggle-btn { border: none; background: #fff; padding: 6px 14px; font-size: 13px; cursor: pointer; }
.mm-view-toggle-btn.mm-active { background: #1a1a1a; color: #fff; }
.mm-view-toggle-btn:not(.mm-active):hover { background: #f2f2f2; }
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 4px;
    padding: 2px 8px;
    font-size: 11.5px;
    cursor: pointer;
}
.mm-map-id-badge button:hover { background: #f2f2f2; }

/* Karteneinstellungen */
.mm-settings-form { display: flex; flex-direction: column; gap: 14px; }
.mm-field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: #444; flex: 1; }
.mm-field input[type="text"] {
    padding: 8px 10px;
    border: 1.5px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}
.mm-field input[type="text"]:focus { outline: none; border-color: #27ae60; }
.mm-field input[type="color"] { width: 100%; height: 34px; border: 1.5px solid #ddd; border-radius: 6px; padding: 2px; cursor: pointer; }
.mm-field-row { display: flex; gap: 12px; }
.mm-checkbox-label { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: #444; }

/* Transform-Steuerung (schwebt über dem Karten-Canvas) */
.mm-transform-controls {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 1000;
    display: flex;
    gap: 8px;
}
.mm-transform-undo-btn, .mm-transform-finish-btn {
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 13.5px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}
.mm-transform-finish-btn { background: #1a1a1a; color: #fff; }
.mm-transform-finish-btn:hover { background: #333; }
.mm-transform-undo-btn { background: #fff; color: #333; }
.mm-transform-undo-btn:hover { background: #f2f2f2; }
