/* Dedicated raster editor, isolated from the product designer layout. */
body.kskd-ie-open{overflow:hidden!important}
.kskd-ie-overlay{position:fixed;inset:0;z-index:2147483600;background:rgba(15,23,42,.78);display:flex;align-items:center;justify-content:center;padding:14px;box-sizing:border-box;font:14px/1.45 -apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;color:#24364b}
.kskd-ie-overlay *{box-sizing:border-box}
.kskd-ie-window{display:flex;flex-direction:column;width:min(1440px,100%);height:min(95vh,960px);min-height:420px;background:#fff;border-radius:16px;overflow:hidden;box-shadow:0 12px 40px #0d152b55}
.kskd-ie-header,.kskd-ie-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 18px;background:#fff;flex-shrink:0}
.kskd-ie-header{border-bottom:1px solid #e4ebf4}.kskd-ie-header strong{font-size:16px}
.kskd-ie-header-actions,.kskd-ie-footer-right,.kskd-ie-inline{display:flex;align-items:center;gap:7px;flex-wrap:wrap}
.kskd-ie-footer{border-top:1px solid #e4ebf4}
.kskd-ie-btn{border:1px solid #cad6e7;border-radius:8px;padding:9px 12px;background:#fff;color:#224c7c;font:600 13px/1.3 inherit;font-size:13px;cursor:pointer;min-height:36px}
.kskd-ie-btn:hover{background:#eaf4fe}.kskd-ie-btn:disabled{opacity:.5;cursor:wait}
.kskd-ie-primary{border-color:#186bb9;background:#196dc1;color:white}.kskd-ie-primary:hover{background:#0c559b}
.kskd-ie-danger{border-color:#f0c2c7;color:#bd3142}
.kskd-ie-layout{display:grid;grid-template-columns:118px minmax(0,1fr) 265px;min-height:0;flex:1;background:#eef3f9}
.kskd-ie-tools{display:flex;flex-direction:column;gap:7px;padding:12px 8px;overflow:auto;background:#fff;border-right:1px solid #e0e8f2}
.kskd-ie-tools .kskd-ie-tool{width:100%;text-align:center;padding:12px 7px;white-space:normal}
.kskd-ie-tools .is-active{background:#dcedff;border-color:#5c9ddf;color:#154f93}
.kskd-ie-workspace{display:flex;flex-direction:column;justify-content:center;min-width:0;min-height:0;padding:16px;gap:12px;overflow:auto}
.kskd-ie-stage-tone{min-height:0;flex:1;display:flex;align-items:center;justify-content:center;overflow:auto}
.kskd-ie-stage{position:relative;display:block;max-width:100%;max-height:100%;box-shadow:0 3px 22px #1829472b;background-color:#fff;background-image:linear-gradient(45deg,#dfE4eb 25%,transparent 25%),linear-gradient(-45deg,#dfe4eb 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#dfe4eb 75%),linear-gradient(-45deg,transparent 75%,#dfe4eb 75%);background-size:24px 24px;background-position:0 0,0 12px,12px -12px,-12px 0}
.kskd-ie-stage[data-shade="dark"]{background:#16191f}.kskd-ie-stage[data-shade="light"]{background:#fff;background-image:none}
.kskd-ie-canvas{display:block;max-width:100%;max-height:calc(95vh - 185px);width:auto;height:auto;touch-action:none;user-select:none}
.kskd-ie-mask{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
.kskd-ie-status{display:flex;justify-content:space-between;gap:12px;font-size:12px;color:#52687f}.kskd-ie-status .is-error{color:#be2c3f}
.kskd-ie-settings{padding:16px;overflow:auto;background:#fff;border-left:1px solid #e0e8f2}
.kskd-ie-section{display:flex;flex-direction:column;gap:11px}.kskd-ie-section[hidden]{display:none!important}
.kskd-ie-section>strong{font-size:15px}.kskd-ie-field{display:flex;flex-direction:column;gap:6px;font-weight:600;font-size:12px}
.kskd-ie-field input[type=range]{width:100%;accent-color:#1c6cb9}.kskd-ie-field input[type=number],.kskd-ie-field select{padding:8px;border-radius:6px;border:1px solid #d3dfec;max-width:100%;font:inherit;background:white;color:#1b3046}
.kskd-ie-help{color:#587088;font-size:12px}.kskd-ie-crop-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.kskd-ie-footer .kskd-ie-field{max-width:155px}
@media(max-width:850px){
.kskd-ie-overlay{padding:0}.kskd-ie-window{border-radius:0;width:100%;height:100dvh;max-height:none;min-height:0}
.kskd-ie-header,.kskd-ie-footer{padding:9px 12px}.kskd-ie-header strong{font-size:14px}
.kskd-ie-layout{display:flex;flex-direction:column}.kskd-ie-tools{flex-direction:row;overflow:auto;white-space:nowrap;padding:7px;gap:5px;flex:0 0 auto;border-right:0;border-bottom:1px solid #e0e8f2}
.kskd-ie-tools .kskd-ie-tool{min-width:92px;padding:8px 6px}.kskd-ie-workspace{flex:1 1 auto;min-height:160px;padding:8px;gap:6px}
.kskd-ie-settings{flex:0 0 auto;max-height:27vh;padding:10px;border-left:0;border-top:1px solid #e0e8f2}
.kskd-ie-canvas{max-height:calc(57dvh - 155px)}.kskd-ie-footer-right{justify-content:flex-end}
.kskd-ie-footer .kskd-ie-field{display:none}.kskd-ie-footer .kskd-ie-btn{padding:7px 9px;font-size:12px}
}
@media(max-width:420px){.kskd-ie-header-actions .kskd-ie-btn:not(.kskd-ie-close){font-size:11px;padding:5px}.kskd-ie-header strong{font-size:12px}}
/* The advanced editor is additive; the original one-click background removal remains unchanged. */
.kskd-open-advanced-editor{display:block;width:100%;padding:10px 12px;border:1px solid #81b5eb;border-radius:8px;background:#edf6ff;color:#15559c;font-size:13px;font-weight:700;cursor:pointer;margin:10px 0}
.kskd-open-advanced-editor:hover{background:#dceeff}

/* Addon 1.0: manual selection, recoloring and painting controls. */
.kskd-ie-field input[type=color]{height:39px;width:74px;padding:2px;border-radius:7px;border:1px solid #cdd8e8;background:white;cursor:pointer}
.kskd-ie-inline .kskd-ie-primary{white-space:normal}
.kskd-ie-mask{user-select:none}
@media(max-width:850px){.kskd-ie-tools .kskd-ie-tool{min-width:95px}.kskd-ie-settings{max-height:32vh}}

/* Image Editor 1.1: local image-quality enhancement controls. */
.kskd-ie-target{color:#245e99;font-size:12px;font-weight:650}
.kskd-ie-target.is-error{color:#bd3142}
