/* Scoped host UI; the editor itself owns its tools and project state. */
.scwn-editor-host{--scwn-accent:#2454d9;background:#fff;border:1px solid #ccd5e3;border-radius:14px;color:#20334f;overflow:hidden;padding:0;box-sizing:border-box;width:100%;margin:16px 0;scroll-margin-top:24px;box-shadow:0 6px 24px #20334f0d;font-family:inherit;text-align:left}
.scwn-editor-host>header{display:flex;gap:12px;align-items:center;padding:10px 14px;background:#f7f9fc;border-bottom:1px solid #dce3ed;flex-shrink:0}
.scwn-editor-heading{flex:1;min-width:0;display:grid;gap:2px}.scwn-editor-heading strong{font-size:16px;line-height:1.35}.scwn-editor-heading small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#53637a;font-size:12px}
.scwn-editor-badge{white-space:nowrap;font-size:11px;font-weight:600;padding:4px 8px;border-radius:20px;background:#e7edfc;color:#2346a5}.scwn-editor-host[data-state=error] .scwn-editor-badge{background:#fff0d1;color:#795100}
.scwn-editor-header-controls{display:flex;align-items:center;gap:6px;min-width:0}.scwn-editor-actions{display:flex;gap:6px;flex-wrap:wrap}.scwn-editor-host button{border:1px solid #bac9df;border-radius:8px;padding:8px 12px;background:#fff;color:#234c98;cursor:pointer;font-family:inherit;font-size:13px;font-weight:600;line-height:1.3;min-height:38px}.scwn-editor-host button:hover:not(:disabled){background:#edf2ff;border-color:var(--scwn-accent)}.scwn-editor-host button:focus-visible{outline:3px solid #2454d9;outline-offset:2px}.scwn-editor-host button:disabled{opacity:.55;cursor:default}
.scwn-editor-help{margin:0;padding:7px 14px;font-size:12px;line-height:1.5;color:#53637a;background:#fff;border-bottom:1px solid #e6ebf2;flex-shrink:0}
.scwn-editor-body{position:relative;min-height:460px;height:76dvh;isolation:isolate;background:#f4f6fa}.scwn-editor-host iframe{display:block;width:100%;height:100%;border:0;background:#fff}
.scwn-editor-status{position:absolute;inset:0;z-index:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:18px;text-align:center;padding:32px;margin:0;background:#f4f6faf5;color:#253955;font-size:15px;line-height:1.6}.scwn-editor-host[data-state=loading] .scwn-editor-status::before,.scwn-editor-host[data-state=returning] .scwn-editor-status::before{content:'';width:30px;height:30px;border:3px solid #d5dff6;border-top-color:var(--scwn-accent);border-radius:50%;animation:scwn-editor-spin 1s linear infinite}
.scwn-editor-host[hidden],.scwn-editor-host [hidden]{display:none!important}
dialog.scwn-editor-host{width:98vw;height:96dvh;max-width:none;max-height:none;margin:auto;box-shadow:0 15px 80px #0005}
dialog.scwn-editor-host[open],.scwn-editor-expanded{display:flex;flex-direction:column}
dialog.scwn-editor-host::backdrop,.scwn-editor-expanded::backdrop{background:#091729bd}
.scwn-editor-expanded{position:fixed!important;inset:2dvh 1vw;z-index:2147483000;width:98vw;height:96dvh;margin:0;max-width:none;max-height:none;box-shadow:0 0 0 100vmax #091729b8}
dialog.scwn-editor-host .scwn-editor-body,.scwn-editor-expanded .scwn-editor-body{flex:1;min-height:0;height:auto}
.scwn-editor-narrow>header{flex-wrap:wrap;gap:8px}.scwn-editor-narrow .scwn-editor-header-controls{width:100%;min-width:0}.scwn-editor-narrow .scwn-editor-header-controls>.scwn-editor-actions{width:auto;flex:1;flex-wrap:nowrap;min-width:0}.scwn-editor-narrow .scwn-editor-header-controls>.scwn-editor-history{flex:0 0 auto}.scwn-editor-narrow .scwn-editor-history button{flex:0 0 36px;width:36px}.scwn-editor-narrow .scwn-editor-header-controls button{white-space:nowrap}.scwn-editor-narrow .scwn-editor-actions button{flex:1;min-height:42px}
.scwn-editor-narrow[data-state=error] .scwn-editor-actions button:last-child{flex-basis:100%}
section.scwn-editor-host[data-state=error]:not(.scwn-editor-expanded) .scwn-editor-body{height:240px;min-height:240px}
@keyframes scwn-editor-spin{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.scwn-editor-status::before{animation:none!important}}
@media(max-width:600px){.scwn-editor-host{border-radius:10px}.scwn-editor-host>header{padding:8px}.scwn-editor-body{min-height:380px;height:75dvh}.scwn-editor-help{padding:7px 10px}dialog.scwn-editor-host,.scwn-editor-expanded{width:100vw;height:100dvh;inset:0;border:0;border-radius:0}.scwn-editor-status{padding:20px;font-size:14px}}

.scwn-purchase-panel{display:flex;align-items:center;flex-wrap:wrap;gap:12px;padding:16px;border-top:1px solid #d5deea;background:#fff}.scwn-purchase-panel strong{font-size:1.2rem}.scwn-purchase-panel small{flex-basis:100%;color:#51647a}.scwn-purchase-panel button{cursor:pointer}.scwn-discount-dialog{max-width:90vw;max-height:85vh;overflow:auto;border:1px solid #d5deea;border-radius:14px;padding:24px}.scwn-discount-dialog::backdrop{background:#10243c99}.scwn-discount-dialog td,.scwn-discount-dialog th{padding:10px;border-bottom:1px solid #d5deea}

.scwn-launch-suppressed,.scw-product-entry[hidden],.scw-product-entry [data-scw-launch][hidden],.scwn-editor-host [hidden]{display:none!important}

/* One compact host bar; the corner control remains available in clean mode. */
.scwn-editor-host{position:relative}
.scwn-editor-host>header{padding:6px 46px 6px 12px;gap:8px;min-height:44px}
.scwn-editor-heading{display:flex;align-items:baseline;gap:8px;flex-wrap:wrap}
.scwn-editor-heading strong{font-size:14px}.scwn-editor-heading small{font-size:12px}
.scwn-editor-host .scwn-editor-actions button{min-height:32px;padding:5px 9px;font-size:12px}
.scwn-editor-host>.scwn-header-toggle{position:absolute;right:6px;top:6px;z-index:5;width:32px;min-height:32px;padding:0;border-radius:8px;background:#fff;box-shadow:0 1px 4px #152d5420;font-size:18px}
.scwn-editor-host.scwn-header-hidden[data-state=ready]>header,.scwn-editor-host.scwn-header-hidden[data-state=ready]>.scwn-editor-help{display:none}
.scwn-editor-host.scwn-editor-narrow .scwn-editor-heading small,.scwn-editor-host.scwn-editor-narrow .scwn-editor-badge{display:none}
.scwn-editor-host.scwn-editor-narrow>header{flex-wrap:wrap}

.scwn-purchase-panel{gap:10px;padding:10px 14px;justify-content:flex-end}.scwn-purchase-panel label{display:flex;align-items:center;gap:6px;margin:0}.scwn-purchase-panel input{width:76px;min-height:38px;border:1px solid #ccd5e0;border-radius:6px;padding:6px}.scwn-purchase-panel strong{margin-right:auto;font-size:1.1rem}

/* Purchase guidance stays scoped to the embedded editor. */
.scwn-purchase-panel .scwn-purchase-status{margin:0;flex:1 1 100%;font-size:12px;line-height:1.4}
.scwn-purchase-panel[data-purchase-state=error] .scwn-purchase-status{color:#9b301c}
.scwn-editor-host .scwn-purchase-submit{background:var(--scwn-accent);border-color:var(--scwn-accent);color:#fff}
.scwn-editor-host .scwn-purchase-submit:hover:not(:disabled){background:#193fad}
.scwn-editor-host .scwn-purchase-panel button:disabled{cursor:not-allowed}
.scwn-purchase-panel input[aria-invalid=true]{border-color:#b83320;outline:1px solid #b83320}
.scwn-purchase-panel input:focus-visible{outline:2px solid var(--scwn-accent);outline-offset:2px}
@media(max-width:600px){.scwn-purchase-panel{padding:10px;gap:8px}.scwn-purchase-panel .scwn-purchase-submit{flex:1 1 100%;min-height:44px}.scwn-purchase-panel input{font-size:16px}.scwn-discount-dialog{padding:16px}}

/* Compact purchase strip: discounts, total, quantity and primary action. */
.scwn-purchase-panel{justify-content:flex-end;gap:10px}
.scwn-purchase-panel .scwn-purchase-total{display:flex;flex-direction:column;justify-content:center;min-width:110px;padding:8px 14px;border:1px solid #c4d6f5;border-left:4px solid #4987ef;border-radius:10px;background:#f5f8fe;min-height:54px;box-sizing:border-box}
.scwn-purchase-panel .scwn-purchase-total small,.scwn-purchase-panel label>span:first-child{font-size:10px;text-transform:uppercase;letter-spacing:.07em;font-weight:700;color:#315782;flex-basis:auto}
.scwn-purchase-panel strong{margin:0;font-size:16px;line-height:1.3}
.scwn-purchase-panel label{display:flex;flex-direction:column;gap:0;border:1px solid #94baff;background:#e7efff;border-radius:10px;overflow:hidden;text-align:center}
.scwn-quantity-stepper{display:flex;align-items:stretch}
.scwn-editor-host .scwn-quantity-stepper button{border:0;border-radius:0;background:transparent;width:34px;padding:0;font-size:22px;min-height:36px}
.scwn-purchase-panel .scwn-quantity-stepper input{appearance:textfield;width:52px;min-height:36px;border:0;border-left:1px solid #afc9ef;border-right:1px solid #afc9ef;border-radius:0;text-align:center;font-size:16px;font-weight:700;padding:3px}
.scwn-quantity-stepper input::-webkit-inner-spin-button,.scwn-quantity-stepper input::-webkit-outer-spin-button{appearance:none;margin:0}
.scwn-editor-host .scwn-purchase-discounts{background:#effbf1;border-color:#8add9f;color:#087a3c;min-height:54px}
.scwn-editor-host .scwn-purchase-submit{min-height:42px}
@media(max-width:600px){.scwn-purchase-panel .scwn-purchase-submit{flex:0 1 auto}.scwn-purchase-panel{gap:6px}.scwn-purchase-panel .scwn-purchase-total{min-width:90px;padding:8px}.scwn-editor-host .scwn-purchase-discounts{padding:8px}}

/* Scoped to automatic cart/edit transitions; normal product pages stay interactive. */
.scwn-transition{position:fixed;inset:0;z-index:2147483647;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;background:#fff;color:#203653;padding:24px;text-align:center;font-size:16px}
.scwn-transition[hidden]{display:none}
.scwn-transition::before{content:"";width:32px;height:32px;border:3px solid #dbe3f0;border-top-color:#2455dd;border-radius:50%;animation:scwn-transition-spin .9s linear infinite}
@keyframes scwn-transition-spin{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.scwn-transition::before{animation:none}}

.scwn-editor-host>header{padding:6px 10px;gap:8px;flex-wrap:wrap}.scwn-color-mode{font-size:11px;color:#53637a}.scwn-editor-host>header button{min-height:30px;padding:5px 8px}.scwn-editor-host>header .scwn-editor-heading strong{font-size:14px}

.scwn-discount-dialog{width:min(560px,calc(100vw - 24px));max-height:90dvh;padding:0!important;border:1px solid #dbe4ef;border-radius:18px;color:#172335;overflow:auto;box-sizing:border-box}
.scwn-discount-dialog::backdrop{background:#203047aa}.scwn-discount-dialog>header{position:relative;padding:24px;background:linear-gradient(120deg,#effcf3,#eff6ff)}.scwn-discount-dialog>header>small{display:inline-block;padding:4px 8px;border-radius:12px;background:#dbfce8;color:#006749;font-weight:700;text-transform:uppercase;font-size:10px}.scwn-discount-dialog h2{margin:8px 32px 6px 0;font-size:24px}.scwn-discount-dialog p{font-size:13px;color:#5d7089}.scwn-discount-dialog .scwn-discount-close{position:absolute;right:14px;top:14px;border:1px solid #c9d8e9;border-radius:50%;width:34px;height:34px;background:white;font-size:22px}.scwn-discount-tiers{display:grid;gap:10px;padding:18px 20px}.scwn-discount-tier{display:flex;align-items:center;gap:12px;text-align:left;width:100%;padding:14px;border:1px solid #d7e2f2;border-radius:12px;background:white;color:inherit;font:inherit;box-sizing:border-box}.scwn-discount-tier>div{flex:1;min-width:0}.scwn-discount-tier small{display:block;margin-top:5px;font-size:12px;color:#5d7089}.scwn-discount-tier.is-current{border-color:#29c967;background:#effcf3}.scwn-discount-tier:focus-visible{outline:3px solid #2454d9;outline-offset:2px}.scwn-discount-value{text-align:center;padding:8px;background:#f5f8fc;border:1px solid #e0e7f0;border-radius:8px}.scwn-discount-value small{font-size:10px;margin:0 0 4px;text-transform:uppercase}.scwn-discount-note{margin:0 20px 20px;padding:10px;background:#f5f8fc;border-radius:8px;text-align:center}@media(max-width:420px){.scwn-discount-tier{flex-wrap:wrap}.scwn-discount-tier>div:first-child{flex-basis:100%}}

.scwn-editor-host .scwn-editor-actions>.scwn-header-toggle{position:static;flex:0 0 32px;width:32px;min-height:32px;padding:0;font-size:18px;align-self:center}

/* Temporary top-layer viewport for editor previews; the iframe is never recreated. */
.scwn-editor-host.scwn-editor-overlay{position:fixed;inset:0;width:100vw;max-width:none;height:100dvh;max-height:none;margin:0;padding:0;border:0;border-radius:0;z-index:2147483000}
.scwn-editor-host.scwn-editor-overlay> :not(.scwn-editor-body){display:none!important}
.scwn-editor-host.scwn-editor-overlay>.scwn-editor-body{height:100dvh!important;min-height:0;flex:1}

.scwn-dynamic-cart-hidden{display:none!important}

.scwn-close-dialog{box-sizing:border-box;width:min(440px,calc(100vw - 24px));max-height:calc(100dvh - 24px);overflow:auto;padding:22px;border:1px solid #ccd5e3;border-radius:14px;background:#fff;color:#20334f;font-family:inherit;box-shadow:0 15px 70px #0004}
.scwn-close-dialog::backdrop{background:#09172999}.scwn-close-dialog h2{margin:0 0 12px;font-size:20px}.scwn-close-dialog p{font-size:14px;line-height:1.5}.scwn-close-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:18px}.scwn-close-actions button{flex:1;padding:10px;border:1px solid #bac9df;border-radius:8px;background:#fff;color:#234c98;font:inherit;cursor:pointer}.scwn-close-actions button:first-child{background:#2454d9;color:#fff;border-color:#2454d9}.scwn-close-actions button:focus-visible{outline:3px solid #86afff;outline-offset:2px}

[data-scw-launch]::before,[data-dp-open]::before,.scwn-dynamic-personalize::before,#add-to-cart-or-refresh [data-button-action="add-to-cart"][aria-controls="scwn-product-editor"]::before{content:'';display:inline-block;position:static;vertical-align:middle;width:21px;height:21px;flex-shrink:0;margin-right:8px;border-radius:50%;background:conic-gradient(#e63876 0deg 45deg,#ed5650 45deg 90deg,#ffcd3a 90deg 135deg,#88c657 135deg 180deg,#41bbc6 180deg 225deg,#3985cb 225deg 270deg,#674dac 270deg 315deg,#ae4498 315deg);mask:radial-gradient(circle,transparent 0 35%,#000 38%);-webkit-mask:radial-gradient(circle,transparent 0 35%,#000 38%);pointer-events:none}
