/* 消息意图提示里的「匹配工厂」按钮与弹窗（factory-match.js） */
.intent-action {
  padding: 3px 12px; border:1px solid var(--a-600); border-radius: 99px; cursor: pointer;
  background:#fff; color:var(--warning-fg); font-size: 11.5px; font-weight: 650; line-height: 1.6;
  transition: background .15s ease, color .15s ease;
}
.intent-action:hover { background:var(--a-600); color:#fff; }

.factory-match {
  width: min(560px, calc(100vw - 32px)); padding: 22px 24px; border: 0; border-radius: 16px;
  box-shadow: 0 24px 64px rgba(23, 42, 33, .25);
}
.factory-match::backdrop { background: rgba(23, 33, 28, .45); }
.factory-match h3 { margin: 0 0 4px; font-size: 16px; }
.fm-product { margin: 0 0 14px; color:var(--text-muted); font-size: 12.5px; }
.fm-product:empty { display: none; }

.fm-search {
  display: flex; align-items: center; gap: 8px; padding: 0 12px;
  border:1px solid var(--border-strong); border-radius: 10px; background:var(--surface-hover);
}
.fm-search:focus-within { border-color:var(--accent); background:#fff; }
.fm-search > span { color:var(--text-muted); font-size: 14px; }
.fm-search input { flex: 1; padding: 9px 0; border: 0; background: transparent; font-size: 13.5px; outline: none; }

.fm-list {
  margin-top: 10px; max-height: min(320px, 44vh); overflow-y: auto;
  border:1px solid var(--border-subtle); border-radius: 12px; display: grid; align-content: start;
}
.fm-list-hint { margin: 0; padding: 18px 14px; color:var(--text-muted); font-size: 12.5px; line-height: 1.6; }
.fm-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%;
  padding: 10px 14px; border: 0; border-bottom:1px solid var(--border-subtle); cursor: pointer;
  background:#fff; text-align: left; transition: background .12s ease;
}
.fm-row:last-child { border-bottom: 0; }
.fm-row:hover { background:var(--surface-hover); }
.fm-row.selected { background:var(--accent-soft-bg); }
.fm-row-copy { display: grid; gap: 2px; min-width: 0; }
.fm-row-copy b { font-size: 13.5px; font-weight: 650; color:var(--text-primary); overflow-wrap: anywhere; }
.fm-row-copy small { color:var(--text-muted); font-size: 11.5px; }
.fm-row > i { flex: 0 0 auto; font-style: normal; font-weight: 700; color:var(--accent); }

.fm-count { margin: 8px 0 0; color:var(--text-muted); font-size: 11.5px; }
.fm-hint { margin: 10px 0 0; color:var(--text-muted); font-size: 11.5px; line-height: 1.6; }
.fm-error { margin: 10px 0 0; color:var(--danger-fg); font-size: 12px; line-height: 1.6; }
.fm-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }
