/* The chat scrolls independently; the composer and Send button stay in the viewport. */
@media screen {
 #es-ai-panel {
  display:grid!important;
  grid-template-rows:auto minmax(0,1fr) auto;
  box-sizing:border-box;
  width:min(450px,calc(var(--es-ai-viewport-width,100vw) - 16px))!important;
  min-width:0!important;
  max-width:calc(var(--es-ai-viewport-width,100vw) - 16px)!important;
  height:min(720px,calc(var(--es-ai-viewport-height,100dvh) - 16px))!important;
  max-height:calc(var(--es-ai-viewport-height,100dvh) - 16px)!important;
  top:calc(var(--es-ai-viewport-top,0px) + 8px);
  right:8px;
  overflow:hidden;
  border:1px solid #d8e1eb;
  border-radius:14px;
  visibility:hidden;
  pointer-events:none;
 }
 #es-ai-panel.open {visibility:visible;pointer-events:auto}
 #es-ai-panel header {min-width:0;min-height:48px;box-sizing:border-box;gap:12px;flex-shrink:0}
 #es-ai-close {min-width:44px;min-height:44px;line-height:1}
 #es-ai-chatlog {min-width:0;min-height:0;overflow-y:auto;overscroll-behavior:contain}
 #es-ai-panel .ai-controls {
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto;
  gap:8px;
  min-width:0;
  margin:0;
  padding:12px;
  padding-bottom:max(12px,env(safe-area-inset-bottom));
  background:#fff;
  border-top:1px solid #d8e1eb;
  align-items:stretch;
 }
 #es-ai-provider {grid-column:1 / -1;min-width:0;max-width:100%;min-height:40px;box-sizing:border-box}
 #es-ai-panel #es-ai-question {
  grid-column:1;
  box-sizing:border-box;
  min-width:0;
  width:100%;
  height:64px;
  min-height:64px;
  max-height:128px;
  margin:0;
  resize:none;
  overflow-y:auto;
  font-size:16px;
 }
 #es-ai-panel .ai-controls #es-ai-send {
  grid-column:2;
  display:inline-flex!important;
  align-items:center;
  justify-content:center;
  align-self:stretch;
  box-sizing:border-box;
  opacity:1;
  min-width:76px;
  min-height:44px;
  margin:0;
  padding:10px 14px;
  background:#0f766e!important;
  color:#fff!important;
  border:1px solid #0f766e;
  border-radius:8px;
  font-size:15px;
  font-weight:700;
  line-height:1.3;
 }
 #es-ai-panel .ai-controls #es-ai-send:hover:not(:disabled) {background:#115e59!important}
 #es-ai-panel .ai-controls #es-ai-send:disabled {opacity:.6;cursor:wait}
 #es-ai-panel :is(button,textarea,select):focus-visible {outline:3px solid #0d9488;outline-offset:2px}
 #es-ai-panel.is-short .ai-controls {padding:8px;gap:6px}
 #es-ai-panel.is-short #es-ai-provider {display:none}
 #es-ai-panel.is-short #es-ai-question {height:44px;min-height:44px}
 #es-ai-panel.is-short header {padding:4px 10px;min-height:44px}
}
