/* LL AI v64.4.5 — hard fixes verified against the v64.4.4 DOM. */

/* 1) Viewer delete confirmation MUST appear above the full-screen image viewer. */
.llDialogOverlay{
  z-index:26050!important;
}
.llDialogOverlay .llDialog{
  z-index:26051!important;
}

/* 2) The real response menu is .ll625ResponseMenu. Open it DOWN, never up. */
.msgActions{overflow:visible!important}
.ll625ResponseMenu{
  top:calc(100% + 9px)!important;
  bottom:auto!important;
  right:0!important;
  transform-origin:top right!important;
  z-index:2600!important;
}
.ll625ResponseMenu.is-open{
  animation:ll645MenuDown .16s cubic-bezier(.2,.8,.2,1) both!important;
}
@keyframes ll645MenuDown{
  from{opacity:0;transform:translateY(-4px) scale(.985)}
  to{opacity:1;transform:translateY(0) scale(1)}
}
/* v64.4.4 accidentally added a second three-dot system. Never show duplicates. */
.responseMoreWrap,.responseMoreBtn,.responseMoreMenu{display:none!important}

/* 3) Preset cards now carry actual image previews, not text-gradient art cards. */
.v634PresetArt{
  background:#111!important;
  overflow:hidden!important;
}
.v634PresetArt img{
  width:100%!important;
  height:100%!important;
  object-fit:cover!important;
  object-position:center!important;
  filter:none!important;
  transform:scale(1.002);
  transition:opacity .2s ease,transform .22s ease!important;
}
.v634Preset:hover .v634PresetArt img{transform:scale(1.035)}
.v634PresetArt::after{
  content:"";
  position:absolute;
  inset:auto 0 0;
  height:34%;
  pointer-events:none;
  background:linear-gradient(to top,rgba(0,0,0,.28),transparent);
}

/* 4) Keyboard-safe image composer mode: sidebar is temporarily removed while typing. */
body.llImageKeyboardMode #side,
body.llImageKeyboardMode #sidebarScrim{
  transform:translateX(-110%)!important;
  opacity:0!important;
  pointer-events:none!important;
}
body.llImageKeyboardMode .app{
  grid-template-columns:0 minmax(0,1fr)!important;
}
body.llImageKeyboardMode #imageStudio{
  left:0!important;
  width:100vw!important;
}
body.llImageKeyboardMode #imageStudio .imagePromptBar,
#imageStudio .imagePromptBar.llKeyboardOpen{
  position:fixed!important;
  left:50%!important;
  right:auto!important;
  width:min(820px,calc(100vw - 18px))!important;
  max-width:820px!important;
  transform:translateX(-50%)!important;
  bottom:calc(10px + var(--ll-image-kb,0px))!important;
  margin:0!important;
  z-index:2500!important;
}
@media(max-width:900px){
  body.llImageKeyboardMode #imageStudio .imagePromptBar,
  #imageStudio .imagePromptBar.llKeyboardOpen{
    width:calc(100vw - 14px)!important;
  }
}

/* Keep generation errors readable, but don't let them shove the composer around. */
#imageStudio .imageStatus{
  max-width:min(820px,calc(100vw - 28px))!important;
  margin-inline:auto!important;
  overflow-wrap:anywhere!important;
}
