/* Targeted action card (行动卡) — see web/js/ui/drawers/action_card.js.
 * 行动对象放在行动卡内部：标题 + 对象标签 / 句中填空 + 预估 + 执行按钮，整张卡就是一个行动。 */

.act-card,
.act-card.d-action-item {
  display: flex; flex-direction: column; gap: 5px; min-width: 0;
  padding: 7px 9px 6px 10px;
  background: linear-gradient(180deg, var(--vellum-hi) 0%, var(--vellum-lo) 100%);
  border: 1px solid rgba(30, 28, 26, 0.55);
  border-left: 3px solid var(--brass);
  border-radius: 2px;
  box-shadow: inset 0 1px 0 rgba(255, 253, 247, 0.9), 0 1px 0 rgba(30, 28, 26, 0.12);
}
.act-card.is-avail:hover { border-color: var(--accent); border-left-color: var(--brass); }
.act-card.is-locked { border-left-color: rgba(30, 28, 26, 0.28); opacity: 0.82; }

/* 标题行：类别 · 行动名 ··· 成本 */
.act-card-head { display: flex; align-items: baseline; gap: 6px; min-width: 0; flex-wrap: wrap; }
.act-card-cat {
  flex: 0 0 auto; font-size: 11.5px; line-height: 1.3; padding: 0 5px;
  color: #8A5A0C; border: 1px solid rgba(169, 123, 44, 0.55); background: #FBF1DD;
}
.act-card-title { flex: 0 1 auto; font-size: 13.5px; font-weight: 700; color: var(--ink); min-width: 0; }
.act-card-meta {
  flex: 0 1 auto; margin-left: auto; font-size: 12px; color: var(--muted);
  font-variant-numeric: tabular-nums; text-align: right;
}

/* 对象行：标签 + 对象选择（不是框） */
.act-card-targets { display: flex; flex-direction: column; gap: 4px; padding: 1px 0 0; }
.act-target-row { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.act-target-lbl {
  flex: 0 0 auto; min-width: 2.6em; font-size: 12px; color: var(--muted); letter-spacing: 0.04em;
}
.act-target-lbl::after { content: "："; }

.act-chips { display: flex; flex-wrap: wrap; gap: 3px 4px; min-width: 0; }
button.act-chip {
  font: inherit; font-size: 12.5px; line-height: 1.35; color: #4A4038;
  padding: 1px 9px; border-radius: 11px; cursor: pointer;
  background: rgba(107, 68, 40, 0.06); border: 1px solid transparent;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}
button.act-chip:hover { background: var(--accent-wash); border-color: rgba(107, 68, 40, 0.4); color: var(--accent-deep); }
button.act-chip.is-on {
  background: var(--accent); border-color: var(--accent-deep); color: #FCF8EF; font-weight: 700;
}
button.act-chip:focus-visible { outline: 1px solid var(--brass); outline-offset: 1px; }

/* 选项太多时：句中填空式下划线选择 */
select.act-token-select {
  -webkit-appearance: none; appearance: none;
  font: inherit; font-size: 13px; font-weight: 700; color: var(--accent-deep);
  min-width: 0; max-width: 100%; padding: 0 18px 1px 2px; min-height: 0; cursor: pointer;
  border: none; border-bottom: 1.5px dashed var(--accent); border-radius: 0;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6'><path d='M0.5 0.5 L5 5 L9.5 0.5' fill='none' stroke='%236B4428' stroke-width='1.4'/></svg>") no-repeat right 4px center transparent;
  text-overflow: ellipsis; box-shadow: none;
}
select.act-token-select:hover { border-bottom-style: solid; background-color: var(--accent-wash); }
select.act-token-select:focus { outline: none; border-bottom-style: solid; }

.act-card .d-action-preview { margin: 0; }
.act-card-head .act-card-meta + .act-card-status { margin-left: 4px; }

/* 对象选择 + 执行 同一行 */
.act-card-body { display: flex; align-items: flex-end; gap: 10px; min-width: 0; }
.act-card-body > .act-card-targets { flex: 1 1 auto; min-width: 0; }
.act-card-status { flex: 0 0 auto; font-size: 12px; color: var(--red); }
button.btn.act-card-go {
  flex: 0 0 auto; min-width: 68px; padding: 3px 14px; min-height: 27px;
  font-size: 13px !important; font-weight: 700; letter-spacing: 0.12em; white-space: nowrap;
}
.act-card.is-avail button.btn.act-card-go:not(:disabled) { border-color: var(--accent); color: var(--accent-deep); }

/* 卡片在网格里被拉高时：对象行紧贴标题，「执行」贴底，不在按钮下面留空。 */
.act-card-body { flex: 1 1 auto; }
.act-card-body > .act-card-targets { align-self: flex-start; }

/* 简化卡：不需要选对象的行动只有标题行 + 行尾「执行」。 */
.act-card.is-simple .act-card-targets { display: none; }
.act-card.is-simple .act-card-body { justify-content: flex-end; }

/* 议会·盟党诉求里的「改成有期限的承诺」：嵌在诉求卡内的简化行动卡。 */
.act-card.d2-bargain-card { margin-top: 2px; }
.act-card.d2-bargain-card .act-target-row { align-items: center; }
.act-card.d2-bargain-card select.act-token-select { flex: 1 1 auto; }
