/* Fahnen-Editor: Module unter css/ (Reihenfolge per @import) */
@import url("css/01-tokens.css");
@import url("css/02-coloris.css");
@import url("css/03-base-reset.css");
@import url("css/04-page-layout.css");
@import url("css/05-editor-windows.css");
@import url("css/06-editor-window-inner.css");
@import url("css/07-preview-vorschau.css");
@import url("css/08-toast.css");
@import url("css/09-stage-svg.css");
@import url("css/10-cursor-states.css");
@import url("css/11-controls-buttons.css");
@import url("css/12-grund-btn.css");
@import url("css/13-graphic-actions-grid.css");
@import url("css/14-tools-sections.css");
@import url("css/15-text-panel.css");
@import url("css/16-text-format-toolbar.css");
@import url("css/17-text-color-coloris-panels.css");
@import url("css/18-pattern-panel.css");
@import url("css/19-pattern-buttons.css");
@import url("css/20-responsive.css");
@import url("css/21-print.css");
@import url("css/23-modal-dialog.css");
@import url("css/24-editor-boot-loading.css");
@import url("css/25-modern-dialog.css");
@import url("css/26-shop-embed.css");
@import url("css/27-shop-wrap.css");

/* Vorschau: 20px zum Rahmen — nach allen Imports, überschreibt ggf. alte Teil-CSS aus dem Cache */
.editor-window.editor-window--vorschau {
    padding: 20px 6px 20px 46px !important;
    box-sizing: border-box !important;
}
.editor-window--vorschau > .editor-window-inner {
    padding: 0 !important;
}
.editor-window--vorschau .editor-window-inner--stage {
    padding: 0 !important;
}
body.is-editing-image .editor-window--vorschau .editor-window-inner--stage,
body.is-editing-text .editor-window--vorschau .editor-window-inner--stage {
    overflow: visible !important;
}
body.is-editing-image .editor-window--vorschau,
body.is-editing-text .editor-window--vorschau {
    z-index: 2;
}

/* Gesperrte Arbeitsfläche (nach Refresh): JS setzt html.editor-workbench-locked + disabled — CSS blockiert Klicks zuverlässig */
html.editor-workbench-locked .grundfunktionen-actions > .grund-btn:not(#grundLoadProjectBtn):not(#grundUndoBtn):not(#grundRedoBtn) {
    pointer-events: none !important;
    opacity: 0.42 !important;
    cursor: not-allowed !important;
    filter: grayscale(0.25);
}
/* Verlauf auch bei gesperrter Arbeitsfläche bedienbar (z. B. erste Hintergrundfarbe) */
html.editor-workbench-locked .grundfunktionen-actions > #grundUndoBtn:not(:disabled),
html.editor-workbench-locked .grundfunktionen-actions > #grundRedoBtn:not(:disabled) {
    pointer-events: auto !important;
    opacity: 1 !important;
    cursor: pointer !important;
    filter: none;
}
html.editor-workbench-locked .grundfunktionen-actions > #grundProductSelectBtn:not(:disabled) {
    pointer-events: auto !important;
    opacity: 1 !important;
    cursor: pointer !important;
    filter: none;
}
html.editor-workbench-locked .grundfunktionen-actions > #grundShopReturnBtn:not(:disabled),
html.editor-workbench-locked .grundfunktionen-actions > #grundSaveBtn:not(:disabled) {
    pointer-events: auto !important;
    opacity: 1 !important;
    cursor: pointer !important;
    filter: none;
}
html.editor-workbench-locked .graphic-window .graphic-actions-grid .grund-btn:not(#uploadBtn) {
    pointer-events: none !important;
    opacity: 0.42 !important;
    cursor: not-allowed !important;
    filter: grayscale(0.25);
}
html.editor-workbench-locked .text-panel-left .grund-btn,
html.editor-workbench-locked .text-window .text-format-btn,
html.editor-workbench-locked .text-window .text-font-family-select {
    pointer-events: none !important;
    opacity: 0.42 !important;
    cursor: not-allowed !important;
    filter: grayscale(0.25);
}
/* Hintergrund / Muster: bis Produktwahl — wie übrige Werkzeuge */
html.editor-workbench-locked .bg-window input,
html.editor-workbench-locked .bg-window .coloris-inline-frame,
html.editor-workbench-locked .pattern-window input,
html.editor-workbench-locked .pattern-window .bg-pattern-btn,
html.editor-workbench-locked .pattern-window .coloris-inline-frame {
    pointer-events: none !important;
    opacity: 0.42 !important;
    cursor: not-allowed !important;
    filter: grayscale(0.25);
}
html.editor-workbench-locked .pattern-window input[type='range'] {
    cursor: not-allowed !important;
}

/* Snapshot-Restore / Undo-Redo: Zwischenzustände + Coloris-Iframe-Reload ausblenden (ein sichtbarer Aufbau) */
html.editor-restoring-snapshot .editor-preview-stack {
    opacity: 0;
    pointer-events: none;
}
html.editor-restoring-snapshot .bg-window,
html.editor-restoring-snapshot .pattern-window,
html.editor-restoring-snapshot .text-window,
html.editor-restoring-snapshot .graphic-window {
    opacity: 0;
    pointer-events: none;
}

/* DB-Laden: linke/rechte Werkzeug-Spalte über die Vorschau legen (vermeidet weiße Overlay-Artefakte über dem Grafik-Editor). */
html.editor-db-project-preview-hold .settings-left-column,
html.editor-db-project-preview-hold .settings-right-column,
html.editor-preview-graphic-loading .settings-left-column,
html.editor-preview-graphic-loading .settings-right-column,
html.editor-preview-graphic-revealing .settings-left-column,
html.editor-preview-graphic-revealing .settings-right-column {
    position: relative;
    z-index: 5 !important;
    isolation: isolate;
}

html.editor-db-project-preview-hold .editor-window--vorschau,
html.editor-preview-graphic-loading .editor-window--vorschau,
html.editor-preview-graphic-revealing .editor-window--vorschau {
    z-index: 0 !important;
    overflow: hidden !important;
}

/* Coloris srcdoc: weißer Zwischenzustand — bis zum load unsichtbar (DB-Projekt laden). */
html.editor-db-project-hide-coloris-iframes iframe.coloris-inline-frame {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

