/* 粘贴地址解析卡 · 两栏版面（spec 20260921-address-workbench-layout-v2）
   左栏地址 / 右栏「本次解析」；右栏在 编辑 → 确认估价 → 解析中 → 完成 四态原位切换。 */
.addr-paste { background: #fff; border: 1px solid #e8e6e2; border-radius: 14px; padding: 20px 24px 22px; margin: 0 0 14px; min-width: 0; }
.addr-paste [hidden] { display: none !important; }
.addr-paste__head { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.addr-paste h2 { margin: 0; font-size: 17px; font-weight: 650; color: #302e2b; display: flex; align-items: center; gap: 8px; }
.addr-paste h2 i { color: #ec891d; }
.addr-paste__sub { font-size: 13px; color: #79756e; }
.addr-paste__link { background: none; border: 0; padding: 0; color: #ad5b09; font-size: 12px; text-decoration: underline; cursor: pointer; }

/* 两栏栅格：左栏吃剩余宽度，右栏 340–400px；≤900px 堆叠 */
.addr-paste__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, 400px); gap: 24px; align-items: stretch; margin: 0; }
.addr-paste__left { border: 0; padding: 0; margin: 0; min-width: 0; display: flex; flex-direction: column; }
.addr-paste__lbl { display: flex; align-items: baseline; gap: 8px; margin-bottom: 7px; font-size: 13px; font-weight: 600; color: #494640; }
.addr-paste__lbl-sub { font-weight: 400; color: #79756e; font-size: 12px; }
.addr-paste__lbl .addr-paste__link { margin-left: auto; }
.addr-paste textarea { display: block; width: 100%; flex: 1 1 auto; min-height: 236px; min-width: 0; box-sizing: border-box; resize: vertical; border: 1px solid #dcd8d2; border-radius: 8px; background: #fdfcfb; padding: 10px 12px; font: inherit; font-size: 14px; line-height: 1.7; color: #302e2b; }
.addr-paste textarea:focus, .addr-paste input:focus { outline: 2px solid #f9bb72; outline-offset: 2px; }
.addr-paste textarea[readonly] { background: #f6f5f3; color: rgba(0, 0, 0, .65); }
.addr-paste__meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; margin: 8px 0 0; color: #69645d; font-size: 12px; }
.addr-paste__meta .is-error { color: #b33c21; font-weight: 600; }
.addr-paste__grow { flex: 1; }
.addr-paste__upload { color: #79756e; }
.addr-paste__hint { margin: 6px 0 0; font-size: 12px; color: #777168; line-height: 1.7; overflow-wrap: anywhere; }
.addr-paste__hint:empty, .addr-paste__actions:empty, .addr-paste__links:empty { display: none; }

/* 右栏：稳定最小高度，四态切换时卡片不跳、textarea 不缩 */
.addr-paste__side { border: 1px solid #f0f0f0; border-radius: 10px; background: #fafafa; padding: 16px; display: flex; flex-direction: column; gap: 12px; min-width: 0; min-height: 336px; }
.addr-paste__side-title { margin: 0; font-size: 13px; font-weight: 600; color: rgba(0, 0, 0, .65); }
.addr-paste__settings { display: flex; flex-direction: column; gap: 10px; }
.addr-paste__field { display: block; font-size: 12px; color: rgba(0, 0, 0, .65); }
.addr-paste__field span { color: #9a958d; margin-left: 4px; }
.addr-paste__field input { display: block; width: 100%; box-sizing: border-box; height: 32px; margin-top: 4px; border: 1px solid #d9d9d9; border-radius: 6px; padding: 0 10px; background: #fff; font: inherit; color: #302e2b; }
.addr-paste__options { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: rgba(0, 0, 0, .65); }
.addr-paste__options label { display: inline-flex; align-items: center; gap: 5px; }
.addr-paste :disabled { opacity: .7; }
.addr-paste__start { width: 100%; height: 40px; font-size: 15px; margin-top: auto; }
.addr-paste__alt { margin: 0; font-size: 12px; color: #79756e; text-align: center; }
.addr-paste__alt a { font-weight: 600; }

/* 估价确认：状态框在右栏变成报价卡；首行（规模与费用）加重 */
.addr-paste__status { border: 1px solid #f3d4ab; background: #fff8ed; border-radius: 8px; padding: 12px 14px; margin: 0; font-size: 13px; line-height: 1.8; white-space: pre-line; overflow-wrap: anywhere; }
.addr-paste[data-state=confirming] .addr-paste__status { background: #fff; border-color: #ffd591; }
.addr-paste[data-state=confirming] .addr-paste__status { color: #69645d; font-size: 12px; line-height: 1.7; }
.addr-paste__actions, .addr-paste__links { display: flex; flex-direction: column; gap: 8px; margin: 0; }
.addr-paste__actions .btn { width: 100%; white-space: normal; }
.addr-paste__links a { overflow-wrap: anywhere; font-size: 13px; text-align: center; }
.addr-paste .addr-paste__busy:disabled { opacity: 1; cursor: wait; }
.addr-paste__busy::before { content: ''; display: inline-block; width: 12px; height: 12px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; margin-right: 8px; vertical-align: -1px; animation: addr-paste-spin 1s linear infinite; }
.addr-paste[data-state=submitted] .addr-paste__busy::before { display: none; }

/* 进行中 / 完成：同一反馈区原位承接（spec 20260921-address-paste-parse-feedback） */
.addr-paste__feedback { padding: 14px; border: 1px solid #d8e7ef; border-radius: 10px; background: #fff; overflow-wrap: anywhere; }
.addr-paste__feedback > p:first-child { margin: 0 0 10px; font-size: 14px; line-height: 1.7; font-weight: 600; color: #304d61; }
.addr-paste__feedback progress { display: block; width: 100%; height: 8px; accent-color: #da790f; margin-bottom: 10px; }
.addr-paste__feedback[data-phase=succeeded] { border-color: #d4e7da; }
.addr-paste__feedback[data-phase=failed], .addr-paste__feedback[data-phase=error] { background: #fff9f4; border-color: #efd7c5; }
.addr-paste__feedback .addr-paste__actions { margin-top: 10px; }
.addr-paste__task-link { display: block; margin-top: 10px; font-size: 13px; text-align: center; }
.addr-paste__feedback .dtb-result-bar { max-width: 100%; }
@keyframes addr-paste-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .addr-paste__busy::before { animation: none; } }

@media (max-width: 900px) {
  .addr-paste__grid { grid-template-columns: 1fr; }
  .addr-paste__side { min-height: 0; }
  .addr-paste textarea { min-height: 170px; }
}
@media (max-width: 600px) {
  .addr-paste { padding: 14px; }
  .addr-paste__side, .addr-paste__feedback { padding: 12px; }
}

/* D-10 分段外观「粘贴地址 | 上传表格」：灰色胶囊轨道 + 白色选中胶囊；「上传表格」是跳上传向导的链接 */
.addr-paste__sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.addr-paste__seg { display: inline-flex; align-items: stretch; gap: 2px; height: 36px; padding: 3px; box-sizing: border-box; border-radius: 999px; background: #efedea; }
.addr-paste__seg-item {
  display: inline-flex; align-items: center; justify-content: center; height: 30px; padding: 0 18px; border-radius: 999px;
  font-size: 13.5px; font-weight: 600; line-height: 1; color: #5f5a53; white-space: nowrap; text-decoration: none;
  transition: color .12s, background .12s;
}
a.addr-paste__seg-item:hover { color: #302e2b; background: rgba(255, 255, 255, .55); text-decoration: none; }
a.addr-paste__seg-item:focus-visible { outline: 2px solid #f9bb72; outline-offset: 1px; }
.addr-paste__seg-item.is-active { background: #fff; color: #302e2b; font-weight: 650; box-shadow: 0 1px 3px rgba(48, 46, 43, .14), 0 0 0 1px rgba(48, 46, 43, .04); }
/* 分段后的说明靠右、弱化 */
.addr-paste__seg ~ .addr-paste__sub { margin-left: auto; color: #9a958d; }
@media (max-width: 600px) {
  .addr-paste__seg ~ .addr-paste__sub { margin-left: 0; }
  .addr-paste__seg { display: flex; width: 100%; }
  .addr-paste__seg-item { flex: 1 1 0; }
}

/* A4 预检额度行（spec 20261009-address-workbench-trust-a）：确认态报价卡头；额度不够时整块转红 */
.addr-paste__quota { border: 1px solid #ffd591; background: #fff; border-radius: 8px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; overflow-wrap: anywhere; }
.addr-paste__quota-line { margin: 0; font-size: 13.5px; line-height: 1.7; font-weight: 600; color: #ad4e00; }
.addr-paste__quota-line b { font-size: 15px; font-variant-numeric: tabular-nums; }
.addr-paste__quota-note { margin: 0; font-size: 12px; line-height: 1.7; color: #777168; }
.addr-paste__quota-addons { display: flex; flex-wrap: wrap; gap: 4px 14px; padding-top: 6px; border-top: 1px dashed #f0e2cc; font-size: 12px; color: rgba(0, 0, 0, .65); }
.addr-paste__quota-addons label { display: inline-flex; align-items: center; gap: 5px; }
.addr-paste__quota.is-blocked { border-color: #f2b8a8; background: #fff6f3; }
.addr-paste__quota.is-blocked .addr-paste__quota-line { color: #b33c21; }
.addr-paste__quota.is-blocked .addr-paste__quota-note { color: #8f3a22; }
.addr-paste__actions .addr-paste__exit { width: 100%; white-space: normal; }
.addr-paste__actions .btn:disabled { cursor: not-allowed; }
