/* LL AI v66.01 — cross-device topbar/search optical alignment.
   Visual-only: keeps existing Temporary Chat/Search behavior and fixes centering on phone, tablet and desktop. */
.topbar .topActions{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  flex:0 0 auto!important;
  min-width:0!important;
}
.topbar #currentChatName{
  min-width:0!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
}
.topbar #topCommands.commandTopBtn{
  box-sizing:border-box!important;
  line-height:0!important;
  overflow:hidden!important;
}
/* A circle must behave as a true one-cell grid so hidden labels can never offset the glyph. */
.topbar #topCommands.commandTopBtn:not(.llSearchExpanded),
body.llChatStarted .topbar #topCommands.commandTopBtn.llSearchExpanded{
  align-items:center!important;
}
.topbar #topCommands.commandTopBtn>svg{
  display:block!important;
  flex:0 0 auto!important;
  margin:0!important;
  position:relative!important;
  top:0!important;
  left:0!important;
  /* Optical correction for the magnifier handle: keeps the visible mark centered, not only its viewBox. */
  transform:translateX(-.35px)!important;
  transform-origin:50% 50%!important;
}
/* After a chat starts, desktop/tablet Search becomes a pill. Center the whole icon+label group. */
@media (min-width:641px){
  body.llChatStarted .topbar #topCommands.commandTopBtn.llSearchExpanded{
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    text-align:center!important;
    gap:8px!important;
    padding-inline:13px!important;
  }
  body.llChatStarted .topbar #topCommands.commandTopBtn.llSearchExpanded .llTopSearchLabel{
    position:static!important;
    display:block!important;
    flex:0 0 auto!important;
    width:auto!important;
    max-width:none!important;
    margin:0!important;
    transform:none!important;
    line-height:1!important;
  }
}
/* Phone: Search remains circular after Temporary Chat disappears, with exact geometric centering. */
@media (max-width:640px){
  .topbar #topCommands.commandTopBtn,
  body.llChatStarted .topbar #topCommands.commandTopBtn.llSearchExpanded{
    display:grid!important;
    grid-template-columns:1fr!important;
    grid-template-rows:1fr!important;
    place-items:center!important;
    padding:0!important;
    gap:0!important;
  }
  .topbar #topCommands.commandTopBtn>svg,
  body.llChatStarted .topbar #topCommands.commandTopBtn.llSearchExpanded>svg{
    grid-area:1/1!important;
    justify-self:center!important;
    align-self:center!important;
  }
  .topbar #topCommands .llTopSearchLabel,
  body.llChatStarted .topbar #topCommands.commandTopBtn.llSearchExpanded .llTopSearchLabel{
    display:none!important;
    width:0!important;
    max-width:0!important;
    margin:0!important;
    padding:0!important;
  }
}
/* Very narrow/short devices: never let title width shove the action control off its alignment rail. */
@media (max-width:420px){
  .topbar{column-gap:7px!important}
  .topbar #currentChatName{max-width:calc(100vw - 132px)!important}
}
