/* NOTWEN NODE — V9.9.1
 * RP Chat storefront, approved product imagery and documentation refinement.
 * Scoped to product, product modal, RP Chat docs and RP Chat demo.
 * No change to global header, Tebex checkout or resource runtime.
 */
:root { --nw991-bg:#080f12; --nw991-panel:#0c171d; --nw991-elevated:#102027; --nw991-line:#1c343d; --nw991-green:#24ec70; --nw991-ink:#f2f6f7; --nw991-muted:#91a6ae; }

/* Store: keep the grid reusable for new products; present a single live product with intention. */
.v94-store-grid:has(>.v94-product-card:only-child){
  grid-template-columns:minmax(0,440px);
  justify-content:center;
  align-items:start;
  padding-top:16px;
  padding-bottom:22px;
}
.v94-store-grid>.v94-product-card[data-catalog-product="notwen-rpchat"]{
  min-width:0;
  background:linear-gradient(165deg,#0e1c22,#081216);
  border:1px solid rgba(36,236,112,.29);
  border-radius:13px;
  overflow:hidden;
  box-shadow:0 24px 55px rgba(0,0,0,.2);
}
.v94-product-card[data-catalog-product="notwen-rpchat"] .v59-card-media{
  display:block;
  position:relative;
  width:100%;
  aspect-ratio:1672 / 941;
  height:auto;
  min-height:0;
  background:#080f12;
  overflow:hidden;
}
.v94-product-card[data-catalog-product="notwen-rpchat"] .v59-card-media>img{
  display:block;width:100%;height:100%;object-fit:contain;object-position:center;
  transform:none!important;filter:none!important;
}
.v94-product-card[data-catalog-product="notwen-rpchat"] .v59-card-media::after{height:24%;background:linear-gradient(0deg,rgba(5,11,14,.65),transparent)}
.v94-product-card[data-catalog-product="notwen-rpchat"] .v59-card-body{padding:23px 24px 22px;gap:12px;}
.v94-product-card[data-catalog-product="notwen-rpchat"] .v59-card-title{display:flex;align-items:baseline;justify-content:space-between;flex-wrap:wrap;gap:6px 16px;}
.v94-product-card[data-catalog-product="notwen-rpchat"] .v59-card-title h2{margin:0;font-size:23px;line-height:1.15;color:var(--nw991-ink)}
.nw991-card-version{font:800 9px/1.4 var(--font-ui);letter-spacing:.09em;color:#7ab995;white-space:nowrap}
.v94-product-card .nw991-card-description{margin:0!important;min-height:35px;font:500 12px/1.6 var(--font-ui);color:#a9bec3}
.v94-product-card[data-catalog-product="notwen-rpchat"] .v59-card-compat{margin:0;gap:7px}
.v94-product-card[data-catalog-product="notwen-rpchat"] .v59-card-compat b{padding:6px 9px;border-radius:6px;font-size:11px;font-weight:700}
.v94-product-card[data-catalog-product="notwen-rpchat"] .v59-card-foot{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:14px;padding-top:18px;margin:0;border-top:1px solid rgba(128,208,212,.11)}
.v94-product-card[data-catalog-product="notwen-rpchat"] .v59-card-price{font-size:23px;line-height:1;white-space:nowrap}
.v94-product-card[data-catalog-product="notwen-rpchat"] .v59-card-actions{display:flex;gap:8px;margin-left:auto;justify-content:flex-end}
.v94-product-card[data-catalog-product="notwen-rpchat"] .v59-card-actions .button{min-height:39px;padding:8px 13px;border-radius:7px;font-size:12px;font-weight:750}

/* Product modal: image full-width, explanation and purchase in balanced columns. */
.product-modal-dialog:has([data-product-gallery="nw-rpchat"]){
  width:min(1080px,calc(100% - 28px));
  max-height:min(94svh,940px);
  border:1px solid #24434b;
  border-radius:17px;
  background:#081317;
}
.product-modal-dialog:has([data-product-gallery="nw-rpchat"]) .product-modal-shell{overflow-y:auto;scrollbar-gutter:stable;}
.product-modal-dialog:has([data-product-gallery="nw-rpchat"]) .product-modal-media{padding:18px 20px 0;}
.product-modal-dialog:has([data-product-gallery="nw-rpchat"]) .product-modal-stage{
  height:auto;aspect-ratio:1672 / 941;
  max-height:none;
  border:1px solid #223d46;border-radius:11px;
}
.product-modal-dialog:has([data-product-gallery="nw-rpchat"]) .product-modal-main{
  display:grid;
  grid-template-columns:minmax(0,1.5fr) minmax(240px,.75fr);
  align-items:start;
  column-gap:25px;row-gap:21px;
  padding:20px 27px 30px;
  background:none;
}
.product-modal-dialog:has([data-product-gallery="nw-rpchat"]) .product-modal-heading{grid-column:1;grid-row:1;min-width:0;}
.product-modal-dialog:has([data-product-gallery="nw-rpchat"]) .product-modal-heading h2{margin:9px 0;font-size:clamp(31px,4vw,42px)}
.product-modal-dialog:has([data-product-gallery="nw-rpchat"]) .product-modal-heading p{max-width:620px;font:500 13px/1.7 var(--font-ui);color:#afc3c8}
.product-modal-dialog:has([data-product-gallery="nw-rpchat"]) .product-modal-price-row{
  grid-column:2;grid-row:1;
  display:flex;flex-direction:column;align-items:flex-start;justify-content:center;
  gap:9px;padding:18px 20px;border:1px solid #1c343d;border-radius:10px;
  background:linear-gradient(155deg,#11242a,#0a171c);
}
.product-modal-dialog:has([data-product-gallery="nw-rpchat"]) .product-modal-price-row strong{font-size:30px}
.product-modal-dialog:has([data-product-gallery="nw-rpchat"]) .product-modal-price-row>span{text-align:left;line-height:1.5}
.product-modal-dialog:has([data-product-gallery="nw-rpchat"]) .product-modal-compat,
.product-modal-dialog:has([data-product-gallery="nw-rpchat"]) .product-modal-sections,
.product-modal-dialog:has([data-product-gallery="nw-rpchat"]) .product-modal-note,
.product-modal-dialog:has([data-product-gallery="nw-rpchat"]) .product-modal-actions,
.product-modal-dialog:has([data-product-gallery="nw-rpchat"]) .product-modal-policy{grid-column:1 / -1;min-width:0}
.product-modal-dialog:has([data-product-gallery="nw-rpchat"]) .product-modal-sections{gap:15px;align-items:stretch}
.product-modal-dialog:has([data-product-gallery="nw-rpchat"]) .product-modal-sections section{padding:20px 22px;border-radius:10px;min-height:100%}
.product-modal-dialog:has([data-product-gallery="nw-rpchat"]) .product-modal-sections ul{font-size:12.5px;line-height:1.75}
.product-modal-dialog:has([data-product-gallery="nw-rpchat"]) .product-modal-actions{display:flex;gap:9px;position:static;margin:0;padding:5px 0 0;background:none}
.product-modal-dialog:has([data-product-gallery="nw-rpchat"]) .product-modal-actions .button{min-height:43px;padding-inline:17px}
.product-modal-dialog:has([data-product-gallery="nw-rpchat"]) .product-modal-policy{padding-top:11px;border-top:1px solid rgba(109,186,191,.10)}

/* One image per gallery slide — no old vertical cropping. */
.nw-product-gallery[data-product-gallery="nw-rpchat"] .product-modal-stage>img,
.nw-product-gallery[data-product-gallery="nw-rpchat"] .nw-product-hero-stage>img{
  width:100%!important;height:100%!important;object-fit:contain!important;
  max-height:none!important;min-height:0!important;
}
.nw-product-gallery[data-product-gallery="nw-rpchat"] .product-gallery-nav{width:35px;height:35px;border-radius:9px;border-color:rgba(159,210,213,.32);background:rgba(7,18,21,.9);}
.nw-product-gallery[data-product-gallery="nw-rpchat"] .product-gallery-footer{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:11px 3px 0;font:600 11px/1.4 var(--font-ui)}
.nw-product-gallery[data-product-gallery="nw-rpchat"] .product-gallery-counter{font-size:11px}

/* Standalone product: big header image + balanced details/checkout beneath. */
.v59-product .v59-product-hero{display:grid;grid-template-columns:minmax(0,1fr);gap:27px;}
.v59-product .v59-product-hero>.v59-product-media{width:100%;margin:0;}
.v59-product .nw-product-hero-stage{height:auto;aspect-ratio:1672 / 941;max-height:none;}
.v59-product .v59-product-copy{
  display:grid;
  grid-template-columns:minmax(0,1.4fr) minmax(290px,.65fr);
  column-gap:38px;row-gap:12px;
  width:100%;padding:6px 4px 35px;align-items:start;
}
.v59-product .v59-product-copy>.v59-kicker{grid-column:1;grid-row:1}
.v59-product .v59-product-copy>h1{grid-column:1;grid-row:2;margin:0;line-height:1.08}
.v59-product .v59-product-copy>.v59-product-lead{grid-column:1;grid-row:3;margin:0 0 9px;max-width:780px;line-height:1.75;color:#afc3c8}
.v59-product .v59-product-copy>.v59-framework-row{grid-column:1;grid-row:4;margin:5px 0;}
.v59-product .v59-product-copy>.v59-hero-facts{grid-column:1;grid-row:5;margin:0;}
.v59-product .v59-product-copy>.v59-buybox{grid-column:2;grid-row:1 / span 5;align-self:stretch;margin:0;min-width:0;border-radius:12px}
.v59-product .v59-product-nav{border-top:1px solid rgba(112,192,196,.12)}

/* Real-content Docs. Respect left product navigation & right in-page TOC. */
body.nw-docs .v46-article-shell:has(.nw-rp-documentation){width:min(1570px,calc(100% - 48px));grid-template-columns:minmax(215px,244px) minmax(0,1fr) minmax(165px,194px);column-gap:24px;align-items:start;}
body.nw-docs .nw-rp-documentation{min-width:0;}
body.nw-docs .nw-rp-documentation .nw-rp-guide-hero{
  grid-template-columns:minmax(0,1.25fr) minmax(210px,.75fr);
  gap:24px;padding:31px;margin-bottom:13px;
  border:1px solid rgba(113,205,204,.18);border-radius:13px;
  background:radial-gradient(ellipse at 86% 0%,rgba(36,236,112,.065),transparent 43%),linear-gradient(145deg,#0e1f24,#081317);
}
body.nw-docs .nw-rp-guide-hero-copy{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:0;}
body.nw-docs .nw-rp-documentation .nw-rp-guide-hero h1{margin:0 0 17px!important;line-height:1.05!important;letter-spacing:-.045em}
body.nw-docs .nw-rp-documentation .nw-rp-guide-hero .doc-lead{font-size:13px!important;line-height:1.9!important;max-width:580px}
body.nw-docs .nw-rp-guide-flags{gap:7px;margin-top:19px}
body.nw-docs .nw-rp-guide-flags span{padding:8px 9px;border-radius:6px;font-size:9px}
body.nw-docs .nw-rp-guide-visual{align-self:stretch;align-content:center;padding:10px;border-radius:10px}
body.nw-docs .nw-rp-guide-visual img{display:block;width:100%;height:auto;max-height:none;aspect-ratio:1672/941;object-fit:contain;border-radius:7px}
body.nw-docs .nw-rp-guide-visual span{padding:8px 3px 2px;font-size:9px}
body.nw-docs .nw-rp-guide-shortcuts{gap:10px;margin:0 0 23px}
body.nw-docs .nw-rp-guide-shortcuts a{min-height:58px;gap:10px;padding:13px 14px;border-radius:8px;background:#0d1a1f;font-size:10px}
body.nw-docs .nw-rp-documentation>p:not(.doc-lead){width:100%;max-width:870px;padding:0 2px;margin:0 0 25px!important;font-size:13px!important;line-height:1.85!important}
body.nw-docs .nw-rp-documentation>.nw-rp-doc-block{
  display:block!important;
  width:100%;min-width:0;margin:0 0 13px!important;
  padding:28px 31px 30px!important;
  border-radius:11px!important;
  background:linear-gradient(160deg,#0e1c21,#091418)!important;
}
body.nw-docs .nw-rp-documentation .nw-rp-doc-block>h2{margin:0 0 17px!important;font-size:clamp(20px,2vw,24px)!important;line-height:1.25!important}
body.nw-docs .nw-rp-documentation .nw-rp-doc-block>ul,
body.nw-docs .nw-rp-documentation .nw-rp-doc-block>ol,
body.nw-docs .nw-rp-documentation .nw-rp-doc-block>p{max-width:100%;font-size:13.25px!important;line-height:1.85!important;color:#bacbd0!important}
body.nw-docs .nw-rp-documentation .nw-rp-doc-block li{margin-bottom:10px!important}
body.nw-docs .nw-rp-documentation .doc-page-nav{margin-top:24px}
body.nw-docs .v46-doc-toc:has(.toc-note){min-width:0}

/* Demo: align it with the established HUD stage & make the controls clear. */
#rpchat-demo{margin-inline:auto}
#rpchat-demo .nw-rp-live-demo{border-color:#1c343d;border-radius:11px}
#rpchat-demo .nw-rp-live-banner{padding:14px 20px}
#rpchat-demo .nw-rp-live-viewport{background:#0b171c!important}
#rpchat-demo .nw-rp-live-actions{gap:9px;padding:16px 20px;justify-content:flex-start}
#rpchat-demo .nw-rp-live-actions button,#rpchat-demo .nw-rp-live-actions a{min-height:41px;border-radius:7px;padding:9px 13px}
#rpchat-demo .nw-rp-live-actions button:first-child{background:#123024;border-color:#248650;color:#9af5b5}
#rpchat-demo .nw-rp-live-help{padding:4px 20px 18px;line-height:1.7}

@media(max-width:1160px){
 body.nw-docs .v46-article-shell:has(.nw-rp-documentation){grid-template-columns:240px minmax(0,1fr);gap:22px}
 body.nw-docs .v46-doc-toc:has(.toc-note){display:none}
}
@media(max-width:900px){
 .product-modal-dialog:has([data-product-gallery="nw-rpchat"]) .product-modal-main{grid-template-columns:1fr;padding:20px;gap:17px}
 .product-modal-dialog:has([data-product-gallery="nw-rpchat"]) .product-modal-heading,
 .product-modal-dialog:has([data-product-gallery="nw-rpchat"]) .product-modal-price-row{grid-column:1;grid-row:auto}
 .v59-product .v59-product-copy{grid-template-columns:1fr;gap:13px}
 .v59-product .v59-product-copy>.v59-buybox{grid-column:1;grid-row:6;margin-top:14px}
 body.nw-docs .nw-rp-documentation .nw-rp-guide-hero{grid-template-columns:1fr;padding:24px}
 body.nw-docs .nw-rp-guide-visual img{max-height:260px}
}
@media(max-width:850px){
 body.nw-docs .v46-article-shell:has(.nw-rp-documentation){grid-template-columns:1fr;gap:16px;width:calc(100% - 28px)}
 body.nw-docs .v46-article-shell:has(.nw-rp-documentation)>.v46-doc-article{order:1}
 body.nw-docs .v46-article-shell:has(.nw-rp-documentation)>.v46-docs-sidebar{order:2}
}
@media(max-width:640px){
 .v94-store-grid:has(>.v94-product-card:only-child){grid-template-columns: minmax(0,1fr);padding-top:10px}
 .v94-product-card[data-catalog-product="notwen-rpchat"] .v59-card-body{padding:17px 17px 19px}
 .v94-product-card[data-catalog-product="notwen-rpchat"] .v59-card-foot{align-items:center;gap:14px}
 .v94-product-card[data-catalog-product="notwen-rpchat"] .v59-card-title h2{font-size:20px}
 .product-modal-dialog:has([data-product-gallery="nw-rpchat"]){width:calc(100% - 10px);max-height:calc(100svh - 10px);border-radius:13px}
 .product-modal-dialog:has([data-product-gallery="nw-rpchat"]) .product-modal-media{padding:9px 9px 0}
 .product-modal-dialog:has([data-product-gallery="nw-rpchat"]) .product-modal-stage{height:auto;aspect-ratio:1672/941}
 .product-modal-dialog:has([data-product-gallery="nw-rpchat"]) .product-modal-main{padding:17px 14px 22px}
 .nw-product-gallery[data-product-gallery="nw-rpchat"] .product-gallery-footer{flex-wrap:wrap;font-size:10px}
 .v59-product .nw-product-hero-stage{height:auto;aspect-ratio:1672 / 941}
 .v59-product .v59-product-copy{padding:5px 1px 27px}
 body.nw-docs .nw-rp-documentation .nw-rp-guide-hero{padding:20px;gap:19px}
 body.nw-docs .nw-rp-guide-shortcuts{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 body.nw-docs .nw-rp-documentation>.nw-rp-doc-block{padding:20px 17px 22px!important}
 body.nw-docs [data-rp-guide="overview"] .nw-rp-doc-block:first-of-type>ul{grid-template-columns:1fr}
 #rpchat-demo .nw-rp-live-actions{padding:12px;gap:7px}
 #rpchat-demo .nw-rp-live-actions button,#rpchat-demo .nw-rp-live-actions a{flex:1 1 auto;min-height:42px;font-size:11px}
}
@media(prefers-reduced-motion:reduce){.v94-product-card[data-catalog-product="notwen-rpchat"] *{transition:none!important}}
