/* Agnes stable visual polish 1: visual only, no click logic */

.composer-wrap {
  overflow: visible !important;
}

#composer,
.composer {
  overflow: visible !important;
  background: linear-gradient(180deg, rgba(34,34,35,.94), rgba(27,27,28,.96)) !important;
  border: 1px solid rgba(255,255,255,.075) !important;
  box-shadow:
    0 18px 70px rgba(0,0,0,.42) !important;
}

#composer::before,
.composer::before {
  opacity: .58 !important;
}

#composer textarea,
#composer input,
.composer textarea,
.composer input {
  color: rgba(245,245,245,.88) !important;
  font-size: 18px !important;
  line-height: 1.45 !important;
}

#composer textarea::placeholder,
#composer input::placeholder,
.composer textarea::placeholder,
.composer input::placeholder {
  color: rgba(230,230,235,.34) !important;
}

#assetMenu,
#assetMenu.asset-menu {
  background: rgba(12,12,13,.97) !important;
  border: 1px solid rgba(255,255,255,.075) !important;
  border-radius: 18px !important;
  box-shadow: 0 20px 54px rgba(0,0,0,.50) !important;
}

#assetMenu button {
  font-size: 18px !important;
  height: 34px !important;
  min-height: 34px !important;
  padding: 0 22px !important;
  color: rgba(245,245,245,.90) !important;
}

#assetMenu button:hover {
  background: rgba(255,255,255,.065) !important;
}

.param,
button.param,
[class*="param"] {
  border-color: rgba(255,255,255,.065) !important;
  background: rgba(255,255,255,.045) !important;
  color: rgba(240,240,245,.78) !important;
}

.param:hover,
button.param:hover,
[class*="param"]:hover {
  background: rgba(255,255,255,.075) !important;
  color: rgba(255,255,255,.92) !important;
}

.agnes-pop,
.agnes-param-pop {
  background: rgba(12,12,13,.97) !important;
  border: 1px solid rgba(255,255,255,.075) !important;
  box-shadow: 0 18px 46px rgba(0,0,0,.50) !important;
}

.agnes-pop-item,
.agnes-param-pop button,
.agnes-param-pop [role="button"] {
  color: rgba(245,245,245,.86) !important;
}

.agnes-pop-item:hover,
.agnes-param-pop button:hover,
.agnes-param-pop [role="button"]:hover {
  background: rgba(255,255,255,.065) !important;
}

/* [JM62] remove composer glow (user request) */
html body .composer-glow{display:none!important}
html body main.main.main{background-image:linear-gradient(rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.008)), none!important}
/* [JM62] skip layout of off-screen chat messages: drag/resize no longer relayouts the whole 35000px history */
.agnes-chat-messages .jm-msg{content-visibility:auto;contain-intrinsic-size:auto 400px}

/* [JM66] drag-resize: every mousemove restarted a 1e-05s transition, so the height stayed at the old value (85% of moves). Disable transitions in the composer area. */
html body #composerWrap#composerWrap,html body #composerWrap#composerWrap *{transition:none!important}

/* [JM96] asset detail modal: above the assets popup (z 99999), larger image */
html body .agnes-assets-v2-modal-mask{z-index:100000!important}
html body .agnes-assets-v2-modal-mask:has(img)>*{width:min(94vw,1600px)!important;max-width:none!important;max-height:96vh!important}
html body .agnes-assets-v2-modal-mask img{width:auto!important;height:auto!important;max-width:100%!important;max-height:78vh!important;object-fit:contain!important}

/* [JM114] asset detail: preview box was fixed at 300px (body max 350px) and clipped tall images */
html body .agnes-assets-v2-modal-mask .agnes-assets-v2-preview,
html body .agnes-assets-v2-modal-mask .agnes-assets-v2-modal-body{height:auto!important;max-height:none!important;min-height:0!important}
html body .agnes-assets-v2-modal-mask .agnes-assets-v2-modal{overflow:auto!important}
html body .agnes-assets-v2-modal-mask .agnes-assets-v2-preview img{display:block!important;margin:0 auto!important;max-height:72vh!important}

/* [JM126] asset detail = image viewer: dark backdrop, large image, only a round close button */
html body .agnes-assets-v2-modal-mask:has(.agnes-assets-v2-preview){background:rgba(0,0,0,.9)!important;backdrop-filter:none!important;display:flex!important;align-items:center!important;justify-content:center!important}
html body .agnes-assets-v2-modal-mask:has(.agnes-assets-v2-preview) .agnes-assets-v2-modal-title,html body .agnes-assets-v2-modal-mask:has(.agnes-assets-v2-preview) .agnes-assets-v2-kv,html body .agnes-assets-v2-modal-mask:has(.agnes-assets-v2-preview) .agnes-assets-v2-modal-actions{display:none!important}
html body .agnes-assets-v2-modal-mask:has(.agnes-assets-v2-preview)>*,html body .agnes-assets-v2-modal-mask:has(.agnes-assets-v2-preview) .agnes-assets-v2-modal,html body .agnes-assets-v2-modal-mask:has(.agnes-assets-v2-preview) .agnes-assets-v2-modal-head,html body .agnes-assets-v2-modal-mask:has(.agnes-assets-v2-preview) .agnes-assets-v2-modal-body,html body .agnes-assets-v2-modal-mask:has(.agnes-assets-v2-preview) .agnes-assets-v2-preview{background:transparent!important;border:0!important;box-shadow:none!important;padding:0!important;margin:0!important;width:auto!important;max-width:96vw!important;height:auto!important;max-height:none!important;min-height:0!important;overflow:visible!important}
html body .agnes-assets-v2-modal-mask:has(.agnes-assets-v2-preview) .agnes-assets-v2-preview img{display:block!important;margin:0 auto!important;width:auto!important;height:auto!important;max-width:94vw!important;max-height:90vh!important;object-fit:contain!important;border-radius:8px!important}
html body .agnes-assets-v2-modal-mask:has(.agnes-assets-v2-preview) .agnes-assets-v2-modal-head .agnes-assets-v2-btn{position:fixed!important;top:18px!important;right:22px!important;width:40px!important;height:40px!important;min-width:0!important;padding:0!important;border-radius:50%!important;font-size:0!important;background:rgba(255,255,255,.12)!important;border:1px solid rgba(255,255,255,.25)!important;z-index:2!important;cursor:pointer!important}
html body .agnes-assets-v2-modal-mask:has(.agnes-assets-v2-preview) .agnes-assets-v2-modal-head .agnes-assets-v2-btn::after{content:"\00d7";font-size:26px;line-height:38px;color:#fff}
