/* =======================================================
   PRODUKTKONFIGURATOR – CSS FINAL
======================================================= */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  background: #f3f4f6;
  font-family: Arial, Helvetica, sans-serif;
  color: #111827;
}

.configurator-wrapper {
  max-width: 1540px;
  margin: 0 auto;
  padding: 10px;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr) 300px;
  gap: 12px;
  align-items: start;
}

.tools,
.preview,
.tools-right {
  width: 100%;
}

.panel,
.canvas-card {
  background: #ffffff;

  border: 1px solid #e5e7eb;

  border-radius: 16px;

  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);

  padding: 12px;

  margin-bottom: 14px;
}

.panel h2 {
  margin-top: 0;

  margin-bottom: 12px;

  font-size: 20px;
}

label {
  display: block;

  font-weight: 700;

  margin-bottom: 6px;

  margin-top: 14px;
}

input,
select,
textarea,
button {
  width: 100%;

  padding: 11px;

  border-radius: 10px;

  border: 1px solid #d1d5db;

  font-size: 15px;
}

button {
  cursor: pointer;

  background: #111827;

  color: #ffffff;

  font-weight: 700;
}

button:hover {
  background: #374151;
}

.side-buttons {
  display: grid;

  gap: 8px;
}

.side-btn {
  background: #e5e7eb;

  color: #111827;
}

.side-btn.active {
  background: #111827;

  color: #ffffff;
}

.side-rules {
  margin-top: 10px;

  padding: 12px;

  border-radius: 10px;

  background: #f8fafc;

  line-height: 1.6;

  font-size: 13px;
}

.upload-box {
  display: block;

  padding: 20px;

  text-align: center;

  border: 2px dashed #cbd5e1;

  border-radius: 14px;

  cursor: pointer;

  background: #f8fafc;
}

.upload-box input {
  display: none;
}

.upload-box span {
  display: block;

  font-weight: 800;
}

.upload-box small {
  display: block;

  margin-top: 8px;

  color: #64748b;
}

/* ====================================
GRAFIKAUSWAHL
==================================== */

.graphic-grid {
  display: grid;

  grid-template-columns: repeat(3, 1fr);

  gap: 10px;

  max-height: 230px;

  overflow-y: auto;

  overflow-x: hidden;

  padding-right: 4px;
}

.graphic-grid::-webkit-scrollbar {
  width: 10px;
}

.graphic-grid::-webkit-scrollbar-thumb {
  background: #cbd5e1;

  border-radius: 10px;
}

.graphic-btn {
  background: #ffffff;

  border: 1px solid #d1d5db;

  border-radius: 12px;

  padding: 8px;

  height: 96px;

  display: flex;

  align-items: center;

  justify-content: center;

  overflow: hidden;
}

.graphic-btn:hover {
  border-color: #111827;
}

.graphic-btn img {
  width: 100%;

  height: 100%;

  object-fit: contain;

  display: block;

  margin: 0;

  flex-shrink: 0;
}

.graphic-btn span {
  display: none;
}

/* ====================================
CANVAS
==================================== */

.canvas-card {
  position: relative;
  padding: 0;
  overflow: hidden;
}

.canvas-stage-wrap {
  position: relative;

  width: 780px;

  max-width: 780px;

  height: 780px;

  max-height: 780px;

  overflow: hidden;

  aspect-ratio: 1/1;

  margin: auto;
}

.canvas-stage {
  width: 780px;

  height: 780px;

  position: relative;

  transform-origin:center center;
}

/* ====================================
OBJEKTE
==================================== */

.object-item {
  display: block;

  margin-bottom: 8px;

  background: #f9fafb;

  color: #111827;
}

.empty {
  color: #6b7280;
}

/* ====================================
BUTTONS UNTEN
==================================== */

.bottom-actions {
  display: grid;

  grid-template-columns: 1fr 1fr;

  gap: 10px;
}

.cancel-button,
.cart-button {
  height: 54px;

  border: none;

  font-size: 16px;

  border-radius: 10px;
}

.cancel-button {
  background: #6b7280;
}

.cancel-button:hover {
  background: #4b5563;
}

.cart-button {
  background: #047857;
}

.cart-button:hover {
  background: #065f46;
}

/* ====================================
SCHRIFTVORSCHAU
==================================== */

/* ====================================
SCHRIFTVORSCHAU
==================================== */

.font-preview,
#fontPreview {
  height: 140px !important;

  min-height: 140px !important;

  max-height: 140px !important;

  padding: 16px !important;

  margin-top: 8px;

  border: 1px solid #d1d5db;

  border-radius: 10px;

  background: #f9fafb;

  display: flex;

  align-items: center;

  justify-content: center;

  overflow: hidden;
}
#fontPreviewText {
  display: flex;

  flex-direction: column;

  align-items: center;

  justify-content: center;

  width: 100%;

  height: 100%;

  padding: 6px;

  font-size: 40px;

  line-height: 1.15;

  text-align: center;

  overflow: hidden;

  white-space: normal;
}
/* ====================================
MOBILE
==================================== */

@media (max-width: 760px) {
  .configurator-wrapper {
    display: flex;

    flex-direction: column;

    padding: 10px;
  }

  .preview {
    order: 1;
  }

  .tools {
    order: 2;
  }

  .tools-right {
    order: 3;
  }

  .graphic-grid {
    grid-template-columns: repeat(3, 1fr);

    max-height: 320px;
  }

  .bottom-actions {
    grid-template-columns: 1fr;
  }
}
#textValue {
  width: 100% !important;

  max-width: 100% !important;

  display: block;

  box-sizing: border-box;

  resize: vertical;

  min-height: 60px;

  line-height: 1.5;

  white-space: pre-wrap;

  padding: 10px;

  font-size: 15px;
}

.font-preview,
#fontPreview {
  height: 170px !important;

  min-height: 170px !important;

  max-height: 170px !important;

  padding: 20px !important;

  overflow: hidden !important;

  display: flex !important;

  align-items: center !important;

  justify-content: center !important;
}

#fontPreviewText {
  display: flex !important;

  flex-direction: column !important;

  align-items: center !important;

  justify-content: center !important;

  width: 100% !important;

  height: 100% !important;

  font-size: 24px !important;

  line-height: 1.35 !important;

  text-align: center !important;

  white-space: normal !important;

  overflow: hidden !important;
}
.text-align-buttons {
  display: grid;

  grid-template-columns: repeat(3, minmax(0, 1fr));

  gap: 8px;

  margin-top: 10px;

  margin-bottom: 14px;

  align-items: stretch;
}

.align-btn {
  height: 48px;
  min-height: 48px;
  padding: 3px 5px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 8px;
  font-weight: 700;
  line-height: 0.95;
  overflow: hidden;
  white-space: normal;
}

.align-btn::first-line {
  font-size: 18px;
}

.align-btn br {
  margin: 1px 0;
}

.align-btn {
  white-space: normal;
}

.align-btn br {
  display: block;

  content: "";

  margin-top: 2px;
}

.align-btn.active {
  background: #047857;

  color: #ffffff;
}

.draft-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
}

.draft-window {
  width: 540px;
  max-width: 92vw;
  background: #ffffff;
  border-radius: 18px;
  padding: 28px;
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.25);
}

.draft-window h2 {
  margin-top: 0;
  font-size: 24px;
}

.draft-window p {
  font-size: 16px;
  line-height: 1.6;
}

.draft-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 22px;
}

#draftDownloadYes {
  background: #047857;
}

#draftDownloadNo {
  background: #111827;
}

.upload-info-image {
  display: block;
  width: 100%;
  height: auto;
  max-height: 42vh;
  object-fit: contain;
  border-radius: 14px;
  margin: 0 0 18px 0;
}
#ownGraphicInput {
  margin-top: 12px;

  margin-bottom: 16px;
}

.curve-box {
  width: 100% !important;
  display: block !important;
}

.curve-box input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100% !important;
  height: 28px;
  padding: 0 !important;
  margin: 10px 0 !important;
  border: none !important;
  background: transparent !important;
  display: block !important;
}

.curve-box input[type="range"]::-webkit-slider-runnable-track {
  width: 100%;
  height: 8px;
  background: #d1d5db;
  border-radius: 999px;
}

.curve-box input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #047857;
  margin-top: -7px;
  cursor: pointer;
}

.curve-box input[type="range"]::-moz-range-track {
  width: 100%;
  height: 8px;
  background: #d1d5db;
  border-radius: 999px;
}

.curve-box input[type="range"]::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #047857;
  border: none;
  cursor: pointer;
}

.curve-box,
.curve-box * {
  box-sizing: border-box !important;
}

.curve-box {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
}

.curve-box input#curveTextRange {
  display: block !important;
  width: 100% !important;
  min-width: 260px !important;
  max-width: none !important;
}

.curve-box label {
  display: inline-block !important;
  width: auto !important;
  max-width: none !important;
  white-space: nowrap !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
  line-height: 1.2 !important;
}

.canvas-card,
.canvas-stage-wrap,
.canvas-stage {
  padding: 0 !important;
  border: 0 !important;
}

.canvas-stage-wrap {
  overflow: hidden !important;
  padding: 0 !important;
  margin: auto !important;
  line-height: 0 !important;
  font-size: 0 !important;
}

.canvas-container {
  margin: 0 auto !important;
  padding: 0 !important;
}

/* STARTBILD → Buttonbox direkt unter Gravurseite auswählen */

body.start-mode .configurator-wrapper {
  position: relative;
}

body.start-mode .tools-right {
  position: absolute;
  left: 10px;
  top: auto;
  bottom: 24px;
  width: 300px;
}

body.start-mode .tools-right .panel {
  margin-top: 0;
}

body.start-mode .tools-right .panel:last-child {
  margin-bottom: 0;
}

@media (max-width: 760px) {
  body.start-mode .tools-right {
    position: static !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  body.start-mode .tools-right .panel {
    margin-top: 14px !important;
  }

  body.start-mode .bottom-actions {
    grid-template-columns: 1fr 1fr !important;
  }
}

/* Foto-Upload kompakter */

.photo-panel-compact {
  padding: 10px !important;
}

.photo-panel-compact .upload-box,
.upload-box-compact {
  padding: 14px 10px !important;
  min-height: auto !important;
}

.photo-panel-compact .upload-box span {
  font-size: 17px !important;
  line-height: 1.2 !important;
}

.photo-panel-compact .upload-box small {
  margin-top: 6px !important;
  font-size: 13px !important;
  line-height: 1.25 !important;
}

/* ====================================
SCHRIFTAUSWAHL KOMPAKT
==================================== */

#fontFamily {
  height: 260px !important;

  overflow-y: auto;

  padding: 0 !important;

  font-size: 18px;
}

#fontFamily option {
  padding: 14px;

  line-height: 1.6;

  border-bottom: 1px solid #ececec;

  background: #ffffff;
}

/* Schrift direkt anzeigen */

#fontFamily option{
background:#ffffff;
}

/* Mobile: versteckte Boxen wirklich versteckt lassen */

@media (max-width: 760px) {
  .panel[style*="display: none"] {
    display: none !important;
  }
}

/* Schriftartenliste kompakter */

#fontFamily{

height:80px !important;

overflow-y:auto !important;

padding:0 !important;

font-size:16px;

font-display:block;

contain:layout;

}

/* Einträge */

#fontFamily option {
  padding: 4px 10px;

  min-height: 36px;

  line-height: 1;
}

/* =======================================================
   MOBILE KONFIGURATOR – Vorschau oben + Werkzeuge scrollen
======================================================= */

.reset-view-btn {
  display: none;
  position: absolute;
  right: 10px;
  top: 10px;
  z-index: 20;
  width: auto;
  padding: 9px 12px;
  border: 0;
  border-radius: 10px;
  background: rgba(17, 24, 39, 0.88);
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}

.canvas-card {
  position: relative;
}

@media (max-width: 760px) {
  html,
  body {
    height: 100%;
  }

  body {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .configurator-wrapper {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    padding: 8px !important;
    max-width: 100% !important;
  }

  .preview {
    order: 1 !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 50 !important;
    background: #f3f4f6 !important;
    padding-top: 6px !important;
    padding-bottom: 8px !important;
  }

  .preview .canvas-card {
    margin-bottom: 0 !important;
    border-radius: 14px !important;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.1) !important;
  }

  .canvas-stage-wrap {
    touch-action: none !important;
  }

  .reset-view-btn {
    display: block !important;
  }

  .tools {
    order: 2 !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .tools-right {
    order: 3 !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Bedienfelder kompakt und normal scrollbar unter der Vorschau */
  .tools,
  .tools-right {
    overflow: visible !important;
  }

  .panel {
    margin-bottom: 10px !important;
    border-radius: 14px !important;
    padding: 10px !important;
  }

  .panel h2 {
    font-size: 18px !important;
    margin-bottom: 8px !important;
  }

  .side-buttons {
    gap: 8px !important;
  }

  .side-btn {
    min-height: 50px !important;
    font-size: 17px !important;
  }

  .bottom-actions {
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
  }

  .cancel-button,
  .cart-button {
    height: 56px !important;
    font-size: 18px !important;
  }

  /* Startbild: Buttonbox nicht absolut verschieben */
  body.start-mode .tools-right {
    position: static !important;
    left: auto !important;
    top: auto !important;
    width: 100% !important;
  }

  body.start-mode .tools {
    padding-bottom: 0 !important;
  }

  /* Versteckte Boxen bleiben auch mobil versteckt */
  .panel[style*="display: none"] {
    display: none !important;
  }
}

/* Desktop bleibt unverändert, Zoom-Button nur mobil sichtbar */
@media (min-width: 761px) {
  .reset-view-btn {
    display: none !important;
  }
}
/* Schriftarten-Auswahl ohne Select */

.font-list{
height:90px;
overflow-y:auto;
border:1px solid #d1d5db;
border-radius:10px;
background:#ffffff;
}

.font-list-btn{
width:100%;
display:block;
padding:8px 12px;
border:0;
border-bottom:1px solid #e5e7eb;
background:#ffffff;
color:#111827;
text-align:left;
font-size:18px;
border-radius:0;
cursor:pointer;
}

.font-list-btn:hover{
background:#f3f4f6;
}

.font-list-btn.active{
background:#e5e7eb;
}

.curve-value {
  white-space: nowrap;
  display: flex;
  gap: 4px;
  align-items: center;
}

@media (max-width:760px){

  .preview{
    z-index:9999 !important;
    position:sticky !important;
    top:0 !important;
    overflow:hidden !important;
  }

  .tools,
  .tools-right{
    position:relative !important;
    z-index:1 !important;
  }

  .font-list{
    position:relative !important;
    z-index:auto !important;
    height:220px !important;
    max-height:220px !important;
    overflow-y:auto !important;
    -webkit-overflow-scrolling:touch !important;
    touch-action:pan-y !important;
  }

  .font-list-btn{
    position:relative !important;
    z-index:auto !important;
    min-height:54px !important;
    padding:14px 12px !important;
    pointer-events:auto !important;
  }

  .canvas-stage-wrap,
  .canvas-container,
  .upper-canvas,
  .lower-canvas{
    touch-action:none !important;
    pointer-events:auto !important;
  }

  #canvasStage{
    transform-origin:top left !important;
  }

  .tools,
  .tools-right,
  .panel{
    touch-action:pan-y !important;
  }

}
/* ====================================
MOBIL → Entwurf Download Fenster optimiert
==================================== */

@media (max-width:760px){

.draft-window{

width:92vw !important;

max-width:92vw !important;

/* vorher 80 → etwas höher */
max-height:92vh !important;

overflow-y:auto !important;

padding:22px 22px 28px 22px !important;

border-radius:18px !important;

display:flex !important;

flex-direction:column !important;

justify-content:space-between !important;

}

.draft-window h2{

font-size:30px !important;

margin-bottom:18px !important;

line-height:1.05 !important;

}

.draft-window p{

font-size:15px !important;

line-height:1.55 !important;

margin-bottom:18px !important;

}

.draft-actions{

grid-template-columns:1fr 1fr !important;

gap:12px !important;

margin-top:20px !important;

padding-bottom:6px !important;

}

#draftDownloadYes,
#draftDownloadNo{

height:64px !important;

padding:12px !important;

font-size:17px !important;

border-radius:14px !important;

}

}

.draft-window h2{

font-size:30px !important;

margin-bottom:14px !important;

line-height:1.05 !important;

}

.draft-window p{

font-size:15px !important;

line-height:1.45 !important;

margin-bottom:12px !important;

}

.draft-actions{

grid-template-columns:1fr 1fr !important;

gap:10px !important;

margin-top:16px !important;

}

#draftDownloadYes,
#draftDownloadNo{

height:58px !important;

padding:10px !important;

font-size:16px !important;

border-radius:12px !important;

}

}
.upload-loader{

position:absolute !important;

left:50% !important;

top:50% !important;

transform:translate(-50%,-50%) !important;

width:320px;

max-width:calc(100% - 48px);

background:#fff;

padding:20px;

border-radius:14px;

box-shadow:0 20px 60px rgba(0,0,0,.35);

z-index:9999 !important;

display:none;

text-align:center;

font-weight:700;

color:#111827;

pointer-events:none;

line-height:1.35 !important;
font-size:15px !important;

}

.upload-loader-bar{

height:14px;

background:#e5e7eb;

border-radius:999px;

overflow:hidden;

}

.upload-loader-fill{

width:100%;

height:100%;

background:#10b981;

animation:loader 1.1s linear infinite;

}

@keyframes loader{

0%{
transform:translateX(-100%);
}

100%{
transform:translateX(280%);
}

}


/* VERSION DELTADESIGN24 START */
.program-version-badge{
  position:fixed;
  right:16px;
  bottom:12px;
  z-index:99999;
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:7px 13px;
  border:2px solid #ff6a00;
  border-radius:10px;
  background:rgba(255,255,255,.94);
  color:#0f172a;
  font-size:13px;
  font-weight:700;
  line-height:1;
  box-shadow:0 8px 22px rgba(15,23,42,.12);
  backdrop-filter:blur(4px);
}

@media(max-width:760px){
  .program-version-badge{
    right:10px;
    bottom:8px;
    padding:6px 10px;
    font-size:11px;
  }
}
/* VERSION DELTADESIGN24 ENDE */


/* VERSION DELTADESIGN24 POSITION FIX */
.program-version-badge{
    position:fixed!important;
    right:14px!important;
    left:auto!important;
    bottom:8px!important;
    z-index:999999!important;
    display:inline-flex!important;
    align-items:center!important;
    gap:8px!important;
    padding:6px 12px!important;
    border:2px solid #ff6a00!important;
    border-radius:8px!important;
    background:rgba(255,255,255,.96)!important;
    color:#0f172a!important;
    font-size:12px!important;
    font-weight:700!important;
    line-height:1!important;
    box-shadow:0 6px 18px rgba(15,23,42,.16)!important;
}


/* VERSION DELTADESIGN24 INLINE FIX */
.program-version-badge{
  display:none!important;
}

.config-version-inline{
  width:100%;
  margin-top:10px;
  padding-top:9px;
  border-top:1px solid #e5e7eb;
  text-align:center;
  font-size:11px;
  line-height:1.3;
  font-weight:700;
  color:#64748b;
}

/* =======================================================
   MOBILE FIX: Entwurf-Download Buttons zentrieren + Abstand unten
======================================================= */
@media (max-width:760px){
  .draft-window{
    width:92vw !important;
    max-width:92vw !important;
    max-height:90vh !important;
    overflow-y:auto !important;
    padding:22px 22px 38px 22px !important;
    border-radius:18px !important;
    display:flex !important;
    flex-direction:column !important;
    justify-content:flex-start !important;
  }

  .draft-actions{
    width:100% !important;
    display:grid !important;
    grid-template-columns:1fr 1fr !important;
    gap:14px !important;
    align-items:center !important;
    justify-content:center !important;
    margin:22px auto 0 auto !important;
    padding:0 0 18px 0 !important;
  }

  #draftDownloadYes,
  #draftDownloadNo{
    width:100% !important;
    height:62px !important;
    min-height:62px !important;
    margin:0 !important;
    padding:10px 8px !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    text-align:center !important;
    line-height:1.18 !important;
    font-size:16px !important;
    border-radius:14px !important;
  }
}


/* =======================================================
   FINAL MOBILE FIX: Entwurf-Download Fenster komplett sichtbar
   Kompakter, ohne Scrollen, Buttons zentriert mit Abstand unten
======================================================= */
@media (max-width:760px){

  .draft-backdrop{
    padding:10px !important;
    align-items:center !important;
    justify-content:center !important;
  }

  .draft-window{
    width:88vw !important;
    max-width:88vw !important;
    max-height:86vh !important;
    overflow:hidden !important;
    padding:18px 18px 22px 18px !important;
    border-radius:18px !important;
    display:flex !important;
    flex-direction:column !important;
    justify-content:flex-start !important;
  }

  .draft-window h2{
    font-size:25px !important;
    line-height:1.08 !important;
    margin:0 0 12px 0 !important;
  }

  .draft-window p{
    font-size:13.5px !important;
    line-height:1.38 !important;
    margin:0 0 10px 0 !important;
  }

  .draft-actions{
    width:100% !important;
    display:grid !important;
    grid-template-columns:1fr 1fr !important;
    gap:14px !important;
    align-items:center !important;
    justify-content:center !important;
    margin:14px auto 0 auto !important;
    padding:8px 0 10px 0 !important;
  }

  #draftDownloadYes,
  #draftDownloadNo{
    width:100% !important;
    height:56px !important;
    min-height:56px !important;
    margin:0 !important;
    padding:8px 6px !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    text-align:center !important;
    line-height:1.16 !important;
    font-size:15.5px !important;
    border-radius:14px !important;
  }
}

/* Sehr kleine Handyhöhen zusätzlich kompakter */
@media (max-width:760px) and (max-height:740px){

  .draft-window{
    max-height:84vh !important;
    padding:16px 16px 18px 16px !important;
  }

  .draft-window h2{
    font-size:23px !important;
    margin-bottom:10px !important;
  }

  .draft-window p{
    font-size:12.8px !important;
    line-height:1.32 !important;
    margin-bottom:8px !important;
  }

  #draftDownloadYes,
  #draftDownloadNo{
    height:52px !important;
    min-height:52px !important;
    font-size:14.5px !important;
  }
}


/* =======================================================
   START: Datenschutz-Hinweis im Canvas-Fenster
======================================================= */
.privacy-start-box{
  position:absolute;
  inset:0;
  z-index:40;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
  background:rgba(17,24,39,.45);
}

.privacy-start-window{
  width:min(720px,94%);
  height:min(720px,92%);
  max-height:92%;
  padding:18px;
  display:flex;
  flex-direction:column;
  gap:12px;
  background:#ffffff;
  border-radius:16px;
  box-shadow:0 18px 60px rgba(0,0,0,.28);
}

.privacy-start-window h2{
  margin:0;
  color:#0066ff;
  font-size:22px;
  line-height:1.2;
}

.privacy-start-scroll{
  flex:1 1 auto;
  min-height:0;
  border:1px solid #d1d5db;
  border-radius:12px;
  overflow:hidden;
  background:#ffffff;
}

.privacy-start-scroll iframe{
  width:100%;
  height:100%;
  border:0;
  background:#ffffff;
}

.privacy-start-ok{
  width:100%;
  height:54px;
  min-height:54px;
  border:0;
  border-radius:12px;
  background:#047857!important;
  color:#ffffff!important;
  font-size:18px;
  font-weight:800;
}

.privacy-start-ok:hover{
  background:#065f46!important;
}

@media(max-width:760px){
  .privacy-start-box{
    position:fixed;
    inset:0;
    z-index:9999;
    padding:6px;
    background:rgba(17,24,39,.62);
  }

  .privacy-start-window{
    width:calc(100vw - 12px);
    height:calc(100dvh - 12px);
    max-width:none;
    max-height:none;
    padding:10px;
    border-radius:14px;
    gap:8px;
  }

  .privacy-start-window h2{
    font-size:20px;
  }

  .privacy-start-scroll{
    width:100%;
    height:auto;
    flex:1 1 auto;
    min-height:0;
  }

  .privacy-start-scroll iframe{
    display:block;
    width:100%;
    height:100%;
  }

  .privacy-start-ok{
    height:48px;
    min-height:48px;
    font-size:17px;
  }
}

/* Ladebalken direkt im Canvas-Fenster */
.canvas-upload-loader{
  position:absolute;
  inset:0;
  display:none;
  align-items:center;
  justify-content:center;
  z-index:100000;
  background:rgba(255,255,255,.35);
  pointer-events:none;
}

.canvas-upload-loader.is-visible{
  display:flex !important;
}

.canvas-upload-loader-window{
  width:320px;
  max-width:calc(100% - 48px);
  background:#ffffff;
  padding:20px;
  border-radius:14px;
  box-shadow:0 20px 60px rgba(0,0,0,.35);
  text-align:center;
  font-weight:700;
  color:#111827;
  line-height:1.35;
  font-size:15px;
}

.canvas-upload-loader-text{
  margin-bottom:14px;
}

.canvas-upload-loader-bar{
  height:14px;
  background:#e5e7eb;
  border-radius:999px;
  overflow:hidden;
}

.canvas-upload-loader-fill{
  width:45%;
  height:100%;
  background:#10b981;
  border-radius:999px;
  animation:canvasUploadLoaderMove 1.1s linear infinite;
}

@keyframes canvasUploadLoaderMove{
  0%{ transform:translateX(-120%); }
  100%{ transform:translateX(260%); }
}

/* Gravurfeld-Rahmen Button */
#toggleFrameBtn{
    background:#0066ff!important;
    color:#fff!important;
    border:none!important;
}

/* DELTADESIGN24: Grafik-Ordnerfilter im Produktkonfigurator */
.graphics-panel h2{
  margin-bottom:8px;
}

.graphic-folder-filter{
  width:100%;
  margin:0 0 10px 0;
  padding:8px 10px;
  border:1px solid #d1d5db;
  border-radius:10px;
  background:#fff;
  font-size:14px;
}

.graphics-panel .graphic-grid{
  max-height:360px;
}


/* DELTADESIGN24 MOBILE CANVAS TOUCH FIX */
@media (max-width:760px){
  #canvasStageWrap,
  #canvasStage,
  #designCanvas,
  .canvas-container,
  .upper-canvas,
  .lower-canvas{
    touch-action:none!important;
    -ms-touch-action:none!important;
    -webkit-user-select:none!important;
    user-select:none!important;
  }
}

/* DELTADESIGN24 FIX: Mobile Canvas darf nicht per CSS-transform gezoomt werden,
   sonst stimmen Touchpunkte nicht mit Fabric-Koordinaten überein. */
@media (max-width:760px){
  #canvasStage{
    transform:none!important;
  }
  #canvasStageWrap,
  #canvasStage,
  #designCanvas,
  .canvas-container,
  .upper-canvas,
  .lower-canvas{
    touch-action:none!important;
    -ms-touch-action:none!important;
  }
  .graphic-folder-filter{
    display:block!important;
    width:100%!important;
    pointer-events:auto!important;
    touch-action:auto!important;
  }
}


/* ====================================
FORMEN EINFÜGEN
==================================== */

.shape-panel {
  padding: 8px;
}

.shape-panel h2 {
  font-size: 15px;
  margin-bottom: 6px;
}

.shape-buttons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
}

.shape-btn {
  padding: 6px 5px;
  font-size: 13px;
  border-radius: 8px;
}

.shape-btn.active {
  background: #2563eb;
  color: #ffffff;
}

.shape-stroke-row {
  display: grid;
  grid-template-columns: 1fr 64px auto;
  gap: 6px;
  align-items: center;
  margin-top: 6px;
}

.shape-stroke-row label {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
}

.shape-stroke-row input {
  padding: 5px;
  font-size: 13px;
  border-radius: 8px;
  text-align: center;
}

.shape-stroke-row span {
  font-size: 13px;
  color: #374151;
}

.shape-hint {
  margin-top: 6px;
  font-size: 11px;
  color: #64748b;
}


/* Kompakte kombinierte Box: Auswahl & Elemente */
.selection-elements-panel {
  padding: 12px !important;
}

.selection-elements-panel h2 {
  margin: 0 0 10px 0 !important;
  font-size: 20px !important;
  line-height: 1.15 !important;
}

.compact-action-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.compact-action-grid button,
.compact-frame-btn {
  min-height: 42px !important;
  padding: 8px 9px !important;
  border-radius: 10px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px !important;
  font-size: 14px !important;
  line-height: 1.15 !important;
}

.compact-frame-btn {
  margin-top: 6px !important;
  background: #0d6efd !important;
}

.btn-icon {
  font-size: 18px !important;
  line-height: 1 !important;
  font-weight: 800 !important;
}

.compact-elements-block {
  margin-top: 10px !important;
  padding-top: 10px !important;
  border-top: 1px solid #e5e7eb !important;
}

.compact-elements-block label {
  margin: 0 0 6px 0 !important;
  font-size: 17px !important;
  line-height: 1.1 !important;
}

.object-select {
  width: 100% !important;
  min-height: 40px !important;
  padding: 8px 10px !important;
  border-radius: 10px !important;
  background: #f9fafb !important;
  color: #111827 !important;
  font-weight: 700 !important;
}

/* Auswahl Icons korrigiert */
.selection-actions .btn,
.actionsCompact .btn{
 display:flex!important;
 align-items:center!important;
 justify-content:center!important;
 gap:10px!important;
}
.selection-actions .btn-delete::before,
.btn-delete::before{
 content:"🗑";
 font-size:22px!important;
 line-height:1;
}
.selection-actions .btn-clear::before,
.btn-clear::before{
 content:"▭";
 font-size:26px!important;
 font-weight:700;
 line-height:1;
}


/* Korrigierte Icons in der kompakten Auswahl-Box */
.compact-action-grid .btn-icon {
  width: 24px !important;
  height: 24px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 0 24px !important;
}

.compact-action-grid .btn-icon svg {
  width: 24px !important;
  height: 24px !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 2.2 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}

.compact-action-grid .btn-icon-clear,
.compact-action-grid .btn-icon-clear svg {
  width: 26px !important;
  height: 26px !important;
  flex-basis: 26px !important;
}

.compact-action-grid .btn-icon-clear svg {
  stroke-width: 2.4 !important;
}


/* Auswahl & Elemente Reihenfolge angepasst */
.selection-elements-panel .compact-elements-block {
  margin: 0 0 8px 0 !important;
}
.selection-elements-panel .compact-action-grid {
  margin-top: 0 !important;
}


/* Untere Aktionsbox kompakter und bündig zum Canvas */
.bottom-actions{
  gap:8px!important;
  margin-top:4px!important;
  margin-bottom:4px!important;
}

.bottom-actions button{
  min-height:42px!important;
  height:42px!important;
  padding:8px 12px!important;
}

.config-version-inline{
  font-size:11px!important;
  line-height:1.1!important;
  margin-top:6px!important;
  margin-bottom:0!important;
  padding-top:2px!important;
}

.panel:has(.bottom-actions){
  padding-top:8px!important;
  padding-bottom:8px!important;
  min-height:auto!important;
}

.selection-elements-panel + .panel{
  margin-top:8px!important;
}


.side-select-wrap{
 display:flex!important;
 flex-direction:column!important;
 gap:6px!important;
}
.side-select-wrap label{
 font-weight:700!important;
}
.side-select{
 width:100%!important;
 height:40px!important;
 border-radius:10px!important;
 padding:0 10px!important;
}

/* Gravurseiten-Dropdown statt Buttons */
.side-select {
  width: 100% !important;
  height: 40px !important;
  padding: 0 10px !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 10px !important;
  background: #fff !important;
  font-weight: 700 !important;
  color: #111827 !important;
  box-sizing: border-box !important;
}
#sideButtons {
  display: none !important;
}


/* Kompakte Formenbox – nur Layout, Funktionen bleiben unverändert */
.shape-panel-compact {
  padding: 10px 12px !important;
}

.shape-panel-compact h2 {
  margin: 0 0 8px 0 !important;
  font-size: 18px !important;
  line-height: 1.15 !important;
}

.shape-compact-row {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  width: 100% !important;
  flex-wrap: nowrap !important;
}

.shape-buttons-compact {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  margin: 0 !important;
  flex: 0 0 auto !important;
}

.shape-icon-btn {
  width: 38px !important;
  min-width: 38px !important;
  height: 32px !important;
  min-height: 32px !important;
  padding: 0 !important;
  border-radius: 8px !important;
  font-size: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.shape-symbol {
  display: block !important;
  width: 18px !important;
  height: 18px !important;
  position: relative !important;
}

.shape-symbol-line::before {
  content: "" !important;
  position: absolute !important;
  left: 2px !important;
  right: 2px !important;
  top: 8px !important;
  border-top: 3px solid currentColor !important;
  border-radius: 3px !important;
}

.shape-symbol-rect::before {
  content: "" !important;
  position: absolute !important;
  inset: 2px !important;
  border: 2px solid currentColor !important;
  border-radius: 2px !important;
}

.shape-symbol-circle::before {
  content: "" !important;
  position: absolute !important;
  inset: 2px !important;
  border: 2px solid currentColor !important;
  border-radius: 50% !important;
}

.shape-stroke-inline {
  display: flex !important;
  align-items: center !important;
  gap: 5px !important;
  margin: 0 !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
  white-space: nowrap !important;
}

.shape-stroke-inline label {
  margin: 0 !important;
  font-size: 13px !important;
  line-height: 1 !important;
  font-weight: 700 !important;
}

.shape-stroke-inline input {
  width: 48px !important;
  height: 30px !important;
  min-height: 30px !important;
  padding: 3px 4px !important;
  text-align: center !important;
  font-size: 13px !important;
}

.shape-stroke-inline span {
  font-size: 13px !important;
}


/* Gravurseite kompakter ohne Überschrift */
#sideSelect{
 margin-top:0!important;
}

.panel:has(#sideSelect){
 padding:10px 12px!important;
 min-height:auto!important;
}

.panel:has(#sideSelect) .side-select,
.panel:has(#sideSelect) select{
 height:38px!important;
 margin:0!important;
}

.panel:has(#sideSelect) .side-rules{
 display:none!important;
}




/* Startlayout per JS verschoben: Aktionsbox direkt unter Gravurseite */
body.start-info-mode #startActionPanel {
  margin-top: 8px !important;
  margin-bottom: 14px !important;
}


/* Layout-Anpassung: kompaktere Wunschtext-Box, größere Pfeile, kurze Buttontexte */
.text-align-buttons {
  gap: 6px !important;
  margin-top: 8px !important;
  margin-bottom: 8px !important;
}

.align-btn {
  height: 46px !important;
  min-height: 46px !important;
  padding: 2px 4px !important;
  font-size: 12px !important;
  line-height: 1.02 !important;
}

.align-btn::first-line {
  font-size: 24px !important;
  line-height: 0.95 !important;
}

.align-btn br {
  margin-top: 0 !important;
}

.curve-box {
  grid-column: 1 / -1 !important;
  width: 100% !important;
  max-width: 100% !important;
  margin-top: 0 !important;
}

.curve-headline {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  width: 100% !important;
  margin: 0 0 3px 0 !important;
}

.curve-box label {
  font-size: 11px !important;
  line-height: 1.1 !important;
  margin: 0 !important;
  white-space: nowrap !important;
}

.curve-value {
  font-size: 12px !important;
  line-height: 1.1 !important;
  margin: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 3px !important;
  white-space: nowrap !important;
}

.curve-box input#curveTextRange,
.curve-box input[type="range"] {
  min-width: 0 !important;
  width: 100% !important;
  height: 22px !important;
  margin: 2px 0 0 0 !important;
}

#textValue {
  min-height: 58px !important;
}


/* Foto-Box kompakter + unten bündig */
.photo-panel-compact{
  padding:6px 10px 0 !important;
  margin-top:auto !important;
}

.photo-panel-compact .upload-box,
.upload-box-compact{
  padding:10px 8px !important;
  min-height:72px !important;
}

.photo-panel-compact .upload-box small{
  margin-top:4px !important;
  font-size:12px !important;
  line-height:1.15 !important;
}


/* =======================================================
   Layout-Fix 2026-06-22: Wunschtext/Fotobox + Datenschutz-Select
   Nur Layout, keine Funktionsänderung.
======================================================= */
@media (min-width: 901px) {
  .configurator-wrapper {
    align-items: start !important;
  }

  .tools {
    display: flex !important;
    flex-direction: column !important;
    min-height: 804px !important;
  }

  #textPanel {
    flex: 1 1 auto !important;
    display: flex;
    flex-direction: column !important;
    min-height: 0 !important;
    margin-bottom: 14px !important;
  }

  #textValue {
    min-height: 120px !important;
    height: 120px !important;
    resize: vertical !important;
  }

  .photo-panel-compact {
    margin-top: auto !important;
    margin-bottom: 0 !important;
    padding: 8px 10px 0 !important;
  }

  .photo-panel-compact .upload-box,
  .upload-box-compact {
    padding: 10px 8px !important;
    min-height: 70px !important;
  }
}

.photo-panel-compact .upload-box small {
  display: block !important;
}

.photo-panel-compact .upload-box small:empty {
  display: none !important;
}


/* Layout Korrektur Foto/Wunschtext */
@media (min-width:901px){
  .tools{
    min-height:820px !important;
    display:flex !important;
    flex-direction:column !important;
  }

  #textPanel{
    flex:0 0 auto !important;
    margin-bottom:10px !important;
  }

  #textPanel textarea,
  #textValue{
    min-height:82px !important;
    height:82px !important;
    max-height:82px !important;
  }

  .photo-panel-compact,
  #photoPanel{
    margin-top:auto !important;
    margin-bottom:0 !important;
    align-self:stretch !important;
  }

  .photo-panel-compact .upload-box,
  #photoPanel .upload-box{
    min-height:84px !important;
    padding:12px 10px !important;
  }
}


/* =======================================================
   Layout-Korrektur 2026-06-22:
   Foto auswählen unten bündig mit Canvas.
   Wunschtext-Eingabefeld nutzt den freien Platz.
   Nur CSS/Layout, keine Funktionsänderung.
======================================================= */
@media (min-width: 901px) {
  .configurator-wrapper {
    align-items: start !important;
  }

  aside.tools {
    display: flex !important;
    flex-direction: column !important;
    height: 780px !important;
    min-height: 780px !important;
    max-height: 780px !important;
  }

  #textPanel {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    margin-bottom: 10px !important;
  }

  #textPanel #textValue {
    flex: 1 1 auto !important;
    min-height: 185px !important;
    height: auto !important;
    resize: vertical !important;
  }

  #photoPanel.photo-panel-compact,
  .photo-panel-compact {
    flex: 0 0 auto !important;
    margin-top: auto !important;
    margin-bottom: 0 !important;
    padding: 10px !important;
  }

  #photoPanel .upload-box-compact,
  #photoPanel .upload-box {
    min-height: 88px !important;
    padding: 14px 8px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
  }
}


/* Fix: Wunschtext-Box beim Start und bei nicht erlaubter Texteingabe wirklich ausblenden. */
#textPanel[style*="display:none"],
#textPanel[style*="display: none"] {
  display: none !important;
}


/* Korrektur: erlaubte Werte unter der Gravurseiten-Auswahl wieder anzeigen */
.panel:has(#sideSelect) .side-rules,
#sideRules {
  display: block !important;
  margin-top: 7px !important;
  padding: 8px 10px !important;
  font-size: 12px !important;
  line-height: 1.35 !important;
  border-radius: 8px !important;
  background: #f8fafc !important;
  color: #334155 !important;
}

/* Kleine eigene Hinweisbox ohne Browser-Meldung */
#canvasStageWrap {
  position: relative;
}
#customMessage .msg-backdrop {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.18);
  z-index: 9999;
}
#customMessage .msg-window {
  width: min(330px, calc(100% - 36px));
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.28);
  padding: 16px 18px;
  text-align: center;
  font-size: 14px;
  line-height: 1.45;
}
#customMessage .msg-ok {
  margin-top: 12px;
  min-width: 90px;
  border: 0;
  border-radius: 8px;
  padding: 8px 14px;
  background: #111827;
  color: #ffffff;
  font-weight: 700;
  cursor: pointer;
}


/* Wunschtext sichtbar halten */
@media (max-width:760px){
#textValue, textarea#textValue, .text-input textarea{height:82px!important;min-height:82px!important;max-height:82px!important;}
}

/* Fix 2026-06-22: echte Desktop-Regel fuer Wunschtext-Feld ueberschreiben.
   Vorher setzte eine spaetere Regel #textPanel #textValue auf min-height:185px,
   deshalb waren Schriftart/weitere Funktionen abgeschnitten. Nur Layout. */
@media (min-width: 901px) {
  #textPanel #textValue,
  #textValue,
  textarea#textValue,
  #textPanel textarea {
    flex: 0 0 82px !important;
    height: 82px !important;
    min-height: 82px !important;
    max-height: 82px !important;
    resize: vertical !important;
  }
}

.text-editor-modal{position:fixed;inset:0;background:rgba(0,0,0,.45);display:flex;align-items:center;justify-content:center;z-index:9999}
.text-editor-dialog{background:#fff;width:min(800px,90vw);padding:20px;border-radius:16px}
#textValueLarge{width:100%;height:320px;resize:vertical}
.text-editor-actions{display:flex;gap:12px;justify-content:flex-end;margin-top:10px}

/* Großer Texteditor nur Desktop */
@media (min-width: 769px){
  .text-editor-modal{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.25);
    display:flex;
    align-items:center;
    justify-content:center;
    z-index:9999;
  }
  .text-editor-dialog{
    background:#fff;
    width:860px;
    min-width:780px;
    max-width:96vw;
    height:520px;
    min-height:450px;
    max-height:92vh;
    padding:16px;
    border-radius:16px;
    box-shadow:0 18px 50px rgba(15,23,42,.25);
    resize:both;
    overflow:auto;
    position:relative;
  }
  .text-editor-title{
    font-size:20px;
    font-weight:800;
    margin-bottom:12px;
    cursor:move;
    user-select:none;
  }
  .text-editor-content{
    display:flex;
    gap:16px;
    height:calc(100% - 42px);
    min-height:280px;
  }
  .text-editor-main{
    flex:1 1 auto;
    min-width:0;
    display:flex;
    flex-direction:column;
  }
  #textValueLarge{
    flex:1 1 auto;
    width:100%;
    min-height:220px;
    resize:none;
    border:1px solid #cbd5e1;
    border-radius:12px;
    padding:12px;
    font-size:18px;
    line-height:1.45;
    box-sizing:border-box;
  }
  .text-editor-fonts{
    width:230px;
    flex:0 0 230px;
    border-left:1px solid #e5e7eb;
    padding-left:14px;
    display:flex;
    flex-direction:column;
    min-height:0;
  }
  .text-editor-font-title{
    font-weight:800;
    margin-bottom:8px;
  }
  .text-editor-font-list{
    display:flex;
    flex-direction:column;
    gap:7px;
    overflow:auto;
    padding-right:4px;
  }
  .text-editor-font-btn{
    border:1px solid #cbd5e1;
    background:#fff;
    border-radius:9px;
    padding:9px 10px;
    text-align:left;
    cursor:pointer;
    font-size:16px;
  }
  .text-editor-font-btn.active{
    border-color:#00876c;
    background:#e8f5f1;
    font-weight:800;
  }
  .text-editor-actions{
    display:flex;
    gap:12px;
    justify-content:flex-end;
    margin-top:12px;
  }
  .text-editor-actions button{
    border:0;
    border-radius:10px;
    padding:12px 18px;
    font-weight:800;
    cursor:pointer;
  }
  #textEditorCancel{background:#111827;color:#fff;}
  #textEditorDeleteSelection{background:#c62828;color:#fff;}
  #textEditorApply{background:#00876c;color:#fff;}
}

@media (max-width: 768px){
  .text-editor-modal{display:none!important;}
}

/* Fix 2026-06-22: Schrift im großen Texteditor immer schwarz anzeigen.
   Die Gravurfarbe aus config.php darf nur beim Hinzufügen in das Canvas wirken. */
@media (min-width: 769px){
  #textEditorModal,
  #textEditorModal *{
    color:#111827 !important;
  }
  #textValueLarge,
  #textValueLarge::placeholder,
  .text-editor-fonts,
  .text-editor-font-title,
  .text-editor-font-btn{
    color:#111827 !important;
    -webkit-text-fill-color:#111827 !important;
  }
  .text-editor-font-btn{
    background:#ffffff !important;
  }
  .text-editor-font-btn.active{
    color:#111827 !important;
    -webkit-text-fill-color:#111827 !important;
    background:#e8f5f1 !important;
  }
  #textEditorCancel,
  #textEditorDeleteSelection,
  #textEditorApply{
    color:#ffffff !important;
    -webkit-text-fill-color:#ffffff !important;
  }
}


/* Fix: eigene Hinweisbox muss auch ueber dem grossen Texteditor liegen,
   damit OK/Bestätigen immer anklickbar bleibt. */
#customMessage {
  position: fixed !important;
  inset: 0 !important;
  z-index: 2147483647 !important;
  pointer-events: auto !important;
}
#customMessage .msg-backdrop {
  position: fixed !important;
  inset: 0 !important;
  z-index: 2147483647 !important;
  pointer-events: auto !important;
}
#customMessage .msg-window,
#customMessage .msg-ok {
  pointer-events: auto !important;
}


/* Layout: kleiner Text-hinzufuegen Button + PC-ZOOM Button fuer grossen Texteditor */
.text-action-row{
  display:flex;
  align-items:center;
  gap:8px;
  width:100%;
  margin:6px 0 8px 0;
}
#textPanel .text-action-row #addTextBtn,
#textPanel .text-add-small{
  flex:1 1 auto;
  min-width:0;
  padding:8px 10px !important;
  font-size:14px !important;
  line-height:1.15 !important;
  white-space:nowrap;
}
#textPanel .text-zoom-btn{
  display:none;
  flex:0 0 auto;
  align-items:center;
  justify-content:center;
  gap:5px;
  padding:8px 10px;
  border:0;
  border-radius:10px;
  font-size:14px;
  font-weight:800;
  line-height:1.15;
  cursor:pointer;
  background:#111827;
  color:#fff;
  white-space:nowrap;
}
#textPanel .text-zoom-btn .zoom-icon{
  font-size:15px;
  line-height:1;
}
@media (min-width: 769px){
  #textPanel .text-zoom-btn{display:inline-flex;}
}
@media (max-width: 768px){
  #openTextEditorBtn{display:none!important;}
}

/* Fix 2026-06-22: ZOOM-Button kompakt + Schriftartliste sichtbar.
   Nur Desktop-Layout, keine Funktionsaenderung. */
@media (min-width: 769px) {
  #textPanel .text-action-row {
    display: flex !important;
    flex-direction: row !important;
    align-items: stretch !important;
    gap: 8px !important;
    width: 100% !important;
    margin: 6px 0 8px 0 !important;
  }

  #textPanel .text-action-row #addTextBtn,
  #textPanel .text-add-small {
    width: auto !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    height: 36px !important;
    min-height: 36px !important;
    padding: 7px 10px !important;
    font-size: 14px !important;
    line-height: 1.1 !important;
  }

  #textPanel .text-action-row #openTextEditorBtn,
  #textPanel .text-zoom-btn {
    display: inline-flex !important;
    width: 82px !important;
    max-width: 82px !important;
    flex: 0 0 82px !important;
    height: 36px !important;
    min-height: 36px !important;
    padding: 6px 8px !important;
    gap: 4px !important;
    font-size: 13px !important;
    line-height: 1 !important;
    border-radius: 10px !important;
    box-sizing: border-box !important;
  }

  #textPanel .text-zoom-btn .zoom-icon {
    font-size: 13px !important;
    line-height: 1 !important;
  }

  #textPanel #textValue,
  #textValue,
  textarea#textValue,
  #textPanel textarea {
    flex: 0 0 70px !important;
    height: 70px !important;
    min-height: 70px !important;
    max-height: 70px !important;
  }

  #textPanel label[for="fontFamily"],
  #textPanel label {
    margin-top: 8px !important;
    margin-bottom: 6px !important;
  }

  #textPanel #fontFamilyList.font-list,
  #fontFamilyList.font-list {
    height: 58px !important;
    min-height: 58px !important;
    max-height: 58px !important;
    overflow-y: auto !important;
  }

  #textPanel #fontFamilyList .font-list-btn,
  #fontFamilyList .font-list-btn {
    width: 100% !important;
    min-height: 44px !important;
    height: 44px !important;
    padding: 7px 12px !important;
    font-size: 18px !important;
    line-height: 1.35 !important;
    box-sizing: border-box !important;
    overflow: visible !important;
  }
}


/* Fix Schriftart Dropdown Höhe */
#fontFamily{
height:52px !important;
min-height:52px !important;
max-height:52px !important;
padding:0 32px 0 10px !important;
font-size:16px !important;
line-height:52px !important;
}
#fontFamily option{
padding:2px 8px !important;
min-height:28px !important;
line-height:1.2 !important;
}

/* Fix 2026-06-22: Schriftartliste korrekt positionieren, Fotobox flacher, Texteingabe etwas hoeher. Nur Layout. */
@media (min-width: 769px) {
  #textPanel #textValue,
  #textValue,
  textarea#textValue,
  #textPanel textarea {
    flex: 0 0 92px !important;
    height: 92px !important;
    min-height: 92px !important;
    max-height: 92px !important;
  }

  #textPanel label {
    margin-top: 7px !important;
    margin-bottom: 5px !important;
    line-height: 1.15 !important;
  }

  #textPanel #fontFamilyList.font-list,
  #fontFamilyList.font-list {
    height: 48px !important;
    min-height: 48px !important;
    max-height: 48px !important;
    overflow-y: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
  }

  #textPanel #fontFamilyList .font-list-btn,
  #fontFamilyList .font-list-btn {
    min-height: 38px !important;
    height: 38px !important;
    padding: 5px 10px !important;
    font-size: 17px !important;
    line-height: 1.2 !important;
    display: flex !important;
    align-items: center !important;
    box-sizing: border-box !important;
  }

  #photoPanel.photo-panel-compact,
  .photo-panel-compact {
    padding: 7px 10px !important;
  }

  #photoPanel .upload-box-compact,
  #photoPanel .upload-box,
  .photo-panel-compact .upload-box,
  .upload-box-compact {
    min-height: 64px !important;
    padding: 8px 8px !important;
  }

  .photo-panel-compact .upload-box span {
    font-size: 16px !important;
    line-height: 1.1 !important;
  }

  .photo-panel-compact .upload-box small {
    margin-top: 3px !important;
    font-size: 11.5px !important;
    line-height: 1.1 !important;
  }
}


/* =======================================================
   Layout-Fix: Schriftartliste in "Wunschtext eingeben"
   Die Liste nutzt dynamisch den freien Platz bis kurz vor
   den unteren Rand des Containers. Foto-Box etwas flacher.
   Nur Desktop-Layout, keine Funktionsänderung.
======================================================= */
@media (min-width: 769px) {
  aside.tools {
    display: flex !important;
    flex-direction: column !important;
  }

  #textPanel {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow: hidden !important;
    padding-bottom: 8px !important;
  }

  #textPanel #textValue,
  #textPanel textarea#textValue {
    flex: 0 0 90px !important;
    height: 90px !important;
    min-height: 90px !important;
    max-height: 90px !important;
    resize: vertical !important;
  }

  #textPanel #fontFamilyList.font-list,
  #fontFamilyList.font-list {
    flex: 1 1 auto !important;
    height: auto !important;
    min-height: 52px !important;
    max-height: none !important;
    margin: 0 0 4px 0 !important;
    overflow-y: auto !important;
    box-sizing: border-box !important;
  }

  #textPanel #fontFamilyList .font-list-btn,
  #fontFamilyList .font-list-btn {
    min-height: 36px !important;
    height: 36px !important;
    padding: 5px 10px !important;
    font-size: 16px !important;
    line-height: 1.15 !important;
    display: flex !important;
    align-items: center !important;
    box-sizing: border-box !important;
  }

  #photoPanel.photo-panel-compact,
  .photo-panel-compact {
    flex: 0 0 auto !important;
    padding: 6px 10px !important;
    margin-top: 8px !important;
  }

  #photoPanel .upload-box-compact,
  #photoPanel .upload-box,
  .photo-panel-compact .upload-box,
  .upload-box-compact {
    min-height: 56px !important;
    padding: 7px 8px !important;
  }

  .photo-panel-compact .upload-box span {
    font-size: 15px !important;
    line-height: 1.05 !important;
  }

  .photo-panel-compact .upload-box small {
    margin-top: 2px !important;
    font-size: 11px !important;
    line-height: 1.05 !important;
  }
}

/* Fix 2026-06-22: Schriftartliste dynamisch bis zum unteren Rand der Wunschtext-Box. */
@media (min-width: 769px) {
  #textPanel {
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
  }

  #textPanel #fontFamilyList.font-list,
  #fontFamilyList.font-list {
    height: var(--font-list-dynamic-height, auto) !important;
    min-height: 52px !important;
    max-height: var(--font-list-dynamic-height, none) !important;
    overflow-y: auto !important;
    margin-bottom: 6px !important;
  }

  #photoPanel.photo-panel-compact,
  .photo-panel-compact {
    padding-top: 6px !important;
    padding-bottom: 6px !important;
  }

  #photoPanel .upload-box-compact,
  #photoPanel .upload-box,
  .photo-panel-compact .upload-box,
  .upload-box-compact {
    min-height: 54px !important;
    padding-top: 6px !important;
    padding-bottom: 6px !important;
  }
}


/* Fix 2026-06-23: Wunschtext-Box auf Desktop dynamisch bis Unterkante Canvas.
   Nur Layout, keine Funktionsänderung. */
@media (min-width: 769px) {
  #textPanel {
    flex: 0 0 auto !important;
    height: var(--text-panel-canvas-height, auto) !important;
    min-height: var(--text-panel-canvas-height, 0) !important;
    max-height: var(--text-panel-canvas-height, none) !important;
    display: flex;
    flex-direction: column;
    overflow: hidden !important;
  }

  #textPanel #fontFamilyList.font-list,
  #fontFamilyList.font-list {
    height: var(--font-list-dynamic-height, auto) !important;
    max-height: var(--font-list-dynamic-height, none) !important;
    flex: 0 0 auto !important;
    overflow-y: auto !important;
  }
}


/* Fix 2026-06-23: Foto-Box rechts zwischen Grafiken und Elementauswahl.
   Rechte Spalte wird auf die Canvas-Unterkante ausgerichtet; die Grafikbox
   nimmt dynamisch den freien Platz ein. Nur Desktop-Layout. */
@media (min-width: 769px) {
  body:not(.start-mode) .tools-right {
    display: flex !important;
    flex-direction: column !important;
    height: var(--right-column-canvas-height, auto) !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  body:not(.start-mode) .tools-right > .panel {
    flex: 0 0 auto !important;
    margin-bottom: 10px !important;
  }

  body:not(.start-mode) .tools-right > .panel:last-child {
    margin-bottom: 0 !important;
  }

  body:not(.start-mode) .tools-right .graphics-panel {
    flex: 1 1 auto !important;
    min-height: 120px !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
  }

  body:not(.start-mode) .tools-right .graphics-panel .graphic-grid {
    flex: 1 1 auto !important;
    height: auto !important;
    max-height: none !important;
    min-height: 60px !important;
    overflow-y: auto !important;
  }

  body:not(.start-mode) .tools-right #photoPanel.photo-panel-compact {
    flex: 0 0 auto !important;
    padding: 7px 10px !important;
  }

  body:not(.start-mode) .tools-right #photoPanel .upload-box-compact,
  body:not(.start-mode) .tools-right #photoPanel .upload-box {
    min-height: 58px !important;
    padding: 7px 8px !important;
  }

  body:not(.start-mode) .tools-right #photoPanel .upload-box span {
    font-size: 15px !important;
    line-height: 1.05 !important;
  }

  body:not(.start-mode) .tools-right #photoPanel .upload-box small {
    margin-top: 2px !important;
    font-size: 11px !important;
    line-height: 1.05 !important;
  }
}


/* Fix 2026-06-23: Abstand zwischen Foto-Box und Element-Auswahl rechts.
   Nur Layout, keine Funktionsaenderung. */
@media (min-width: 769px) {
  body:not(.start-mode) .tools-right #photoPanel.photo-panel-compact {
    margin-bottom: 14px !important;
  }

  body:not(.start-mode) .tools-right .selection-elements-panel {
    margin-top: 0 !important;
  }
}


/* DELTADESIGN24 FIX: Panels, die per Gravurseiten-Regel ausgeblendet werden,
   duerfen nicht durch spaetere display:flex!important Layoutregeln wieder erscheinen. */
.panel-hidden-by-rule {
  display: none !important;
}

/* DELTADESIGN24 FIX 2026-06-23:
   Grafiken-Box sicher ausblenden, wenn auf der gewaehlten Gravurseite
   keine Grafiken erlaubt sind. Die rechte Spaltenregel
   body:not(.start-mode) .tools-right .graphics-panel { display:flex!important; }
   war spezifischer als .panel-hidden-by-rule und hat display:none ueberstimmt. */
body:not(.start-mode) .tools-right .graphics-panel.panel-hidden-by-rule,
.tools-right .graphics-panel.panel-hidden-by-rule,
.graphics-panel.panel-hidden-by-rule,
.panel.graphics-panel.panel-hidden-by-rule {
  display: none !important;
  visibility: hidden !important;
  flex: 0 0 0 !important;
  min-height: 0 !important;
  max-height: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}


/* Desktop: großes Wunschtext-Fenster per Maus skalierbar mit sichtbarem Hinweis */
@media (min-width: 769px){
  #textEditorDialog{
    resize: none !important; /* eigene Griff-Fläche verwenden */
    overflow: hidden !important;
  }
  #textEditorDialog .text-editor-content{
    min-height: 0 !important;
  }
  #textEditorResizeHandle{
    position:absolute;
    right:0;
    bottom:0;
    width:28px;
    height:28px;
    cursor:nwse-resize;
    z-index:5;
    background:transparent;
  }
  #textEditorResizeHandle::before{
    content:"";
    position:absolute;
    right:6px;
    bottom:6px;
    width:14px;
    height:14px;
    border-right:3px solid #64748b;
    border-bottom:3px solid #64748b;
    opacity:.9;
  }
  #textEditorResizeHandle::after{
    content:"";
    position:absolute;
    right:11px;
    bottom:11px;
    width:8px;
    height:8px;
    border-right:2px solid #94a3b8;
    border-bottom:2px solid #94a3b8;
    opacity:.9;
  }
  .text-editor-resize-hint{
    position:absolute;
    right:28px;
    bottom:7px;
    font-size:17px;
    line-height:1;
    color:#64748b !important;
    pointer-events:none;
    opacity:.85;
  }
  .text-editor-resize-label{
    position:absolute;
    right:50px;
    bottom:7px;
    font-size:11px;
    line-height:1;
    color:#64748b !important;
    pointer-events:none;
    opacity:.8;
    user-select:none;
  }
}
@media (max-width: 768px){
  #textEditorResizeHandle,
  .text-editor-resize-hint,
  .text-editor-resize-label{
    display:none !important;
  }
}

/* Fix 2026-06-23: Großes Textfenster - Schriftartenliste etwas kürzer,
   damit der Hinweis/Griff zum Fensterziehen unten rechts sichtbar bleibt. */
@media (min-width: 769px){
  #textEditorDialog .text-editor-fonts{
    padding-bottom:42px !important;
    box-sizing:border-box !important;
    min-height:0 !important;
  }
  #textEditorDialog #textEditorFontList.text-editor-font-list{
    flex:0 1 auto !important;
    height:calc(100% - 76px) !important;
    max-height:calc(100% - 76px) !important;
    min-height:120px !important;
    overflow-y:auto !important;
    overflow-x:hidden !important;
  }
}

/* Großes Textfenster: eigene Textwerkzeuge, Canvas bleibt auswählbar */
@media (min-width: 769px){
  .text-editor-modal{
    pointer-events:none !important;
    background:transparent !important;
  }
  .text-editor-dialog{
    pointer-events:auto !important;
  }
  .text-editor-tools{
    display:flex;
    gap:10px;
    align-items:stretch;
    margin-top:10px;
  }
  .text-editor-align-buttons{
    display:flex;
    gap:6px;
    flex:0 0 auto;
  }
  .text-editor-align-btn{
    border:1px solid #cbd5e1;
    background:#f8fafc;
    border-radius:8px;
    padding:5px 8px;
    min-width:58px;
    font-size:12px;
    line-height:1.15;
    font-weight:800;
    cursor:pointer;
  }
  .text-editor-align-btn.active{
    border-color:#00876c;
    background:#e8f5f1;
  }
  .text-editor-curve-box{
    flex:1 1 auto;
    border:1px solid #d7dee8;
    border-radius:9px;
    padding:6px 9px;
    background:#f8fafc;
    min-width:0;
  }
  .text-editor-curve-headline{
    display:flex;
    justify-content:space-between;
    gap:10px;
    align-items:center;
    font-size:12px;
    font-weight:700;
    margin-bottom:4px;
  }
  #textEditorCurveRange{
    width:100%;
    height:18px;
    margin:0;
  }
}
@media (max-width: 768px){
  .text-editor-tools{display:none!important;}
}


/* Fix 2026-06-23: Großes Textfenster - Buttontext zentrieren, Text bleibt nach Übernahme aktiv, Limits anzeigen */
@media (min-width: 769px){
  #textEditorDialog .text-editor-align-btn{
    display:flex !important;
    flex-direction:column !important;
    align-items:center !important;
    justify-content:center !important;
    text-align:center !important;
    line-height:1.12 !important;
    min-height:42px !important;
    box-sizing:border-box !important;
    white-space:normal !important;
  }
  #textEditorDialog #textEditorAlignCenter{
    text-align:center !important;
  }
  #textEditorLimitsInfo.text-editor-limits-info{
    margin-top:8px !important;
    padding:8px 9px !important;
    border:1px solid #d7dee8 !important;
    border-radius:9px !important;
    background:#f8fafc !important;
    color:#334155 !important;
    font-size:12px !important;
    line-height:1.35 !important;
    font-weight:700 !important;
  }
}


/* Fix 2026-06-23: Großes Textfenster - Info-Box Textblöcke/Zeilen/Zeichen tiefer positionieren.
   Die Box sitzt nun optisch etwa mittig zwischen Schriftartenliste und "Fenster ziehen". */
@media (min-width: 769px){
  #textEditorDialog .text-editor-fonts{
    padding-bottom:52px !important;
  }
  #textEditorDialog #textEditorFontList.text-editor-font-list{
    height:calc(100% - 130px) !important;
    max-height:calc(100% - 130px) !important;
  }
  #textEditorDialog #textEditorLimitsInfo.text-editor-limits-info{
    margin-top:26px !important;
    margin-bottom:0 !important;
  }
}



/* FIX 2026-06-23: Großes Textfenster – Info-Box unten positionieren, Schriftartenliste größer */
@media (min-width: 769px){
  #textEditorDialog .text-editor-fonts{
    display:flex !important;
    flex-direction:column !important;
    min-height:0 !important;
    height:100% !important;
    padding-bottom:18px !important;
    box-sizing:border-box !important;
  }

  #textEditorDialog #textEditorFontList.text-editor-font-list{
    flex:1 1 auto !important;
    min-height:0 !important;
    height:auto !important;
    max-height:none !important;
    overflow:auto !important;
  }

  #textEditorDialog #textEditorLimitsInfo.text-editor-limits-info{
    flex:0 0 auto !important;
    margin-top:auto !important;      /* schiebt die Box nach unten */
    margin-bottom:4px !important;   /* Abstand zu "Fenster ziehen" */
    padding:8px 9px !important;
    border:1px solid #d7dee8 !important;
    border-radius:9px !important;
    background:#f8fafc !important;
    color:#111827 !important;
    font-size:12px !important;
    line-height:1.35 !important;
    font-weight:700 !important;
    box-sizing:border-box !important;
  }
}

/* Final-Fix: Nur die Info-Box im großen Textfenster 20px weiter nach unten verschieben. */
@media (min-width: 769px){
  #textEditorDialog #textEditorLimitsInfo.text-editor-limits-info{
    position: relative !important;
    transform: translateY(20px) !important;
  }
}


/* DELTADESIGN24 FIX: Mindestgröße großes Texteingabefenster */
@media (min-width: 769px){
  #textEditorDialog.text-editor-dialog,
  .text-editor-dialog{
    min-width:780px;
    min-height:450px;
  }
}


/* DELTADESIGN24 FIX: großes Textfenster Mindestgröße + Startgröße + Schließen-X */
@media (min-width: 769px){
  #textEditorDialog.text-editor-dialog,
  .text-editor-dialog{
    width:780px;
    min-width:780px;
    height:450px;
    min-height:450px;
    position:relative;
  }
  #textEditorCloseX.text-editor-close-x{
    position:absolute;
    top:8px;
    right:10px;
    z-index:5;
    width:28px;
    height:28px;
    border:none;
    border-radius:50%;
    background:#ef4444;
    color:#fff;
    font-size:22px;
    font-weight:700;
    line-height:26px;
    text-align:center;
    cursor:pointer;
    padding:0;
  }
  #textEditorCloseX.text-editor-close-x:hover{
    background:#dc2626;
  }
}


/* DELTADESIGN24 FIX: Texteditor darf wieder größer gezogen werden.
   Nur Mindestgröße bleibt fest. */
@media (min-width: 769px){
  #textEditorDialog.text-editor-dialog,
  .text-editor-dialog{
    min-width:780px !important;
    min-height:450px !important;
    max-width:96vw;
    max-height:92vh;
  }
}


/* DELTADESIGN24: Einstellung "Großes Textfeld Aktiv" */
body.large-text-editor-disabled #openTextEditorBtn{
  display:none !important;
}
body.large-text-editor-disabled #textPanel .text-action-row #addTextBtn,
body.large-text-editor-disabled #textPanel .text-action-row .text-add-small{
  flex:1 1 100% !important;
  width:100% !important;
  max-width:none !important;
}
.settings-check-row{
  display:flex;
  flex-direction:row;
  align-items:center;
  gap:10px;
}
.settings-check-row input[type="checkbox"]{
  width:auto;
  min-width:auto;
}


/* DELTADESIGN24: Zoom-Button sichtbar/unsichtbar ueber Einstellung */
body.large-text-editor-disabled #openTextEditorBtn{
  display:none !important;
}
body.large-text-editor-disabled #textPanel .text-action-row #addTextBtn,
body.large-text-editor-disabled #textPanel .text-action-row .text-add-small{
  flex:1 1 100% !important;
  width:100% !important;
  max-width:none !important;
}
.settings-check-row{
  display:flex;
  flex-direction:row;
  align-items:center;
  gap:10px;
}
.settings-check-row input[type="checkbox"]{
  width:auto;
  min-width:auto;
}

body.large-text-editor-disabled #openTextEditorBtn{
display:none!important;
}
body.large-text-editor-disabled .text-action-row #addTextBtn{
flex:1 1 100%!important;
max-width:none!important;
width:100%!important;
}


/* DELTADESIGN24 FIX: Zoom-Button wirklich ausblenden.
   Wichtig: frühere Regel #textPanel .text-zoom-btn { display:inline-flex!important; }
   überschreibt sonst das HTML-hidden-Attribut. */
#textPanel #openTextEditorBtn[hidden],
body.large-text-editor-disabled #textPanel #openTextEditorBtn,
body.large-text-editor-disabled #openTextEditorBtn{
  display:none !important;
  visibility:hidden !important;
  pointer-events:none !important;
}

body.large-text-editor-disabled #textPanel .text-action-row #addTextBtn,
body.large-text-editor-disabled #textPanel .text-action-row .text-add-small{
  flex:1 1 100% !important;
  width:100% !important;
  max-width:none !important;
}

/* Upload-Hinweisbox: native Zusatzfunktionen ausblenden, nur einfache Dateiauswahl anzeigen */
.upload-file-row{
  display:flex;
  align-items:center;
  gap:12px;
  margin-top:16px;
}
.upload-file-hidden{
  display:none !important;
}
.upload-file-button{
  border:0;
  border-radius:12px;
  background:#f97316;
  color:#ffffff;
  font-weight:700;
  font-size:15px;
  padding:12px 18px;
  cursor:pointer;
  white-space:nowrap;
}
.upload-file-button:hover{
  background:#ea580c;
}
.upload-file-name{
  min-width:0;
  color:#374151;
  font-size:14px;
  line-height:1.3;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

@media (max-width:760px){
  .upload-file-row{
    flex-direction:column;
    align-items:stretch;
    gap:8px;
    margin-top:12px;
  }
  .upload-file-button{
    width:100%;
    min-height:48px;
    font-size:16px;
  }
  .upload-file-name{
    text-align:center;
    white-space:normal;
  }
}


/* Upload-Hinweisboxen: Browser-Dateifeld komplett unsichtbar machen.
   Sichtbar bleiben nur unsere eigenen Buttons "Grafik auswählen" und "Foto auswählen". */
#ownGraphicBox input[type="file"],
#customerPhotoUploadBox input[type="file"],
.upload-file-hidden{
  display:none !important;
  visibility:hidden !important;
  opacity:0 !important;
  position:absolute !important;
  left:-99999px !important;
  top:auto !important;
  width:1px !important;
  height:1px !important;
  overflow:hidden !important;
  pointer-events:none !important;
  appearance:none !important;
  -webkit-appearance:none !important;
}


/* DELTADESIGN24 FIX: Upload-Hinweisboxen getrennt vom normalen Entwurf-Fenster behandeln. */
#ownGraphicBox .draft-window,
#customerPhotoUploadBox .draft-window{
  overflow-y:auto !important;
}
#ownGraphicBox .upload-info-image,
#customerPhotoUploadBox .upload-info-image{
  display:block !important;
  width:100% !important;
  height:auto !important;
  max-height:38vh !important;
  object-fit:contain !important;
  margin:0 0 14px 0 !important;
}
@media (max-width:760px){
  #ownGraphicBox .draft-window,
  #customerPhotoUploadBox .draft-window{
    max-height:92vh !important;
    overflow-y:auto !important;
    padding:14px !important;
  }
  #ownGraphicBox .upload-info-image,
  #customerPhotoUploadBox .upload-info-image{
    max-height:34vh !important;
    margin-bottom:10px !important;
  }
  #ownGraphicBox .draft-window h2,
  #customerPhotoUploadBox .draft-window h2{
    font-size:22px !important;
    margin-bottom:8px !important;
  }
  #ownGraphicBox .draft-window p,
  #customerPhotoUploadBox .draft-window p{
    font-size:13px !important;
    line-height:1.32 !important;
    margin-bottom:8px !important;
  }
}


/* DELTADESIGN24 FIX: InfoGrafik/InfoFoto nicht als <img>, sondern als Hintergrund anzeigen.
   Dadurch zeigt Microsoft Edge keine eingeblendete "Visuelle Suche" / "Einstellungen" direkt auf der Grafik an. */
#ownGraphicBox .upload-info-bg,
#customerPhotoUploadBox .upload-info-bg{
  display:block !important;
  width:100% !important;
  height:auto !important;
  aspect-ratio:1 / 1 !important;
  max-height:38vh !important;
  background-repeat:no-repeat !important;
  background-position:center center !important;
  background-size:contain !important;
  border-radius:14px !important;
  margin:0 0 14px 0 !important;
  -webkit-user-select:none !important;
  user-select:none !important;
  -webkit-user-drag:none !important;
}
@media (max-width:760px){
  #ownGraphicBox .upload-info-bg,
  #customerPhotoUploadBox .upload-info-bg{
    aspect-ratio:1 / 1 !important;
    max-height:34vh !important;
    min-height:220px !important;
    margin-bottom:10px !important;
  }
}

/* DELTADESIGN24: Mobile Uploadboxen kompakt und ohne Scrollen darstellen */
.upload-text-mobile{
  display:none;
}

@media (max-width:760px){
  #ownGraphicBox .draft-backdrop,
  #customerPhotoUploadBox .draft-backdrop{
    align-items:center !important;
    justify-content:center !important;
    padding:8px !important;
  }

  #ownGraphicBox .draft-window,
  #customerPhotoUploadBox .draft-window{
    width:min(94vw, 420px) !important;
    max-width:94vw !important;
    max-height:calc(100dvh - 24px) !important;
    overflow:hidden !important;
    padding:14px 14px 16px 14px !important;
    border-radius:22px !important;
    box-sizing:border-box !important;
  }

  #ownGraphicBox .upload-info-bg,
  #customerPhotoUploadBox .upload-info-bg,
  #ownGraphicBox .upload-info-image,
  #customerPhotoUploadBox .upload-info-image{
    height:clamp(118px, 31vw, 168px) !important;
    min-height:0 !important;
    max-height:168px !important;
    aspect-ratio:auto !important;
    margin:0 0 10px 0 !important;
    border-radius:12px !important;
    background-size:contain !important;
  }

  #ownGraphicBox .draft-window h2,
  #customerPhotoUploadBox .draft-window h2{
    font-size:clamp(24px, 7vw, 31px) !important;
    line-height:1.05 !important;
    margin:0 0 8px 0 !important;
    letter-spacing:-0.03em !important;
  }

  #ownGraphicBox .upload-text-desktop,
  #customerPhotoUploadBox .upload-text-desktop{
    display:none !important;
  }

  #ownGraphicBox .upload-text-mobile,
  #customerPhotoUploadBox .upload-text-mobile{
    display:block !important;
    font-size:clamp(14px, 3.65vw, 16px) !important;
    line-height:1.32 !important;
    margin:0 0 12px 0 !important;
    color:#111827 !important;
  }

  #ownGraphicBox .upload-file-row,
  #customerPhotoUploadBox .upload-file-row{
    display:flex !important;
    flex-direction:row !important;
    align-items:center !important;
    gap:10px !important;
    margin:10px 0 14px 0 !important;
  }

  #ownGraphicBox .upload-file-button,
  #customerPhotoUploadBox .upload-file-button{
    flex:0 0 auto !important;
    width:auto !important;
    min-width:128px !important;
    max-width:148px !important;
    min-height:44px !important;
    padding:10px 14px !important;
    border-radius:14px !important;
    font-size:15px !important;
    line-height:1.1 !important;
    text-align:center !important;
  }

  #ownGraphicBox .upload-file-name,
  #customerPhotoUploadBox .upload-file-name{
    flex:1 1 auto !important;
    min-width:0 !important;
    max-width:none !important;
    text-align:left !important;
    white-space:nowrap !important;
    overflow:hidden !important;
    text-overflow:ellipsis !important;
    font-size:14px !important;
    line-height:1.2 !important;
    color:#4b5563 !important;
  }

  #ownGraphicBox .draft-actions,
  #customerPhotoUploadBox .draft-actions{
    display:grid !important;
    grid-template-columns:1fr 1fr !important;
    gap:10px !important;
    margin-top:4px !important;
  }

  #ownGraphicBox .draft-actions button,
  #customerPhotoUploadBox .draft-actions button,
  #ownGraphicCancel,
  #ownGraphicUse,
  #customerPhotoCancel,
  #customerPhotoUse{
    width:100% !important;
    min-width:0 !important;
    min-height:50px !important;
    padding:10px 8px !important;
    border-radius:16px !important;
    font-size:16px !important;
    line-height:1.15 !important;
    white-space:normal !important;
  }
}

@media (max-width:380px), (max-height:720px){
  #ownGraphicBox .upload-info-bg,
  #customerPhotoUploadBox .upload-info-bg,
  #ownGraphicBox .upload-info-image,
  #customerPhotoUploadBox .upload-info-image{
    height:118px !important;
    max-height:118px !important;
    margin-bottom:8px !important;
  }
  #ownGraphicBox .draft-window,
  #customerPhotoUploadBox .draft-window{
    padding:12px !important;
  }
  #ownGraphicBox .draft-window h2,
  #customerPhotoUploadBox .draft-window h2{
    font-size:23px !important;
    margin-bottom:6px !important;
  }
  #ownGraphicBox .upload-text-mobile,
  #customerPhotoUploadBox .upload-text-mobile{
    font-size:13px !important;
    line-height:1.25 !important;
    margin-bottom:10px !important;
  }
  #ownGraphicBox .upload-file-button,
  #customerPhotoUploadBox .upload-file-button{
    min-width:118px !important;
    max-width:136px !important;
    min-height:40px !important;
    font-size:14px !important;
    padding:8px 10px !important;
  }
  #ownGraphicBox .draft-actions button,
  #customerPhotoUploadBox .draft-actions button,
  #ownGraphicCancel,
  #ownGraphicUse,
  #customerPhotoCancel,
  #customerPhotoUse{
    min-height:44px !important;
    font-size:15px !important;
    border-radius:14px !important;
  }
}


/* DELTADESIGN24 FINAL: Uploadboxen Grafik/Foto - Buttonbreite und mobile Vollbild-Ansicht */
#ownGraphicBox .upload-file-row,
#customerPhotoUploadBox .upload-file-row{
  display:flex !important;
  align-items:center !important;
  gap:12px !important;
}
#ownGraphicBox .upload-file-button,
#customerPhotoUploadBox .upload-file-button{
  flex:0 0 156px !important;
  width:156px !important;
  min-width:156px !important;
  max-width:156px !important;
  padding:11px 12px !important;
  text-align:center !important;
  box-sizing:border-box !important;
}
#ownGraphicBox .upload-file-name,
#customerPhotoUploadBox .upload-file-name{
  flex:1 1 auto !important;
  min-width:0 !important;
  max-width:none !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
  white-space:nowrap !important;
}

@media (max-width:760px){
  #ownGraphicBox .draft-backdrop,
  #customerPhotoUploadBox .draft-backdrop{
    inset:0 !important;
    padding:8px !important;
    align-items:center !important;
    justify-content:center !important;
    box-sizing:border-box !important;
  }

  #ownGraphicBox .draft-window,
  #customerPhotoUploadBox .draft-window{
    width:calc(100vw - 22px) !important;
    max-width:430px !important;
    height:calc(100dvh - 18px) !important;
    max-height:calc(100dvh - 18px) !important;
    min-height:calc(100dvh - 18px) !important;
    overflow:hidden !important;
    padding:16px 18px 18px 18px !important;
    border-radius:24px !important;
    box-sizing:border-box !important;
    display:flex !important;
    flex-direction:column !important;
    justify-content:flex-start !important;
  }

  #ownGraphicBox .upload-info-bg,
  #customerPhotoUploadBox .upload-info-bg,
  #ownGraphicBox .upload-info-image,
  #customerPhotoUploadBox .upload-info-image{
    display:block !important;
    width:100% !important;
    flex:0 0 clamp(200px, 37dvh, 285px) !important;
    height:clamp(200px, 37dvh, 285px) !important;
    min-height:0 !important;
    max-height:none !important;
    aspect-ratio:auto !important;
    margin:0 0 12px 0 !important;
    border-radius:14px !important;
    background-size:contain !important;
    background-position:center center !important;
    background-repeat:no-repeat !important;
  }

  #ownGraphicBox .draft-window h2,
  #customerPhotoUploadBox .draft-window h2{
    flex:0 0 auto !important;
    font-size:clamp(25px, 7vw, 31px) !important;
    line-height:1.04 !important;
    margin:0 0 10px 0 !important;
    letter-spacing:-0.035em !important;
  }

  #ownGraphicBox .upload-text-desktop,
  #customerPhotoUploadBox .upload-text-desktop{
    display:none !important;
  }

  #ownGraphicBox .upload-text-mobile,
  #customerPhotoUploadBox .upload-text-mobile{
    display:block !important;
    flex:0 0 auto !important;
    font-size:clamp(13px, 3.55vw, 15px) !important;
    line-height:1.24 !important;
    margin:0 0 12px 0 !important;
    color:#111827 !important;
  }

  #ownGraphicBox .upload-file-row,
  #customerPhotoUploadBox .upload-file-row{
    flex:0 0 auto !important;
    display:flex !important;
    flex-direction:row !important;
    align-items:center !important;
    gap:10px !important;
    margin:0 0 14px 0 !important;
  }

  #ownGraphicBox .upload-file-button,
  #customerPhotoUploadBox .upload-file-button{
    flex:0 0 148px !important;
    width:148px !important;
    min-width:148px !important;
    max-width:148px !important;
    height:50px !important;
    min-height:50px !important;
    padding:8px 10px !important;
    border-radius:16px !important;
    font-size:16px !important;
    line-height:1.08 !important;
    white-space:normal !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
  }

  #ownGraphicBox .upload-file-name,
  #customerPhotoUploadBox .upload-file-name{
    flex:1 1 auto !important;
    min-width:0 !important;
    text-align:left !important;
    white-space:nowrap !important;
    overflow:hidden !important;
    text-overflow:ellipsis !important;
    font-size:14px !important;
    line-height:1.2 !important;
    color:#4b5563 !important;
  }

  #ownGraphicBox .draft-actions,
  #customerPhotoUploadBox .draft-actions{
    flex:0 0 auto !important;
    width:100% !important;
    display:grid !important;
    grid-template-columns:1fr 1fr !important;
    gap:10px !important;
    margin-top:auto !important;
    padding:0 !important;
  }

  #ownGraphicBox .draft-actions button,
  #customerPhotoUploadBox .draft-actions button,
  #ownGraphicCancel,
  #ownGraphicUse,
  #customerPhotoCancel,
  #customerPhotoUse{
    width:100% !important;
    height:50px !important;
    min-height:50px !important;
    min-width:0 !important;
    padding:8px 8px !important;
    border-radius:16px !important;
    font-size:16px !important;
    line-height:1.08 !important;
    white-space:nowrap !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    text-align:center !important;
    box-sizing:border-box !important;
  }
}


/* DELTADESIGN24 MOBILE ONLY FINAL: Uploadboxen ohne Scrollen, Bilder priorisieren */
@media (max-width:760px){
  #ownGraphicBox .draft-window,
  #customerPhotoUploadBox .draft-window{
    width:calc(100vw - 18px) !important;
    max-width:430px !important;
    height:calc(100dvh - 14px) !important;
    max-height:calc(100dvh - 14px) !important;
    min-height:calc(100dvh - 14px) !important;
    padding:14px 14px 14px 14px !important;
    overflow:hidden !important;
    display:flex !important;
    flex-direction:column !important;
  }

  #ownGraphicBox .upload-info-bg,
  #customerPhotoUploadBox .upload-info-bg,
  #ownGraphicBox .upload-info-image,
  #customerPhotoUploadBox .upload-info-image{
    flex:0 0 clamp(220px, 42dvh, 360px) !important;
    height:clamp(220px, 42dvh, 360px) !important;
    max-height:42dvh !important;
    margin:0 0 10px 0 !important;
  }

  #ownGraphicBox .draft-window h2,
  #customerPhotoUploadBox .draft-window h2{
    flex:0 0 auto !important;
    font-size:clamp(17px, 5vw, 22px) !important;
    line-height:1.05 !important;
    white-space:nowrap !important;
    overflow:hidden !important;
    text-overflow:ellipsis !important;
    letter-spacing:-0.02em !important;
    margin:0 0 10px 0 !important;
  }

  #ownGraphicBox .upload-text-mobile,
  #customerPhotoUploadBox .upload-text-mobile,
  #ownGraphicBox .upload-text-desktop,
  #customerPhotoUploadBox .upload-text-desktop{
    display:none !important;
  }

  #ownGraphicBox .upload-file-row,
  #customerPhotoUploadBox .upload-file-row{
    width:100% !important;
    display:grid !important;
    grid-template-columns:1fr 1fr !important;
    gap:10px !important;
    align-items:stretch !important;
    margin:0 0 10px 0 !important;
    flex:0 0 auto !important;
  }

  #ownGraphicBox .upload-file-button,
  #customerPhotoUploadBox .upload-file-button,
  #ownGraphicBox .draft-actions button,
  #customerPhotoUploadBox .draft-actions button,
  #ownGraphicCancel,
  #ownGraphicUse,
  #customerPhotoCancel,
  #customerPhotoUse{
    width:100% !important;
    min-width:0 !important;
    max-width:none !important;
    height:52px !important;
    min-height:52px !important;
    padding:8px 10px !important;
    border-radius:16px !important;
    font-size:16px !important;
    line-height:1.1 !important;
    white-space:nowrap !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    text-align:center !important;
    box-sizing:border-box !important;
  }

  #ownGraphicBox .upload-file-name,
  #customerPhotoUploadBox .upload-file-name{
    width:100% !important;
    min-width:0 !important;
    height:52px !important;
    min-height:52px !important;
    display:flex !important;
    align-items:center !important;
    justify-content:flex-start !important;
    padding:0 6px !important;
    font-size:14px !important;
    line-height:1.15 !important;
    text-align:left !important;
    white-space:nowrap !important;
    overflow:hidden !important;
    text-overflow:ellipsis !important;
    color:#4b5563 !important;
    box-sizing:border-box !important;
  }

  #ownGraphicBox .draft-actions,
  #customerPhotoUploadBox .draft-actions{
    width:100% !important;
    display:grid !important;
    grid-template-columns:1fr 1fr !important;
    gap:10px !important;
    margin-top:auto !important;
    flex:0 0 auto !important;
  }
}

@media (max-width:380px), (max-height:700px){
  #ownGraphicBox .upload-info-bg,
  #customerPhotoUploadBox .upload-info-bg,
  #ownGraphicBox .upload-info-image,
  #customerPhotoUploadBox .upload-info-image{
    flex-basis:clamp(190px, 38dvh, 300px) !important;
    height:clamp(190px, 38dvh, 300px) !important;
    max-height:38dvh !important;
  }

  #ownGraphicBox .draft-window h2,
  #customerPhotoUploadBox .draft-window h2{
    font-size:18px !important;
    margin-bottom:8px !important;
  }

  #ownGraphicBox .upload-file-button,
  #customerPhotoUploadBox .upload-file-button,
  #ownGraphicBox .draft-actions button,
  #customerPhotoUploadBox .draft-actions button,
  #ownGraphicCancel,
  #ownGraphicUse,
  #customerPhotoCancel,
  #customerPhotoUse,
  #ownGraphicBox .upload-file-name,
  #customerPhotoUploadBox .upload-file-name{
    height:48px !important;
    min-height:48px !important;
    font-size:14px !important;
  }
}

@media (max-width:380px), (max-height:700px){
  #ownGraphicBox .draft-window,
  #customerPhotoUploadBox .draft-window{
    padding:12px 14px 14px 14px !important;
    border-radius:22px !important;
  }
  #ownGraphicBox .upload-info-bg,
  #customerPhotoUploadBox .upload-info-bg,
  #ownGraphicBox .upload-info-image,
  #customerPhotoUploadBox .upload-info-image{
    flex-basis:clamp(160px, 32dvh, 220px) !important;
    height:clamp(160px, 32dvh, 220px) !important;
    margin-bottom:9px !important;
  }
  #ownGraphicBox .draft-window h2,
  #customerPhotoUploadBox .draft-window h2{
    font-size:23px !important;
    margin-bottom:8px !important;
  }
  #ownGraphicBox .upload-text-mobile,
  #customerPhotoUploadBox .upload-text-mobile{
    font-size:12.5px !important;
    line-height:1.2 !important;
    margin-bottom:10px !important;
  }
  #ownGraphicBox .upload-file-button,
  #customerPhotoUploadBox .upload-file-button{
    flex-basis:132px !important;
    width:132px !important;
    min-width:132px !important;
    max-width:132px !important;
    height:44px !important;
    min-height:44px !important;
    font-size:14px !important;
  }
  #ownGraphicBox .draft-actions button,
  #customerPhotoUploadBox .draft-actions button,
  #ownGraphicCancel,
  #ownGraphicUse,
  #customerPhotoCancel,
  #customerPhotoUse{
    height:44px !important;
    min-height:44px !important;
    font-size:14px !important;
    border-radius:14px !important;
  }
}


/* DELTADESIGN24 MOBILE ONLY FINAL 2: Dateiname komplett sichtbar, weniger Leerraum, Bilder groesser */
@media (max-width:760px){
  #ownGraphicBox .draft-window,
  #customerPhotoUploadBox .draft-window{
    height:calc(100dvh - 14px) !important;
    max-height:calc(100dvh - 14px) !important;
    min-height:calc(100dvh - 14px) !important;
    padding:12px 14px 14px 14px !important;
    overflow:hidden !important;
    display:flex !important;
    flex-direction:column !important;
    justify-content:flex-start !important;
  }

  #ownGraphicBox .upload-info-bg,
  #customerPhotoUploadBox .upload-info-bg,
  #ownGraphicBox .upload-info-image,
  #customerPhotoUploadBox .upload-info-image{
    flex:0 0 clamp(285px, 48dvh, 430px) !important;
    height:clamp(285px, 48dvh, 430px) !important;
    max-height:48dvh !important;
    width:100% !important;
    margin:0 0 10px 0 !important;
    background-size:contain !important;
    background-position:center center !important;
    background-repeat:no-repeat !important;
  }

  #ownGraphicBox .draft-window h2,
  #customerPhotoUploadBox .draft-window h2{
    font-size:clamp(19px, 5.2vw, 23px) !important;
    line-height:1.05 !important;
    margin:0 0 10px 0 !important;
    white-space:nowrap !important;
    overflow:visible !important;
    text-overflow:clip !important;
  }

  #ownGraphicBox .upload-text-mobile,
  #customerPhotoUploadBox .upload-text-mobile,
  #ownGraphicBox .upload-text-desktop,
  #customerPhotoUploadBox .upload-text-desktop{
    display:none !important;
  }

  #ownGraphicBox .upload-file-row,
  #customerPhotoUploadBox .upload-file-row{
    display:grid !important;
    grid-template-columns:1fr 1fr !important;
    gap:8px !important;
    width:100% !important;
    align-items:center !important;
    margin:0 0 10px 0 !important;
    flex:0 0 auto !important;
  }

  #ownGraphicBox .upload-file-button,
  #customerPhotoUploadBox .upload-file-button{
    width:100% !important;
    min-width:0 !important;
    max-width:none !important;
    height:50px !important;
    min-height:50px !important;
    padding:8px 8px !important;
    font-size:clamp(14px, 3.9vw, 16px) !important;
    white-space:nowrap !important;
  }

  #ownGraphicBox .upload-file-name,
  #customerPhotoUploadBox .upload-file-name{
    width:100% !important;
    min-width:0 !important;
    height:50px !important;
    min-height:50px !important;
    display:flex !important;
    align-items:center !important;
    justify-content:flex-start !important;
    padding:0 2px !important;
    font-size:clamp(11px, 3.2vw, 13px) !important;
    line-height:1.1 !important;
    white-space:nowrap !important;
    overflow:visible !important;
    text-overflow:clip !important;
    color:#4b5563 !important;
    box-sizing:border-box !important;
  }

  #ownGraphicBox .draft-actions,
  #customerPhotoUploadBox .draft-actions{
    display:grid !important;
    grid-template-columns:1fr 1fr !important;
    gap:8px !important;
    width:100% !important;
    margin-top:0 !important;
    flex:0 0 auto !important;
  }

  #ownGraphicBox .draft-actions button,
  #customerPhotoUploadBox .draft-actions button,
  #ownGraphicCancel,
  #ownGraphicUse,
  #customerPhotoCancel,
  #customerPhotoUse{
    width:100% !important;
    min-width:0 !important;
    max-width:none !important;
    height:50px !important;
    min-height:50px !important;
    padding:8px 8px !important;
    border-radius:16px !important;
    font-size:clamp(14px, 3.9vw, 16px) !important;
    line-height:1.1 !important;
    white-space:nowrap !important;
  }
}

@media (max-width:380px), (max-height:700px){
  #ownGraphicBox .upload-info-bg,
  #customerPhotoUploadBox .upload-info-bg,
  #ownGraphicBox .upload-info-image,
  #customerPhotoUploadBox .upload-info-image{
    flex-basis:clamp(230px, 43dvh, 340px) !important;
    height:clamp(230px, 43dvh, 340px) !important;
    max-height:43dvh !important;
  }

  #ownGraphicBox .draft-window h2,
  #customerPhotoUploadBox .draft-window h2{
    font-size:18px !important;
  }

  #ownGraphicBox .upload-file-button,
  #customerPhotoUploadBox .upload-file-button,
  #ownGraphicBox .draft-actions button,
  #customerPhotoUploadBox .draft-actions button,
  #ownGraphicCancel,
  #ownGraphicUse,
  #customerPhotoCancel,
  #customerPhotoUse{
    height:46px !important;
    min-height:46px !important;
    font-size:14px !important;
  }

  #ownGraphicBox .upload-file-name,
  #customerPhotoUploadBox .upload-file-name{
    height:46px !important;
    min-height:46px !important;
    font-size:11px !important;
  }
}

/* DELTADESIGN24 MOBILE ONLY FINAL 3: Boxhoehe an Inhalt anpassen, PC unveraendert */
@media (max-width:760px){
  #ownGraphicBox .draft-backdrop,
  #customerPhotoUploadBox .draft-backdrop{
    align-items:center !important;
    justify-content:center !important;
    padding:8px !important;
    box-sizing:border-box !important;
  }

  #ownGraphicBox .draft-window,
  #customerPhotoUploadBox .draft-window{
    width:calc(100vw - 18px) !important;
    max-width:430px !important;
    height:auto !important;
    min-height:0 !important;
    max-height:calc(100dvh - 18px) !important;
    overflow:hidden !important;
    padding:14px 14px 16px 14px !important;
    border-radius:24px !important;
    box-sizing:border-box !important;
    display:flex !important;
    flex-direction:column !important;
    justify-content:flex-start !important;
  }

  #ownGraphicBox .upload-info-bg,
  #customerPhotoUploadBox .upload-info-bg,
  #ownGraphicBox .upload-info-image,
  #customerPhotoUploadBox .upload-info-image{
    width:100% !important;
    flex:0 0 auto !important;
    height:clamp(285px, 78vw, 360px) !important;
    min-height:0 !important;
    max-height:50dvh !important;
    margin:0 0 12px 0 !important;
    background-size:contain !important;
    background-position:center center !important;
    background-repeat:no-repeat !important;
    border-radius:14px !important;
  }

  #ownGraphicBox .draft-window h2,
  #customerPhotoUploadBox .draft-window h2{
    flex:0 0 auto !important;
    font-size:clamp(18px, 5.1vw, 22px) !important;
    line-height:1.05 !important;
    margin:0 0 12px 0 !important;
    white-space:nowrap !important;
    overflow:visible !important;
    text-overflow:clip !important;
    letter-spacing:-0.02em !important;
  }

  #ownGraphicBox .upload-text-mobile,
  #customerPhotoUploadBox .upload-text-mobile,
  #ownGraphicBox .upload-text-desktop,
  #customerPhotoUploadBox .upload-text-desktop{
    display:none !important;
  }

  #ownGraphicBox .upload-file-row,
  #customerPhotoUploadBox .upload-file-row{
    flex:0 0 auto !important;
    width:100% !important;
    display:grid !important;
    grid-template-columns:1fr 1fr !important;
    gap:8px !important;
    align-items:stretch !important;
    margin:0 0 10px 0 !important;
  }

  #ownGraphicBox .upload-file-button,
  #customerPhotoUploadBox .upload-file-button,
  #ownGraphicBox .draft-actions button,
  #customerPhotoUploadBox .draft-actions button,
  #ownGraphicCancel,
  #ownGraphicUse,
  #customerPhotoCancel,
  #customerPhotoUse{
    width:100% !important;
    min-width:0 !important;
    max-width:none !important;
    height:50px !important;
    min-height:50px !important;
    padding:8px 8px !important;
    border-radius:16px !important;
    font-size:15px !important;
    line-height:1.1 !important;
    white-space:nowrap !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    text-align:center !important;
    box-sizing:border-box !important;
  }

  #ownGraphicBox .upload-file-name,
  #customerPhotoUploadBox .upload-file-name{
    width:100% !important;
    min-width:0 !important;
    max-width:none !important;
    height:50px !important;
    min-height:50px !important;
    padding:0 2px !important;
    display:flex !important;
    align-items:center !important;
    justify-content:flex-start !important;
    text-align:left !important;
    font-size:13px !important;
    line-height:1.1 !important;
    color:#4b5563 !important;
    white-space:nowrap !important;
    overflow:visible !important;
    text-overflow:clip !important;
    box-sizing:border-box !important;
  }

  #ownGraphicBox .draft-actions,
  #customerPhotoUploadBox .draft-actions{
    flex:0 0 auto !important;
    width:100% !important;
    display:grid !important;
    grid-template-columns:1fr 1fr !important;
    gap:8px !important;
    margin:0 !important;
    padding:0 !important;
  }
}

@media (max-width:380px), (max-height:700px){
  #ownGraphicBox .draft-window,
  #customerPhotoUploadBox .draft-window{
    padding:12px 12px 14px 12px !important;
    border-radius:22px !important;
  }

  #ownGraphicBox .upload-info-bg,
  #customerPhotoUploadBox .upload-info-bg,
  #ownGraphicBox .upload-info-image,
  #customerPhotoUploadBox .upload-info-image{
    height:clamp(235px, 70vw, 305px) !important;
    max-height:47dvh !important;
    margin-bottom:10px !important;
  }

  #ownGraphicBox .draft-window h2,
  #customerPhotoUploadBox .draft-window h2{
    font-size:17px !important;
    margin-bottom:10px !important;
  }

  #ownGraphicBox .upload-file-button,
  #customerPhotoUploadBox .upload-file-button,
  #ownGraphicBox .draft-actions button,
  #customerPhotoUploadBox .draft-actions button,
  #ownGraphicCancel,
  #ownGraphicUse,
  #customerPhotoCancel,
  #customerPhotoUse{
    height:46px !important;
    min-height:46px !important;
    font-size:14px !important;
    border-radius:14px !important;
  }

  #ownGraphicBox .upload-file-name,
  #customerPhotoUploadBox .upload-file-name{
    height:46px !important;
    min-height:46px !important;
    font-size:12px !important;
  }
}


/* DELTADESIGN24: Beispieltext in kleiner und großer Texteingabe immer neutral anzeigen */
#textValue::placeholder,
#textValueLarge::placeholder{
  font-family: Arial, Helvetica, sans-serif !important;
  font-style: normal !important;
  font-weight: 400 !important;
  color: rgba(17, 24, 39, 0.45) !important;
  -webkit-text-fill-color: rgba(17, 24, 39, 0.45) !important;
  opacity: 1 !important;
}
#textValue::-webkit-input-placeholder,
#textValueLarge::-webkit-input-placeholder{
  font-family: Arial, Helvetica, sans-serif !important;
  font-style: normal !important;
  font-weight: 400 !important;
  color: rgba(17, 24, 39, 0.45) !important;
  -webkit-text-fill-color: rgba(17, 24, 39, 0.45) !important;
  opacity: 1 !important;
}
#textValue::-moz-placeholder,
#textValueLarge::-moz-placeholder{
  font-family: Arial, Helvetica, sans-serif !important;
  font-style: normal !important;
  font-weight: 400 !important;
  color: rgba(17, 24, 39, 0.45) !important;
  opacity: 1 !important;
}


/* DELTADESIGN24: Großes Textfenster - Bogen-Wert immer einzeilig halten */
#textEditorDialog .text-editor-curve-headline{
  flex-wrap:nowrap !important;
  align-items:center !important;
}
#textEditorDialog .text-editor-curve-headline span{
  white-space:nowrap !important;
}
#textEditorDialog .text-editor-curve-headline span:first-child{
  flex:1 1 auto !important;
  min-width:0 !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
}
#textEditorDialog .text-editor-curve-headline span:last-child{
  flex:0 0 82px !important;
  min-width:82px !important;
  width:82px !important;
  text-align:right !important;
}


/* =======================================================
   DELTADESIGN24 Tablet-Erweiterung 2026-06-25
   Nur Tablet-Bereich: 761px bis 1100px.
   Smartphone-Regeln bis 760px und PC-Regeln ab 1101px bleiben unverändert.
======================================================= */

@media (min-width:761px) and (max-width:1100px){
  html, body{
    width:100%;
    overflow-x:hidden;
    touch-action:manipulation;
  }

  .configurator-wrapper{
    max-width:1100px !important;
    margin:0 auto !important;
    padding:12px !important;
    gap:12px !important;
    align-items:start !important;
  }

  .panel,
  .canvas-card{
    border-radius:16px !important;
    padding:12px !important;
    margin-bottom:12px !important;
  }

  input,
  select,
  textarea,
  button{
    min-height:46px;
    font-size:16px;
  }

  .canvas-card{
    position:relative !important;
  }

  .canvas-stage-wrap{
    margin-left:auto !important;
    margin-right:auto !important;
  }

  .graphic-grid{
    grid-template-columns:repeat(4, minmax(0, 1fr)) !important;
    max-height:330px !important;
    overflow:auto !important;
  }

  .graphic-btn{
    min-height:70px !important;
  }

  .text-align-buttons,
  .compact-action-grid,
  .bottom-actions{
    gap:10px !important;
  }

  .reset-view-btn{
    min-height:42px !important;
    padding:9px 14px !important;
  }

  aside.tools,
  aside.tools-right{
    height:auto !important;
    min-height:0 !important;
    max-height:none !important;
    display:block !important;
  }

  #textPanel{
    height:auto !important;
    min-height:0 !important;
    max-height:none !important;
    display:block !important;
    flex:none !important;
  }

  #textValue,
  textarea#textValue,
  #textPanel textarea{
    height:96px !important;
    min-height:96px !important;
    max-height:120px !important;
    resize:vertical !important;
    flex:none !important;
  }

  #fontFamilyList{
    max-height:220px !important;
    height:auto !important;
  }

  .tools-right{
    top:auto !important;
    bottom:auto !important;
  }

  .photo-panel-compact,
  #photoPanel{
    margin-top:0 !important;
    margin-bottom:12px !important;
    padding:10px !important;
  }

  .photo-panel-compact .upload-box,
  #photoPanel .upload-box{
    min-height:78px !important;
    padding:12px 10px !important;
  }
}

/* Tablet Hochformat / schmale Tablets: großzügige Touch-Ansicht untereinander */
@media (min-width:761px) and (max-width:900px){
  .configurator-wrapper{
    display:flex !important;
    flex-direction:column !important;
  }

  .preview{ order:1 !important; width:100% !important; }
  .tools{ order:2 !important; width:100% !important; }
  .tools-right{ order:3 !important; width:100% !important; }
}

/* Tablet Querformat / breite Tablets: Vorschau links, Bedienung rechts */
@media (min-width:901px) and (max-width:1100px){
  .configurator-wrapper{
    display:grid !important;
    grid-template-columns:minmax(0, 1fr) 360px !important;
    grid-template-areas:
      "preview tools"
      "preview toolsright" !important;
  }

  .preview{ grid-area:preview !important; min-width:0 !important; }
  .tools{ grid-area:tools !important; min-width:0 !important; }
  .tools-right{ grid-area:toolsright !important; min-width:0 !important; }

  .canvas-card{
    position:sticky !important;
    top:10px !important;
  }

  .graphic-grid{
    max-height:250px !important;
  }
}

/* Großer Texteditor auf Tablet fingerfreundlich statt Maus-Fenster */
@media (min-width:761px) and (max-width:1100px){
  .text-editor-modal{
    align-items:center !important;
    justify-content:center !important;
    padding:12px !important;
  }

  .text-editor-dialog{
    width:calc(100vw - 24px) !important;
    min-width:0 !important;
    max-width:980px !important;
    height:calc(100vh - 24px) !important;
    min-height:0 !important;
    max-height:none !important;
    resize:none !important;
    overflow:auto !important;
    left:auto !important;
    top:auto !important;
    transform:none !important;
  }

  .text-editor-title{
    cursor:default !important;
  }

  .text-editor-content{
    display:flex !important;
    flex-direction:column !important;
    gap:12px !important;
    height:auto !important;
  }

  #textValueLarge{
    height:220px !important;
    min-height:180px !important;
  }

  .text-editor-fonts{
    width:100% !important;
    max-width:none !important;
  }

  .text-editor-font-list{
    max-height:190px !important;
  }

  .text-editor-resize-hint,
  .text-editor-resize-label,
  .text-editor-resize-handle{
    display:none !important;
  }
}

/* =======================================================
   DELTADESIGN24 Tablet-Korrektur 2
   Aktiv nur mit body.tablet-mode = echte Touch-Tablets / DevTools Tablet.
   PC mit Maus bleibt unverändert, Smartphone <=760px bleibt unverändert.
======================================================= */

@media (min-width:761px) and (max-width:1366px){
  body.tablet-mode{
    overflow-x:hidden !important;
    overflow-y:auto !important;
    -webkit-overflow-scrolling:touch !important;
  }

  body.tablet-mode .configurator-wrapper{
    width:100% !important;
    max-width:none !important;
    margin:0 auto !important;
    padding:10px !important;
    gap:12px !important;
    align-items:start !important;
  }

  body.tablet-mode .panel,
  body.tablet-mode .canvas-card{
    border-radius:14px !important;
    padding:10px !important;
    margin-bottom:10px !important;
  }

  body.tablet-mode .canvas-card{
    padding:0 !important;
    overflow:hidden !important;
  }

  body.tablet-mode .canvas-stage-wrap{
    touch-action:none !important;
    margin-left:auto !important;
    margin-right:auto !important;
  }

  body.tablet-mode aside.tools,
  body.tablet-mode aside.tools-right{
    width:100% !important;
    height:auto !important;
    min-height:0 !important;
    max-height:none !important;
    display:block !important;
    overflow:visible !important;
  }

  body.tablet-mode #textPanel{
    height:auto !important;
    min-height:0 !important;
    max-height:none !important;
    flex:none !important;
  }

  body.tablet-mode #textValue,
  body.tablet-mode textarea#textValue,
  body.tablet-mode #textPanel textarea{
    height:90px !important;
    min-height:90px !important;
    max-height:115px !important;
    resize:vertical !important;
    flex:none !important;
  }

  body.tablet-mode input,
  body.tablet-mode select,
  body.tablet-mode textarea,
  body.tablet-mode button{
    min-height:44px !important;
    font-size:15px !important;
  }

  body.tablet-mode .graphic-grid{
    grid-template-columns:repeat(3, minmax(0, 1fr)) !important;
    max-height:210px !important;
    overflow-y:auto !important;
  }

  body.tablet-mode .graphic-btn{
    min-height:66px !important;
  }

  body.tablet-mode #fontFamilyList{
    max-height:170px !important;
    height:auto !important;
    overflow-y:auto !important;
  }

  body.tablet-mode .photo-panel-compact,
  body.tablet-mode #photoPanel{
    margin-top:0 !important;
    margin-bottom:10px !important;
    padding:10px !important;
  }

  body.tablet-mode .photo-panel-compact .upload-box,
  body.tablet-mode #photoPanel .upload-box{
    min-height:72px !important;
    padding:10px !important;
  }
}

/* Tablet Hochformat: Canvas groß oben, Bedienung darunter. Keine abgeschnittenen Spalten. */
@media (min-width:761px) and (max-width:1366px) and (orientation:portrait){
  body.tablet-mode .configurator-wrapper{
    display:flex !important;
    flex-direction:column !important;
  }

  body.tablet-mode .preview{
    order:1 !important;
    width:100% !important;
  }

  body.tablet-mode .tools{
    order:2 !important;
    width:100% !important;
  }

  body.tablet-mode .tools-right{
    order:3 !important;
    width:100% !important;
  }

  body.tablet-mode .preview .canvas-card{
    max-width:calc(100vw - 20px) !important;
    margin-left:auto !important;
    margin-right:auto !important;
  }
}

/* Tablet Querformat: Canvas bekommt Priorität, Bedienung komplett rechts. */
@media (min-width:901px) and (max-width:1366px) and (orientation:landscape){
  body.tablet-mode .configurator-wrapper{
    display:grid !important;
    grid-template-columns:minmax(0, 1fr) minmax(300px, 340px) !important;
    grid-template-areas:
      "preview tools"
      "preview toolsright" !important;
    grid-auto-rows:auto !important;
  }

  body.tablet-mode .preview{
    grid-area:preview !important;
    min-width:0 !important;
    width:100% !important;
    order:initial !important;
  }

  body.tablet-mode .tools{
    grid-area:tools !important;
    min-width:0 !important;
    width:100% !important;
    order:initial !important;
  }

  body.tablet-mode .tools-right{
    grid-area:toolsright !important;
    min-width:0 !important;
    width:100% !important;
    order:initial !important;
  }

  body.tablet-mode .canvas-card{
    position:sticky !important;
    top:10px !important;
  }
}

/* Sehr niedrige Tablets / Nest-Hub-Größen: etwas kompakter, damit nichts hart abgeschnitten wirkt. */
@media (min-width:901px) and (max-width:1366px) and (orientation:landscape) and (max-height:700px){
  body.tablet-mode .configurator-wrapper{
    grid-template-columns:minmax(0, 1fr) minmax(295px, 320px) !important;
    gap:10px !important;
    padding:8px !important;
  }

  body.tablet-mode .panel{
    padding:9px !important;
    margin-bottom:9px !important;
  }

  body.tablet-mode .panel h2{
    font-size:20px !important;
    margin-bottom:8px !important;
  }

  body.tablet-mode #textValue,
  body.tablet-mode textarea#textValue,
  body.tablet-mode #textPanel textarea{
    height:80px !important;
    min-height:80px !important;
  }

  body.tablet-mode .graphic-grid{
    max-height:170px !important;
  }

  body.tablet-mode #fontFamilyList{
    max-height:130px !important;
  }
}

/* =======================================================
   DELTADESIGN24 Tablet-Korrektur 3
   Tablet: Canvas/Vorschau bleibt beim Scrollen oben sichtbar.
   Gilt nur fuer body.tablet-mode (Touch-Tablet/DevTools Tablet),
   Smartphone <=760px und PC ohne Touch bleiben unveraendert.
======================================================= */
@media (min-width:761px) and (max-width:1366px){
  body.tablet-mode .preview{
    position:sticky !important;
    top:0 !important;
    z-index:9999 !important;
    align-self:start !important;
    background:#f3f4f6 !important;
    padding-top:6px !important;
    padding-bottom:8px !important;
  }

  body.tablet-mode .preview .canvas-card{
    margin-bottom:0 !important;
    position:relative !important;
  }

  body.tablet-mode .tools,
  body.tablet-mode .tools-right{
    position:relative !important;
    z-index:1 !important;
  }

  body.tablet-mode .canvas-stage-wrap,
  body.tablet-mode .canvas-container,
  body.tablet-mode .upper-canvas,
  body.tablet-mode .lower-canvas{
    touch-action:none !important;
    pointer-events:auto !important;
  }
}

@media (min-width:761px) and (max-width:1366px) and (orientation:landscape){
  body.tablet-mode .preview{
    top:8px !important;
  }
}

/* =======================================================
   DELTADESIGN24 Tablet-Korrektur 4
   Fix: position:sticky war im Tablet-Grid nicht zuverlässig genug,
   weil die komplette Seite/der Grid-Container gescrollt wird. Deshalb
   bleibt die Vorschau auf Tablets jetzt als eigener fixer Bereich sichtbar.
   Nur aktiv bei body.tablet-mode.tablet-fixed-preview.
======================================================= */
@media (min-width:761px) and (max-width:1366px){
  body.tablet-mode.tablet-fixed-preview{
    overflow-y:auto !important;
    overflow-x:hidden !important;
    --dd24-tablet-right-width:340px;
    --dd24-tablet-gap:12px;
  }

  body.tablet-mode.tablet-fixed-preview .preview{
    position:fixed !important;
    z-index:9999 !important;
    background:#f3f4f6 !important;
    margin:0 !important;
  }

  body.tablet-mode.tablet-fixed-preview .preview .canvas-card{
    position:relative !important;
    margin:0 !important;
    box-shadow:0 8px 22px rgba(0,0,0,.10) !important;
  }
}

/* Tablet Hochformat: Canvas oben fest, Bedienfelder darunter scrollen. */
@media (min-width:761px) and (max-width:1366px) and (orientation:portrait){
  body.tablet-mode.tablet-fixed-preview .configurator-wrapper{
    display:flex !important;
    flex-direction:column !important;
    padding-top:calc(var(--dd24-tablet-preview-height, 430px) + 14px) !important;
  }

  body.tablet-mode.tablet-fixed-preview .preview{
    top:0 !important;
    left:0 !important;
    right:0 !important;
    width:100vw !important;
    padding:8px 10px 10px 10px !important;
  }

  body.tablet-mode.tablet-fixed-preview .preview .canvas-card{
    width:fit-content !important;
    max-width:calc(100vw - 20px) !important;
    margin-left:auto !important;
    margin-right:auto !important;
  }

  body.tablet-mode.tablet-fixed-preview .tools,
  body.tablet-mode.tablet-fixed-preview .tools-right{
    width:100% !important;
    margin-left:0 !important;
    position:relative !important;
    z-index:1 !important;
  }
}

/* Tablet Querformat: Canvas links fest, rechte Bedienung scrollt. */
@media (min-width:761px) and (max-width:1366px) and (orientation:landscape){
  body.tablet-mode.tablet-fixed-preview .configurator-wrapper{
    display:block !important;
    width:100% !important;
    max-width:none !important;
    min-height:100vh !important;
    padding:10px 10px 10px 10px !important;
  }

  body.tablet-mode.tablet-fixed-preview .preview{
    top:10px !important;
    left:10px !important;
    width:calc(100vw - var(--dd24-tablet-right-width) - 34px) !important;
    max-width:calc(100vw - var(--dd24-tablet-right-width) - 34px) !important;
    height:calc(100vh - 20px) !important;
    padding:0 !important;
    display:flex !important;
    align-items:flex-start !important;
    justify-content:center !important;
  }

  body.tablet-mode.tablet-fixed-preview .preview .canvas-card{
    max-width:100% !important;
    max-height:calc(100vh - 20px) !important;
    overflow:hidden !important;
  }

  body.tablet-mode.tablet-fixed-preview .tools,
  body.tablet-mode.tablet-fixed-preview .tools-right{
    width:var(--dd24-tablet-right-width) !important;
    max-width:var(--dd24-tablet-right-width) !important;
    margin-left:calc(100vw - var(--dd24-tablet-right-width) - 20px) !important;
    position:relative !important;
    z-index:1 !important;
  }
}

/* Sehr schmale Querformate: rechte Spalte minimal kleiner, damit Canvas nicht zu klein wird. */
@media (min-width:761px) and (max-width:1050px) and (orientation:landscape){
  body.tablet-mode.tablet-fixed-preview{
    --dd24-tablet-right-width:320px;
  }
}

/* DELTADESIGN24 FIX 2026-06-25:
   ZOOM-Button nur in der Tablet-Ansicht ausblenden.
   PC und Smartphone bleiben unveraendert. */
@media (min-width:761px) and (max-width:1366px){
  body.tablet-mode #textPanel #openTextEditorBtn,
  body.tablet-mode #textPanel .text-zoom-btn{
    display:none !important;
    visibility:hidden !important;
    pointer-events:none !important;
  }

  body.tablet-mode #textPanel .text-action-row #addTextBtn,
  body.tablet-mode #textPanel .text-action-row .text-add-small{
    flex:1 1 100% !important;
    width:100% !important;
    max-width:none !important;
  }
}

/* DELTADESIGN24 FIX 2026-06-25:
   iPad-Pro/Tablet: ZOOM-Button nicht mehr an eine exakte Breiten-Media-Query binden.
   Sobald die Tablet-Ansicht per body.tablet-mode aktiv ist, wird der ZOOM-Button ausgeblendet.
   PC und Smartphone bleiben unveraendert. */
body.tablet-mode #textPanel #openTextEditorBtn,
body.tablet-mode #textPanel .text-zoom-btn{
  display:none !important;
  visibility:hidden !important;
  pointer-events:none !important;
}

body.tablet-mode #textPanel .text-action-row #addTextBtn,
body.tablet-mode #textPanel .text-action-row .text-add-small{
  flex:1 1 100% !important;
  width:100% !important;
  max-width:none !important;
}

/* DELTADESIGN24: Canvas-Ladebalken Produktkonfigurator */
#canvasStageWrap{
  position:relative;
}

.configurator-loading-screen{
  position:absolute;
  inset:0;
  z-index:50;
  display:flex;
  align-items:center;
  justify-content:center;
  background:rgba(255,255,255,.88);
  border-radius:14px;
  pointer-events:auto;
}

.configurator-loading-screen.is-hidden{
  display:none !important;
  opacity:0 !important;
  visibility:hidden !important;
  pointer-events:none !important;
}

.configurator-loading-box{
  width:min(360px, calc(100% - 36px));
  padding:22px 20px;
  border-radius:16px;
  background:#ffffff;
  box-shadow:0 14px 36px rgba(15,23,42,.18);
  text-align:center;
}

.configurator-loading-text{
  margin-bottom:14px;
  font-size:17px;
  font-weight:700;
  color:#111827;
}

.configurator-loading-bar{
  width:100%;
  height:13px;
  overflow:hidden;
  border-radius:999px;
  background:#e5e7eb;
}

.configurator-loading-bar-fill{
  width:45%;
  height:100%;
  border-radius:999px;
  background:#2563eb;
  animation:dd24ConfiguratorLoadingBar 1.05s ease-in-out infinite;
}

@keyframes dd24ConfiguratorLoadingBar{
  0%{ transform:translateX(-110%); }
  50%{ transform:translateX(75%); }
  100%{ transform:translateX(240%); }
}

/* DELTADESIGN24: Mobile/Tablet Canvas darf die Produktkoordinaten nicht verfälschen */
@media (max-width:760px){
  #canvasStageWrap,
  .canvas-stage-wrap{
    aspect-ratio:auto !important;
  }
}

@media (min-width:761px) and (max-width:1366px){
  body.tablet-mode #canvasStageWrap,
  body.tablet-mode .canvas-stage-wrap{
    aspect-ratio:auto !important;
  }
}

/* DELTADESIGN24: Ebenen-Buttons pro Gravurseite ausblenden */
#bringFrontBtn[hidden],
#sendBackBtn[hidden]{
  display:none !important;
}

/* DELTADESIGN24: Ebenen-Buttons auch auf Tablet/Smartphone sicher ausblenden */
#bringFrontBtn[hidden],
#sendBackBtn[hidden]{
  display:none !important;
  visibility:hidden !important;
}
