/*! version: "打包信息：由 jiasheng_cai 于 2026-5-20 10:22 进行了打包" */
/* 悬浮胶囊 */
.float-capsule {
  position: fixed;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c5cfc 0%, #5b9cf7 100%);
  box-shadow: 0 4px 16px rgba(124, 92, 252, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 99999;
  -webkit-user-select: none;
      -ms-user-select: none;
          user-select: none;
  touch-action: none;
}

.float-capsule:hover {
  box-shadow: 0 6px 24px rgba(124, 92, 252, 0.5);
  transform: scale(1.08);
}

.float-capsule.dragging {
  cursor: grabbing;
  box-shadow: 0 8px 32px rgba(124, 92, 252, 0.5);
  transform: scale(1.12) !important;
  transition: none !important;
}

.float-capsule.hidden-state {
  opacity: 0.6;
}

.float-capsule.hidden-state:hover {
  opacity: 1;
}

.capsule-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

/* 对话面板 */
.chat-panel {
  position: fixed;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.12), 0 4px 16px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  z-index: 99998;
  overflow: visible;
  animation: panelSlideIn 0.25s ease-out;
}

@keyframes panelSlideIn {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* 四边拖拽手柄 */
.resize-handle {
  position: absolute;
  z-index: 10;
}

.resize-n {
  top: 0;
  left: 8px;
  right: 8px;
  height: 6px;
  cursor: n-resize;
}

.resize-s {
  bottom: 0;
  left: 8px;
  right: 8px;
  height: 6px;
  cursor: s-resize;
}

.resize-e {
  top: 8px;
  right: 0;
  bottom: 8px;
  width: 6px;
  cursor: e-resize;
}

.resize-w {
  top: 8px;
  left: 0;
  bottom: 8px;
  width: 6px;
  cursor: w-resize;
}

.resize-ne {
  top: 0;
  right: 0;
  width: 12px;
  height: 12px;
  cursor: ne-resize;
}

.resize-nw {
  top: 0;
  left: 0;
  width: 12px;
  height: 12px;
  cursor: nw-resize;
}

.resize-se {
  bottom: 0;
  right: 0;
  width: 12px;
  height: 12px;
  cursor: se-resize;
}

.resize-sw {
  bottom: 0;
  left: 0;
  width: 12px;
  height: 12px;
  cursor: sw-resize;
}

/* 头部 */
.chat-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid #f0f0f0;
}

.chat-panel-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #1a1a1a;
}

.chat-panel-avatar {
  display: flex;
}

.chat-panel-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.panel-action-btn {
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #999;
  transition: all 0.15s;
}

.panel-action-btn:hover {
  background: #f5f5f5;
  color: #666;
}

.panel-action-btn.active {
  color: #7c5cfc;
  background: #f0ebff;
}

/* 消息区域 */
.chat-panel-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  scrollbar-width: thin;
  scrollbar-color: #ddd transparent;
}

.chat-panel-messages::-webkit-scrollbar {
  width: 6px;
}

.chat-panel-messages::-webkit-scrollbar-track {
  background: transparent;
}

.chat-panel-messages::-webkit-scrollbar-thumb {
  background: #ddd;
  border-radius: 3px;
}

.chat-panel-messages::-webkit-scrollbar-thumb:hover {
  background: #bbb;
}

.chat-panel-welcome {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
  gap: 12px;
}

.welcome-greeting {
  font-size: 20px;
  font-weight: 600;
  color: #1a1a1a;
}

.welcome-hint {
  font-size: 13px;
  color: #999;
}

/* 消息气泡 */
.chat-message {
  margin-bottom: 16px;
  display: flex;
}

.chat-message-user {
  justify-content: flex-end;
}

.chat-message-assistant {
  justify-content: flex-start;
}

.chat-message-bubble {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.6;
  word-break: break-word;
}

.chat-message-user .chat-message-bubble {
  background: linear-gradient(135deg, #7c5cfc, #5b9cf7);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.chat-message-assistant .chat-message-bubble {
  background: #f5f5f7;
  color: #333;
  border-bottom-left-radius: 4px;
}

/* 输入区域 */
.chat-panel-input-area {
  padding: 12px 16px 16px;
  border-top: 1px solid #f0f0f0;
  position: relative;
}

.chat-input-wrapper {
  border: 1px solid #e8e8e8;
  border-radius: 12px;
  overflow: visible;
  transition: border-color 0.2s;
}

.chat-input-wrapper:focus-within {
  border-color: #7c5cfc;
  box-shadow: 0 0 0 2px rgba(124, 92, 252, 0.1);
}

.chat-input {
  width: 100%;
  border: none;
  outline: none;
  resize: none;
  padding: 12px 14px 4px;
  font-size: 14px;
  line-height: 1.5;
  color: #333;
  font-family: inherit;
  box-sizing: border-box;
}

.chat-input:-ms-input-placeholder {
  color: #bbb;
}

.chat-input::placeholder {
  color: #bbb;
}

.chat-input-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px 10px;
}

.toolbar-left {
  display: flex;
  align-items: center;
  gap: 4px;
  position: relative;
}

.toolbar-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.toolbar-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #999;
  transition: all 0.15s;
}

.toolbar-btn:hover {
  background: #f5f5f5;
  color: #666;
}

.agent-selector {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  color: #666;
  background: #f7f7f7;
  cursor: pointer;
  transition: background 0.15s;
}

.agent-selector:hover {
  background: #eee;
}

.agent-menu {
  position: absolute;
  bottom: 100%;
  left: 0;
  margin-bottom: 8px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
  padding: 6px;
  min-width: 140px;
  z-index: 99999;
}

.agent-menu-item {
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  color: #333;
  cursor: pointer;
  transition: background 0.15s;
}

.agent-menu-item:hover {
  background: #f5f5f7;
}

.agent-menu-item.active {
  color: #7c5cfc;
  background: #f0ebff;
}

.send-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: #e8e8e8;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: not-allowed;
  color: #bbb;
  transition: all 0.2s;
}

.send-btn.active {
  background: linear-gradient(135deg, #7c5cfc, #5b9cf7);
  color: #fff;
  cursor: pointer;
}

.send-btn.active:hover {
  box-shadow: 0 2px 8px rgba(124, 92, 252, 0.4);
}


/* 流式输出光标 */
.streaming-cursor {
  display: inline-block;
  animation: blink 0.8s infinite;
  color: #7c5cfc;
  font-weight: bold;
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

/* 附件预览 */
.chat-attachments {
  padding: 8px 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  border-top: 1px solid #f0f0f0;
}

.attachment-item {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  background: #f5f5f7;
  border-radius: 6px;
  font-size: 12px;
  color: #666;
}

.attachment-name {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-remove {
  border: none;
  background: none;
  cursor: pointer;
  color: #999;
  font-size: 14px;
  padding: 0 2px;
}

.attachment-remove:hover {
  color: #f56c6c;
}

/* 技能描述 */
.skill-desc {
  font-size: 11px;
  color: #999;
  margin-top: 2px;
}

/* 内联技能标签 */
.fcc-inline-skill-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  margin: 0 2px;
  border-radius: 4px;
  background: #f0f7ff;
  border: 1px solid #91caff;
  color: #1677ff;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  vertical-align: baseline;
  -webkit-user-select: all;
          user-select: all;
  cursor: default;
}
.fcc-inline-skill-tag:hover {
  background: #e6f4ff;
  border-color: #69b1ff;
}

