.template-combobox {
  min-width: 0;
}
/* SyncFusion Document Editor Styles - Angepasst an Ant Design */

.mu-syncfusion-documenteditor {
  --mu-document-editor-text-cursor: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%3E%3Cpath%20d='M9%204h6M12%204v16M9%2020h6'%20fill='none'%20stroke='%23fff'%20stroke-width='3.5'%20stroke-linecap='square'/%3E%3Cpath%20d='M9%204h6M12%204v16M9%2020h6'%20fill='none'%20stroke='%23000'%20stroke-width='1.7'%20stroke-linecap='square'/%3E%3C/svg%3E") 12 12;
  width: 100%;
}

/* Topbar (Variable einfügen + Import/Export) */
.mu-syncfusion-documenteditor-topbar {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 2px; /* verhindert "harten" Scrollbar-Überlapp */
  scrollbar-width: none;
}

.mu-syncfusion-documenteditor-topbar::-webkit-scrollbar {
  display: none;
}

.mu-syncfusion-documenteditor-variable-tools {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.mu-syncfusion-documenteditor-varselect {
  min-width: 220px;
  flex: 1 1 auto;
}

.mu-syncfusion-documenteditor-formulaselect {
  min-width: 300px;
  flex: 0 0 340px;
}

.mu-syncfusion-documenteditor-actions {
  flex: 0 0 auto;
  white-space: nowrap;
}

.mu-syncfusion-documenteditor-preview-toggle {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  color: var(--ant-color-text-secondary, rgba(0, 0, 0, 0.65));
  font-size: 13px;
  white-space: nowrap;
}

@media (max-width: 767px) {
  .mu-syncfusion-documenteditor-topbar {
    align-items: stretch;
    flex-wrap: wrap;
    overflow-x: visible;
  }

  .mu-syncfusion-documenteditor-variable-tools {
    flex: 1 1 100%;
    width: 100%;
  }

  .mu-syncfusion-documenteditor-varselect {
    flex: 1 1 auto;
    min-width: 0;
  }

  .mu-syncfusion-documenteditor-formulaselect {
    flex: 1 1 100%;
    min-width: 0;
  }

  .mu-syncfusion-documenteditor-actions {
    display: flex;
    flex: 1 1 100%;
    justify-content: flex-end;
    min-width: 0;
    width: 100%;
  }

  .mu-syncfusion-documenteditor-preview-toggle {
    flex: 1 1 auto;
  }

  .mu-syncfusion-documenteditor-wrapper .e-de-ctnr-properties-pane,
  .mu-syncfusion-documenteditor-wrapper .e-de-ctnr-properties-pane-btn,
  .mu-syncfusion-documenteditor-wrapper .e-de-prop-pane {
    display: none !important;
  }

  .mu-syncfusion-documenteditor-wrapper .e-de-ctnr-documenteditor {
    width: 100% !important;
  }
}

/* Syncfusion wird als helle Editor-Insel gerendert; Dark Mode wird hier nicht erzwungen. */
.mu-syncfusion-documenteditor-wrapper {
  background: #f3f4f6;
  border: 1px solid #d9d9d9;
  border-radius: 8px;
  overflow: hidden;
}

.mu-syncfusion-documenteditor-wrapper .e-de-ctnr {
  background: #f3f4f6 !important;
  color: #1f1f1f !important;
}

.mu-syncfusion-documenteditor-wrapper .e-de-ctnr-toolbar {
  background: #ffffff !important;
  border-bottom: 1px solid #d9d9d9 !important;
  padding: 8px 12px;
  max-width: 100%;
  overflow: hidden;
}

.mu-syncfusion-documenteditor-wrapper .e-de-ctnr-toolbar,
.mu-syncfusion-documenteditor-wrapper .e-de-ctnr-toolbar .e-toolbar,
.mu-syncfusion-documenteditor-wrapper .e-de-ctnr-toolbar .e-toolbar-items,
.mu-syncfusion-documenteditor-wrapper .e-de-ctnr-toolbar .e-hscroll,
.mu-syncfusion-documenteditor-wrapper .e-de-ctnr-toolbar .e-hscroll-content,
.mu-syncfusion-documenteditor-wrapper .e-de-ctnr-toolbar .e-hscroll-nav,
.mu-syncfusion-documenteditor-wrapper .e-de-tlbr-wrapper,
.mu-syncfusion-documenteditor-wrapper .e-de-status-bar,
.mu-syncfusion-documenteditor-wrapper .e-de-ctnr-properties-pane-btn,
.mu-syncfusion-documenteditor-wrapper .e-de-prop-pane,
.mu-syncfusion-documenteditor-wrapper .e-de-ctnr-ribbon,
.mu-syncfusion-documenteditor-wrapper .e-ribbon {
  background-color: #ffffff !important;
  color: #1f1f1f !important;
}

.mu-syncfusion-documenteditor-wrapper .e-de-tool-ctnr-properties-pane,
.mu-syncfusion-documenteditor-wrapper .e-de-ctnr-properties-pane,
.mu-syncfusion-documenteditor-wrapper .e-de-ctn {
  background-color: #ffffff !important;
  color: #1f1f1f !important;
}

.mu-syncfusion-documenteditor-wrapper .e-de-ctnr-toolbar .e-hscroll,
.mu-syncfusion-documenteditor-wrapper .e-de-ctnr-toolbar .e-hscroll-bar {
  max-width: 100%;
  overflow: hidden;
}

.mu-syncfusion-documenteditor-wrapper .e-de-ctnr-toolbar .e-hscroll-content {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}

.mu-syncfusion-documenteditor-wrapper .e-de-ctnr-toolbar .e-hscroll-content::-webkit-scrollbar {
  display: none;
}

.mu-syncfusion-documenteditor-wrapper .e-de-ctnr-toolbar .e-toolbar-item {
  margin: 0 2px;
}

.mu-syncfusion-documenteditor-wrapper .e-de-ctnr-toolbar .e-toolbar-item .e-btn {
  border-radius: 6px;
  padding: 4px 8px;
}

.mu-syncfusion-documenteditor-wrapper .e-de-ctnr-toolbar .e-toolbar-item .e-btn,
.mu-syncfusion-documenteditor-wrapper .e-de-ctnr-toolbar .e-tbar-btn,
.mu-syncfusion-documenteditor-wrapper .e-de-ctnr-toolbar .e-dropdown-btn,
.mu-syncfusion-documenteditor-wrapper .e-de-ctnr-properties-pane-btn .e-btn,
.mu-syncfusion-documenteditor-wrapper .e-de-statusbar-zoom,
.mu-syncfusion-documenteditor-wrapper .e-de-pagenumber-input {
  background-color: #ffffff !important;
  border-color: #d9d9d9 !important;
  color: #1f1f1f !important;
}

.mu-syncfusion-documenteditor-wrapper .e-de-ctnr-toolbar .e-btn-icon,
.mu-syncfusion-documenteditor-wrapper .e-de-ctnr-toolbar .e-icons,
.mu-syncfusion-documenteditor-wrapper .e-de-ctnr-properties-pane-btn .e-icons {
  color: #1f1f1f !important;
}

.mu-syncfusion-documenteditor-wrapper .e-de-ctnr-toolbar .e-toolbar-item .e-btn:hover {
  background-color: #f5f5f5 !important;
}

/* Verstecke "New" und "Open" Buttons */
.mu-syncfusion-documenteditor-wrapper .e-de-ctnr-toolbar .e-toolbar-item[title="New"],
.mu-syncfusion-documenteditor-wrapper .e-de-ctnr-toolbar .e-toolbar-item[title="Neu"],
.mu-syncfusion-documenteditor-wrapper .e-de-ctnr-toolbar .e-toolbar-item[title="Open"],
.mu-syncfusion-documenteditor-wrapper .e-de-ctnr-toolbar .e-toolbar-item[title="Öffnen"] {
  display: none !important;
}

/* Alternative: Verstecke über Data-Attribute oder Klassen */
.mu-syncfusion-documenteditor-wrapper .e-de-ctnr-toolbar .e-toolbar-item:has([aria-label*="New"]),
.mu-syncfusion-documenteditor-wrapper .e-de-ctnr-toolbar .e-toolbar-item:has([aria-label*="Neu"]),
.mu-syncfusion-documenteditor-wrapper .e-de-ctnr-toolbar .e-toolbar-item:has([aria-label*="Open"]),
.mu-syncfusion-documenteditor-wrapper .e-de-ctnr-toolbar .e-toolbar-item:has([aria-label*="Öffnen"]) {
  display: none !important;
}

.mu-syncfusion-documenteditor-wrapper .e-de-ctnr-documenteditor {
  background: #f3f4f6 !important;
  color: #1f1f1f !important;
}

.mu-syncfusion-documenteditor-wrapper .e-de-page {
  background: #ffffff !important;
  box-shadow: none;
  margin: 0;
}

.mu-syncfusion-documenteditor-wrapper .e-de-status-bar {
  background: #ffffff !important;
  border-top: 1px solid #d9d9d9 !important;
  padding: 6px 12px;
  font-size: 12px;
  color: #4b5563 !important;
}

.mu-syncfusion-documenteditor-wrapper .e-de-page,
.mu-syncfusion-documenteditor-wrapper .e-de-page-content,
.mu-syncfusion-documenteditor-wrapper .e-de-page canvas {
  background-color: #ffffff !important;
  color: #000000 !important;
}

.mu-syncfusion-documenteditor-wrapper .e-de-ctnr-documenteditor,
.mu-syncfusion-documenteditor-wrapper .e-documenteditor,
.mu-syncfusion-documenteditor-wrapper .e-de-background,
.mu-syncfusion-documenteditor-wrapper .e-de-background canvas,
.mu-syncfusion-documenteditor-wrapper .e-de-page,
.mu-syncfusion-documenteditor-wrapper .e-de-page-content,
.mu-syncfusion-documenteditor-wrapper .e-de-page canvas {
  cursor: var(--mu-document-editor-text-cursor), text !important;
}

.mu-syncfusion-documenteditor-wrapper .e-de-ctnr-ribbon {
  background: #ffffff !important;
  border-bottom: 1px solid #d9d9d9;
}

.mu-syncfusion-documenteditor-wrapper .e-btn {
  border-radius: 6px;
  transition: all 0.2s;
  color: #1f1f1f !important;
}

.mu-syncfusion-documenteditor-wrapper .e-btn:hover {
  background-color: #f5f5f5 !important;
}

.mu-syncfusion-documenteditor-wrapper .e-dropdown-btn {
  border-radius: 6px;
  color: #1f1f1f !important;
}

.mu-syncfusion-documenteditor-wrapper .e-dropdown-btn:hover {
  background-color: #f5f5f5 !important;
}

/* Input-Felder im Editor */
.mu-syncfusion-documenteditor-wrapper .e-input-group {
  border-radius: 6px;
}

/* Popups/Menüs */
.mu-syncfusion-documenteditor-wrapper .e-popup {
  border-radius: 8px;
  box-shadow: 0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 9px 28px 8px rgba(0, 0, 0, 0.05);
}
