/* NexusSpy V5 — private reference flow; intentionally scoped to avoid layout conflicts. */
.ns-ref-layer[hidden]{display:none!important}
.ns-ref-layer{position:fixed;inset:0;z-index:1000;padding:18px;display:grid;place-items:center;background:rgba(5,19,12,.78);backdrop-filter:blur(11px)}
.ns-ref-dialog{width:min(490px,100%);max-height:calc(100dvh - 36px);overflow-y:auto;position:relative;border:1px solid rgba(214,241,205,.27);border-radius:22px;background:linear-gradient(155deg,#fff 70%,#eef8e7 100%);padding:clamp(22px,4vw,36px);box-shadow:0 25px 110px rgba(0,0,0,.37);color:#173323;text-align:left}
.ns-ref-close{position:absolute;right:17px;top:12px;width:38px;height:38px;border:0;border-radius:50%;background:#e8f1e7;color:#29402e;font-size:26px;cursor:pointer}
.ns-ref-icon{height:56px;width:56px;display:grid;place-items:center;border-radius:17px;color:#173123;background:#c8f58b;font-size:28px;margin-bottom:23px}
.ns-ref-eyebrow{font-size:10px;font-weight:800;letter-spacing:.17em;color:#59865d;margin-bottom:9px}
.ns-ref-dialog h2{font-size:clamp(26px,5vw,33px);letter-spacing:-.055em;line-height:1.14;margin:0 40px 10px 0;color:#14291a;font-weight:850}
.ns-ref-dialog h2 span{color:#63a545}.ns-ref-product{font-weight:800;font-size:14px;margin:0 0 10px;overflow-wrap:anywhere}
.ns-ref-explain{font-size:13px;line-height:1.75;color:#66776a;margin:0 0 25px}
.ns-ref-label{display:block;font-size:10px;letter-spacing:.12em;font-weight:800;color:#507554;margin-bottom:9px}
.ns-ref-code-wrap{display:flex;gap:7px;padding:7px;border:1px solid #d1e0d0;background:#f4f9f1;border-radius:12px;align-items:center}
.ns-ref-code-wrap input{flex:1;min-width:0;border:0;outline:0;background:transparent;font-family:ui-monospace,SFMono-Regular,Consolas,monospace;letter-spacing:.025em;font-weight:800;font-size:clamp(12px,3vw,15px);padding:12px 6px;color:#193d25}
.ns-ref-copy{white-space:nowrap;border:0;border-radius:8px;padding:13px 15px;background:#173b28;color:#fff;font-weight:800;font-size:12px;cursor:pointer}
.ns-ref-copy:hover{background:#25593c}.ns-ref-copy:focus-visible,.ns-ref-close:focus-visible,.ns-ref-verify:focus-visible,.ns-code-action:focus-visible,.ref-card:focus-visible{outline:3px solid #7fba67;outline-offset:3px}
.ns-ref-foot{display:flex;align-items:flex-start;gap:9px;margin-top:18px;color:#66786a;font-size:11px;line-height:1.6}.ns-ref-dot{width:7px;height:7px;background:#77b66f;flex:none;border-radius:50%;margin-top:5px}
.ns-ref-verify{display:inline-block;margin-top:16px;font-weight:750;font-size:12px;text-decoration:underline;text-underline-offset:4px;color:#286b3b}
.ns-ref-error{font-size:12px;color:#9e342e}
html.ns-ref-active,body.ns-ref-active{overflow:hidden}
.product-card[data-request-product],.ref-card[data-request-product]{cursor:pointer}
.product-card[data-request-product]:focus-visible{outline:3px solid #7fba67;outline-offset:4px}
.ns-code-action{border:0;border-radius:8px;background:#19392a;color:white;padding:11px 12px;font-size:11px;font-weight:800;cursor:pointer;display:inline-flex;justify-content:center;align-items:center;gap:7px}
.ns-code-action:hover{background:#2b5b39}
.ns-code-action[disabled]{opacity:.5;cursor:not-allowed}
.ns-ref-loading{opacity:.68;pointer-events:none}
@media(max-width:540px){.ns-ref-dialog{border-radius:17px;padding:25px 19px}.ns-ref-code-wrap{gap:3px}.ns-ref-copy{font-size:11px;padding:12px 9px}.ns-ref-code-wrap input{letter-spacing:0}.ns-code-action{font-size:10px;padding:9px 10px}.product-bottom{align-items:center}}

/* V6 instant-tap feedback; no changes to the existing green theme */
.ns-ref-loading-text{display:flex;align-items:center;gap:10px;margin:0 0 14px;font-size:12px;font-weight:700;color:#34623c}
.ns-ref-loading-text[hidden],.ns-ref-retry[hidden]{display:none!important}
.ns-ref-loading-text::before{content:'';width:17px;height:17px;border-radius:50%;border:2px solid #bddfb3;border-top-color:#2d6c39;animation:ns-code-spin .8s linear infinite}
@keyframes ns-code-spin{to{transform:rotate(360deg)}}
.ns-ref-copy:disabled{opacity:.47;cursor:wait}
.ns-ref-close:disabled{opacity:.55;cursor:wait}
.ns-ref-error{margin-top:16px;padding:12px 13px;border-radius:10px;background:#fff0ed;border:1px solid #f3c3b9;color:#8d3329;font-weight:700;line-height:1.5}
.ns-ref-retry{border:0;border-radius:10px;background:#c8f58b;color:#14331f;margin-top:13px;padding:12px 18px;font-size:12px;font-weight:800;cursor:pointer}
.ns-ref-retry:hover{background:#b5e57c}
@media(prefers-reduced-motion:reduce){.ns-ref-loading-text::before{animation:none}}

/* V7: show reference field only after automatic server generation succeeds. */
.ns-ref-code-wrap[hidden]{display:none!important}
