/* app/components/floating-assistant.css —— 浮动决策助手（玻璃质感重设计 · 包 D） */

/* 主理人要求：原"问题决策框"整块 UI 从主页移除（保留 id 供 main.js 绑定，仅隐藏） */
.agri-hidden { display: none !important; }

/* 主理人要求：隐藏右下角悬浮按钮（丑且突兀） */
.fa-fab { display: none !important; }

/* ===== 浮动按钮（参考 WorkBuddy 悬浮按钮：玻璃 + 品牌绿，去除廉价辉光） ===== */
.fa-fab {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: linear-gradient(150deg, rgba(94,234,212, 0.96), rgba(69,32,83, 0.94));
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  /* 多层阴影：落地投影 + 顶部高光(物理透镜感) + 静态品牌辉光 */
  box-shadow:
    0 10px 26px rgba(0, 0, 0, 0.45),
    0 1px 0 rgba(255, 255, 255, 0.35) inset,
    0 0 18px rgba(94,234,212, 0.32);
  transition: transform .25s cubic-bezier(.34, 1.56, .64, 1), box-shadow .25s ease;
}
.fa-fab:hover {
  transform: translateY(-2px) scale(1.06);
  box-shadow:
    0 14px 32px rgba(0, 0, 0, 0.5),
    0 1px 0 rgba(255, 255, 255, 0.45) inset,
    0 0 26px rgba(94,234,212, 0.5);
}
.fa-fab:active { transform: scale(.95); }
.fa-fab:focus-visible { outline: 2px solid rgba(94,234,212, 0.9); outline-offset: 3px; }
.fa-fab svg { width: 30px; height: 30px; display: block; }
/* 微光呼吸环：雷达式扩散光圈，传达"常驻在线决策助手"（reduced-motion 自动关闭） */
.fa-fab::after{
  content:""; position:absolute; inset:-3px; border-radius:50%;
  border:1.5px solid rgba(193,63,224,.55);
  animation:fabRing 3.6s cubic-bezier(.4,0,.2,1) infinite;
  pointer-events:none;
}
@keyframes fabRing{
  0%{ transform:scale(1); opacity:.55; }
  70%{ transform:scale(1.4); opacity:0; }
  100%{ transform:scale(1.4); opacity:0; }
}

/* ===== 对话面板 ===== */
.fa-panel {
  position: fixed;
  bottom: 96px;
  right: 28px;
  width: 360px;
  height: 500px;
  max-height: calc(100vh - 130px);
  z-index: 901;
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(26,13,31, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
  color: var(--text, #f7eafb);
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", Segoe UI, sans-serif;
  overflow: hidden;
  transform: translateX(120%);
  opacity: 0;
  pointer-events: none;
  transition: transform .3s ease, opacity .3s ease;
}
.fa-panel.open {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}

.fa-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(94,234,212, 0.08);
}
.fa-title { font-size: 14px; font-weight: 700; letter-spacing: .3px; }
.fa-close {
  width: 28px; height: 28px; line-height: 26px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: transparent; color: var(--text, #f7eafb);
  border-radius: 8px; cursor: pointer; font-size: 16px;
}
.fa-close:hover { background: rgba(94,234,212, 0.28); }

.fa-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 12px 4px; }
.fa-chip {
  font-size: 12px; padding: 5px 10px; border-radius: 999px;
  border: 1px solid rgba(94,234,212, 0.45);
  background: rgba(94,234,212, 0.12);
  color: #dcc3de; cursor: pointer; transition: background .15s;
}
.fa-chip:hover { background: rgba(94,234,212, 0.28); }

.fa-history {
  font-size: 11px; opacity: .6; padding: 4px 14px 6px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.fa-synthesis {
  flex: 1;
  overflow-y: auto;
  padding: 6px 14px;
  font-size: 12.5px;
  line-height: 1.55;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.fa-synthesis .syn-h2 { font-weight: 700; color: #5eead4; margin: 8px 0 4px; }
.fa-synthesis .syn-h3 { font-weight: 600; margin: 6px 0 2px; }
.fa-synthesis .syn-line { margin: 2px 0; }
.fa-synthesis .syn-gap { height: 6px; }
.fa-synthesis .syn-tbl { width: 100%; border-collapse: collapse; font-size: 11.5px; margin: 4px 0; }
.fa-synthesis .syn-tbl td { border: 1px solid rgba(255, 255, 255, 0.1); padding: 3px 6px; }
.fa-synthesis .warn { color: #ffb347; }

.fa-kanban { padding: 4px 14px 8px; border-top: 1px solid rgba(255, 255, 255, 0.05); }
.fa-kanban h4 { font-size: 12px; margin: 4px 0; opacity: .85; }
.fa-kanban .kb-item { display: flex; gap: 6px; align-items: flex-start; font-size: 12px; margin: 3px 0; }
.fa-kanban .kb-p { font-weight: 700; color: #5eead4; }
.fa-kanban .kb-owner { opacity: .6; }
.fa-kanban .done { opacity: .5; text-decoration: line-through; }

.fa-input {
  display: flex; gap: 8px; padding: 10px 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}
.fa-input textarea {
  flex: 1; resize: none; height: 42px; max-height: 90px;
  border-radius: 10px; border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.25); color: var(--text, #f7eafb);
  padding: 8px 10px; font-size: 12.5px; font-family: inherit;
}
.fa-input textarea:focus { outline: none; border-color: rgba(94,234,212, 0.6); }
.fa-run {
  align-self: flex-end;
  border: none; border-radius: 10px;
  background: linear-gradient(150deg, #5EEAD4, #452053); color: #fff; font-weight: 600;
  padding: 0 14px; height: 42px; cursor: pointer; font-size: 13px;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(94,234,212, 0.3);
}
.fa-run:disabled { opacity: .5; cursor: default; }
.fa-run:not(:disabled):hover { background: linear-gradient(150deg, #5eead4, #8a17a8); }

/* 移动端：面板加宽；左下/右下已由 mini-map 错开 */
@media (max-width: 768px) {
  .fa-panel { width: calc(100vw - 32px); right: 16px; bottom: 92px; }
  .fa-fab { bottom: 20px; right: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .fa-fab { transition: none; }
  .fa-fab:hover { transform: none; }
}
