/* A shared, native-checkbox market selector for conversations and strategies. */
.country-selection { min-width:0; border:1px solid var(--border-default); border-radius:16px; background:#fff; margin:18px 0 8px; padding:20px; }
.country-selection-heading { display:flex; justify-content:space-between; align-items:flex-start; gap:14px; margin-bottom:16px; }
.country-selection-heading h3 { margin:0 0 5px; font-size:var(--font-body); color:var(--text-primary); font-weight:600; }
.country-selection-heading p { margin:0; font-size:var(--font-caption); line-height:1.7; color:var(--text-tertiary); }
.country-selection button { font:inherit; }
.country-selection-heading>button,.country-selection-list-heading>button { border:0; padding:5px 0; background:transparent; color:var(--text-secondary); font-size:var(--font-caption); flex-shrink:0; }
.country-selection-heading>button:hover,.country-selection-list-heading>button:hover { color:#b3442c; }
.country-selection-search { display:flex; align-items:center; gap:9px; border:1px solid var(--control-border); border-radius:10px; padding:0 12px; min-height:42px; margin-bottom:13px; transition:border-color 120ms,box-shadow 120ms; }
.country-selection-search:hover { border-color:var(--border-strong); }
.country-selection-search svg { width:16px; height:16px; flex-shrink:0; color:var(--text-tertiary); fill:none; stroke:currentColor; stroke-width:1.5; }
.country-selection-search input { width:100%; min-width:0; border:0; outline:0; padding:11px 0; font:inherit; font-size:var(--font-small); color:var(--text-primary); background:transparent; }
.country-selection-search input:focus-visible { outline:none; }
.country-selection-search input::placeholder { color:var(--text-tertiary); }
.country-selection-filterbar { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:13px; flex-wrap:wrap; }
.country-selection-tabs { display:flex; gap:2px; padding:3px; border-radius:9px; background:var(--surface-hover); }
.country-selection-tabs button { min-height:32px; padding:6px 13px; border:0; border-radius:6px; font-size:var(--font-caption); line-height:1.5; color:var(--text-secondary); background:transparent; white-space:nowrap; }
.country-selection-tabs button[aria-pressed="true"] { background:#fff; color:var(--text-primary); box-shadow:0 1px 4px #0000000c; }
.country-selected-filter { display:flex; gap:7px; align-items:center; border:1px solid transparent; border-radius:8px; padding:7px 9px; font-size:var(--font-caption)!important; color:var(--text-secondary); background:transparent; min-height:34px; }
.country-selected-filter[aria-pressed="true"] { color:#a83d24; border-color:#f1d8ce; background:#fff5f0; }
.country-selection-browser { display:grid; grid-template-columns:172px minmax(0,1fr); min-width:0; border:1px solid var(--border-subtle); border-radius:12px; overflow:hidden; }
.country-selection-groups { max-height:312px; overflow:auto; border-right:1px solid var(--border-subtle); padding:8px; background:var(--surface-subtle); overscroll-behavior:contain; }
.country-group-row { display:flex; align-items:center; gap:10px; border-radius:8px; padding:0 8px; min-height:44px; }
.country-group-row.is-active { background:var(--border-subtle); }
.country-group-row:hover { background:var(--surface-hover); }
.country-group-row>button { flex:1; min-width:0; display:flex; justify-content:space-between; align-items:center; gap:5px; border:0; padding:10px 0; min-height:44px; background:transparent; font-size:var(--font-small); text-align:left; color:var(--text-secondary); }
.country-group-row small { color:var(--text-tertiary); font-size:var(--font-caption); font-variant-numeric:tabular-nums; white-space:nowrap; }
.country-group-row>button>span { overflow-wrap:anywhere; }
.country-selection-list-wrap { min-width:0; }
.country-selection-list-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:8px 14px; min-height:42px; border-bottom:1px solid var(--border-subtle); font-size:var(--font-caption); color:var(--text-secondary); }
.country-selection-list { height:270px; overflow:auto; padding:7px; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:4px; align-content:start; overscroll-behavior:contain; scrollbar-gutter:stable; }
.country-choice { display:flex; min-width:0; align-items:center; gap:10px; min-height:52px; padding:9px 10px; border:1px solid transparent; border-radius:9px; cursor:pointer; transition:background-color 120ms,border-color 120ms; }
.country-choice:hover { border-color:var(--border-subtle); background:var(--surface-subtle); }
.country-choice.is-selected { border-color:#f0d9ce; background:#fff5ef; }
.country-choice-name { flex:1; min-width:0; overflow-wrap:anywhere; }
.country-choice-name>span { display:block; color:var(--text-primary); font-size:var(--font-small); line-height:1.5; }
.country-choice-name>small { display:block; color:var(--text-tertiary); font-size:var(--font-caption); margin-top:2px; line-height:1.4; }
.country-choice-code { font-size:var(--font-caption); color:var(--text-tertiary); font-variant-numeric:tabular-nums; letter-spacing:.03em; }
.country-selection-empty { grid-column:1/-1; align-self:center; text-align:center; padding:42px 10px; }
.country-selection-empty p { color:var(--text-tertiary); font-size:var(--font-caption); line-height:1.8; margin:8px 0 10px; }
.country-selection-empty strong { color:var(--text-primary); font-size:var(--font-small); font-weight:500; }
.country-selection-empty button { border:1px solid var(--border-default); border-radius:8px; background:#fff; padding:7px 11px; font-size:var(--font-caption); }
.selected-country-summary { background:var(--surface-subtle); border:1px solid var(--border-subtle); padding:12px; border-radius:10px; margin-top:13px; }
.selected-country-summary-heading { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:8px; font-size:var(--font-caption); color:var(--text-secondary); }
.selected-country-summary-heading>button { border:0; background:transparent; padding:2px 0; font-size:var(--font-caption); color:var(--text-secondary); }
.selected-country-chips { display:flex; align-items:center; flex-wrap:wrap; gap:6px; max-height:144px; overflow:auto; }
.selected-country-chips>span { font-size:var(--font-caption); line-height:1.7; color:var(--text-tertiary); }
.selected-country-chip { display:inline-flex; align-items:center; gap:5px; border:1px solid var(--border-default); background:#fff; border-radius:7px; padding:3px 5px 3px 9px; font-size:var(--font-caption); color:var(--text-primary); }
.selected-country-chip button { display:grid; place-items:center; width:24px; height:24px; border:0; border-radius:5px; padding:0; color:var(--text-secondary); background:transparent; font-size:var(--font-reading); line-height:1; }
.selected-country-chip button:hover { color:#9d3923; background:#fff1eb; }
.country-selection-footer { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-top:15px; }
.country-selection-footer>span { font-size:var(--font-caption); color:var(--text-secondary); }
.country-selection-footer>.portal-button { font-size:var(--font-small); min-height:38px; border-radius:9px; }
.country-choice:focus-within { outline:2px solid var(--text-secondary); outline-offset:-2px; }
.country-group-row:focus-within { box-shadow:inset 0 0 0 1px var(--border-strong); }
@media(max-width:1100px) { .country-selection-list { grid-template-columns:minmax(0,1fr); } }
@media(max-width:640px) {
  .country-selection { padding:14px; border-radius:13px; }
  .country-selection-browser { grid-template-columns:118px minmax(0,1fr); }
  .country-selection-groups { padding:5px; }
  .country-group-row { gap:7px; padding:0 5px; }
  .country-group-row>button { font-size:var(--font-caption); }
  .country-group-row small { display:none; }
  .country-selection-list { padding:4px; }
  .country-choice { gap:8px; padding:8px 6px; }
  .country-choice-code { display:none; }
  .country-selection-search input { font-size:var(--font-reading); }
  .country-selection-tabs button { padding-inline:10px; }
  .country-selection-heading { gap:8px; }
  .country-selection-list-heading { padding-inline:9px; gap:8px; }
  .country-selection-filterbar { gap:8px; }
}
@media(max-width:420px) { .country-selection-browser { grid-template-columns:100px minmax(0,1fr); } .country-choice-name>small { display:none; } }
