/* ==========================================================================
   Verba AI 智能想法整理器与高精分类图标选择器样式 (public/ai-organizer.css)
   ========================================================================== */

/* 1. 触发按钮样式（桌面侧边栏与时间流通用） */
.btn-ai-organize {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: rgba(168, 85, 247, 0.08);
  border: 1px solid rgba(168, 85, 247, 0.25);
  color: #c084fc;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-ai-organize:hover {
  background: rgba(168, 85, 247, 0.18);
  border-color: rgba(168, 85, 247, 0.45);
  color: #e9d5ff;
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.25);
  transform: translateY(-1px);
}

.btn-ai-organize:active {
  transform: translateY(0);
}

.btn-ai-organize .ai-spark-icon {
  font-size: 14px;
  animation: ai-pulse 2.5s infinite ease-in-out;
}

@keyframes ai-pulse {
  0%, 100% { transform: scale(1); opacity: 0.9; }
  50% { transform: scale(1.18); opacity: 1; filter: drop-shadow(0 0 6px rgba(192, 132, 252, 0.6)); }
}

/* 侧边栏专属紧凑样式 */
.sidebar-ai-organize-item {
  margin: 4px 0 8px;
  padding: 6px 9px;
  border-radius: var(--radius-sm);
  background: rgba(168, 85, 247, 0.06);
  border: 1px dashed rgba(168, 85, 247, 0.3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.15s ease;
}

.sidebar-ai-organize-item:hover {
  background: rgba(168, 85, 247, 0.12);
  border-color: rgba(168, 85, 247, 0.5);
}

.sidebar-ai-organize-item .ai-item-left {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 500;
  color: #c084fc;
}

/* 2. 审查预览弹窗 */
.modal-card.modal-ai-organizer {
  max-width: 680px;
  width: 94%;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
}

.ai-summary-banner {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.1) 0%, rgba(56, 189, 248, 0.06) 100%);
  border: 1px solid rgba(168, 85, 247, 0.2);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-bottom: 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.ai-summary-icon {
  font-size: 20px;
  flex-shrink: 0;
  line-height: 1.2;
}

.ai-summary-text {
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-primary);
}

/* 新建项目建议区块 */
.ai-section-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.04em;
  margin: 12px 0 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ai-new-project-card {
  background: var(--bg-surface);
  border: 1px dashed rgba(45, 212, 191, 0.4);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.ai-new-proj-icon {
  font-size: 22px;
  flex-shrink: 0;
}

.ai-new-proj-inputs {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ai-new-proj-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-teal);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 2px 4px;
  outline: none;
  transition: all 0.15s ease;
}

.ai-new-proj-name:focus {
  background: var(--bg-input);
  border-color: var(--accent-teal);
}

.ai-new-proj-reason {
  font-size: 11px;
  color: var(--text-muted);
}

/* 建议移动列表 */
.ai-moves-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 42vh;
  overflow-y: auto;
  padding-right: 4px;
}

.ai-move-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  transition: all 0.15s ease;
  font-size: 12px;
}

.ai-move-row:hover {
  border-color: rgba(168, 85, 247, 0.3);
  background: rgba(255, 255, 255, 0.02);
}

.ai-move-checkbox {
  width: 16px;
  height: 16px;
  accent-color: #a855f7;
  cursor: pointer;
  flex-shrink: 0;
}

.ai-move-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ai-move-title {
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ai-move-snippet {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ai-move-arrow {
  color: var(--text-muted);
  font-weight: 600;
  flex-shrink: 0;
}

.ai-move-target-wrap {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
}

.ai-target-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 500;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(56, 189, 248, 0.1);
  color: var(--accent-blue);
  border: 1px solid rgba(56, 189, 248, 0.25);
}

.ai-target-chip.is-new {
  background: rgba(45, 212, 191, 0.12);
  color: var(--accent-teal);
  border-color: rgba(45, 212, 191, 0.3);
}

.ai-reason-pill {
  font-size: 10px;
  color: var(--text-muted);
  max-width: 140px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 弹窗底部操作栏 */
.ai-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-subtle);
  padding-top: 12px;
  margin-top: 12px;
}

.ai-selection-meta {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-link-toggle {
  background: none;
  border: none;
  color: #a855f7;
  cursor: pointer;
  padding: 0;
  font-size: 11px;
  text-decoration: underline;
}

.btn-link-toggle:hover {
  color: #c084fc;
}

.btn-ai-apply {
  background: linear-gradient(135deg, #9333ea 0%, #7c3aed 100%);
  color: #fff;
  border: none;
  padding: 7px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 10px rgba(124, 58, 237, 0.3);
}

.btn-ai-apply:hover:not(:disabled) {
  opacity: 0.95;
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.45);
  transform: translateY(-1px);
}

.btn-ai-apply:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* 3. 高精分类 Emoji 选择器样式 */
#projectModal .modal-card {
  max-width: 500px;
  width: 94%;
}

.emoji-picker {
  display: flex !important;
  flex-direction: column !important;
  width: 100% !important;
  box-sizing: border-box !important;
  gap: 8px !important;
}

.emoji-tabs-bar {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--border-subtle);
  scrollbar-width: thin;
  width: 100%;
  box-sizing: border-box;
}

.emoji-tab-pill {
  flex-shrink: 0;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 12px;
  background: var(--bg-pill);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.emoji-tab-pill:hover {
  border-color: var(--accent-teal);
  color: var(--text-primary);
}

.emoji-tab-pill.active {
  background: rgba(45, 212, 191, 0.15);
  border-color: var(--accent-teal);
  color: var(--accent-teal);
  font-weight: 600;
}

.emoji-grid-wrap {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(34px, 1fr));
  gap: 5px;
  max-height: 180px;
  overflow-y: auto;
  padding: 4px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
}

.emoji-grid-wrap .emoji-option {
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.12s ease;
  user-select: none;
}

.emoji-grid-wrap .emoji-option:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.15);
}

.emoji-grid-wrap .emoji-option.selected {
  background: rgba(45, 212, 191, 0.22);
  outline: 2px solid var(--accent-teal);
  transform: scale(1.1);
}

/* 移动端小屏响应式适配 */
@media (max-width: 640px) {
  .ai-move-row {
    flex-wrap: wrap;
    gap: 6px;
  }
  .ai-move-target-wrap {
    width: 100%;
    align-items: flex-start;
    flex-direction: row;
    justify-content: space-between;
    margin-top: 4px;
    padding-top: 4px;
    border-top: 1px dashed var(--border-subtle);
  }
  .ai-reason-pill {
    max-width: 100%;
  }
}
