/* =========================================================
   ADS MAP — the boost form's map picker and the region heatmap.
   Quiet by design: grey tiles, one accent, nothing but the pin and the area.
========================================================= */

.ads-map-open { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px 16px; border: 1px dashed var(--border-strong); border-radius: var(--radius-md); background: var(--surface-soft); }
.ads-map-open .ads-hint { margin: 0; flex: 1 1 220px; }
.ads-map-wrap { display: flex; flex-direction: column; gap: 10px; }
.ads-map-wrap[hidden], .ads-map-open[hidden] { display: none; }
.ads-map { position: relative; z-index: 0; isolation: isolate; height: clamp(300px, 46dvh, 400px); border: 1px solid var(--border-strong); border-radius: var(--radius-md); overflow: hidden; background: var(--surface-soft); }
.ads-map-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ads-map-radius { display: flex; align-items: center; gap: 10px; flex: 1 1 220px; min-width: 200px; font-size: 12.5px; font-weight: 700; color: var(--text-2); }
.ads-map-radius input { flex: 1; accent-color: var(--primary); }
.ads-map-radius output { min-width: 48px; text-align: right; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; }
.ads-map-country { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; color: var(--text-2); }
.ads-map-country select { min-width: 140px; padding: 6px 10px; }
.ads-map-bar .btn { padding: 7px 14px; font-size: 12.5px; }
.ads-map-tiles { filter: grayscale(1) contrast(.92) brightness(1.06); }
.ads-map .leaflet-container { font: inherit; background: var(--surface-soft); }
path.ads-map-circle { fill: var(--primary); fill-opacity: .08; stroke: var(--text-3); stroke-width: 1.5; stroke-dasharray: 5 4; }
path.ads-map-circle.is-selected { fill-opacity: .18; stroke: var(--primary); stroke-width: 2.5; stroke-dasharray: none; }
.ads-map-sel { flex: 1 1 100%; font-size: 12.5px; font-weight: 800; color: var(--text); }
.ads-map-radius { flex: 1 1 280px; }
.ads-step-btn { display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface); color: var(--text); font-size: 16px; line-height: 1; cursor: pointer; }
.ads-step-btn:hover:not(:disabled) { background: var(--primary-soft-2); border-color: var(--primary); }
.ads-step-btn:disabled, .ads-map-bar input:disabled, .ads-map-bar select:disabled, .ads-map-bar .btn:disabled { opacity: .45; cursor: not-allowed; }
.ads-pinlist { min-height: 0; }
.ads-pinchip { cursor: pointer; }
.ads-pinchip.is-selected { background: var(--primary-soft-2); border-color: var(--primary); color: var(--primary-dark); box-shadow: 0 0 0 2px var(--primary-soft); }
.ads-pinchip:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* ---------- Ads Intelligence: where the engagement is ---------- */
.ads-ix-regions { flex: 0 0 auto; width: 280px; display: flex; flex-direction: column; gap: 8px; }
.ads-ix-regions h5 { margin: 0; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.ads-ix-regionmap { position: relative; z-index: 0; isolation: isolate; height: 190px; border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; background: var(--surface-soft); }
.ads-ix-regionmap .leaflet-container { background: var(--surface-soft); font: inherit; }
.ads-ix-heat { fill-opacity: .55; stroke: none; }
.ads-ix-heat.is-core { fill-opacity: .8; }
.ads-ix-regionlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ads-ix-regionlist li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; align-items: center; font-size: 12.5px; }
.ads-ix-regionlist span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.ads-ix-regionlist b { font-variant-numeric: tabular-nums; }
.ads-ix-regionlist i { grid-column: 1 / -1; display: block; height: 5px; border-radius: 99px; background: var(--heat, var(--primary)); opacity: .85; }
.ads-ix-regionlist .ads-ix-best { margin-left: 6px; }
.ads-ix-regions .ads-hint { margin: 0; }
@media (max-width: 640px) { .ads-ix-regions { width: 100%; } }

/* ---------- Ads Intelligence: where your ads perform (bottom of the page) ---------- */
.ads-ix-geo[hidden] { display: none; }
.ads-ix-geo-body { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 20px; padding: 6px 16px 4px; align-items: start; }
.ads-ix-geomap { position: relative; z-index: 0; isolation: isolate; height: 340px; border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; background: var(--surface-soft); }
.ads-ix-geomap[hidden] { display: none; }
.ads-ix-geomap .leaflet-container { background: var(--surface-soft); font: inherit; }
.ads-ix-geo-body:has(.ads-ix-geomap[hidden]) { grid-template-columns: minmax(0, 1fr); }
.ads-ix-geotable-t { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.ads-ix-geotable-t th, .ads-ix-geotable-t td { padding: 10px 8px; text-align: right; border-bottom: 1px solid var(--border); background: transparent; vertical-align: middle; }
.ads-ix-geotable-t thead th { padding-top: 0; font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--text-3); }
.ads-ix-geotable-t thead th:first-child, .ads-ix-geotable-t tbody th { text-align: left; }
.ads-ix-geotable-t tbody th { font-size: 14px; font-weight: 700; letter-spacing: 0; text-transform: none; color: var(--text); white-space: nowrap; }
.ads-ix-geotable-t tbody th i { display: inline-block; width: 10px; height: 10px; margin-right: 9px; border-radius: 50%; background: var(--heat); vertical-align: -1px; }
.ads-ix-geotable-t tbody tr { cursor: pointer; transition: background .15s ease; }
.ads-ix-geotable-t tbody tr:hover, .ads-ix-geotable-t tbody tr.is-on { background: var(--primary-soft-2); }
.ads-ix-geotable-t tbody tr:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.ads-ix-geotable-t td b { font-variant-numeric: tabular-nums; }
.ads-ix-geoshare { width: 34%; }
.ads-ix-geoshare span { display: inline-block; width: calc(100% - 38px); height: 6px; vertical-align: middle; border-radius: 99px; background: var(--surface-soft); box-shadow: inset 0 0 0 1px var(--border); overflow: hidden; }
.ads-ix-geoshare span i { display: block; height: 100%; border-radius: 99px; background: var(--heat, var(--primary)); }
.ads-ix-geoshare small { display: inline-block; width: 34px; margin-left: 4px; font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.ads-ix-geo-legend { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 6px 16px 14px; font-size: 12px; color: var(--text-3); }
.ads-ix-geo-legend > i { width: 120px; height: 8px; border-radius: 99px; background: linear-gradient(90deg, rgb(252, 217, 168), rgb(232, 89, 12)); }
.ads-ix-geo-legend small { margin-left: auto; font-size: 11.5px; }
.ads-ix-heat { fill-opacity: .55; stroke: none; }
@media (max-width: 900px) { .ads-ix-geo-body { grid-template-columns: minmax(0, 1fr); } .ads-ix-geomap { height: 280px; } }
.ads-ix-geotable { min-width: 0; overflow-x: auto; }
.ads-ix-geotable-t { table-layout: auto; }
.ads-ix-geotable-t .ads-ix-best { margin-left: 8px; padding: 1px 8px; border-radius: 999px; background: var(--success-soft); color: var(--success); font-size: 11px; font-weight: 800; font-style: normal; }
.ads-ix-geotable-t tbody th .ads-ix-best { background: var(--primary-soft-2); color: var(--primary-dark); }
.ads-ix-geoshare { width: 150px; min-width: 130px; }
.ads-ix-geo-body { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 16px; padding-right: 12px; }
.ads-ix-geotable-t th, .ads-ix-geotable-t td { padding: 10px 6px; }
.ads-ix-geoshare { width: 118px; min-width: 100px; }
.ads-ix-geoshare span { width: calc(100% - 34px); }
.ads-ix-geotable-t tbody th { font-size: 13.5px; }
.ads-ix-geotable-t { white-space: nowrap; }
.ads-ix-geotable-t { table-layout: fixed; width: 100%; white-space: normal; }
.ads-ix-geotable-t th:nth-child(1) { width: 34%; } .ads-ix-geotable-t th:nth-child(2) { width: 17%; } .ads-ix-geotable-t th:nth-child(3) { width: 29%; } .ads-ix-geotable-t th:nth-child(4) { width: 20%; }
.ads-ix-geoshare { width: auto; min-width: 0; }
.ads-ix-geotable-t td.is-cheapest { color: var(--success); font-weight: 800; }
.ads-ix-geotable-t tbody th { overflow: hidden; text-overflow: ellipsis; }
.ads-ix-geotable-t { min-width: 0; }
.ads-ix-score { min-width: 0; }
.ads-ix-geoshare span { width: calc(100% - 46px); }
.ads-ix-geoshare small { width: 38px; text-align: right; }
