/* Country details float above the same map; opening them never rebuilds its camera. */
.market-workspace .country-detail{position:absolute;right:70px;top:16px;width:min(var(--market-panel-width),calc(100% - 92px));max-height:calc(100% - 32px);min-width:0;padding:0 19px;border:1px solid var(--border-default);border-radius:12px;background:#fffffff7;box-shadow:0 8px 30px #1018230d;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#dce1e7 transparent;z-index:3;animation:country-detail-enter .16s ease-out}
.market-workspace .country-detail-heading{display:flex;align-items:center;gap:8px;position:sticky;top:0;z-index:2;padding:17px 0 14px;background:#fff;border-bottom:1px solid var(--border-subtle)}
.market-workspace .country-identity{display:flex;align-items:center;gap:10px;min-width:0;flex:1;margin:0}
.market-workspace .country-flag{font-size:25px;line-height:1;flex-shrink:0}
.market-workspace .country-identity>div{min-width:0}
.market-workspace .country-identity h2{font-size:20px;font-weight:550;line-height:1.4;letter-spacing:-.025em;margin:0;overflow-wrap:anywhere}
.market-workspace .country-identity p{font-size:11px;line-height:1.7;color:var(--text-tertiary);margin:3px 0 0;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.market-workspace .country-detail-heading button{display:grid;place-items:center;width:30px;height:32px;min-width:30px;min-height:32px;padding:7px;border:0;border-radius:6px;background:transparent;color:var(--text-tertiary);cursor:pointer;flex-shrink:0}
.market-workspace .country-detail-heading button:hover{background:var(--surface-hover);color:var(--text-primary)}
.market-workspace .country-detail-heading button svg{width:17px;height:17px}
.market-workspace .country-metrics{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;margin:17px 0 0;padding:0 0 15px;border:0;border-bottom:1px solid var(--border-subtle)}
.market-workspace .country-metrics>div{padding:0;border:0;background:transparent}
.market-workspace .country-metrics dt{font-size:12px;line-height:1.7;color:var(--text-tertiary)}
.market-workspace .country-metrics dd{font-size:24px;line-height:1.25;font-weight:550;letter-spacing:-.035em;font-variant-numeric:tabular-nums;color:var(--text-primary);margin:5px 0 0}
.market-workspace .country-review-summary{font-size:12px;line-height:1.7;color:var(--text-tertiary);padding-top:11px}
.market-workspace .country-review-summary b{font-weight:500;color:var(--text-secondary);margin-left:5px}
.market-workspace .country-sync-state{font-size:12px;line-height:1.7;color:var(--text-tertiary);margin:11px 0 0}
.market-workspace .country-records{margin:0;border:0}
.market-workspace .country-records>summary{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:15px 0 13px;min-height:42px;font-size:12px;line-height:1.7;color:var(--text-secondary);list-style:none;cursor:pointer}
.market-workspace .country-records>summary::-webkit-details-marker{display:none}
.market-workspace .country-records>summary::after{content:'';width:6px;height:6px;border:solid var(--text-tertiary);border-width:0 1.3px 1.3px 0;transform:rotate(45deg);margin-right:2px;flex-shrink:0}
.market-workspace .country-records[open]>summary::after{transform:rotate(225deg)}
.market-workspace .country-market-content{min-height:0;overflow:visible}
.market-workspace .country-activity-section{padding:0 0 8px;margin:0;border:0}
.market-workspace .country-activity-section+.country-activity-section{border-top:1px solid var(--border-subtle);padding-top:15px;margin-top:8px}
.market-workspace .country-section-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:5px}
.market-workspace .country-section-heading h3{font-size:12px;font-weight:500;line-height:1.7;color:var(--text-tertiary);margin:0}
.market-workspace .country-section-heading button{font:inherit;font-size:11px;border:0;background:none;padding:4px 0;color:var(--text-tertiary);cursor:pointer}
.market-workspace .country-customer-row,.market-workspace .country-task-row{display:flex;align-items:center;gap:12px;width:100%;min-height:52px;padding:11px 6px;border:0;border-radius:7px;background:none;color:var(--text-primary);text-align:left;cursor:pointer}
.market-workspace .country-customer-row:hover,.market-workspace .country-task-row:hover{background:var(--surface-subtle)}
.market-workspace .country-row-copy{display:flex;flex-direction:column;gap:4px;min-width:0;flex:1}
.market-workspace .country-row-copy strong{font-size:13px;line-height:1.6;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.market-workspace .country-row-copy small{font-size:11px;line-height:1.7;color:var(--text-tertiary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.market-workspace .country-row-arrow{font-size:14px;color:var(--text-tertiary);flex-shrink:0}
.market-workspace .country-task-status{font-size:11px;line-height:1.7;color:var(--text-tertiary);white-space:nowrap;flex-shrink:0}
.market-workspace .country-task-status.is-running,.market-workspace .country-task-status.is-queued{color:#a26644}
.market-workspace .country-task-status.is-completed{color:#58806b}
.market-workspace .country-task-status.is-failed{color:#a35c4d}
.market-workspace .country-list-empty{font-size:12px;line-height:1.8;color:var(--text-tertiary);margin:11px 0}
.market-workspace .country-empty{padding:20px 0 7px;margin:0;border:0;min-height:0;text-align:left}
.market-workspace .country-empty strong{font-size:13px;line-height:1.7;font-weight:500;color:var(--text-secondary)}
.market-workspace .country-empty p{font-size:12px;line-height:1.8;color:var(--text-tertiary);margin:6px 0 0}
.market-workspace .country-retry{font-size:12px;min-height:34px;margin:5px 0}
.market-workspace .country-detail-actions{display:flex;align-items:center;gap:8px;position:sticky;bottom:0;padding:14px 0 16px;margin:0;background:#fff;border-top:1px solid var(--border-subtle)}
.portal-page .market-workspace .country-detail-actions .portal-button{flex:1;min-height:38px;min-width:0;padding:8px 11px;border-radius:8px;font-size:12px;line-height:1.5;white-space:nowrap;box-shadow:none}
.portal-page .market-workspace .country-detail-actions .portal-button:hover{transform:none}
@keyframes country-detail-enter{from{opacity:.65;transform:translateY(5px)}to{opacity:1;transform:none}}
@media(max-width:700px){
 .market-workspace .country-detail{inset:auto 12px 12px;width:auto;max-height:calc(100% - 205px);padding:0 15px;border-radius:12px;background:#fff;box-shadow:0 -5px 24px #1018230b}
 .market-workspace .country-detail-heading{padding:12px 0 10px;gap:6px}
 .market-workspace .country-identity{gap:9px}
 .market-workspace .country-identity h2{font-size:19px}
 .market-workspace .country-identity p{font-size:11px}
 .market-workspace .country-detail-heading button{width:36px;height:38px;min-width:36px;min-height:38px;padding:9px}
 .market-workspace .country-metrics{margin-top:12px;padding-bottom:12px;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
 .market-workspace .country-metrics>div{display:flex;align-items:baseline;justify-content:space-between;gap:10px}
 .market-workspace .country-metrics dd{font-size:22px;margin:0}
 .market-workspace .country-records>summary{padding-block:10px;min-height:42px}
 .market-workspace .country-detail-actions{padding:11px 0 max(12px,env(safe-area-inset-bottom));gap:8px}
 .portal-page .market-workspace .country-detail-actions .portal-button{min-height:42px;font-size:13px}
 .market-workspace .country-empty{padding:14px 0 11px}
 .market-workspace .country-empty p{margin-top:4px}
 .market-workspace .country-review-summary{padding-top:9px}
 .market-workspace .country-customer-row,.market-workspace .country-task-row{min-height:50px}
}
@media(prefers-reduced-motion:reduce){.market-workspace .country-detail{animation:none}}
@media(max-width:700px) and (max-height:500px){
 .market-workspace.is-expanded .country-detail{inset:12px 70px 12px 12px;max-height:calc(100% - 24px)}
}
