/* ---- Agent panel (resizable, collapsible) ------------------------- */
.docx-editor-agent-panel {
  position: relative;
  flex: 0 0 var(--de-agent-width, 340px);
  width: var(--de-agent-width, 340px);
  min-width: 280px;
  max-width: 600px;
  background: var(--de-surface);
  border-left: 1px solid var(--de-border-raw);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: flex-basis 220ms ease, width 220ms ease, opacity 220ms ease;
  flex-shrink: 0;
}
.docx-editor-agent-panel[data-closed="true"] {
  flex-basis: 0 !important;
  width: 0 !important;
  min-width: 0;
  opacity: 0;
  pointer-events: none;
  border-left-color: transparent;
}

.docx-editor-agent-panel__header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--de-border-raw);
  font-size: 13px;
  font-weight: 600;
  color: var(--de-text);
  flex-shrink: 0;
}

.docx-editor-agent-panel__title {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
}

.docx-editor-agent-panel__body {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.docx-editor-agent-panel__resize-handle {
  position: absolute;
  top: 0;
  left: -3px;
  width: 6px;
  height: 100%;
  cursor: col-resize;
  z-index: 10;
  background: transparent;
  transition: background 80ms ease;
}
.docx-editor-agent-panel__resize-handle:hover,
.docx-editor-agent-panel__resize-handle[data-active="true"] {
  background: rgba(37, 99, 235, 0.25);
}

/* ---- Floating toggle button when panel is closed ----------------- */
.docx-editor-agent-toggle {
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  width: 24px;
  height: 48px;
  border: 1px solid var(--de-border-raw);
  border-right: none;
  background: var(--de-surface);
  border-radius: 6px 0 0 6px;
  cursor: pointer;
  display: grid;
  place-items: center;
  color: var(--de-text);
  box-shadow: -2px 0 4px rgba(0, 0, 0, 0.04);
  z-index: 5;
  transition: background 80ms ease;
}
.docx-editor-agent-toggle:hover {
  background: var(--de-surface-hover);
}
