/* Etikett-Designer – Shop-Editor und gemeinsame Canvas-Elemente */
.etd-canvas-wrap { position: relative; margin: 0 auto; box-shadow: 0 2px 14px rgba(0,0,0,.18); background: #fff; }
.etd-canvas-wrap .etd-safe { position: absolute; pointer-events: none; border: 1px dashed rgba(0,0,0,.35); box-sizing: border-box; z-index: 2; }
.etd-canvas-wrap .canvas-container { margin: 0 auto; }

/* Produktseite */
.etd-product { border: 1px solid rgba(0,0,0,.15); border-radius: 6px; padding: 16px; margin: 0 0 20px; }
.etd-product__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 10px; }
.etd-product__status { font-size: .9em; opacity: .7; }
.etd-product__status--ok { color: #1f7a3a; opacity: 1; }
.etd-product__preview { margin: 0 0 12px; }
.etd-product__preview img { max-width: 160px; height: auto; border: 1px solid rgba(0,0,0,.15); background: #fff; display: block; }
.etd-product__preview--mockup img { max-width: 320px; border: 0; background: transparent; }
.etd-mockup { margin: 0 0 16px; }
.etd-mockup img { display: block; width: 100%; max-width: 280px; height: auto; }
.etd-mockup figcaption { font-size: .85em; opacity: .7; margin-top: 4px; }
.etd-product__hint { font-size: .9em; opacity: .75; margin: 10px 0 0; }

/* Modal */
.etd-modal { position: fixed; inset: 0; z-index: 100000; display: flex; align-items: center; justify-content: center; }
.etd-modal[hidden] { display: none; }
.etd-modal__backdrop { position: absolute; inset: 0; background: rgba(20,20,20,.6); }
.etd-modal__dialog { position: relative; background: #fff; color: #222; width: min(1100px, 96vw); max-height: 94vh; overflow: auto; border-radius: 8px; box-shadow: 0 20px 60px rgba(0,0,0,.35); display: flex; flex-direction: column; }
.etd-modal__header { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; border-bottom: 1px solid rgba(0,0,0,.1); }
.etd-modal__title { margin: 0; font-size: 1.25rem; }
.etd-modal__close { background: none; border: 0; font-size: 28px; line-height: 1; cursor: pointer; padding: 4px 8px; color: inherit; }
body.etd-modal-open { overflow: hidden; }

.etd-step { padding: 20px; }
.etd-step__intro { margin: 0 0 16px; }

/* Vorlagenauswahl */
.etd-templates { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px; }
.etd-template { background: #fff; border: 2px solid rgba(0,0,0,.12); border-radius: 8px; padding: 12px; cursor: pointer; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; color: inherit; font: inherit; transition: border-color .15s, transform .15s; }
.etd-template:hover, .etd-template:focus-visible { border-color: #2271b1; transform: translateY(-2px); outline: none; }
.etd-template img { max-width: 100%; max-height: 190px; height: auto; border: 1px solid rgba(0,0,0,.1); background: #fff; }
.etd-template__blank { width: 100px; height: 140px; background: repeating-linear-gradient(45deg, #eee 0 8px, #f7f7f7 8px 16px); border: 1px solid rgba(0,0,0,.1); }
.etd-template__title { font-weight: 600; }
.etd-template__size { font-size: .8em; opacity: .65; }

/* Editor */
.etd-editor { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.etd-editor__stage { background: #ececec; padding: 20px; border-radius: 6px; }
.etd-editor__note { font-size: .8em; opacity: .7; text-align: center; margin: 12px 0 0; }
.etd-editor__panel { display: flex; flex-direction: column; gap: 14px; }
.etd-link { background: none; border: 0; color: #2271b1; cursor: pointer; padding: 0; text-align: left; font: inherit; }
.etd-fields { display: flex; flex-direction: column; gap: 14px; }
.etd-field { border: 1px solid rgba(0,0,0,.12); border-radius: 6px; padding: 10px 12px; transition: border-color .15s; }
.etd-field--active { border-color: #2271b1; box-shadow: 0 0 0 2px rgba(34,113,177,.18); }
.etd-field label { display: block; margin: 0; }
.etd-field__label { display: block; font-weight: 600; font-size: .9em; margin-bottom: 6px; }
.etd-field input[type=text], .etd-field textarea { width: 100%; box-sizing: border-box; font: inherit; padding: 8px 10px; border: 1px solid rgba(0,0,0,.25); border-radius: 4px; }
.etd-file { display: inline-block; }
.etd-file input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.etd-field__hint { display: block; font-size: .8em; opacity: .7; margin-top: 6px; }
.etd-field__warn { display: block; font-size: .85em; color: #a35b00; margin-top: 6px; }
.etd-editor__actions { border-top: 1px solid rgba(0,0,0,.1); padding-top: 14px; }
.etd-editor__actions .button { width: 100%; }
.etd-editor__busy { font-size: .9em; opacity: .75; margin: 8px 0 0; }
.etd-editor__error { color: #b32d2e; font-size: .9em; margin: 8px 0 0; }
.etd-fields__none { opacity: .7; }

@media (max-width: 860px) {
	.etd-editor { grid-template-columns: 1fr; }
	.etd-editor__stage { padding: 12px; }
	.etd-modal__dialog { width: 100vw; max-height: 100vh; border-radius: 0; }
	.etd-step { padding: 14px; }
}
