/*
 * /google-ads/: réplicas de Google Ads (inc/gads.php + assets/js/gads-replicas.js).
 * Se apoya en service-heroes.css (.sh-stage, .sh-win, .sh-bar, .sh-cap, .gs-*) y en pages-pro-v2.css (.pp-rep,
 * .pp-browser). Misma paleta que las réplicas de los otros servicios: navy, azules de marca y slates.
 * Alturas fijas por aspecto (sin CLS). Un DOM, dos aspectos por container query: < 400 px → móvil.
 * Si este fichero cambia después de publicar, renómbralo (LiteSpeed le quita el ?ver= y lo cachea 1 año).
 */

/* =================================================================
 * HERO · escenario
 * ================================================================= */
.sh-ads { height: 452px; }
.sh-ads .ga-serp { left: 0; right: 0; top: 0; height: 268px; z-index: 1; }
.ga-res { position: relative; padding: 8px 14px 0; }
.ga-ad { position: relative; padding-bottom: 8px; border-bottom: 1px solid var(--s1); }
.ga-spon { margin: 0 0 5px; font: 700 11px/1.2 Inter, sans-serif; color: var(--navy); }
.ga-ad .gs-site { height: 22px; }
.ga-t { margin-top: 4px; font-size: 13.5px; line-height: 17px; color: var(--blue-d); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ga-d { margin-top: 2px; font-size: 10.5px; line-height: 14px; color: var(--s7); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ga-links { display: flex; gap: 6px; margin-top: 7px; overflow: hidden; }
.ga-links span { flex: none; padding: 3px 9px; border: 1px solid var(--s2); border-radius: 999px; font-size: 10px; font-weight: 500; color: var(--blue-d); white-space: nowrap; }
.ga-tap { position: absolute; left: 34%; top: 38px; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; background: rgba(37, 99, 235, .18); box-shadow: 0 0 0 2px rgba(37, 99, 235, .55); }
.ga-org { height: 50px; }
.ga-org .gs-t { font-size: 12.5px; }

/* Móvil con la página de destino */
.ga-ph { position: absolute; z-index: 3; left: 15%; right: 15%; top: 258px; height: 166px; border: 6px solid var(--navy); border-radius: 22px; background: var(--navy); overflow: hidden; box-shadow: 0 1px 2px rgba(2, 6, 23, .2), 0 18px 36px -16px rgba(2, 6, 23, .5); }
.ga-ph-s { height: 100%; padding: 10px 11px; border-radius: 16px; background: #fff; overflow: hidden; }
.ga-ph-top { display: none; align-items: center; justify-content: space-between; height: 20px; }
.ga-ph-logo { display: flex; align-items: center; gap: 5px; font: 700 12px/1 Poppins, Inter, sans-serif; letter-spacing: -.02em; color: var(--navy); }
.ga-ph-logo b { width: 11px; height: 11px; border-radius: 3px 3px 3px 1px; background: var(--blue); }
.ga-ph-menu { display: flex; flex-direction: column; gap: 3px; width: 13px; }
.ga-ph-menu i { height: 1.5px; background: var(--navy); }
.ga-ph-k { display: none; margin: 12px 0 0; font-size: 8.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--blue); }
.ga-ph-h { display: none; margin: 4px 0 0; font: 700 15px/1.15 Poppins, Inter, sans-serif; letter-spacing: -.02em; color: var(--navy); }
.ga-ph-box { position: relative; height: 136px; }
.ga-form, .ga-sent { position: absolute; inset: 0; display: flex; flex-direction: column; }
.ga-lb { font-size: 9px; font-weight: 600; color: var(--s7); }
.ga-in { display: flex; align-items: center; height: 26px; margin: 3px 0 7px; padding: 0 8px; border: 1px solid var(--s3); border-radius: 6px; font-size: 11px; color: var(--navy); white-space: nowrap; overflow: hidden; }
.ga-btn { display: flex; align-items: center; justify-content: center; height: 30px; margin-top: 3px; border-radius: 6px; background: var(--blue); color: #fff; font-size: 11px; font-weight: 600; }
.ga-sent { align-items: center; justify-content: center; gap: 5px; padding: 10px; border-radius: 10px; background: var(--s0); border: 1px solid var(--s2); text-align: center; }
.ga-sent b { font: 600 13px/1.2 Poppins, Inter, sans-serif; color: var(--navy); }
.ga-sent > span:last-child { font-size: 10px; line-height: 1.35; color: var(--s7); }
.ga-sent-i { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--blue); }
.ga-sent-i svg, .ga-toast-i svg { width: 15px; height: 15px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Aviso de conversión */
.ga-toast { position: absolute; z-index: 5; left: 8px; right: 8px; top: 300px; display: flex; align-items: center; gap: 9px; padding: 9px 11px; border-radius: 10px; background: var(--navy); color: var(--s3); font-size: 10px; line-height: 1.35; box-shadow: 0 16px 32px -14px rgba(2, 6, 23, .55); }
.ga-toast b { display: block; font-size: 11.5px; font-weight: 600; color: #fff; }
.ga-toast-i { display: grid; place-items: center; flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--blue); }

/* Panel de la campaña */
.ga-panel { left: 0; right: 0; top: 248px; height: 198px; z-index: 4; display: flex; }
.ga-pn-side { display: none; flex: none; flex-direction: column; align-items: center; gap: 10px; width: 38px; padding-top: 10px; background: var(--s0); border-right: 1px solid var(--s2); }
.ga-pn-logo { display: flex; gap: 2px; align-items: flex-end; height: 16px; margin-bottom: 4px; }
.ga-pn-logo i { width: 4px; border-radius: 2px; background: var(--blue); }
.ga-pn-logo i:nth-child(1) { height: 9px; background: var(--blue-l); }
.ga-pn-logo i:nth-child(2) { height: 16px; }
.ga-pn-logo i:nth-child(3) { height: 12px; background: var(--navy); }
.ga-pn-ic { width: 16px; height: 16px; border-radius: 5px; border: 1.5px solid var(--s3); }
.ga-pn-ic.on { border-color: var(--blue); background: var(--blue); box-shadow: 0 0 0 4px #DBEAFE; }
.ga-pn-main { flex: 1; min-width: 0; padding: 10px 12px; }
.ga-pn-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; white-space: nowrap; }
.ga-pn-crumb { min-width: 0; overflow: hidden; text-overflow: ellipsis; font-size: 10px; color: var(--s5); }
.ga-pn-crumb b { color: var(--navy); font-weight: 600; font-size: 11px; }
.ga-pn-st { display: flex; align-items: center; gap: 5px; flex: none; font-size: 9.5px; font-weight: 600; color: var(--blue-d); }
.ga-pn-st i { width: 7px; height: 7px; border-radius: 50%; background: var(--blue); }
.ga-pn-sub { margin-top: 2px; font-size: 9px; color: var(--s5); }
.ga-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 8px; }
.ga-k { display: flex; flex-direction: column; gap: 2px; padding: 6px 8px; border-radius: 6px; }
.ga-k > span { font-size: 9px; font-weight: 500; white-space: nowrap; }
.ga-k b { display: flex; align-items: center; gap: 6px; font: 600 14px/1.1 Inter, sans-serif; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ga-k em { padding: 1px 5px; border-radius: 4px; background: #fff; color: var(--blue-d); font: 700 9px/1.3 Inter, sans-serif; }
.ga-k1 { background: var(--blue); color: #fff; }
.ga-k1 > span { color: rgba(255, 255, 255, .8); }
.ga-k2 { background: var(--navy); color: #fff; }
.ga-k2 > span { color: var(--s4); }
.ga-k3 { background: var(--blue-d); color: #fff; }
.ga-k3 > span { color: rgba(255, 255, 255, .8); }
.ga-k4 { background: #fff; color: var(--navy); box-shadow: inset 0 0 0 1px var(--s2); }
.ga-k4 > span { color: var(--s5); }
.ga-chart { display: block; width: 100%; height: 40px; margin-top: 8px; overflow: visible; }
.ga-gl { fill: none; stroke: var(--s1); stroke-width: 1; vector-effect: non-scaling-stroke; }
.ga-l1, .ga-l2 { fill: none; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.ga-l1 { stroke: var(--blue); stroke-width: 2; }
.ga-l2 { stroke: var(--navy); stroke-width: 1.4; opacity: .5; }

/* Escritorio (≥ 400 px de escenario) */
@container sh (min-width: 400px) {
  .sh-ads { height: 494px; }
  .sh-ads .ga-serp { right: 24%; height: 290px; }
  .sh-ads .gs-head { padding-right: 40px; }
  .ga-res { padding: 10px 44px 0 14px; }
  .ga-ad { padding-bottom: 10px; }
  .ga-org { height: 56px; padding-top: 9px; }
  .ga-ph { left: auto; right: 0; top: 34px; width: 32%; height: 258px; }
  .ga-ph-top { display: flex; }
  .ga-ph-k, .ga-ph-h { display: block; }
  .ga-ph-box { height: 128px; margin-top: 8px; }
  .ga-in { height: 24px; margin: 2px 0 6px; }
  .ga-toast { left: auto; right: 2%; top: 8px; width: 62%; }
  .ga-panel { left: 6%; right: 0; top: 298px; height: 192px; }
  .ga-pn-side { display: flex; }
  .ga-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .ga-k { padding: 7px 8px; }
  .ga-k b { font-size: 14.5px; }
  .ga-chart { height: 52px; margin-top: 12px; }
}

/* =================================================================
 * Réplicas de sección (marco pp-browser, como las de los otros servicios)
 * ================================================================= */
.ga-rep { container: garep / inline-size; user-select: none; }
.ga-rep .pp-browser { position: relative; }
.gt, .gv { font-size: 12px; color: #0F172A; }
.gt-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; min-height: 58px; padding: 12px 14px 10px; border-bottom: 1px solid #E2E8F0; background: #F8FAFC; }
.gt-h { font: 600 14px/1.2 var(--font-family-headings, Poppins), Inter, sans-serif; color: #0F172A; }
.gt-s { margin-top: 3px !important; font-size: 11px; color: #64748B; }
.gt-act { display: flex; align-items: center; gap: 10px; flex: none; font-size: 11px; color: #334155; white-space: nowrap; }
.gt-btn { padding: 6px 10px; border-radius: 6px; background: #2563EB; color: #fff; font-weight: 600; }
.gt-t { width: 100%; border-collapse: collapse; table-layout: auto; }
.gt-t th { padding: 8px 10px; text-align: left; font-size: 10px; font-weight: 700; letter-spacing: .04em; color: #64748B; border-bottom: 1px solid #E2E8F0; white-space: nowrap; }
.gt-t td { height: 38px; padding: 0 10px; border-bottom: 1px solid #F1F5F9; font-size: 11.5px; color: #334155; white-space: nowrap; }
.gt-t tr { position: relative; }
.gt-term { color: #0F172A !important; font-weight: 500; }
.gt-term span { display: inline-block; max-width: 230px; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
.gt-t td.gt-m { min-width: 118px; white-space: normal; line-height: 1.25; }
.gt-n { text-align: right !important; font-variant-numeric: tabular-nums; }
.gt-c { width: 28px; padding-right: 0 !important; }
.gt-ck { position: relative; display: block; width: 14px; height: 14px; border: 1.5px solid #CBD5E1; border-radius: 3px; }
.gt-ck i { position: absolute; inset: -1.5px; display: grid; place-items: center; border-radius: 3px; background: #2563EB; }
.gt-ck svg { width: 11px; height: 11px; fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.gt-chip { display: inline-block; padding: 2px 8px; border-radius: 999px; background: #DBEAFE; color: #1D4ED8; font-size: 10.5px; font-weight: 700; }
.gt-chip--neg { background: #fff; color: #475569; box-shadow: inset 0 0 0 1px #CBD5E1; }
.gt-none { color: #94A3B8; }
.gt-other td { color: #64748B; background: #F8FAFC; }
.gt-other .gt-term { color: #475569 !important; font-style: italic; font-weight: 400; }
.gt-foot { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; font-size: 11px; color: #64748B; background: #F8FAFC; }
.gt-fs { display: grid; }
.gt-fs > span { grid-area: 1 / 1; }
.gt-fs > span:last-child { color: #1D4ED8; font-weight: 600; }
.gt-fr { white-space: nowrap; }

.gv-pill { flex: none; padding: 4px 10px; border: 1px solid #E2E8F0; border-radius: 999px; background: #fff; font-size: 10.5px; font-weight: 600; color: #334155; white-space: nowrap; }
.gv-t td { height: 44px; }
.gv-o { color: #64748B !important; }
.gv-st { display: inline-grid; vertical-align: middle; }
.gv-st > span { grid-area: 1 / 1; display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.gv-ok { color: #1D4ED8; }
.gv-ok svg { width: 13px; height: 13px; flex: none; fill: none; stroke: #2563EB; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.gv-bad { color: #0F172A; }
.gv-bad i { display: grid; place-items: center; width: 14px; height: 14px; border-radius: 50%; background: #0F172A; color: #fff; font: 700 9px/1 Inter, sans-serif; font-style: normal; }
.gv-foot { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 12px 14px; background: #F8FAFC; border-top: 1px solid #E2E8F0; }
.gv-b { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border: 1px solid #E2E8F0; border-radius: 8px; background: #fff; }
.gv-b > span:first-child { font-size: 10.5px; font-weight: 600; color: #64748B; }

/* Réplicas de sección en móvil o columna estrecha */
@container garep (max-width: 520px) {
  .gt-m, .gt-co, .gv-o { display: none; }
  .gt-term span { max-width: none; white-space: normal; line-height: 1.25; }
  .gt-top { flex-wrap: wrap; }
  .gt-act { width: 100%; justify-content: space-between; }
  .gt-fr { display: none; }
  .gt-t td { padding: 0 7px; font-size: 11px; }
  .gt-t th { padding: 8px 7px; }
  .gv-foot { grid-template-columns: 1fr; }
  .gv-t td { white-space: normal; line-height: 1.25; }
  .gv-st > span { white-space: normal; font-size: 10.5px; }
  .gv-t td.gt-n { width: 40px; }
}
@container garep (max-width: 360px) {
  .gt-t:not(.gv-t) th:last-child { font-size: 0; }
  .gt-t:not(.gv-t) th:last-child::after { content: "Estado"; font-size: 10px; }
}
