/* Chat ↔ Workspace mode switch — tech segmented pill */
.view-mode-switch{
  --fc-ease:cubic-bezier(.22,.68,0,1);
  position:fixed;
  top:max(.85rem, env(safe-area-inset-top));
  left:50%;
  transform:translateX(-50%);
  z-index:92;
  display:inline-flex;
  align-items:center;
  gap:0;
  padding:.18rem;
  border:1px solid rgba(238,243,245,.12);
  border-radius:999px;
  background:rgba(8,14,20,.36);
  backdrop-filter:blur(20px) saturate(1.12);
  -webkit-backdrop-filter:blur(20px) saturate(1.12);
  box-shadow:
    0 12px 36px rgba(0,0,0,.24),
    inset 0 1px 0 rgba(255,255,255,.05);
  opacity:0;
  pointer-events:none;
  visibility:hidden;
  transition:opacity .4s var(--fc-ease), visibility .4s ease, transform .4s var(--fc-ease);
}
body.chat-open .view-mode-switch,
body.workspace-open .view-mode-switch{
  opacity:1;
  pointer-events:auto;
  visibility:visible;
}
/* On pro homepage the selector lives inside the Assist panel */
body.pro-overview-active #viewModeSwitch,
body.pro-overview-active .view-mode-switch{
  display:none !important;
  opacity:0 !important;
  pointer-events:none !important;
  visibility:hidden !important;
}
.view-mode-switch[hidden]{
  display:none !important;
}
.view-mode-switch__btn{
  appearance:none;
  position:relative;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:.45rem;
  min-height:38px;
  padding:.4rem 1.1rem;
  border:1px solid transparent;
  border-radius:999px;
  background:transparent;
  color:rgba(238,243,245,.52);
  font:inherit;
  font-size:.78rem;
  font-weight:400;
  letter-spacing:.01em;
  white-space:nowrap;
  cursor:pointer;
  isolation:isolate;
  overflow:hidden;
  transition:
    color .35s var(--fc-ease),
    border-color .35s var(--fc-ease),
    background .35s var(--fc-ease),
    box-shadow .4s var(--fc-ease),
    transform .35s var(--fc-ease);
}
.view-mode-switch__btn::after{
  content:"";
  position:absolute;
  inset:0;
  border-radius:inherit;
  background:radial-gradient(circle at 30% 40%, rgba(69,255,96,.16), transparent 62%);
  opacity:0;
  transition:opacity .4s var(--fc-ease);
  pointer-events:none;
  z-index:0;
}
.view-mode-switch__btn > *{position:relative;z-index:1}
.view-mode-switch__btn + .view-mode-switch__btn::before{
  content:"";
  position:absolute;
  left:-.5px;
  top:24%;
  bottom:24%;
  width:1px;
  background:rgba(238,243,245,.1);
  pointer-events:none;
  transition:opacity .3s ease;
}
.view-mode-switch__btn .material-symbols-rounded{
  font-size:1.08rem;
  font-variation-settings:"FILL" 0, "wght" 300, "GRAD" 0, "opsz" 24;
  color:inherit;
  opacity:.9;
  transition:color .35s var(--fc-ease), transform .35s var(--fc-ease), opacity .35s ease;
}
.view-mode-switch__btn:hover{
  color:rgba(238,243,245,.88);
  transform:translateY(-1px);
}
.view-mode-switch__btn:hover::after{opacity:1}
.view-mode-switch__btn:hover .material-symbols-rounded{
  color:#45ff60;
  opacity:1;
  transform:scale(1.06);
}
.view-mode-switch__btn.is-active{
  color:#eef3f5;
  border-color:rgba(69,255,96,.5);
  background:rgba(69,255,96,.07);
  box-shadow:
    0 0 0 1px rgba(69,255,96,.06),
    0 0 22px rgba(69,255,96,.14);
}
.view-mode-switch__btn.is-active::after{opacity:.7}
.view-mode-switch__btn.is-active + .view-mode-switch__btn::before,
.view-mode-switch__btn.is-active::before{
  opacity:0;
}
.view-mode-switch__btn.is-active .material-symbols-rounded{
  color:#45ff60;
  opacity:1;
}
.view-mode-switch__btn.is-active:hover{
  border-color:rgba(69,255,96,.7);
  box-shadow:
    0 0 0 1px rgba(69,255,96,.1),
    0 0 28px rgba(69,255,96,.22);
}

#chatWorkspaceBtn,
.chat-workspace-btn{
  display:none !important;
}

@media (max-width:760px){
  .view-mode-switch{
    top:max(.65rem, env(safe-area-inset-top));
    width:min(calc(100% - 1.2rem), 420px);
    justify-content:stretch;
  }
  .view-mode-switch__btn{
    flex:1;
    padding:.35rem .55rem;
    font-size:.68rem;
    min-height:34px;
  }
  .view-mode-switch__btn .material-symbols-rounded{
    font-size:.95rem;
  }
}

@media (max-width:420px){
  .view-mode-switch__btn span:not(.material-symbols-rounded){
    max-width:9.5ch;
    overflow:hidden;
    text-overflow:ellipsis;
  }
}
