/* 修草纪 — 收货地址库 V1（2026-09-22）
   兼容老 iOS：不用 inset（展开为 top/right/bottom/left）、不用 flex gap（用 margin）。
   宽度跟随商城 480px 版心；375 / 390 宽不溢出（长文本 word-break）。 */

/* ---------- 个人中心入口 ---------- */
.profile-address-entry { display: flex; align-items: center; margin: 14px 2px 0; padding: 12px 0 0; border-top: 1px solid #F0F2EF; cursor: pointer; }
.profile-address-entry .pa-icon { width: 16px; height: 16px; border: 1.6px solid #5D655F; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); margin: 0 12px 0 4px; flex-shrink: 0; box-sizing: border-box; }
.profile-address-entry .pa-text { flex: 1; min-width: 0; font-size: 14px; color: #202722; letter-spacing: 0.3px; }
.profile-address-entry .pa-sub { font-size: 12px; color: #9A9F9A; margin-right: 4px; white-space: nowrap; }
.profile-address-entry .pa-arrow { color: #B5BAB5; font-size: 16px; }

/* ---------- 地址列表视图 ---------- */
.address-book-scroll { min-height: calc(100vh - 58px); background: #F5F5F4; padding: 10px 0 calc(96px + var(--safe-bottom, 0px)); box-sizing: border-box; }
.ab-loading { padding: 40px 0; text-align: center; color: #8A928B; font-size: 13px; }
.ab-list { padding: 0 12px; }
.ab-list-note { padding: 14px 18px 0; color: #9A9F9A; font-size: 12px; line-height: 1.5; text-align: center; }

.ab-card { background: #fff; border-radius: 12px; margin-bottom: 10px; box-shadow: 0 2px 10px rgba(20, 48, 31, 0.04); overflow: hidden; border: 1px solid transparent; }
.ab-card.is-picked { border-color: var(--green-light, #4A7C59); }
.ab-card-main { padding: 14px 16px 12px; cursor: pointer; }
.ab-card-person { display: flex; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.ab-card-name { font-size: 15px; font-weight: 600; color: #1F2722; margin-right: 10px; max-width: 100%; word-break: break-all; }
.ab-card-phone { font-size: 14px; color: #3F4741; margin-right: 8px; }
.ab-tag { display: inline-block; font-size: 11px; line-height: 16px; padding: 0 6px; border-radius: 4px; color: #fff; background: var(--green-dark, #173B25); }
.ab-card-addr { font-size: 13px; color: #4B544E; line-height: 1.6; word-break: break-all; }
.ab-card-foot { display: flex; align-items: center; padding: 10px 16px; border-top: 1px solid #F2F3F1; }
.ab-radio { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid #C7CCC6; box-sizing: border-box; margin-right: 6px; flex-shrink: 0; position: relative; cursor: pointer; }
.ab-radio.on { border-color: var(--green-dark, #173B25); background: var(--green-dark, #173B25); }
.ab-radio.on:after { content: ''; position: absolute; top: 4px; left: 4px; width: 5px; height: 5px; border-radius: 50%; background: #fff; }
.ab-card-foot-text { font-size: 12px; color: #5B635D; cursor: pointer; white-space: nowrap; }
.ab-card-foot-spacer { flex: 1; min-width: 8px; }
.ab-link { border: 0; background: transparent; font-size: 13px; color: #48524B; padding: 4px 0 4px 16px; cursor: pointer; font-family: inherit; }

.ab-empty { padding: 56px 24px 20px; text-align: center; }
.ab-empty-pin { width: 30px; height: 30px; margin: 0 auto 18px; border: 2px solid #9CA39D; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); box-sizing: border-box; }
.ab-empty-title { font-size: 15px; color: #1F2722; margin-bottom: 8px; }
.ab-empty-sub { font-size: 12px; color: #8A928B; line-height: 1.6; }
.ab-latest-btn { margin-top: 20px; }

.ab-bottom-bar { position: fixed; left: 0; right: 0; bottom: 0; max-width: 480px; margin: 0 auto; background: #fff; padding: 10px 16px calc(10px + var(--safe-bottom, 0px)); box-sizing: border-box; box-shadow: 0 -1px 10px rgba(20, 32, 24, 0.05); z-index: 120; }

/* ---------- 按钮 ---------- */
.ab-btn { height: 44px; border-radius: 22px; font-size: 15px; font-family: inherit; cursor: pointer; padding: 0 22px; letter-spacing: 1px; box-sizing: border-box; }
.ab-btn-primary { background: var(--green-dark, #173B25); color: #fff; border: 1px solid var(--green-dark, #173B25); }
.ab-btn-primary:disabled { opacity: 0.5; }
.ab-btn-ghost { background: #fff; color: #46504A; border: 1px solid #D8DDD3; }
.ab-btn-block { display: block; width: 100%; }

/* ---------- 编辑面板（全屏浮层） ---------- */
.ab-editor { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 1500; background: #F5F5F4; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.ab-editor-inner { max-width: 480px; margin: 0 auto; min-height: 100%; position: relative; padding-bottom: calc(84px + var(--safe-bottom, 0px)); box-sizing: border-box; }
.ab-editor-head { display: flex; align-items: center; padding: 12px 16px; background: #fff; border-bottom: 1px solid var(--border, #D8DDD3); }
.ab-editor-back { font-size: 22px; color: #1F2A24; background: none; border: none; line-height: 1; padding: 4px 12px 4px 0; cursor: pointer; }
.ab-editor-title { font-size: 15px; color: #1F2A24; letter-spacing: 1px; }
.ab-editor-body { background: #fff; margin-top: 10px; padding: 6px 16px 16px; }
.ab-field { padding: 10px 0; border-bottom: 1px solid #F2F3F1; }
.ab-field label { display: block; font-size: 12px; color: #7A827A; margin-bottom: 6px; letter-spacing: 0.5px; }
.ab-field input, .ab-field textarea { display: block; width: 100%; box-sizing: border-box; border: 1px solid #E1E4DF; border-radius: 8px; padding: 10px 12px; font-size: 15px; color: #1F2722; font-family: inherit; background: #FAFBFA; outline: none; -webkit-appearance: none; }
.ab-field textarea { min-height: 64px; resize: vertical; line-height: 1.5; }
.ab-field input:focus, .ab-field textarea:focus { border-color: var(--green-light, #4A7C59); background: #fff; }
.ab-recognize { margin-top: 12px; padding: 10px; border: 1px dashed #D8DDD3; border-radius: 10px; background: #FAFBFA; }
.ab-recognize textarea { display: block; width: 100%; box-sizing: border-box; min-height: 56px; border: 1px solid #E1E4DF; border-radius: 8px; padding: 8px 10px; font-size: 13px; line-height: 1.5; font-family: inherit; background: #fff; resize: vertical; -webkit-appearance: none; }
.ab-recognize-row { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.ab-recognize-tip { font-size: 11px; color: #8A928B; margin-right: 10px; }
.ab-recognize-btn { flex-shrink: 0; border: 1px solid var(--green-dark, #173B25); background: #fff; color: var(--green-dark, #173B25); border-radius: 16px; padding: 6px 14px; font-size: 12px; cursor: pointer; font-family: inherit; }
.ab-recognize-btn:disabled { opacity: 0.5; }
.ab-default-row { display: flex; align-items: center; padding: 16px 0 4px; cursor: pointer; position: relative; }
.ab-default-row.is-locked { cursor: default; }
.ab-default-text { flex: 1; min-width: 0; font-size: 14px; color: #1F2722; margin-right: 12px; }
.ab-default-sub { display: block; font-size: 11px; color: #8A928B; margin-top: 3px; line-height: 1.5; }
.ab-default-row input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.ab-switch { width: 44px; height: 26px; border-radius: 13px; background: #D9DDD8; position: relative; flex-shrink: 0; transition: background 0.2s; }
.ab-switch:after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15); transition: transform 0.2s; }
.ab-default-row input:checked + .ab-switch { background: var(--green-dark, #173B25); }
.ab-default-row input:checked + .ab-switch:after { transform: translateX(18px); }
.ab-default-row input:disabled + .ab-switch { opacity: 0.55; }
.ab-form-error { display: none; margin-top: 12px; color: #C8473D; font-size: 13px; line-height: 1.5; }
.ab-editor-actions { position: fixed; left: 0; right: 0; bottom: 0; max-width: 480px; margin: 0 auto; display: flex; background: #fff; padding: 10px 16px calc(10px + var(--safe-bottom, 0px)); box-sizing: border-box; box-shadow: 0 -1px 10px rgba(20, 32, 24, 0.05); z-index: 1501; }
.ab-editor-actions .ab-btn { flex: 1; }
.ab-editor-actions .ab-btn-ghost { flex: 0 0 96px; margin-right: 10px; }

/* ---------- 下单页 ---------- */
.ab-co-card { display: flex; align-items: flex-start; padding: 4px 0 2px; cursor: pointer; }
.ab-co-pin { width: 18px; height: 18px; border: 1.8px solid #5D655F; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); margin: 4px 12px 0 2px; flex-shrink: 0; box-sizing: border-box; }
.ab-co-main { flex: 1; min-width: 0; }
.ab-co-arrow { color: #9CA39D; font-size: 20px; line-height: 40px; margin-left: 8px; flex-shrink: 0; }
.ab-co-tip { font-size: 11px; color: #9A9F9A; margin-top: 8px; padding-left: 32px; }
.ab-co-save-row { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; padding-top: 10px; border-top: 1px dashed #E6E9E4; }
.ab-co-save-text { font-size: 12px; color: #7A827A; line-height: 1.5; margin-right: 10px; min-width: 0; }

/* ---------- 下单页地址选择（底部弹层） ---------- */
.ab-picker-mask { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 1400; background: rgba(15, 23, 18, 0.45); }
.ab-picker { position: absolute; left: 0; right: 0; bottom: 0; max-width: 480px; margin: 0 auto; background: #F5F5F4; border-radius: 16px 16px 0 0; max-height: 78vh; display: flex; flex-direction: column; overflow: hidden; }
.ab-picker-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; background: #fff; flex-shrink: 0; }
.ab-picker-title { font-size: 15px; font-weight: 600; color: #1F2722; }
.ab-picker-close { border: 0; background: transparent; font-size: 24px; line-height: 1; color: #8A928B; padding: 0 0 0 16px; cursor: pointer; }
.ab-picker-body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 10px 12px 0; min-height: 80px; }
.ab-picker-foot { flex-shrink: 0; background: #fff; padding: 10px 16px calc(10px + var(--safe-bottom, 0px)); }
