/* Canonical docked chat: same width/type/resize behaviour in every panel. */
.ai-chat-section,
#annoChatSection,
#pracChatSection,
#assembleChatSection,
#essayChatSection,
#landingChatSection {
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  height: auto !important;
  min-height: var(--site-chat-min, 260px) !important;
  max-height: none !important;
  resize: none !important;
  overflow: visible !important;
  display: flex !important;
  flex-direction: column !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  align-self: stretch !important;
  position: relative !important;
}

.workspace-panel .ai-chat-section,
.workspace-panel #essayChatSection {
  margin-top: 12px !important;
  margin-bottom: 4px !important;
}

.ai-chat-section .messages,
#essayChatSection .messages,
#landingChatSection .messages {
  flex: 1 0 auto !important;
  min-height: 56px !important;
  overflow: visible !important;
  height: auto !important;
  max-height: none !important;
  font-size: var(--p1-ai-size) !important;
  line-height: 1.55 !important;
}

.ai-chat-section .messages .msg,
.popout-coach-body .messages .msg { font-size: var(--p1-ai-size) !important; line-height:1.55 !important; }
.ai-chat-section .messages .msg .sender,
.popout-coach-body .messages .msg .sender { font-size: var(--p1-ai-meta-size) !important; }
.ai-chat-section .chat-instructions,
.panel-instructions { font-size: 14px !important; line-height: 1.45 !important; }
.ai-chat-section .chat-input-area input,
.ai-chat-section .chat-input-area textarea,
#essayChatSection .chat-input-area input,
#landingChatSection .chat-input-area input { font-size: var(--p1-input-size) !important; }

/* Shared bottom drag handle. Down = taller. */
.chat-drag-handle { display:none !important; }
.p1-chat-resize-handle {
  flex: 0 0 31px;
  width: 100%;
  height: 31px;
  line-height: 31px;
  margin-top: auto;
  background: var(--p1-navy);
  color: #fff;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  cursor: ns-resize;
  user-select: none;
  touch-action: none;
  border-radius: 0 0 8px 8px;
}

/* Landing coach exists only on the landing state. */
body.p1-workspace-active #landingChatSection { display: none !important; }
