#orderStickerDesigner { color:var(--ui-ink,#162536); background:var(--ui-card,#fff); border:1px solid var(--ui-line,#cbd5e1); border-radius:1rem; padding:1rem; width:min(36rem,calc(100% - 2rem)); max-height:85vh; overflow:auto; }
#orderStickerDesigner::backdrop { background:#071423aa; }
#orderStickerDesigner h2 { margin-block:0 .7rem; }
#orderStickerDesigner form { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.6rem; }
#orderStickerDesigner label:not([hidden]) { display:grid; gap:.25rem; }
#orderStickerDesigner input,#orderStickerDesigner select,#orderStickerDesigner button { font:inherit; min-width:0; }
#orderStickerDesigner input:not([type=checkbox]),#orderStickerDesigner select { width:100%; box-sizing:border-box; min-height:2.4rem; }
#orderStickerDesigner button { min-height:44px; cursor:pointer; }
#orderStickerDesigner [role=status] { grid-column:1/-1; margin:0; }
#orderStickerDesigner form small { color:var(--ui-muted,#475569); font-weight:400; }
#orderStickerDesigner .sticker-colors { grid-column:1/-1; min-width:0; display:flex; align-items:center; flex-wrap:wrap; gap:.55rem; border:1px solid var(--ui-line,#cbd5e1); padding:.55rem; border-radius:.7rem; margin:0; }
#orderStickerDesigner [data-swatches] { display:flex; flex-wrap:wrap; gap:.3rem; }
#orderStickerDesigner [data-swatches] button { width:44px; height:44px; border-radius:50%; border:2px solid var(--ui-card,#fff); background:var(--swatch); box-shadow:0 0 0 1px var(--ui-line,#cbd5e1); }
#orderStickerDesigner [data-swatches] button[aria-pressed=true] { box-shadow:0 0 0 2px var(--ui-link,#0f766e); }
#orderStickerDesigner label.sticker-custom-color { display:flex; align-items:center; gap:.45rem; margin:0; }
#orderStickerDesigner input[type=color] { width:44px; height:44px; padding:3px; border:1px solid var(--ui-line,#cbd5e1); border-radius:.55rem; cursor:pointer; }
#orderStickerDesigner label.sticker-toggle:not([hidden]) { display:flex; align-items:center; gap:.65rem; min-height:44px; margin:0; padding:.3rem 0; }
#orderStickerDesigner label.sticker-toggle input { appearance:none; position:relative; padding:0; margin:0; flex:0 0 2.55rem; width:2.55rem; height:1.45rem; min-height:0; border:1px solid var(--ui-muted,#64748b); border-radius:999px; background:var(--ui-soft,#e2e8f0); cursor:pointer; }
#orderStickerDesigner label.sticker-toggle input::before { content:''; position:absolute; inset-block-start:3px; inset-inline-start:3px; width:.95rem; height:.95rem; border-radius:50%; background:var(--ui-muted,#475569); }
#orderStickerDesigner label.sticker-toggle input:checked { background:#087065; border-color:#087065; }
#orderStickerDesigner label.sticker-toggle input:checked::before { inset-inline-start:calc(100% - .95rem - 3px); background:#fff; }
#orderStickerDesigner .sticker-error { color:var(--ui-bad,#b91c1c); }
#orderStickerDesigner .sticker-actions { grid-column:1/-1; display:grid; grid-template-columns:1fr auto; gap:.5rem; }
#orderStickerDesigner .sticker-actions button { min-height:44px; padding:.55rem .8rem; border:1px solid var(--ui-line,#cbd5e1); border-radius:.7rem; background:var(--ui-soft,#f1f5f9); color:var(--ui-ink,#162536); font-weight:700; }
#orderStickerDesigner .sticker-actions button[type=submit] { background:#087065; border-color:#087065; color:#fff; }
#orderStickerDesigner .sticker-actions button[type=submit]:not(:disabled):hover { background:#065a52; }
#orderStickerDesigner .sticker-actions button:disabled { background:var(--ui-soft,#f1f5f9); border-color:var(--ui-line,#cbd5e1); color:var(--ui-muted,#475569); cursor:not-allowed; }
#orderStickerDesigner :is(button,input,select):focus-visible { outline:2px solid var(--ui-link,#0f766e); outline-offset:2px; }
.sticker-preview { max-width:16rem; margin:1rem auto 0; }
.sticker-art { box-sizing:border-box; background:white; color:#101820; border:.15em solid var(--sticker-accent); display:flex; flex-direction:column; align-items:center; justify-content:center; gap:.23em; text-align:center; padding:.65em; line-height:1.25; overflow-wrap:anywhere; }
.sticker-art.sticker-round { border-radius:50%; aspect-ratio:1; padding:13%; }
.sticker-art strong { color:var(--sticker-accent); font-size:1.3em; }
.sticker-art p { margin:0; font-size:.7em; }
.sticker-art img { width:2em; height:2em; object-fit:contain; }
.sticker-art span,.sticker-art b { font-size:.7em; }
.sticker-code { width:min(72%,8em); }
.sticker-code svg { display:block; width:100%; height:auto; }
#orderStickerPrint { display:none; }
@media (max-width:430px) {
  #orderStickerDesigner form { grid-template-columns:minmax(0,1fr); }
}
@media print {
  body.printing-stickers { margin:0 !important; padding:0 !important; background:white !important; }
  body.printing-stickers > :not(#orderStickerPrint) { display:none !important; }
  body.printing-stickers #orderStickerPrint { display:block !important; font-family:system-ui,sans-serif; }
  #orderStickerPrint .sticker-page { position:relative; box-sizing:border-box; width:calc(var(--sticker-width) + var(--sticker-bleed)*2); height:calc(var(--sticker-height) + var(--sticker-bleed)*2); padding:var(--sticker-bleed); break-inside:avoid; margin:0; direction:rtl; }
  #orderStickerPrint .sticker-page:not(:last-of-type) { break-after:page; }
  #orderStickerPrint .sticker-art { width:100%; height:100%; font-size:calc(var(--sticker-width)*.075); }
  #orderStickerPrint .sticker-art strong { color:#101820; }
  #orderStickerPrint .sticker-round { padding:12%; font-size:calc(var(--sticker-width)*.085); }
  #orderStickerPrint .sticker-code { width:64%; max-width:120mm; }
  #orderStickerPrint .sticker-art img { width:1.5em; height:1.5em; }
  .sticker-bleed .sticker-page::before,.sticker-bleed .sticker-page::after {
    content:''; position:absolute; inset:0; pointer-events:none; print-color-adjust:exact; -webkit-print-color-adjust:exact;
    background:
      linear-gradient(#000,#000) 0 3mm/2mm .15mm no-repeat,
      linear-gradient(#000,#000) 100% 3mm/2mm .15mm no-repeat,
      linear-gradient(#000,#000) 3mm 0/.15mm 2mm no-repeat,
      linear-gradient(#000,#000) calc(100% - 3mm) 0/.15mm 2mm no-repeat;
  }
  .sticker-bleed .sticker-page::after { transform:rotate(180deg); }
}
