/* Saved cost lists: add-only EC research preview. */
.ec-cost-dialog { width: min(1040px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); margin: auto; padding: 0; border: 1px solid #d8deea; border-radius: 14px; color: #1a1a2e; background: #fff; box-sizing: border-box; overflow: auto; }
.ec-cost-dialog::backdrop { background: rgba(15, 23, 42, .48); }
.ec-cost-body { padding: 24px; display: flex; flex-direction: column; max-height: calc(100dvh - 34px); box-sizing: border-box; }
.ec-cost-body > * { flex-shrink: 0; }
.ec-cost-body h2 { margin: 0 0 12px; font-size: 22px; }
.ec-cost-body p { margin: 0 0 12px; line-height: 1.7; font-size: 14px; }
.ec-cost-rules { background: #f5f8fc; border-radius: 8px; padding: 12px; color: #475467; }
.ec-cost-picker { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.ec-cost-picker label { width: 100%; font-weight: 700; font-size: 14px; }
.ec-cost-picker select { flex: 1; min-width: 0; min-height: 44px; padding: 8px; border: 1px solid #cbd5e1; border-radius: 6px; font-size: 16px; background: #fff; }
.ec-cost-status { min-height: 24px; margin: 10px 0; line-height: 1.6; font-size: 14px; overflow-wrap: anywhere; }
.ec-cost-status.is-error { color: #b42318; }
.ec-cost-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.ec-cost-stat { border: 1px solid #dfe6f0; border-radius: 8px; padding: 12px; background: #fbfdff; }
.ec-cost-stat strong { display: block; font-size: 26px; color: #1a6fd4; }
.ec-cost-stat span { font-size: 13px; line-height: 1.5; }
.ec-cost-results { margin-top: 14px; max-height: 44dvh; min-height: 100px; flex: 1 1 auto; overflow: auto; border: 1px solid #e5e7eb; border-radius: 8px; }
.ec-cost-results:empty { display: none; }
.ec-cost-results table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ec-cost-results th { position: sticky; top: 0; background: #f5f7fa; text-align: left; z-index: 1; }
.ec-cost-results th, .ec-cost-results td { padding: 10px; border-bottom: 1px solid #e5e7eb; vertical-align: top; overflow-wrap: anywhere; }
.ec-cost-results td small { display: block; color: #667085; font-size: 11px; margin-top: 4px; }
.ec-cost-results .ec-cost-add { color: #067647; font-weight: 700; }
.ec-cost-results .ec-cost-review { color: #934600; }
.ec-cost-results .ec-cost-duplicate { color: #475467; }
.ec-cost-footer { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.ec-cost-dialog button { min-height: 44px; }
.ec-cost-dialog button:disabled { opacity: .55; cursor: default; }
@media (max-width: 600px) {
  .ec-cost-dialog { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); }
  .ec-cost-body { padding: 14px; max-height: calc(100dvh - 18px); }
  .ec-cost-body h2 { font-size: 19px; }
  .ec-cost-summary { gap: 5px; }
  .ec-cost-stat { padding: 8px; }
  .ec-cost-stat span { font-size: 11px; }
  .ec-cost-results table, .ec-cost-results tbody { display: block; }
  .ec-cost-results thead { display: none; }
  .ec-cost-results tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); padding: 5px; border-bottom: 1px solid #dfe6f0; }
  .ec-cost-results td { padding: 7px; border: 0; }
  .ec-cost-results td:first-child, .ec-cost-results td:nth-child(2) { grid-column: 1 / -1; }
  .ec-cost-results td::before { content: attr(data-label); display: block; color: #667085; font-weight: 400; font-size: 11px; margin-bottom: 4px; }
  .ec-cost-footer { flex-wrap: wrap-reverse; }
  .ec-cost-footer button { flex: 1 1 100%; }
}
