/* ============================================================================
 *  Settings > Data Enrichment  (settings-data-enrichment.php)
 *  Behaviour: assets/js/settings-enrichment.js
 * ========================================================================== */
.se { min-width: 0; color: var(--text); }
.se-i { width: 16px; height: 16px; flex: none; vertical-align: middle; }
.se-head { margin-bottom: 18px; }
.se-head__title { margin: 0; font-size: clamp(24px, 1.1rem + 1vw, 30px); font-weight: 500; }
.se-head__sub { margin: 6px 0 0; font-size: 15px; }
.se-tabs { display: flex; gap: 4px; overflow-x: auto; margin-bottom: 26px; border-bottom: 1px solid var(--border-strong); scrollbar-width: none; }
.se-tabs::-webkit-scrollbar { display: none; }
.se-tab { position: relative; flex: none; padding: 10px 28px 14px; font-size: 15px; color: var(--text); text-decoration: none; white-space: nowrap; }
.se-tab:hover { color: var(--brand); }
.se-tab.is-on { font-weight: 600; }
.se-tab.is-on::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 4px; background: var(--text); border-radius: 3px 3px 0 0; }
.se-tab:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: 6px; }
.se-h2 { margin: 0 0 6px; font-size: 18px; font-weight: 700; }
.se-h3 { margin: 22px 0 8px; font-size: 15px; font-weight: 700; }
.se-p { margin: 0 0 12px; font-size: 15px; line-height: 1.45; }
.se-p--muted { color: var(--text-muted); }
.se-card { padding: 22px 24px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm, 8px); background: var(--surface); }
.se-sep { height: 1px; margin: 18px 0; border: 0; background: var(--border-strong); }
.se-intro { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; margin-bottom: 14px; }
.se-colh { display: grid; grid-template-columns: 1fr 1fr; padding-top: 2px; font-size: 15px; font-weight: 700; }
.se-colh span { display: inline-flex; align-items: center; gap: 8px; }
.se-row { display: grid; grid-template-columns: minmax(0, 1fr) 170px 170px; gap: 20px; align-items: center; }
.se-row--sub { margin-top: 16px; padding-left: 24px; }
.se-row--one { grid-template-columns: minmax(0, 1fr) 80px; }
.se-row__txt strong { display: flex; align-items: center; gap: 6px; font-size: 15px; }
.se-row__txt p { margin: 4px 0 0; color: var(--text-muted); font-size: 14.5px; line-height: 1.45; }
.se-cell { display: flex; align-items: center; }
.se-row--one .se-cell { justify-content: flex-end; }
/* switch (CRM style) */
.se-sw { position: relative; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.se-sw input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.se-sw__track { position: relative; width: 44px; height: 24px; background: var(--border-strong, #d0d5dd); border-radius: 12px; transition: background .15s; }
.se-sw__track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; background: #fff; border-radius: 50%; box-shadow: 0 1px 2px rgba(16, 24, 40, .2); transition: transform .15s; }
.se-sw input:checked + .se-sw__track { background: var(--brand); }
.se-sw input:checked + .se-sw__track::after { transform: translateX(20px); }
.se-sw input:focus-visible + .se-sw__track { box-shadow: var(--focus-ring); }
.se-sw__t { min-width: 26px; font-size: 13px; font-weight: 700; color: var(--text-muted); }
.se-tip { position: relative; display: inline-grid; color: var(--text-muted); cursor: help; }
.se-tip::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 8px); left: 50%; z-index: 5; display: none; width: 260px; padding: 8px 10px; font-size: 12.5px; font-weight: 400; line-height: 1.45; color: #fff; background: var(--text); border-radius: 6px; transform: translateX(-50%); pointer-events: none; text-transform: none; letter-spacing: 0; }
.se-tip:hover::after, .se-tip:focus::after { display: block; }
.se-tip:focus-visible { outline: 2px solid var(--brand); border-radius: 50%; }
/* toolbar bits */
.se-mapbar, .se-actbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 18px 0 16px; }
.se-spacer { flex: 1; }
.se-search { position: relative; display: inline-flex; }
.se-search input { width: 224px; height: 40px; padding: 0 36px 0 14px; font: inherit; font-size: 14.5px; color: var(--text); background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-sm, 8px); }
.se-search input:focus { outline: none; border-color: var(--brand); box-shadow: var(--focus-ring); }
.se-search .se-i { position: absolute; right: 12px; top: 12px; color: var(--text-muted); pointer-events: none; }
.se-chip { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; font-size: 13px; font-weight: 600; background: var(--surface-hover, #f2f4f7); border-radius: 6px; }
.se-chip--dark { color: #fff; background: var(--text); }
.se-seg { display: inline-flex; border: 1px solid var(--border-strong); border-radius: var(--radius-sm, 8px); overflow: hidden; }
.se-seg button { height: 34px; padding: 0 14px; font: inherit; font-size: 14.5px; color: var(--text); background: var(--surface); border: 0; cursor: pointer; }
.se-seg button + button { border-left: 1px solid var(--border-strong); }
.se-seg button[aria-checked="true"] { font-weight: 600; background: var(--surface-hover, #f2f4f7); }
.se-seg button:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.se-plain { display: inline-flex; align-items: center; gap: 4px; padding: 6px 8px; font: inherit; font-size: 14.5px; font-weight: 600; color: var(--text); background: none; border: 0; border-radius: 6px; cursor: pointer; }
.se-plain:hover, .se-plain[aria-expanded="true"] { background: var(--surface-hover); }
.se-i--caret { width: 14px; height: 14px; }
/* tables */
.se-tablewrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-sm, 8px); background: var(--surface); }
.se-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 15px; }
.se-table th { padding: 14px 24px; font-size: 14.5px; font-weight: 500; color: var(--text-muted); text-align: left; white-space: nowrap; background: var(--surface); border-bottom: 1px solid var(--text); }
.se-table td { padding: 14px 24px; vertical-align: middle; border-bottom: 1px solid var(--border); background: var(--surface); }
.se-table tbody tr:last-child td { border-bottom: 0; }
.se-table th .se-i { display: inline-block; margin-left: 4px; color: var(--text-muted); }
.se-table th > * { white-space: nowrap; }
.se-sticky { position: sticky; right: 0; z-index: 1; box-shadow: -8px 0 12px -10px rgba(16, 24, 40, .25); }
.se-maptable { min-width: 980px; }
.se-maptable th:first-child, .se-maptable td:first-child { width: 300px; }
.se-prop { display: inline-flex; align-items: center; gap: 12px; white-space: nowrap; }
.se-ft { display: inline-grid; place-items: center; width: 20px; font-size: 9px; font-weight: 700; color: var(--text-muted); letter-spacing: -.02em; }
.se-ft-i { width: 15px; height: 15px; color: var(--text-muted); }
.se-arrowc { width: 40px; padding-left: 0 !important; padding-right: 0 !important; color: var(--text-muted); }
.se-arrowc .se-i { width: 18px; height: 18px; }
.se-crmprop { display: inline-flex; align-items: center; gap: 10px; width: 240px; max-width: 100%; height: 40px; padding: 0 14px; font-size: 15px; white-space: nowrap; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-sm, 8px); }
.se-crmprop > span:last-child { overflow: hidden; text-overflow: ellipsis; }
.se-rule { display: flex; align-items: center; gap: 14px; }
.se-dd { display: inline-flex; align-items: center; justify-content: space-between; gap: 8px; width: 212px; height: 40px; padding: 0 14px; font: inherit; font-size: 15px; color: var(--text); text-align: left; background: var(--surface); border: 1px solid var(--text); border-radius: var(--radius-sm, 8px); cursor: pointer; }
.se-dd span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.se-dd:hover, .se-dd[aria-expanded="true"] { border-color: var(--brand); }
.se-reset { display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0; color: var(--text); background: var(--surface); border: 1px solid var(--text); border-radius: var(--radius-sm, 8px); cursor: pointer; }
.se-reset:hover:not(:disabled) { background: var(--surface-hover); }
.se-reset:disabled { color: var(--text-muted); border-color: var(--border-strong); cursor: default; }
.se-reset .se-i { width: 18px; height: 18px; }
.se-empty { padding: 28px 24px !important; color: var(--text-muted); text-align: center; }
.se-acttable { min-width: 900px; }
.se-when { display: flex; flex-direction: column; white-space: nowrap; }
.se-when small, .se-recs small { margin-top: 2px; font-size: 14px; color: var(--text); }
.se-tag { display: inline-flex; align-items: center; height: 24px; padding: 0 8px; font-size: 13px; background: var(--surface-hover, #f2f4f7); border: 1px solid var(--border-strong); border-radius: 4px; white-space: nowrap; }
.se-recs { display: flex; flex-direction: column; max-width: 200px; }
.se-reclink { padding: 0; overflow: hidden; font: inherit; font-weight: 600; color: var(--brand); text-align: left; text-overflow: ellipsis; white-space: nowrap; background: none; border: 0; cursor: pointer; }
.se-reclink:hover { text-decoration: underline; }
.se-sortbtn { display: inline-flex; align-items: center; gap: 2px; padding: 0; font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
.se-btn { display: inline-flex; align-items: center; justify-content: center; height: 38px; padding: 0 16px; font: inherit; font-size: 14.5px; font-weight: 600; color: var(--text); background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-sm, 8px); cursor: pointer; white-space: nowrap; }
.se-btn:hover { background: var(--surface-hover); }
.se-btn--sm { height: 34px; padding: 0 14px; }
.se-pager { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 16px 0 6px; font-size: 14.5px; }
.se-pg { padding: 6px 10px; font: inherit; font-weight: 600; color: var(--text); background: none; border: 0; border-radius: 6px; cursor: pointer; }
.se-pg:disabled { color: var(--text-muted); cursor: default; }
.se-pg:hover:not(:disabled) { background: var(--surface-hover); }
.se-pg__n { display: inline-grid; place-items: center; min-width: 28px; height: 28px; font-weight: 600; border: 1px solid var(--text); border-radius: 6px; }
/* dropdown */
.se-pop { position: fixed; z-index: 1500; max-height: 320px; padding: 6px; overflow-y: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm, 8px); box-shadow: 0 12px 32px rgba(16, 24, 40, .16); }
.se-pop__item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; font: inherit; font-size: 14.5px; color: var(--text); text-align: left; white-space: nowrap; background: none; border: 0; border-radius: 6px; cursor: pointer; }
.se-pop__item:hover, .se-pop__item:focus-visible { outline: none; background: var(--surface-hover); }
.se-pop__item.is-on { background: var(--surface-hover); font-weight: 600; }
.se-pop__chk { width: 16px; height: 16px; flex: none; border: 1.5px solid var(--border-strong); border-radius: 4px; }
.se-pop__item.is-on .se-pop__chk { border-color: var(--brand); background: var(--brand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5 9-10'/%3E%3C/svg%3E") center / 12px no-repeat; }
/* details drawer */
.se-dov { position: fixed; inset: 0; z-index: 1450; background: rgba(16, 24, 40, .4); }
.se-drawer { position: absolute; top: 0; right: 0; bottom: 0; display: flex; flex-direction: column; width: 460px; max-width: 100%; background: var(--surface); box-shadow: -12px 0 32px rgba(16, 24, 40, .18); }
.se-drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 18px 24px; border-bottom: 1px solid var(--border); }
.se-drawer__head h2 { margin: 0; font-size: 20px; }
.se-drawer__body { flex: 1; overflow-y: auto; padding: 20px 24px; }
.se-drawer__foot { padding: 16px 24px; border-top: 1px solid var(--border); }
.se-x { display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 0; color: var(--text-muted); background: none; border: 0; border-radius: 6px; cursor: pointer; }
.se-x:hover { background: var(--surface-hover); color: var(--text); }
.se-x .se-i { width: 20px; height: 20px; }
.se-dl div { display: grid; grid-template-columns: 120px 1fr; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.se-dl dt { color: var(--text-muted); }
.se-dl dd { margin: 0; }
.se-list { margin: 0 0 16px; padding-left: 20px; }
@media (max-width: 900px) {
  .se-intro { grid-template-columns: 1fr; }
  .se-colh { display: none; }
  .se-row { grid-template-columns: 1fr; gap: 10px; }
  .se-cell { gap: 12px; }
  .se-cell::before { content: attr(data-l); min-width: 84px; font-size: 14px; font-weight: 600; }
  .se-cell:empty { display: none; }
  .se-row--sub { padding-left: 12px; }
}
@media (max-width: 600px) {
  .se-tab { padding: 10px 14px 12px; }
  .se-search input { width: 100%; }
  .se-search { flex: 1 1 100%; }
}
