/* Optional background editor for Maknoon product personalisation. */
.mk-bg-editor{position:fixed;inset:0;z-index:2147483200;background:rgba(18,15,10,.82);display:flex;align-items:center;justify-content:center;padding:14px}
.mk-bg-editor[hidden]{display:none!important}
html.mk-bg-open,html.mk-bg-open body{overflow:hidden!important}
.mk-bg-dialog{width:min(96vw,980px);max-height:96vh;overflow:auto;background:#fff;border-radius:20px;padding:16px;box-shadow:0 28px 90px rgba(0,0,0,.44);color:#2c241b}
.mk-bg-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:12px}
.mk-bg-head h3{margin:0 0 4px;font-size:20px}.mk-bg-head p{margin:0;color:#756b5f;font-size:12px;line-height:1.55}
.mk-bg-head>button{flex:0 0 auto;width:42px;height:42px;border:0;border-radius:999px;background:#f1eee8;font-size:22px;cursor:pointer}
.mk-bg-auto-row{display:grid;grid-template-columns:auto 1fr;gap:10px;align-items:center;margin-bottom:12px}
.mk-bg-auto-row>button{min-height:44px;border:0;border-radius:11px;padding:9px 13px;background:#7a5b2d;color:#fff;font:inherit;font-weight:900;cursor:pointer}
.mk-bg-auto-row label,.mk-bg-brush{display:grid;grid-template-columns:auto 1fr auto;gap:8px;align-items:center;font-size:12px;font-weight:800}
.mk-bg-auto-row input,.mk-bg-brush input{width:100%;accent-color:#b88b4a}
.mk-bg-canvas-wrap{display:flex;align-items:center;justify-content:center;min-height:260px;max-height:56vh;overflow:auto;border:1px solid #ded6c9;border-radius:14px;padding:8px;background-color:#eee;background-image:linear-gradient(45deg,#d8d8d8 25%,transparent 25%),linear-gradient(-45deg,#d8d8d8 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#d8d8d8 75%),linear-gradient(-45deg,transparent 75%,#d8d8d8 75%);background-size:24px 24px;background-position:0 0,0 12px,12px -12px,-12px 0}
#mk-bg-canvas{display:block;max-width:100%;max-height:52vh;width:auto;height:auto;touch-action:none;cursor:crosshair;background:transparent}
.mk-bg-manual{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:12px}
.mk-bg-manual fieldset{border:1px solid #ded6c9;border-radius:12px;padding:9px 11px;margin:0}.mk-bg-manual legend{font-size:12px;font-weight:900;padding:0 5px}
.mk-bg-manual fieldset label{display:inline-flex;align-items:center;gap:6px;margin-inline-end:14px;font-size:12px;font-weight:800}.mk-bg-manual input[type=radio]{accent-color:#b88b4a}
.mk-bg-history,.mk-bg-foot{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
.mk-bg-history button,.mk-bg-foot button,#mk-image-bg-edit,.mk-download-design{min-height:42px;border:1px solid #d8c28c;border-radius:10px;background:#fff;color:#3c3126;padding:8px 12px;font:inherit;font-size:12px;font-weight:900;cursor:pointer}
.mk-bg-history button:disabled,.mk-bg-foot button:disabled{opacity:.45;cursor:not-allowed}
.mk-bg-foot{justify-content:flex-end;border-top:1px solid #eee5d7;padding-top:12px}.mk-bg-foot .is-primary,.mk-download-design{background:#7a5b2d;color:#fff;border-color:#7a5b2d}
.mk-bg-status{min-height:18px;margin:9px 0 0;color:#2f7a52;font-size:12px;font-weight:800}.mk-bg-status.is-error{color:#b42318}
#mk-image-bg-edit{grid-column:1/-1;background:#fff8e8;border-style:dashed}
.mk-download-design{display:block;width:100%;margin-top:12px}
.mk-image-layer-card [data-image-edit]{background:#fff8e8;border-color:#d8c28c}
@media(max-width:620px){
 .mk-bg-editor{padding:7px}.mk-bg-dialog{padding:12px;border-radius:16px;max-height:98vh}
 .mk-bg-auto-row,.mk-bg-manual{grid-template-columns:1fr}
 .mk-bg-auto-row label,.mk-bg-brush{grid-template-columns:1fr auto}.mk-bg-auto-row label span,.mk-bg-brush span{grid-column:1/-1}
 .mk-bg-canvas-wrap{max-height:50vh;min-height:220px}#mk-bg-canvas{max-height:47vh}
 .mk-bg-foot{display:grid;grid-template-columns:1fr 1fr}.mk-bg-foot .is-primary{grid-column:1/-1}
}
.mk-image-layer-card .mk-layer-actions{grid-template-columns:repeat(2,minmax(0,1fr))}
