/*
 * Client dashboards v2 — Google Ads tab (prefix `cd2-g-`).
 *
 * Loaded with the other global stylesheets (frontend/nuxt.config.ts `app.head.link`), AFTER
 * client-dashboards-v2.css which owns the shared look (`.cd2` root, header, KPI band, card, table, bar, chip,
 * logo and the `--cd2-*` variables). This file only adds what the Google Ads tab needs on top of that
 * contract; every value is read off the accepted mockup
 * (.claude/plans/20261030-client-dashboards-v2/mockups/GoogleAds.dc.html).
 *
 * The Google-only hues (the logo blue/green/amber, tones of good/bad cost per conversion) are the
 * `--cd2-g-*` variables, defined with the other tokens in the `.cd2` block of design-system.css
 * (this file holds no colour literal).
 */


/* ── Layout ─────────────────────────────────────────────────────────────── */
.cd2-g {
  display: flex;
  flex-direction: column;
  gap: 28px;
  min-width: 0;
  color: var(--cd2-text);
  font-family: var(--cd2-font-text);
}
.cd2-g-section { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.cd2-g-card { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.cd2-g-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 520px), 1fr));
  gap: 16px;
  align-items: stretch;
}
.cd2-g-cols--wide2 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.cd2-g-cols--keywords { grid-template-columns: repeat(auto-fit, minmax(min(100%, 560px), 1fr)); }
.cd2-g-cols--narrow { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
@media (max-width: 960px) {
  .cd2-g-cols--wide2 { grid-template-columns: minmax(0, 1fr); }
}

/* ── Type helpers ───────────────────────────────────────────────────────── */
.cd2-g-strong-muted { color: var(--cd2-g-strong-muted); }
.cd2-g-strong { font-weight: 700; }
.cd2-g-heavy { font-weight: 800; }
.cd2-g-small { font-size: 13px; }
.cd2-g-xsmall { font-size: 12px; }
.cd2-g-lede { line-height: 1.5; margin: 0; }
.cd2-g-mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.cd2-g-left { text-align: left; }
.cd2-g-right { text-align: right; }
.cd2-g-center { text-align: center; }
.cd2-g-wrap { white-space: normal; min-width: 180px; }
p.cd2-g-lede { margin: 0; }

.cd2-g-stack { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cd2-g-stack--gap { gap: 6px; }
.cd2-g-between { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; }
.cd2-g-inline-gap { display: inline-flex; gap: 6px; align-items: center; }
.cd2-g-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.cd2-g-list--roomy { gap: 16px; }

/* ── Section head ───────────────────────────────────────────────────────── */
.cd2-g-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.cd2-g-head__title { display: flex; align-items: center; gap: 12px; }
.cd2-g-h2 { margin: 0; font-size: 22px; font-weight: 700; }
.cd2-g-num {
  font-family: var(--cd2-font-display);
  font-weight: 800;
  font-size: 14px;
  color: var(--cd2-g-blue);
  background: var(--cd2-g-blue-wash);
  border-radius: 8px;
  padding: 4px 8px;
}
.cd2-g-legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: 13px; font-weight: 600; color: var(--cd2-g-strong-muted); }
.cd2-g-legend--small { gap: 14px; font-size: 12px; }
.cd2-g-legend__item { display: inline-flex; align-items: center; gap: 6px; }
.cd2-g-swatch { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.cd2-g-swatch--sq { width: 10px; height: 10px; }
.cd2-g-swatch--bars { background: var(--cd2-g-blue-soft); }
.cd2-g-swatch--line { width: 14px; height: 3px; border-radius: 2px; background: var(--cd2-g-green); }

/* ── Delivery strip ─────────────────────────────────────────────────────── */

/* ── 01 Takeaways ───────────────────────────────────────────────────────── */
.cd2-g-take { display: flex; flex-direction: column; gap: 14px; }
.cd2-g-take--good { background: var(--cd2-g-green-card); border-color: var(--cd2-g-green-line); --cd2-g-take-ink: var(--cd2-g-green-ink); }
.cd2-g-take--bad { background: var(--cd2-g-red-card); border-color: var(--cd2-g-red-line); --cd2-g-take-ink: var(--cd2-g-red); }
.cd2-g-take--info { background: var(--cd2-g-blue-wash); border-color: var(--cd2-g-blue-line); --cd2-g-take-ink: var(--cd2-g-blue-ink); }
.cd2-g-take__ink { color: var(--cd2-g-take-ink); }
.cd2-g-take__big { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.cd2-g-take__figure { font-size: 52px; line-height: 1; }
.cd2-g-take__text { margin: 0; font-size: 15px; line-height: 1.5; color: var(--cd2-text); }

/* ── 02 Day by day ──────────────────────────────────────────────────────── */
.cd2-g-chart { display: flex; gap: 10px; }
.cd2-g-chart__main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.cd2-g-axis {
  display: flex; flex-direction: column; justify-content: space-between; font-size: 11px; color: var(--cd2-g-muted);
  text-align: right; height: 260px; padding-bottom: 22px; box-sizing: border-box; min-width: 28px;
}
.cd2-g-axis--right { color: var(--cd2-g-green-ink); text-align: left; }
.cd2-g-plot { position: relative; height: 238px; }
.cd2-g-gridlines { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; }
.cd2-g-gridlines span { border-top: 1px dashed var(--cd2-line); }
.cd2-g-gridlines span:last-child { border-top: 1px solid var(--cd2-g-axis-line); }
.cd2-g-plot__svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.cd2-g-bars { fill: var(--cd2-g-blue-soft); }
.cd2-g-line { fill: none; stroke: var(--cd2-g-green); stroke-width: 3; stroke-linejoin: round; }
.cd2-g-dot {
  position: absolute; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; border-radius: 50%; box-sizing: border-box;
  background: var(--cd2-card); border: 2.5px solid var(--cd2-g-green);
}
.cd2-g-days { display: grid; font-size: 11px; color: var(--cd2-g-muted); text-align: center; }

/* ── 03 What people did ─────────────────────────────────────────────────── */
.cd2-g-split-bar { display: flex; height: 18px; border-radius: 9px; overflow: hidden; gap: 3px; }
.cd2-g-kind--booking { background: var(--cd2-g-blue-wash); color: var(--cd2-g-blue); }
.cd2-g-kind--call { background: var(--cd2-g-green-wash); color: var(--cd2-g-green); }
.cd2-g-kind--form { background: var(--cd2-g-amber-wash); color: var(--cd2-g-amber-kind); }
.cd2-g-kind--other { background: var(--cd2-g-gray-chip); color: var(--cd2-g-gray-chip-ink); }
.cd2-g-split-bar .cd2-g-kind--booking { background: var(--cd2-g-blue); }
.cd2-g-split-bar .cd2-g-kind--call { background: var(--cd2-g-green); }
.cd2-g-split-bar .cd2-g-kind--form { background: var(--cd2-g-amber); }
.cd2-g-split-bar .cd2-g-kind--other { background: var(--cd2-g-gray); }
.cd2-g-kind { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.cd2-g-kind__icon { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; }
.cd2-g-kind__n { font-size: 28px; }

/* ── 04 Campaigns / tables ──────────────────────────────────────────────── */
.cd2-table th.cd2-g-left, .cd2-table td.cd2-g-left { text-align: left; }
.cd2-table tr.cd2-g-total td { background: var(--cd2-g-total-bg); font-weight: 700; }
.cd2-g-cell-id { display: inline-flex; align-items: center; gap: 10px; }
.cd2-g-logo { display: inline-flex; align-items: center; justify-content: center; }
.cd2-g-inline-bar { display: inline-flex; align-items: center; gap: 8px; }
.cd2-g-presence { min-width: 220px; }
.cd2-g-presence__bar { display: flex; height: 10px; border-radius: 5px; overflow: hidden; width: 200px; margin-bottom: 4px; }
.cd2-g-chip-sm { font-size: 11px; letter-spacing: 0.03em; border-radius: 6px; padding: 2px 7px; }

/* ── Bars & fills ───────────────────────────────────────────────────────── */
.cd2-g-bar { height: 12px; border-radius: 6px; flex: 0 1 auto; } /* with .cd2-bar: only the size differs */
.cd2-g-bar--md { height: 14px; border-radius: 4px; }
.cd2-g-bar--sm { display: inline-block; width: 56px; height: 6px; border-radius: 3px; }
.cd2-g-bar--xs { height: 6px; border-radius: 3px; }
.cd2-g-bar--sm.cd2-g-bar--xs { width: 48px; }
.cd2-g-fill { display: block; height: 100%; border-radius: inherit; }
.cd2-g-presence__bar span, .cd2-g-fill-shown { background: var(--cd2-g-blue); }
.cd2-g-presence__bar .cd2-g-fill-budget, .cd2-g-fill-budget { background: var(--cd2-g-amber); }
.cd2-g-presence__bar .cd2-g-fill-rank, .cd2-g-fill-rank { background: var(--cd2-g-gray-rank); }
.cd2-g-fill-cost { background: var(--cd2-g-gray); }
.cd2-g-fill-conv { background: var(--cd2-g-green); }
.cd2-g-fill-ink { background: var(--cd2-g-ink); }
.cd2-g-fill-good { background: var(--cd2-g-green); }
.cd2-g-fill-warn { background: var(--cd2-g-amber); }
.cd2-g-fill-bad { background: var(--cd2-g-red); }
.cd2-g-fill-info { background: var(--cd2-g-blue); }
.cd2-g-fill-muted { background: var(--cd2-g-neutral); }

.cd2-g-ink--good { color: var(--cd2-g-green-ink); }
.cd2-g-ink--bad { color: var(--cd2-g-red); }
.cd2-g-ink--warn { color: var(--cd2-g-amber-ink); }
.cd2-g-ink--info { color: var(--cd2-text); }
.cd2-g-ink--muted { color: var(--cd2-g-muted); }

/* Campaign colours (ad group bar, search term bar) — the last one is the neutral fallback. */
.cd2-g-c0 { background: var(--cd2-g-blue); }
.cd2-g-c1 { background: var(--cd2-g-amber); }
.cd2-g-c2 { background: var(--cd2-g-green); }
.cd2-g-c3 { background: var(--cd2-g-purple); }
.cd2-g-c4 { background: var(--cd2-g-teal); }
.cd2-g-c5 { background: var(--cd2-g-neutral); }
.cd2-g-campbar { width: 4px; height: 28px; border-radius: 2px; display: inline-block; flex: none; }

/* ── 05 Budget vs conversions ───────────────────────────────────────────── */
.cd2-g-pair { display: grid; grid-template-columns: minmax(0, 1fr) 52px; gap: 8px; align-items: center; font-size: 13px; }

/* ── 06 Who clicked ─────────────────────────────────────────────────────── */
.cd2-g-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.cd2-g-tile { border: 1px solid var(--cd2-line); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 4px; }
.cd2-g-tile__n { font-size: 26px; }
.cd2-g-age { display: grid; grid-template-columns: 92px minmax(0, 1fr) 96px; gap: 10px; align-items: center; font-size: 13px; }
.cd2-g-age--soft { background: var(--cd2-g-blue-soft); }
.cd2-g-age--strong { background: var(--cd2-g-blue); }
.cd2-g-age--muted { background: var(--cd2-g-gray-rank); }

/* ── 08 Ads as Google shows them ────────────────────────────────────────── */
.cd2-g-ads { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.cd2-g-ad { gap: 16px; padding: 20px; }
.cd2-g-serp { border: 1px solid var(--cd2-g-serp-line); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 6px; background: var(--cd2-card); }
.cd2-g-serp__site { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--cd2-g-serp-ink); }
.cd2-g-serp__avatar {
  width: 26px; height: 26px; border-radius: 50%; background: var(--cd2-g-track); display: inline-flex; align-items: center;
  justify-content: center; font-weight: 800; font-size: 11px; flex: none;
}
.cd2-g-serp__name { font-weight: 600; }
.cd2-g-serp__domain { color: var(--cd2-g-serp-text); }
.cd2-g-serp__sponsored { font-size: 11px; font-weight: 700; color: var(--cd2-g-serp-ink); }
.cd2-g-serp__title { font-size: 18px; line-height: 1.3; color: var(--cd2-g-serp-link); font-family: Arial, sans-serif; }
.cd2-g-serp__desc { font-size: 13px; line-height: 1.5; color: var(--cd2-g-serp-text); font-family: Arial, sans-serif; }
.cd2-g-ad__result { display: flex; align-items: baseline; gap: 8px; }
.cd2-g-ad__n { font-size: 32px; line-height: 1; }
.cd2-g-ad__group { margin-left: auto; text-align: right; }
.cd2-g-dl { margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; font-size: 13px; }
.cd2-g-dl dd { margin: 0; font-weight: 700; }

/* ── 09 Keywords ────────────────────────────────────────────────────────── */
.cd2-g-qs { display: inline-flex; min-width: 30px; justify-content: center; font-weight: 800; font-size: 13px; border-radius: 8px; padding: 3px 8px; }
.cd2-g-qs--good { background: var(--cd2-g-green-wash); color: var(--cd2-g-green-ink); }
.cd2-g-qs--warn { background: var(--cd2-g-amber-wash); color: var(--cd2-g-amber-ink); }
.cd2-g-qs--bad { background: var(--cd2-g-red-wash); color: var(--cd2-g-red); }
.cd2-g-qs--muted, .cd2-g-qs--info { background: var(--cd2-g-gray-chip); color: var(--cd2-g-gray-chip-ink); }

/* ── 10 Search terms ────────────────────────────────────────────────────── */
.cd2-g-term { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; align-items: center; }
.cd2-g-term__q { font-size: 14px; }
.cd2-g-term__bar { grid-column: 1 / -1; }

/* ── 12 Geography ───────────────────────────────────────────────────────── */
.cd2-g-geo { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.cd2-g-pin { width: 28px; height: 28px; border-radius: 8px; background: var(--cd2-g-green-wash); color: var(--cd2-g-green); display: flex; align-items: center; justify-content: center; }
.cd2-g-geo__n { font-size: 22px; color: var(--cd2-g-green-ink); }

/* ── 13 Devices ─────────────────────────────────────────────────────────── */
.cd2-g-device { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; align-items: center; }
.cd2-g-device__icon { width: 40px; height: 40px; border-radius: 12px; background: var(--cd2-g-track); color: var(--cd2-text); display: flex; align-items: center; justify-content: center; }
.cd2-g-device .cd2-g-bar { height: 8px; border-radius: 4px; }

/* ── 14 Weekday ─────────────────────────────────────────────────────────── */
.cd2-g-weekdays { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; align-items: end; height: 200px; }
.cd2-g-weekdays--labels { height: auto; align-items: start; font-size: 12px; }
.cd2-g-weekday { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; height: 100%; }
.cd2-g-weekday__n { font-size: 18px; color: var(--cd2-g-green-ink); }
.cd2-g-weekday__bar { width: 100%; border-radius: 8px 8px 3px 3px; display: block; }

/* Kind bar fill (class used by the Google tab) */
.cd2-g-kind-fill { display: block; height: 100%; }

.cd2-g-heavy { font-weight: 800; }
