/* NCR V28: professional standalone chat only, loaded AFTER previous chat styles.
   No selectors apply to the floating drawer, portals, youth or other public pages. */
html:has(body.ncr-public.ncr-chat-viewport-v27){overflow:hidden!important;height:100%!important}
body.ncr-public.ncr-chat-viewport-v27{--cw-bg:#f2f5f4;--cw-card:#ffffff;--cw-ink:#19383d;--cw-sub:#597177;--cw-border:#d8e4e4;--cw-accent:#1b6b72;--cw-soft:#edf6f5;--cw-head:#173b41;height:100vh!important;height:100dvh!important;max-height:100dvh!important;overflow:hidden!important;background:var(--cw-bg)!important}
html[data-theme="dark"] body.ncr-public.ncr-chat-viewport-v27{--cw-bg:#101d24;--cw-card:#172932;--cw-ink:#eff8f8;--cw-sub:#b8cdcf;--cw-border:#36525b;--cw-accent:#87d2cc;--cw-soft:#203a42;--cw-head:#102d34}
body.ncr-public.ncr-chat-viewport-v27>main#main{min-height:0!important;overflow:hidden!important;background:var(--cw-bg)!important}
body.ncr-public.ncr-chat-viewport-v27 .ncr-chat-v27-shell{min-height:0!important;max-height:100%!important;overflow:hidden!important;padding:clamp(6px,1vh,12px) 12px 12px!important;background:var(--cw-bg)!important}
/* Onboarding: form owns the height. No oversized blank panel beneath the button. */
body.ncr-public.ncr-chat-viewport-v27 .ncr-chat-v27-layout{display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:8px!important;width:100%!important;max-width:880px!important;height:100%!important;min-height:0!important;margin-inline:auto!important}
body.ncr-public.ncr-chat-viewport-v27 .ncr-chat-v27-heading{flex:0 0 auto!important;margin:0!important;padding:0 4px 2px!important;gap:12px!important}
body.ncr-public.ncr-chat-viewport-v27 .ncr-chat-v27-heading h1{color:var(--cw-ink)!important;font-size:clamp(1.09rem,2vw,1.42rem)!important;line-height:1.15!important}
body.ncr-public.ncr-chat-viewport-v27 .ncr-chat-v27-heading p{color:var(--cw-sub)!important;font-size:.73rem!important;line-height:1.3!important}
body.ncr-public.ncr-chat-viewport-v27 .ncr-chat-v27-links a{color:var(--cw-ink)!important;border-color:var(--cw-border)!important;background:var(--cw-card)!important}
body.ncr-public.ncr-chat-viewport-v27 #ncrStandaloneChat.ncr-chat-v27-mount{flex:0 1 auto!important;min-width:0!important;min-height:0!important;max-height:100%!important;height:auto!important;overflow:hidden!important}
body.ncr-public.ncr-chat-viewport-v27 #ncrStandaloneChat>.ncr-chat-panel.ncr-chat-standalone{position:relative!important;inset:auto!important;width:100%!important;max-width:100%!important;height:auto!important;min-height:0!important;max-height:100%!important;margin:0!important;display:grid!important;grid-template-rows:auto auto minmax(0,auto) auto!important;border:1px solid var(--cw-border)!important;border-radius:16px!important;background:var(--cw-card)!important;color:var(--cw-ink)!important;box-shadow:0 12px 35px rgba(15,42,46,.09)!important;overflow:hidden!important;transform:none!important}
body.ncr-public.ncr-chat-viewport-v27 #ncrStandaloneChat .ncr-chat-top{background:var(--cw-head)!important;color:#fff!important;min-height:60px!important;padding:10px clamp(14px,2.5vw,22px)!important}
body.ncr-public.ncr-chat-viewport-v27 #ncrStandaloneChat .ncr-chat-title strong{font:700 1.05rem/1.25 'Plus Jakarta Sans',system-ui,sans-serif!important;color:#fff!important}
body.ncr-public.ncr-chat-viewport-v27 #ncrStandaloneChat .ncr-chat-title small{color:#cde2e2!important;font-size:.72rem!important}
body.ncr-public.ncr-chat-viewport-v27 #ncrStandaloneChat .ncr-chat-notice{background:var(--cw-soft)!important;border-bottom:1px solid var(--cw-border)!important;color:var(--cw-ink)!important;padding:8px clamp(14px,2.5vw,22px)!important;line-height:1.35!important;font-size:.73rem!important}
body.ncr-public.ncr-chat-viewport-v27 #ncrStandaloneChat .ncr-chat-notice a{color:var(--cw-accent)!important;font-weight:800!important}
body.ncr-public.ncr-chat-viewport-v27 #ncrStandaloneChat .ncr-chat-workspace{display:flex!important;flex:0 1 auto!important;flex-direction:column!important;min-height:0!important;height:auto!important;max-height:100%!important;overflow-y:auto!important;overflow-x:hidden!important;padding:0!important;background:var(--cw-card)!important;color:var(--cw-ink)!important;overscroll-behavior:contain!important}
body.ncr-public.ncr-chat-viewport-v27 #ncrStandaloneChat .ncr-chat-internal{display:flex!important;flex:0 1 auto!important;flex-direction:column!important;height:auto!important;min-height:0!important;max-height:100%!important;overflow:visible!important}
body.ncr-public.ncr-chat-viewport-v27 #ncrStandaloneChat .ncr-chat-start:not([hidden]){display:grid!important;grid-template-columns:minmax(0,1fr)!important;flex:0 1 auto!important;min-height:0!important;max-height:none!important;align-content:start!important;gap:7px!important;overflow:visible!important;width:100%!important;margin:0!important;padding:clamp(14px,2vw,22px)!important}
body.ncr-public.ncr-chat-viewport-v27 #ncrStandaloneChat .ncr-chat-start p{color:var(--cw-sub)!important;font-size:.8rem!important;line-height:1.42!important;margin:0 0 3px!important;max-width:none!important}
body.ncr-public.ncr-chat-viewport-v27 #ncrStandaloneChat .ncr-chat-start>label{font-size:.76rem!important;font-weight:800!important;color:var(--cw-ink)!important;margin:2px 0 0!important}
body.ncr-public.ncr-chat-viewport-v27 #ncrStandaloneChat .ncr-chat-start>input{width:100%!important;max-width:none!important;min-height:40px!important;height:40px!important;padding:8px 12px!important;border-radius:9px!important;border:1px solid var(--cw-border)!important;background:var(--cw-card)!important;color:var(--cw-ink)!important}
body.ncr-public.ncr-chat-viewport-v27 #ncrStandaloneChat .ncr-chat-topics{width:100%!important;max-width:none!important;display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:6px!important;margin:0!important;padding:0!important;border:0!important}
body.ncr-public.ncr-chat-viewport-v27 #ncrStandaloneChat .ncr-chat-topics legend{color:var(--cw-ink)!important;font-size:.76rem!important;font-weight:800!important;margin:0 0 5px!important}
body.ncr-public.ncr-chat-viewport-v27 #ncrStandaloneChat .ncr-chat-topics label{display:flex!important;gap:8px!important;align-items:center!important;min-width:0!important;min-height:34px!important;padding:6px 9px!important;border:1px solid var(--cw-border)!important;border-radius:9px!important;background:var(--cw-card)!important;color:var(--cw-ink)!important;font-size:.75rem!important}
body.ncr-public.ncr-chat-viewport-v27 #ncrStandaloneChat .ncr-chat-topics label:has(input:checked){border-color:var(--cw-accent)!important;background:var(--cw-soft)!important}
body.ncr-public.ncr-chat-viewport-v27 #ncrStandaloneChat .ncr-chat-topics input[type=radio]{appearance:auto!important;display:inline-block!important;width:15px!important;min-width:15px!important;height:15px!important;margin:0!important;flex:0 0 15px!important;accent-color:var(--cw-accent)!important}
body.ncr-public.ncr-chat-viewport-v27 #ncrStandaloneChat .ncr-ai-consent{display:flex!important;align-items:flex-start!important;gap:9px!important;width:100%!important;max-width:none!important;margin:4px 0 0!important;padding:9px 11px!important;background:var(--cw-soft)!important;border:1px solid var(--cw-border)!important;border-radius:10px!important;color:var(--cw-ink)!important;font-size:.73rem!important;line-height:1.35!important}
body.ncr-public.ncr-chat-viewport-v27 #ncrStandaloneChat .ncr-ai-consent input[type=checkbox]{appearance:auto!important;display:block!important;width:17px!important;min-width:17px!important;height:17px!important;flex:0 0 17px!important;max-width:17px!important;margin:1px 0 0!important;accent-color:var(--cw-accent)!important}
body.ncr-public.ncr-chat-viewport-v27 #ncrStandaloneChat .ncr-chat-primary{width:100%!important;max-width:none!important;min-height:43px!important;margin:2px 0 0!important;padding:9px 14px!important;color:#fff!important;background:#176b70!important;border:0!important;border-radius:10px!important;font-size:.8rem!important;font-weight:800!important}
body.ncr-public.ncr-chat-viewport-v27 #ncrStandaloneChat .ncr-chat-primary:hover{background:#12565d!important}
body.ncr-public.ncr-chat-viewport-v27 #ncrStandaloneChat .ncr-chat-foot{min-height:27px!important;flex:0 0 auto!important;padding:5px 14px!important;border-top:1px solid var(--cw-border)!important;background:var(--cw-card)!important;color:var(--cw-sub)!important;font-size:.69rem!important}
body.ncr-public.ncr-chat-viewport-v27 #ncrStandaloneChat .ncr-chat-quicklinks,body.ncr-public.ncr-chat-viewport-v27 #ncrStandaloneChat .ncr-chat-contact{display:none!important}
body.ncr-public.ncr-chat-viewport-v27 #ncrStandaloneChat [hidden]{display:none!important}
body.ncr-public.ncr-chat-viewport-v27 .ncr-chat-launcher,body.ncr-public.ncr-chat-viewport-v27 .ncr-chat-backdrop{display:none!important}
/* Conversation mode: fill available height; transcript is the only continuous scroll area. */
body.ncr-public.ncr-chat-viewport-v27.ncr-cw-active .ncr-chat-v27-layout{max-width:1120px!important}
body.ncr-public.ncr-chat-viewport-v27.ncr-cw-active #ncrStandaloneChat.ncr-chat-v27-mount{flex:1 1 0!important;height:100%!important;max-height:100%!important}
body.ncr-public.ncr-chat-viewport-v27.ncr-cw-active #ncrStandaloneChat>.ncr-chat-panel.ncr-chat-standalone{height:100%!important;grid-template-rows:auto auto minmax(0,1fr) auto!important}
body.ncr-public.ncr-chat-viewport-v27.ncr-cw-active #ncrStandaloneChat .ncr-chat-workspace{flex:1 1 0!important;height:100%!important;overflow:hidden!important}
body.ncr-public.ncr-chat-viewport-v27.ncr-cw-active #ncrStandaloneChat .ncr-chat-internal{flex:1 1 0!important;height:100%!important;overflow:hidden!important}
body.ncr-public.ncr-chat-viewport-v27.ncr-cw-active #ncrStandaloneChat .ncr-chat-conversation:not([hidden]){display:grid!important;grid-template-columns:minmax(0,1fr)!important;grid-template-rows:auto auto auto minmax(0,1fr) auto!important;flex:1 1 0!important;height:100%!important;min-height:0!important;max-height:100%!important;overflow:hidden!important;gap:0!important}
body.ncr-public.ncr-chat-viewport-v27.ncr-cw-active #ncrStandaloneChat .ncr-chat-conversation-meta{grid-row:1!important;flex:0 0 auto!important;padding:8px 14px!important;margin:0!important;background:var(--cw-card)!important;color:var(--cw-sub)!important;border-bottom:1px solid var(--cw-border)!important;border-radius:0!important;line-height:1.3!important;font-size:.73rem!important}
body.ncr-public.ncr-chat-viewport-v27.ncr-cw-active #ncrStandaloneChat .ncr-chat-modebar{grid-row:2!important;flex:0 0 auto!important;padding:6px 14px!important;margin:0!important;min-height:37px!important;background:var(--cw-soft)!important;border-bottom:1px solid var(--cw-border)!important}
body.ncr-public.ncr-chat-viewport-v27.ncr-cw-active #ncrStandaloneChat .ncr-chat-handoff:not([hidden]){grid-row:3!important;max-height:25vh!important;min-height:0!important;overflow-y:auto!important;flex:0 0 auto!important}
body.ncr-public.ncr-chat-viewport-v27.ncr-cw-active #ncrStandaloneChat .ncr-chat-thread{grid-row:4!important;min-height:0!important;height:auto!important;max-height:none!important;overflow-y:auto!important;overflow-x:hidden!important;overscroll-behavior:contain!important;scrollbar-gutter:stable!important;padding:14px!important;background:var(--cw-card)!important;border:0!important;border-radius:0!important}
body.ncr-public.ncr-chat-viewport-v27.ncr-cw-active #ncrStandaloneChat .ncr-chat-thread{display:flex!important;flex-direction:column!important;align-items:stretch!important;justify-content:flex-start!important;gap:12px!important}
body.ncr-public.ncr-chat-viewport-v27.ncr-cw-active #ncrStandaloneChat .ncr-chat-message{display:block!important;flex:0 0 auto!important;min-width:0!important;width:fit-content!important;max-width:min(82%,680px)!important;margin:0!important;align-self:flex-start!important}
body.ncr-public.ncr-chat-viewport-v27.ncr-cw-active #ncrStandaloneChat .ncr-chat-message.visitor{align-self:flex-end!important}
body.ncr-public.ncr-chat-viewport-v27.ncr-cw-active #ncrStandaloneChat .ncr-chat-sender{display:block!important;font-size:.69rem!important;color:var(--cw-sub)!important;margin:0 3px 4px!important}
body.ncr-public.ncr-chat-viewport-v27.ncr-cw-active #ncrStandaloneChat .ncr-chat-bubble{display:block!important;min-width:0!important;width:auto!important;overflow-wrap:anywhere!important;white-space:pre-wrap!important;border:1px solid var(--cw-border)!important;background:var(--cw-soft)!important;color:var(--cw-ink)!important;border-radius:13px 13px 13px 4px!important;padding:11px 14px!important;font-size:.82rem!important;line-height:1.55!important}
body.ncr-public.ncr-chat-viewport-v27.ncr-cw-active #ncrStandaloneChat .ncr-chat-message.visitor .ncr-chat-bubble{background:#176b70!important;color:#fff!important;border-color:#176b70!important;border-radius:13px 13px 4px 13px!important}
body.ncr-public.ncr-chat-viewport-v27.ncr-cw-active #ncrStandaloneChat .ncr-chat-message.visitor .ncr-chat-bubble a{color:#fff!important;text-decoration:underline!important}
body.ncr-public.ncr-chat-viewport-v27.ncr-cw-active #ncrStandaloneChat .ncr-chat-message:not(.visitor) .ncr-chat-bubble a{color:var(--cw-accent)!important;text-decoration:underline!important}
body.ncr-public.ncr-chat-viewport-v27.ncr-cw-active #ncrStandaloneChat .ncr-chat-compose{grid-row:5!important;flex:0 0 auto!important;max-height:190px!important;min-height:70px!important;margin:0!important;padding:10px 12px!important;border-top:1px solid var(--cw-border)!important;background:var(--cw-soft)!important}
body.ncr-public.ncr-chat-viewport-v27.ncr-cw-active #ncrStandaloneChat .ncr-chat-compose textarea{min-height:42px!important;max-height:105px!important;border-radius:9px!important;border-color:var(--cw-border)!important;background:var(--cw-card)!important;color:var(--cw-ink)!important}
body.ncr-public.ncr-chat-viewport-v27.ncr-cw-active #ncrStandaloneChat .ncr-chat-compose button{border-radius:9px!important;background:#176b70!important;color:#fff!important}
body.ncr-public.ncr-chat-viewport-v27.ncr-cw-active #ncrStandaloneChat .ncr-chat-bubble{max-width:100%!important;overflow-wrap:anywhere!important}
body.ncr-public.ncr-chat-viewport-v27 #ncrStandaloneChat a:focus-visible,body.ncr-public.ncr-chat-viewport-v27 #ncrStandaloneChat button:focus-visible,body.ncr-public.ncr-chat-viewport-v27 #ncrStandaloneChat input:focus-visible,body.ncr-public.ncr-chat-viewport-v27 #ncrStandaloneChat textarea:focus-visible{outline:3px solid var(--cw-accent)!important;outline-offset:2px!important}
@media(max-width:600px){body.ncr-public.ncr-chat-viewport-v27 .ncr-chat-v27-shell{padding:4px!important}body.ncr-public.ncr-chat-viewport-v27 .ncr-chat-v27-heading{padding:1px 4px!important}body.ncr-public.ncr-chat-viewport-v27 .ncr-chat-v27-links{display:none!important}body.ncr-public.ncr-chat-viewport-v27 #ncrStandaloneChat>.ncr-chat-panel.ncr-chat-standalone{border-radius:10px!important}body.ncr-public.ncr-chat-viewport-v27 #ncrStandaloneChat .ncr-chat-start:not([hidden]){padding:12px!important;gap:6px!important}body.ncr-public.ncr-chat-viewport-v27 #ncrStandaloneChat .ncr-chat-topics label{min-height:34px!important}body.ncr-public.ncr-chat-viewport-v27 #ncrStandaloneChat .ncr-chat-notice{font-size:.68rem!important;padding:6px 10px!important}}
@media(max-height:700px){body.ncr-public.ncr-chat-viewport-v27 .ncr-chat-v27-heading{display:none!important}body.ncr-public.ncr-chat-viewport-v27 #ncrStandaloneChat .ncr-chat-start:not([hidden]){overflow-y:auto!important;overscroll-behavior:contain!important}body.ncr-public.ncr-chat-viewport-v27 #ncrStandaloneChat .ncr-chat-top{min-height:48px!important;padding:7px 12px!important}}
/* On exceptionally short viewports, prioritize access to setup controls. Scroll only the setup pane. */
@media(max-height:700px){
 body.ncr-public.ncr-chat-viewport-v27:not(.ncr-cw-active) #ncrStandaloneChat>.ncr-chat-panel.ncr-chat-standalone{height:100%!important;max-height:100%!important;grid-template-rows:auto auto minmax(0,1fr) auto!important}
 body.ncr-public.ncr-chat-viewport-v27:not(.ncr-cw-active) #ncrStandaloneChat .ncr-chat-workspace{min-height:0!important;height:auto!important;max-height:100%!important;overflow-y:auto!important;overflow-x:hidden!important}
 body.ncr-public.ncr-chat-viewport-v27:not(.ncr-cw-active) #ncrStandaloneChat .ncr-chat-internal{min-height:0!important;overflow:visible!important}
}
@media(prefers-reduced-motion:reduce){body.ncr-public.ncr-chat-viewport-v27 #ncrStandaloneChat *{scroll-behavior:auto!important;animation:none!important;transition:none!important}}
