/* REX ULTRA | Command Chat V10
   Screen-filling chat that preserves Rex's main website design.
   Fixes the legacy Workspace grid and the inline build-progress strip
   pushing the composer below the viewport. */
#workspace[hidden],#workspace[hidden] #chatWorkspace{display:none!important;pointer-events:none!important}
#chatWorkspace[hidden]{display:none!important;pointer-events:none!important}
#workspace[hidden]:not(.rex-window-active):has(#chatWorkspace.rex-chat-v8:not([hidden])){
  display:none!important;
  pointer-events:none!important;
  visibility:hidden!important;
}
#workspace:not(.rex-window-active):has(#chatWorkspace.rex-chat-v8:not([hidden])){
  display:block!important;
  position:fixed!important;
  inset:0!important;
  width:100vw!important;
  height:100dvh!important;
  min-height:0!important;
  max-height:none!important;
  padding:0!important;
  margin:0!important;
  border:0!important;
  border-radius:0!important;
  overflow:hidden!important;
  box-sizing:border-box!important;
  background:#040b18!important;
  isolation:isolate!important;
  z-index:100!important;
}
#workspace:not(.rex-window-active):has(#chatWorkspace.rex-chat-v8:not([hidden]))>.workspace-head,
#workspace:not(.rex-window-active):has(#chatWorkspace.rex-chat-v8:not([hidden]))>.workspace-modes,
#workspace:has(#chatWorkspace.rex-chat-v8:not([hidden]))>.rex-v7-inline-progress{display:none!important}
#workspace:not(.rex-window-active):has(#chatWorkspace.rex-chat-v8:not([hidden]))>#chatWorkspace.rex-chat-v8{
  display:block!important;
  position:relative!important;
  width:100%!important;
  height:100%!important;
  min-height:0!important;
  max-height:100%!important;
  padding:0!important;
  margin:0!important;
  overflow:hidden!important;
  box-sizing:border-box!important;
  background:radial-gradient(ellipse 65% 48% at 67% 0%,#13335b 0%,transparent 70%),#030c18!important;
}
#workspace:has(#chatWorkspace.rex-chat-v8:not([hidden])) #rexProgressInlineV7_chat{
  /* Job information remains available through the header's Job Progress control. */
  display:none!important;
}
#chatWorkspace.rex-chat-v8 .chat-panel{
  height:100%!important;
  min-height:0!important;
  max-height:100%!important;
  overflow:hidden!important;
  padding:0!important;
  margin:0!important;
}
#chatWorkspace.rex-chat-v8 .rex-v8-layout{
  display:grid!important;
  width:100%!important;
  height:100%!important;
  min-height:0!important;
  max-height:100%!important;
  grid-template-columns:268px minmax(0,1fr)!important;
  overflow:hidden!important;
}
#chatWorkspace.rex-chat-v8 .rex-v8-sidebar{
  background:linear-gradient(175deg,#091b33 0%,#061124 45%,#050b16 100%)!important;
  border-right:1px solid #214663!important;
  box-shadow:inset -1px 0 #72e7ff13,15px 0 65px #0004!important;
}
#chatWorkspace.rex-chat-v8 .rex-v8-brand{
  color:#f2fbff!important;
  font-weight:800!important;
  font-size:19px!important;
  letter-spacing:.01em!important;
  padding:7px 10px 10px!important;
}
#chatWorkspace.rex-chat-v8 .rex-v8-glyph{
  width:36px;height:36px;
  border-radius:13px!important;
  background:linear-gradient(135deg,#11c9ea 0%,#2074d7 52%,#7754ff 100%)!important;
  box-shadow:0 0 28px #20baff61,inset 0 1px #d5ffff99!important;
  color:#fff!important;
}
#chatWorkspace.rex-chat-v8 #newChatTab{
  background:linear-gradient(110deg,#10334c,#0d2544)!important;
  border:1px solid #326c97!important;
  color:#e8fcff!important;
  border-radius:12px!important;
  box-shadow:inset 0 1px #9fefff1b,0 5px 24px #0003!important;
  font-weight:720!important;
}
#chatWorkspace.rex-chat-v8 #newChatTab:hover{background:#174663!important;border-color:#4eddf3!important}
#chatWorkspace.rex-chat-v8 .rex-v8-search{
  background:#071d30!important;
  border:1px solid #274a66!important;
  color:#ebfbff!important;
  border-radius:12px!important;
}
#chatWorkspace.rex-chat-v8 .rex-v8-search::placeholder{color:#8198ae!important}
#chatWorkspace.rex-chat-v8 .rex-v8-section-caption{
  color:#61aec9!important;
  font-size:11px!important;
  letter-spacing:.09em!important;
}
#chatWorkspace.rex-chat-v8 .chat-tab:hover{background:#173047!important}
#chatWorkspace.rex-chat-v8 .chat-tab.active{
  background:linear-gradient(100deg,#153a57,#152548)!important;
  box-shadow:inset 3px 0 #5be7fd,inset 0 1px #7be7ff14!important;
}
#chatWorkspace.rex-chat-v8 .chat-tab.active>button:first-child{color:#f5fdff!important}
#chatWorkspace.rex-chat-v8 .rex-v8-side-bottom{border-top:1px solid #224158!important}
#chatWorkspace.rex-chat-v8 .rex-v8-side-link{color:#add3e4!important}
#chatWorkspace.rex-chat-v8 .rex-v8-side-link:hover{background:#18324c!important;color:#e7fbff!important}
#chatWorkspace.rex-chat-v8 .rex-v8-main{
  display:grid!important;
  grid-template-rows:70px minmax(0,1fr) auto!important;
  min-height:0!important;
  max-height:100%!important;
  overflow:hidden!important;
  background:
    radial-gradient(ellipse 55% 55% at 49% -25%,#20437266 0%,transparent 85%),
    radial-gradient(ellipse 45% 35% at 96% 95%,#1435743e 0%,transparent 85%),
    linear-gradient(160deg,#081729,#081324 65%,#07101e)!important;
}
#chatWorkspace.rex-chat-v8 .rex-v8-header{
  min-height:0!important;
  background:linear-gradient(90deg,#0c2037ee,#0c1a2fee)!important;
  border-bottom:1px solid #2b526f!important;
  box-shadow:0 4px 25px #010d1a33,inset 0 -1px #5ceaff13!important;
  padding:0 clamp(10px,2.3vw,36px)!important;
}
#chatWorkspace.rex-chat-v8 .rex-v8-heading{
  color:#f4fdff!important;font-size:19px!important;font-weight:780!important;
  text-shadow:0 0 30px #60c8f951!important;
}
#chatWorkspace.rex-chat-v8 .rex-v8-active-title{color:#9cb5c8!important}
#chatWorkspace.rex-chat-v8 .rex-v8-pill{
  color:#8afbe2!important;background:#10322faa!important;border:1px solid #2c857d!important;
  box-shadow:inset 0 1px #b5fff91a!important;
}
#chatWorkspace.rex-chat-v8 .rex-v8-header-button{
  color:#baddea!important;border-radius:10px!important;
  min-height:39px!important;
}
#chatWorkspace.rex-chat-v8 .rex-v8-header-button:hover{
  background:#174062!important;color:#e3fbff!important;
  box-shadow:inset 0 0 0 1px #3e89a0!important;
}
#chatWorkspace.rex-chat-v8 .rex-v10-workspace-return{
  color:#f2fbff!important;
  border:1px solid #4089b0!important;
  background:linear-gradient(130deg,#0c4564,#102b58)!important;
  padding:9px 13px!important;
  font-weight:680!important;
  white-space:nowrap;
  box-shadow:0 0 20px #32bbf422!important;
}
#chatWorkspace.rex-chat-v8 .rex-v10-workspace-return:hover{
  border-color:#63d8f1!important;background:#14587c!important;
}
#chatWorkspace.rex-chat-v8 .rex-v10-job-button{
  color:#a7d6ec!important;border:1px solid #365875!important;
}
#chatWorkspace.rex-chat-v8 .rex-v8-thread{
  min-height:0!important;
  overflow-y:auto!important;
  overscroll-behavior:contain;
  scrollbar-width:thin;
  scrollbar-color:#365a7b transparent!important;
}
#chatWorkspace.rex-chat-v8 #workspaceChatTranscript{
  min-height:100%!important;
  max-width:950px!important;
  background:transparent!important;
}
#chatWorkspace.rex-chat-v8 .chat-message{
  color:#edfaff!important;
  text-shadow:none!important;
}
#chatWorkspace.rex-chat-v8 .chat-message>div{color:#e9f4fc!important}
#chatWorkspace.rex-chat-v8 .chat-message:not(.user) b{color:#6feaff!important}
#chatWorkspace.rex-chat-v8 .chat-message.user{
  background:linear-gradient(135deg,#153657,#173052)!important;
  border:1px solid #28577b!important;
  box-shadow:0 5px 26px #0003!important;
  border-radius:19px 19px 5px 19px!important;
}
#chatWorkspace.rex-chat-v8 .rex-v8-compose{
  flex-shrink:0!important;
  min-height:0!important;
  padding:12px clamp(12px,4vw,40px) max(12px,env(safe-area-inset-bottom))!important;
  border-top:1px solid #1f4967!important;
  background:linear-gradient(180deg,#0a1a2aee,#071223fc 38%,#060e1dfc)!important;
  box-shadow:0 -12px 50px #01081244!important;
}
#chatWorkspace.rex-chat-v8 .rex-v8-compose-inner{
  border:1px solid #377596!important;
  background:linear-gradient(135deg,#102b42,#0d2440)!important;
  box-shadow:0 0 0 1px #8ce9ff0c,0 0 30px #0e83bf17,0 12px 34px #0006!important;
  border-radius:20px!important;
}
#chatWorkspace.rex-chat-v8 .rex-v8-compose-inner:focus-within{
  border-color:#6cd9f2!important;
  box-shadow:0 0 0 1px #55ccf776,0 0 35px #15baff30,0 12px 34px #0006!important;
}
#chatWorkspace.rex-chat-v8 #workspaceChatInput{
  min-height:55px!important;
  height:64px!important;
  max-height:min(170px,30vh)!important;
  color:#fff!important;
}
#chatWorkspace.rex-chat-v8 #workspaceChatInput::placeholder{color:#9bbbd0!important}
#chatWorkspace.rex-chat-v8 .rex-v8-icon-btn{color:#a8d4e6!important}
#chatWorkspace.rex-chat-v8 .rex-v8-icon-btn:hover{background:#1a4762!important}
#chatWorkspace.rex-chat-v8 .panel-actions #workspaceChatSend{
  background:linear-gradient(125deg,#22b9ec,#2b7ce4 65%,#7048f6)!important;
  color:#fff!important;
  box-shadow:0 0 24px #27bdff50,inset 0 1px #e6ffff77!important;
}
#chatWorkspace.rex-chat-v8 .panel-actions #workspaceChatSend:hover{background:#26ccf8!important;color:#061327!important}
#chatWorkspace.rex-chat-v8 .rex-v8-disclaimer{color:#7798af!important;font-size:10px!important}
#chatWorkspace.rex-chat-v8 .rex-v9-agent-select{
  background:#102a45!important;border-color:#355f80!important;color:#effbff!important;
}
#chatWorkspace.rex-chat-v8 .rex-v9-watch-button{
  background:#103448!important;border-color:#3a7282!important;color:#aef0e9!important;
}
#chatWorkspace.rex-chat-v8 .rex-v9-watch-button[aria-pressed="true"]{
  background:#15544b!important;border-color:#50c8a5!important;
  box-shadow:0 0 16px #4ddec844!important;
}
#chatWorkspace.rex-chat-v8 .rex-v10-welcome{
  align-self:center;
  margin:auto;
  width:min(710px,100%);
  padding:32px clamp(22px,5vw,58px);
  text-align:center;
  display:grid;justify-items:center;gap:16px;
}
#chatWorkspace.rex-chat-v8 .rex-v10-welcome[hidden]{display:none!important}
#chatWorkspace.rex-chat-v8 .rex-v10-orb{
  width:110px;height:110px;border-radius:50%;
  background:
    radial-gradient(circle at 35% 24%,#f7ffff 0 5%,#adfcff 10%,#37d9fa 26%,#506fff 49%,#6134aa 72%,#0c0e2c 88%);
  box-shadow:0 0 20px #5ad4ffb5,0 0 60px #32c8ff77,0 0 145px #574df844,inset -12px -15px 25px #08122d!important;
  position:relative;
}
#chatWorkspace.rex-chat-v8 .rex-v10-orb:after{
  content:"";position:absolute;inset:19px;border-radius:50%;
  background:linear-gradient(138deg,#ffffff75,transparent 35%);filter:blur(8px)
}
#chatWorkspace.rex-chat-v8 .rex-v10-kicker{
  color:#67d8f6;font-size:11px;font-weight:770;letter-spacing:.25em;
}
#chatWorkspace.rex-chat-v8 .rex-v10-welcome h2{
  color:#f4fdff!important;font-size:clamp(28px,3.5vw,45px);letter-spacing:-.05em;
  font-weight:760;line-height:1.14;margin:0;
  text-shadow:0 0 50px #2ecfff45;
}
#chatWorkspace.rex-chat-v8 .rex-v10-welcome p{
  color:#afcde0;line-height:1.65;font-size:14px;margin:0;max-width:520px;
}
#chatWorkspace.rex-chat-v8 .rex-v10-prompts{
  display:flex;flex-wrap:wrap;justify-content:center;gap:9px;margin-top:12px;
}
#chatWorkspace.rex-chat-v8 .rex-v10-prompts button{
  cursor:pointer;padding:12px 16px!important;border-radius:999px!important;
  color:#e4f9ff!important;border:1px solid #305a7b!important;
  background:linear-gradient(135deg,#102c49,#0e1e3b)!important;
  box-shadow:inset 0 1px #9dfaff13!important;font-size:12px!important;
}
#chatWorkspace.rex-chat-v8 .rex-v10-prompts button:hover{
  border-color:#60d7ef!important;background:#154467!important;
}
#chatWorkspace.rex-chat-v8 .rex-v8-thread:has(.rex-v10-welcome:not([hidden])) #workspaceChatTranscript{
  display:none!important;
}
#chatWorkspace.rex-chat-v8 .rex-v8-drawer{
  background:linear-gradient(145deg,#0a243c,#071425)!important;
  border-color:#317a9c!important;color:#e8faff!important;
}
#chatWorkspace.rex-chat-v8 .rex-v8-integration-card{
  background:#0c2841!important;border-color:#2c5976!important
}
#chatWorkspace.rex-chat-v8 .rex-v8-integration-search{
  background:#102943!important;color:#eafaff!important;border-color:#37617c!important;
}
@media(max-width:820px){
 #chatWorkspace.rex-chat-v8 .rex-v8-layout{grid-template-columns:1fr!important}
 #chatWorkspace.rex-chat-v8 .rex-v8-sidebar{box-shadow:15px 0 55px #000b!important}
 #chatWorkspace.rex-chat-v8 .rex-v8-header{padding:0 10px!important}
 #chatWorkspace.rex-chat-v8 .rex-v10-workspace-return{padding:7px 8px!important;font-size:11px!important}
 #chatWorkspace.rex-chat-v8 .rex-v10-job-button{font-size:11px!important}
 #chatWorkspace.rex-chat-v8 .rex-v10-welcome{padding:20px}
 #chatWorkspace.rex-chat-v8 .rex-v10-orb{width:79px;height:79px}
}
@media(max-width:560px){
 #chatWorkspace.rex-chat-v8 .rex-v10-welcome{gap:11px;padding:16px}
 #chatWorkspace.rex-chat-v8 .rex-v10-prompts button{padding:9px 12px!important}
 #chatWorkspace.rex-chat-v8 .rex-v10-workspace-return{font-size:10px!important;padding:6px 8px!important}
 #chatWorkspace.rex-chat-v8 .rex-v8-header-right{gap:2px}
 #chatWorkspace.rex-chat-v8 .rex-v8-active-title{display:none!important}
 #chatWorkspace.rex-chat-v8 .rex-v8-compose{padding:8px 9px max(8px,env(safe-area-inset-bottom))!important}
 #chatWorkspace.rex-chat-v8 .rex-v8-heading{display:none!important}
}
@media(max-height:650px){
 #chatWorkspace.rex-chat-v8 .rex-v8-main{grid-template-rows:56px minmax(0,1fr) auto!important}
 #chatWorkspace.rex-chat-v8 .rex-v8-compose{padding:6px 12px 8px!important}
 #chatWorkspace.rex-chat-v8 #workspaceChatInput{min-height:42px!important;height:48px!important}
 #chatWorkspace.rex-chat-v8 .rex-v10-orb{width:64px;height:64px}
 #chatWorkspace.rex-chat-v8 .rex-v10-welcome{gap:8px;padding:10px}
}

#workspace:not(.rex-window-active):has(#chatWorkspace.rex-chat-v8:not([hidden])){scrollbar-gutter:auto!important}

/* Keep the navigation usable at laptop and phone widths. */
@media(max-width:1250px){
 #chatWorkspace.rex-chat-v8 .rex-v8-active-title,
 #chatWorkspace.rex-chat-v8 .rex-v8-pill{display:none!important}
}
/* Keep Browser reachable even when full-screen Chat hides the workspace ribbon. */
#chatWorkspace.rex-chat-v8 .rex-v10-browser-button{
 border:1px solid #418db2!important;
 background:#11344d!important;
 color:#e6faff!important;
 white-space:nowrap;
}
@media(max-width:900px){
 #chatWorkspace.rex-chat-v8 .rex-v8-header-right>.rex-v8-header-button:not(.rex-v10-job-button):not(.rex-v10-workspace-return):not(.rex-v10-browser-button):not(.rex-v10-desktop-button):not(.rex-bigrex-switch){
  display:none!important
 }
}
/* The verified owner switch must stay available in mobile/full-screen Chat. */
#chatWorkspace.rex-chat-v8 .rex-bigrex-switch[hidden]{display:none!important}
#chatWorkspace.rex-chat-v8 .rex-v8-header-right>.rex-bigrex-switch:not([hidden]){display:inline-flex!important;align-items:center;justify-content:center;}
@media(max-width:520px){
 #chatWorkspace.rex-chat-v8 .rex-v8-header-right .rex-v10-job-button{font-size:10px!important;padding:7px!important}
 #chatWorkspace.rex-chat-v8 .rex-v8-header-right .rex-v10-workspace-return{font-size:10px!important;padding:7px!important}
 #chatWorkspace.rex-chat-v8 .rex-v8-header-right .rex-v9-watch-button{min-width:55px!important;max-width:62px!important}
 #chatWorkspace.rex-chat-v8 .rex-v8-header-right .rex-v9-agent-select{min-width:62px!important;max-width:72px!important}
}

/* One-click native PC control remains visible in fullscreen Chat. */
#chatWorkspace.rex-chat-v8 .rex-v8-header-right>.rex-v10-desktop-button{border:1px solid #408eae!important;background:#102e45!important;color:#e5f9ff!important;white-space:nowrap;min-width:124px;font-size:11px!important}
#chatWorkspace.rex-chat-v8 .rex-v8-header-right>.rex-v10-desktop-button.rex-control-confirmed{background:linear-gradient(100deg,#086db2,#16b8ed)!important;border-color:#91eaff!important;box-shadow:0 0 16px #06baff77!important;color:#fff!important}
@media(max-width:900px){#chatWorkspace.rex-chat-v8 .rex-v8-header-right>.rex-v10-desktop-button{font-size:10px!important;min-width:90px!important;padding:7px 6px!important}}

/* Optional local Windows voice selector. Kept next to Voice without changing Chat layout. */
#chatWorkspace.rex-chat-v8 .rex-v8-voice-picker{
 max-width:150px;min-width:112px;width:auto;
 color:#d9eeff;background:#0b273c;border:1px solid #376885;
 border-radius:9px;padding:6px 9px;font-size:12px;
 cursor:pointer;white-space:nowrap;
}
#chatWorkspace.rex-chat-v8 .rex-v8-voice-picker:focus-visible{outline:2px solid #55cdf4;outline-offset:2px}
#chatWorkspace.rex-chat-v8 .rex-v8-voice-picker[hidden]{display:none!important}
@media(max-width:720px){#chatWorkspace.rex-chat-v8 .rex-v8-voice-picker{max-width:105px;min-width:92px;font-size:11px}}
