/* Minimal styles bundled with the AdsPlatform library. Hosts can override by
   loading their own stylesheet after this one. */

.ads-platform-banner {
    border: 1px dashed #c9c9c9;
    border-radius: 6px;
    padding: 0.5rem;
    margin: 1rem 0;
    background: #fafafa;
    color: #555;
    font-size: 0.875rem;
}

/* Small, unobtrusive ad marker. Left-aligned chip rather than a big centered
   uppercase word. The --net variant lays the "Ad" marker and the network
   attribution out on one row (marker left, network right). */
.ads-platform-banner__label {
    display: block;
    font-size: 0.625rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: #9aa4b2;
    text-decoration: none;
    margin: 0 0.125rem 0.3rem;
    line-height: 1.4;
}

.ads-platform-banner__label--net {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

/* Tiny neutral "Ad" badge — keeps the slot honestly marked as advertising
   without shouting "ADVERTISEMENT". */
.ads-platform-banner__ad {
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #9aa4b2;
}

/* Clickable network attribution (e.g. ⚡ flnk.it) → opens the network home. */
.ads-platform-banner__by {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: #6b7280;
    text-decoration: none;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0.9;
    transition: opacity 0.15s ease, color 0.15s ease;
}

.ads-platform-banner__by:hover {
    opacity: 1;
    color: #374151;
}

.ads-platform-banner__by-icon {
    width: 0.95rem;
    height: 0.95rem;
    border-radius: 3px;
    object-fit: contain;
    display: block;
}

.ads-platform-banner__by-name {
    font-size: 0.6875rem;
}

.ads-platform-banner__body {
    text-align: center;
    padding: 0.5rem;
}

/* Unfilled-slot placeholder. aspect-ratio (set inline from the placement's
   width/height) reserves the slot's footprint; min-height keeps it visible when
   dimensions are unknown. Centered so capped-width slots (e.g. 728px leaderboard)
   don't stretch edge-to-edge. */
.ads-platform-banner__placeholder {
    width: 100%;
    margin: 0 auto;
    min-height: 60px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.03);
}

.ads-platform-banner__body code,
.ads-platform-banner__debug {
    background: rgba(0, 0, 0, 0.04);
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    font-size: 0.75rem;
}

.ads-platform-banner__debug {
    display: block;
    margin-top: 0.35rem;
    color: #777;
    text-align: center;
}

.ads-platform-banner__rot { position: relative; }

.ads-platform-banner__frame {
    width: 100%;
    /* aspect-ratio is set inline per creative — keeps the iframe sized to its
       declared dimensions without layout jumps when the rotation swaps frames
       of the same size. Different-size creatives in the same slot will jump;
       configure the campaign to a single size per slot to avoid that. */
}

.ads-platform-banner__link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.ads-platform-banner__frame iframe {
    border: 0;
    width: 100%;
    height: 100%;
    display: block;
    /* Disables the iframe's own click handling so the wrapping <a> always wins
       — clicks consistently route through /ads-platform/click/{cid} for tracking
       instead of the creative's internal target="_top" links. */
    pointer-events: none;
}

.ads-platform-page {
    max-width: 960px;
    margin: 1.5rem auto;
    padding: 0 1rem;
}

/* Data-dense admin views (e.g. All campaigns) need more room than the default
   reading width. */
.ads-platform-page.ads-wide { max-width: 1280px; }

.ads-platform-page h1 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.ads-platform-page .lead {
    color: #666;
    margin-bottom: 1.25rem;
}

.ads-platform-stub {
    border: 1px solid #e3e3e3;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    background: #fff;
}

.ads-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    gap: 1rem;
}

.ads-page-header h1 { margin: 0; }

.ads-btn {
    display: inline-block;
    padding: 0.4rem 0.85rem;
    border-radius: 4px;
    border: 1px solid transparent;
    background: #f0f0f0;
    color: #222;
    font-size: 0.875rem;
    cursor: pointer;
    text-decoration: none;
    line-height: 1.2;
}
.ads-btn:hover { filter: brightness(0.97); }
.ads-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.ads-btn-primary { background: #2858c8; color: #fff; }
.ads-btn-success { background: #1f8a4c; color: #fff; }
.ads-btn-danger  { background: #b00020; color: #fff; }

.ads-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid #e3e3e3;
    border-radius: 8px;
    overflow: hidden;
}
.ads-table thead th {
    text-align: left;
    background: #f6f7f9;
    color: #555;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.6rem 0.85rem;
    border-bottom: 1px solid #e3e3e3;
}
.ads-table tbody td {
    padding: 0.6rem 0.85rem;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: top;
}
.ads-table tbody tr:last-child td { border-bottom: 0; }
.ads-table th.num, .ads-table td.num { text-align: right; }
.ads-actions { display: flex; gap: 0.5rem; }

/* Pager under a paginated table. */
.ads-platform-page .ads-pager {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: center;
    margin-top: 1rem;
}

/* ── Fancy table (opt-in via class="ads-table ads-fancy" inside an .ads-fancy-wrap) ──
   FastLinkIt-style: rounded card, vivid blue header bar with white uppercase
   labels and click-to-sort affordances (⇅ / ↑ / ↓ rendered by the page). */
.ads-platform-page .ads-fancy-wrap {
    border: 1px solid #e6e8ec;
    border-radius: 12px;
    /* Scroll a too-wide table horizontally instead of clipping it (the admin
       All-campaigns table is wider than the page). border-radius still rounds
       the box; the header scrolls with the rows. */
    overflow-x: auto;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 12px 28px -20px rgba(16, 24, 40, .25);
}
.ads-platform-page .ads-fancy { width: 100%; border-collapse: collapse; margin: 0; border: 0; border-radius: 0; }
.ads-platform-page .ads-fancy thead th {
    background: linear-gradient(180deg, #4263eb, #3b5bdb);
    color: #fff;
    text-transform: uppercase;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .05em;
    padding: .85rem 1rem;
    border: 0;
    white-space: nowrap;
    vertical-align: middle;
}
.ads-platform-page .ads-fancy thead th .th-inner { display: inline-flex; align-items: center; gap: .4rem; }
.ads-platform-page .ads-fancy thead th.num .th-inner { justify-content: flex-end; width: 100%; }
.ads-platform-page .ads-fancy thead th.sortable { cursor: pointer; user-select: none; }
.ads-platform-page .ads-fancy thead th.sortable:hover { background: linear-gradient(180deg, #4d6bf0, #4263eb); }
.ads-platform-page .ads-fancy .sort-ind { font-size: .8em; opacity: .65; line-height: 1; }
.ads-platform-page .ads-fancy thead th.sortable:hover .sort-ind { opacity: 1; }
.ads-platform-page .ads-fancy tbody td {
    padding: .8rem 1rem;
    border-top: 1px solid #eef0f3;
    border-bottom: 0;
    vertical-align: middle;
}
.ads-platform-page .ads-fancy tbody tr:first-child td { border-top: 0; }
.ads-platform-page .ads-fancy tbody tr:hover td { background: #f6f8ff; }
.ads-platform-page .ads-fancy td.num, .ads-platform-page .ads-fancy th.num { text-align: right; }

.ads-pill {
    display: inline-block;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
}
.ads-pill-success { background: #d9f0e2; color: #1f5d36; }
.ads-pill-warning { background: #fff0c4; color: #6b4d05; }
.ads-pill-danger  { background: #fadcdf; color: #7a0a18; }
.ads-pill-muted   { background: #e9eaee; color: #555; }

.ads-tabs {
    display: flex;
    gap: 0.25rem;
    border-bottom: 1px solid #e3e3e3;
    margin: 1rem 0 1rem;
}
.ads-tab {
    background: transparent;
    border: 0;
    padding: 0.6rem 1rem;
    color: #555;
    cursor: pointer;
    font-size: 0.9rem;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}
.ads-tab:hover { color: #222; }
.ads-tab-active { color: #2858c8; border-bottom-color: #2858c8; font-weight: 600; }
.ads-tab-count {
    display: inline-block;
    background: #e9eaee;
    color: #555;
    padding: 0 0.4rem;
    border-radius: 999px;
    font-size: 0.75rem;
    margin-left: 0.4rem;
}

.ads-banner-message {
    padding: 0.6rem 0.85rem;
    background: #e6f0ff;
    border: 1px solid #b6d2ff;
    border-radius: 6px;
    margin-bottom: 1rem;
    color: #1c3a7a;
}

.ads-account-link { margin-top: 1rem; font-size: 0.875rem; }
.ads-muted-line { color: #777; }

.ads-breakdown {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}
.ads-breakdown td { padding: 0.25rem 0.25rem; border-bottom: 1px solid #f0f0f0; }
.ads-breakdown tr:last-child td { border-bottom: 0; }
.ads-breakdown td.num { text-align: right; font-variant-numeric: tabular-nums; }

/* Stats panel — KPI strip + chart grid. */
.ads-stats { display: flex; flex-direction: column; gap: 1rem; margin: 1rem 0; }
.ads-stats-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.75rem;
}
.ads-stats-kpi {
    background: #fff;
    border: 1px solid #e3e3e3;
    border-radius: 8px;
    padding: 0.85rem 1rem;
    text-align: left;
}
.ads-stats-kpi-value {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}
.ads-stats-kpi-label {
    color: #777;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 0.25rem;
}
.ads-stats-charts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}
.ads-stats-chart-wide { grid-column: 1 / -1; }
@media (max-width: 800px) {
    .ads-stats-charts { grid-template-columns: 1fr; }
}

.ads-stats-filter {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    padding: 0.5rem 0.75rem;
    background: #fff;
    border: 1px solid #e3e3e3;
    border-radius: 8px;
}
.ads-stats-filter label { font-size: 0.8rem; color: #555; font-weight: 600; }
.ads-stats-filter select,
.ads-stats-filter input[type="date"] {
    padding: 0.3rem 0.5rem;
    border: 1px solid #c9c9c9;
    border-radius: 4px;
    font: inherit;
    font-size: 0.875rem;
}
.ads-stats-filter__hint { margin-left: auto; color: #777; font-size: 0.8rem; }

/* Chart.js with maintainAspectRatio:false needs a height-constrained parent;
   without it the canvas grows by its own height on each layout pass (infinite
   page-grow). These fixed wrappers stop that. */
.ads-stats-canvas { position: relative; width: 100%; }
.ads-stats-canvas--bar   { height: 220px; }
.ads-stats-canvas--donut { height: 220px; }
.ads-stats-canvas--map   { height: 380px; }
.ads-stats-canvas canvas {
    position: absolute !important;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
}

/* Ranked list — used by Top referrers + Top countries. Each row has a
   background bar sized to the row's share of the leader, then label / count /
   %-of-total on top. */
.ads-rank { list-style: none; padding: 0; margin: 0; }
.ads-rank__row {
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.6rem;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.875rem;
    transition: background 100ms;
}
.ads-rank__row:last-child { border-bottom: 0; }
.ads-rank__row:hover { background: #f6f7f9; }
.ads-rank__bar {
    position: absolute;
    left: 0; top: 0; bottom: 0;
    background: linear-gradient(90deg, rgba(40, 88, 200, 0.15), rgba(40, 88, 200, 0.05));
    border-left: 2px solid rgba(40, 88, 200, 0.6);
    z-index: 0;
}
.ads-rank__label,
.ads-rank__count,
.ads-rank__pct { position: relative; z-index: 1; }
.ads-rank__label {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ads-rank__count {
    font-variant-numeric: tabular-nums;
    color: #222;
    font-weight: 600;
    min-width: 3ch;
    text-align: right;
}
.ads-rank__pct {
    font-variant-numeric: tabular-nums;
    color: #777;
    font-size: 0.75rem;
    min-width: 3ch;
    text-align: right;
}

/* Card grid + definition list — shared between CampaignDetail and Account
   pages. Were inline in CampaignDetail's <style> block, so the Account page
   referenced classes that only existed when CampaignDetail was on screen. */
.ads-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1rem; }
@media (max-width: 700px) { .ads-grid { grid-template-columns: 1fr; } }

.ads-card { border: 1px solid #e3e3e3; border-radius: 8px; padding: 1rem; background: #fff; }
.ads-card h3 { margin: 0 0 0.5rem; font-size: 0.875rem; text-transform: uppercase; color: #555; letter-spacing: 0.04em; }

.ads-dl { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 0.4rem 1rem; }
.ads-dl dt { color: #777; font-size: 0.8rem; }
.ads-dl dd { margin: 0; font-size: 0.9rem; }

/* ──────────────────────────────────────────────────────────────────────────
   Dark mode
   The surfaces above are light-only (#fff cards/tables, pale borders, dark-grey
   muted text), so on a dark host page they glare white. Override the surfaces,
   borders and dark-on-dark text here. Keyed to BOTH theme conventions via :is()
   so it works regardless of host: Bootstrap's `data-bs-theme="dark"` (flnk.it)
   and the plain `data-theme="dark"` (other hosts). The blue sortable header bar
   already reads well on dark, so it's intentionally left as-is.
   ────────────────────────────────────────────────────────────────────────── */
:is([data-bs-theme="dark"], [data-theme="dark"]) {
    /* Card / table / panel surfaces (was #fff) */
    --ads-d-surface: #1e293b;
    --ads-d-border: rgba(148, 163, 184, 0.20);
    --ads-d-border-soft: rgba(148, 163, 184, 0.12);
    --ads-d-text: #e2e8f0;
    --ads-d-muted: #94a3b8;
    --ads-d-hover: rgba(148, 163, 184, 0.10);
}

/* Surfaces that were hard-coded #fff */
:is([data-bs-theme="dark"], [data-theme="dark"]) .ads-table,
:is([data-bs-theme="dark"], [data-theme="dark"]) .ads-platform-stub,
:is([data-bs-theme="dark"], [data-theme="dark"]) .ads-stats-kpi,
:is([data-bs-theme="dark"], [data-theme="dark"]) .ads-stats-filter,
:is([data-bs-theme="dark"], [data-theme="dark"]) .ads-card {
    background: var(--ads-d-surface);
    border-color: var(--ads-d-border);
    color: var(--ads-d-text);
}

/* Non-fancy table header strip (was #f6f7f9 / #555) */
:is([data-bs-theme="dark"], [data-theme="dark"]) .ads-table thead th {
    background: #18243a;
    color: var(--ads-d-muted);
    border-bottom-color: var(--ads-d-border);
}
:is([data-bs-theme="dark"], [data-theme="dark"]) .ads-table tbody td {
    border-bottom-color: var(--ads-d-border-soft);
}

/* Fancy (sortable) table: keep the blue header, darken the body/borders/hover */
:is([data-bs-theme="dark"], [data-theme="dark"]) .ads-platform-page .ads-fancy-wrap {
    border-color: var(--ads-d-border);
    box-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 28px -20px rgba(0, 0, 0, .6);
}
:is([data-bs-theme="dark"], [data-theme="dark"]) .ads-platform-page .ads-fancy tbody td {
    border-top-color: var(--ads-d-border-soft);
}
:is([data-bs-theme="dark"], [data-theme="dark"]) .ads-platform-page .ads-fancy tbody tr:hover td {
    background: var(--ads-d-hover);
}

/* Muted / dark-grey text that goes invisible on dark */
:is([data-bs-theme="dark"], [data-theme="dark"]) .ads-platform-page .lead,
:is([data-bs-theme="dark"], [data-theme="dark"]) .ads-muted-line,
:is([data-bs-theme="dark"], [data-theme="dark"]) .ads-card h3,
:is([data-bs-theme="dark"], [data-theme="dark"]) .ads-dl dt,
:is([data-bs-theme="dark"], [data-theme="dark"]) .ads-stats-kpi-label,
:is([data-bs-theme="dark"], [data-theme="dark"]) .ads-stats-filter label,
:is([data-bs-theme="dark"], [data-theme="dark"]) .ads-stats-filter__hint,
:is([data-bs-theme="dark"], [data-theme="dark"]) .ads-rank__pct {
    color: var(--ads-d-muted);
}
:is([data-bs-theme="dark"], [data-theme="dark"]) .ads-rank__count {
    color: var(--ads-d-text);
}

/* Secondary button (was #f0f0f0 / #222) */
:is([data-bs-theme="dark"], [data-theme="dark"]) .ads-btn {
    background: #334155;
    color: var(--ads-d-text);
}

/* Tabs + count chip */
:is([data-bs-theme="dark"], [data-theme="dark"]) .ads-tabs { border-bottom-color: var(--ads-d-border); }
:is([data-bs-theme="dark"], [data-theme="dark"]) .ads-tab { color: var(--ads-d-muted); }
:is([data-bs-theme="dark"], [data-theme="dark"]) .ads-tab:hover { color: var(--ads-d-text); }
:is([data-bs-theme="dark"], [data-theme="dark"]) .ads-tab-count {
    background: #334155;
    color: var(--ads-d-text);
}

/* Date-range inputs */
:is([data-bs-theme="dark"], [data-theme="dark"]) .ads-stats-filter select,
:is([data-bs-theme="dark"], [data-theme="dark"]) .ads-stats-filter input[type="date"] {
    background: #0f172a;
    color: var(--ads-d-text);
    border-color: var(--ads-d-border);
}

/* Info banner (was pale blue) */
:is([data-bs-theme="dark"], [data-theme="dark"]) .ads-banner-message {
    background: rgba(40, 88, 200, 0.18);
    border-color: rgba(120, 160, 255, 0.35);
    color: #cdddff;
}

/* Row separators in the breakdown + ranked lists */
:is([data-bs-theme="dark"], [data-theme="dark"]) .ads-breakdown td { border-bottom-color: var(--ads-d-border-soft); }
:is([data-bs-theme="dark"], [data-theme="dark"]) .ads-rank__row { border-bottom-color: var(--ads-d-border-soft); }
:is([data-bs-theme="dark"], [data-theme="dark"]) .ads-rank__row:hover { background: var(--ads-d-hover); }

.ads-section-h { margin-top: 1.5rem; font-size: 1.1rem; }

/* Slot picker — tile grid for the campaign form. */
.ads-slot-picker {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.6rem;
    margin-top: 0.25rem;
}
.ads-slot-picker__empty { color: #777; }

.ads-slot-tile {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.3rem;
    text-align: left;
    padding: 0.6rem;
    border: 1px solid #d9dbe1;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    font: inherit;
    color: inherit;
    transition: border-color 120ms, box-shadow 120ms, background 120ms;
}
.ads-slot-tile:hover {
    border-color: #b6bdcc;
    background: #fafbfd;
}
.ads-slot-tile-selected {
    border-color: #2858c8;
    background: #f1f5ff;
    box-shadow: 0 0 0 1px #2858c8 inset;
}
.ads-slot-tile__wire {
    position: relative;
    background: #f6f7f9;
    border-radius: 4px;
    padding: 0.4rem;
}
.ads-slot-tile__wire svg { display: block; width: 100%; height: auto; }
/* Hot spot — neutral when unselected, brand colour when selected. */
.ads-slot-tile__hot { fill: #b6bdcc; }
.ads-slot-tile-selected .ads-slot-tile__hot { fill: #2858c8; }
.ads-slot-tile__check {
    position: absolute;
    top: 4px; right: 6px;
    background: #2858c8;
    color: #fff;
    width: 18px; height: 18px;
    border-radius: 999px;
    display: flex; align-items: center; justify-content: center;
    font-size: 11px;
    font-weight: 700;
}
.ads-slot-tile__name { font-weight: 600; font-size: 0.9rem; }
.ads-slot-tile__channel {
    display: inline-block; margin-left: 0.35rem; vertical-align: middle;
    font-size: 0.65rem; font-weight: 700; color: #8a5a00;
    background: #fff3d6; border-radius: 999px; padding: 0.05rem 0.4rem;
}
.ads-slot-tile__size { color: #777; font-size: 0.75rem; }
.ads-slot-tile__desc { color: #555; font-size: 0.75rem; line-height: 1.3; }

/* Admin placement form. Lives here (not an inline <style> in the page) so the
   grid survives Blazor enhanced navigation — a body <style> block isn't always
   re-applied when you navigate to the page SPA-style, which left the fields
   stacked. */
.ads-placement-form .ap-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}
.ads-placement-form .ap-field {
    display: flex; flex-direction: column; gap: 0.35rem; margin-bottom: 1rem;
}
.ads-placement-form .ap-field > label { font-weight: 600; font-size: 0.8rem; color: #344054; }
.ads-placement-form .cu-input {
    width: 100%; padding: 0.5rem 0.65rem; border: 1px solid #d0d5dd;
    border-radius: 8px; font-size: 0.9rem; background: #fff; color: #101828;
    box-sizing: border-box;
}
.ads-placement-form .cu-input:focus {
    outline: none; border-color: #2858c8; box-shadow: 0 0 0 3px rgba(40, 88, 200, 0.14);
}
.ads-placement-form .ap-hint { color: #667085; font-size: 0.75rem; }

/* Language picker — pill chips. */
.ads-lang-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 0.25rem;
}
.ads-lang-tile {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.4rem 0.85rem 0.4rem 0.7rem;
    border: 1px solid #d9dbe1;
    border-radius: 999px;
    background: #fff;
    cursor: pointer;
    font: inherit;
    color: inherit;
    transition: border-color 120ms, background 120ms, box-shadow 120ms;
}
.ads-lang-tile:hover { border-color: #b6bdcc; background: #fafbfd; }
.ads-lang-tile-selected {
    border-color: #2858c8;
    background: #f1f5ff;
    box-shadow: 0 0 0 1px #2858c8 inset;
}
.ads-lang-tile__flag {
    font-size: 1.25rem;
    line-height: 1;
    /* Force colour-emoji fallback on platforms (Windows) that hide regional indicators. */
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", system-ui, sans-serif;
}
.ads-lang-tile__copy {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
    text-align: left;
}
.ads-lang-tile__label { font-weight: 600; font-size: 0.875rem; }
.ads-lang-tile__code { color: #777; font-size: 0.7rem; }
/* Autocomplete-style language pickers (AdsLanguageSelect + LanguagePicker). */
.ads-lang-row {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.15rem 0;
}
.ads-lang-name { font-weight: 500; }
.ads-lang-native { color: #777; font-size: 0.8rem; margin-left: 0.25rem; }
.ads-lang-results {
    border: 1px solid #d9dbe1;
    border-radius: 4px;
    background: #fff;
    box-shadow: 0 4px 14px rgba(0,0,0,0.08);
    max-height: 320px;
    overflow-y: auto;
}
.ads-lang-item {
    padding: 0.45rem 0.75rem;
    cursor: pointer;
}
.ads-lang-item:hover { background: #f1f5ff; }

.ads-lang-multi { display: flex; flex-direction: column; gap: 0.5rem; }
.ads-lang-multi-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.ads-lang-multi-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.25rem 0.4rem 0.25rem 0.6rem;
    border: 1px solid #d9dbe1;
    border-radius: 999px;
    background: #f6f7f9;
    font-size: 0.85rem;
}
.ads-lang-multi-chip-label { font-weight: 500; }
.ads-lang-multi-chip-remove {
    background: transparent;
    border: 0;
    color: #999;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 0.25rem;
    margin-left: 0.1rem;
}
.ads-lang-multi-chip-remove:hover { color: #b00020; }

.ads-lang-tile__check {
    background: #2858c8;
    color: #fff;
    width: 18px; height: 18px;
    border-radius: 999px;
    display: flex; align-items: center; justify-content: center;
    font-size: 11px;
    font-weight: 700;
    margin-left: 0.2rem;
}
