/* meta-ads.css — extensions for the ads playbook page */

.ads-bg {
  background: var(--cream);
}

/* Page header — feels like an internal media doc */
.ads-header {
  background: var(--brand-ink);
  color: white;
  padding: 56px 28px 64px;
  position: relative; overflow: hidden;
}
.ads-header .halftone {
  position: absolute; inset: 0; opacity: 0.18;
  background-image: radial-gradient(rgba(255,255,255,.6) 1px, transparent 1.6px);
  background-size: 12px 12px;
}
.ads-header-content {
  position: relative;
  max-width: 1400px; margin: 0 auto;
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 56px; align-items: end;
}

/* Section bands */
.ads-section {
  padding: 80px 0 60px;
  border-bottom: 1px solid var(--line);
}
.ads-section h2.section-h {
  font-family: var(--f-display); font-size: 56px; line-height: 0.95;
  text-transform: uppercase; color: var(--navy);
}
.ads-section-eyebrow {
  font-family: var(--f-mono); font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--brand); margin-bottom: 14px;
}

/* Spec chip */
.spec {
  font-family: var(--f-mono); font-size: 11px;
  background: var(--brand-ink); color: white;
  padding: 4px 8px; border-radius: 4px;
  letter-spacing: .04em; display: inline-block;
}
.spec.alt { background: var(--red); }
.spec.mono { background: white; color: var(--ink); border: 1px solid var(--line); }

/* Meta IG/FB chrome */
.fb-chrome {
  width: 100%; background: white;
  border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.fb-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; }
.fb-av {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  color: white; display: flex; align-items: center; justify-content: center;
  font-family: var(--f-display); font-size: 14px;
}
.fb-meta { font-size: 13px; line-height: 1.3; }
.fb-meta b { font-weight: 600; color: #050505; }
.fb-meta div { font-size: 11px; color: #65676b; display: flex; align-items: center; gap: 4px; }
.fb-dots { margin-left: auto; color: #65676b; font-size: 18px; padding: 0 6px; }
.fb-text {
  padding: 0 14px 10px;
  font-size: 14px; color: #050505; line-height: 1.45;
  white-space: pre-line;
}
.fb-text a { color: var(--brand); }
.fb-cta-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; background: #f0f2f5;
  border-top: 1px solid #e4e6eb;
}
.fb-cta-bar .meta { font-size: 12px; color: #65676b; line-height: 1.3; }
.fb-cta-btn {
  padding: 7px 14px; background: #e4e6eb; color: #050505;
  border-radius: 6px; font-weight: 600; font-size: 13px; border: 0;
}
.fb-actions {
  display: flex; padding: 6px 10px;
  border-top: 1px solid #e4e6eb;
  font-size: 13px; color: #65676b;
}
.fb-actions > * {
  flex: 1; text-align: center; padding: 8px 0;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  font-weight: 600;
}

/* Story chrome */
.ig-story {
  position: relative; aspect-ratio: 9/16;
  border-radius: 22px; overflow: hidden;
  background: black; color: white;
  box-shadow: var(--shadow-md);
}
.ig-story-bar {
  position: absolute; top: 8px; left: 12px; right: 12px;
  height: 3px; background: rgba(255,255,255,.3); border-radius: 2px; z-index: 4;
}
.ig-story-bar::after {
  content: ""; position: absolute; left: 0; top: 0; height: 100%; width: 32%;
  background: white; border-radius: 2px;
}
.ig-story-head {
  position: absolute; top: 22px; left: 14px; right: 14px;
  display: flex; align-items: center; gap: 10px; z-index: 4;
}
.ig-story-av {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), #ffffff);
  padding: 2px; border: 1.5px solid white;
}
.ig-story-av > div {
  width: 100%; height: 100%; border-radius: 50%;
  background: var(--brand); color: white;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--f-display); font-size: 12px;
}
.ig-story-name { font-size: 13px; font-weight: 600; }
.ig-story-sub { font-size: 11px; opacity: .85; }
.ig-story-cta {
  position: absolute; left: 14px; right: 14px; bottom: 14px;
  background: rgba(0,0,0,.55); backdrop-filter: blur(8px);
  color: white; padding: 14px 18px; border-radius: 28px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 700; font-size: 14px; z-index: 4;
}
.ig-story-cta::before {
  content: ""; width: 8px; height: 8px; border-right: 2px solid white;
  border-top: 2px solid white; transform: rotate(45deg);
}

/* Ad card */
.ad-card {
  background: white;
  border-radius: 14px; border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.ad-card-body { padding: 20px; }
.ad-card-title { font-family: var(--f-display); font-size: 22px;
  color: var(--navy); text-transform: uppercase; letter-spacing: .01em; }
.ad-card-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }

/* KPI tile */
.kpi {
  background: white; border-radius: 12px; border: 1px solid var(--line);
  padding: 18px; display: flex; flex-direction: column; gap: 6px;
}
.kpi-num { font-family: var(--f-display); font-size: 44px; color: var(--brand); line-height: 1; }
.kpi-lbl { font-size: 12px; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }

/* Funnel bars */
.funnel-row { display: grid; grid-template-columns: 220px 1fr 160px; gap: 18px; align-items: center; padding: 16px 0; border-top: 1px solid var(--line); }
.funnel-row:last-child { border-bottom: 1px solid var(--line); }
.funnel-bar { height: 24px; border-radius: 4px; }
.funnel-stage { font-weight: 700; font-size: 14px; color: var(--navy); }
.funnel-stage small { display: block; font-weight: 500; color: var(--muted); font-size: 12px; margin-top: 2px; }

/* Matrix */
.matrix { width: 100%; border-collapse: separate; border-spacing: 0; }
.matrix th, .matrix td {
  text-align: left; padding: 14px 16px; vertical-align: top; font-size: 13.5px; line-height: 1.5;
}
.matrix thead th {
  background: var(--navy); color: white; font-weight: 600;
  font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
}
.matrix tbody tr { border-top: 1px solid var(--line); }
.matrix tbody tr:nth-child(odd) { background: white; }
.matrix tbody tr:nth-child(even) { background: var(--paper); }
.matrix th:first-child { border-radius: 10px 0 0 0; }
.matrix th:last-child  { border-radius: 0 10px 0 0; }

/* Copy bank lines */
.copy-line {
  display: grid; grid-template-columns: 110px 1fr; gap: 16px;
  padding: 12px 0; border-top: 1px dashed var(--line); align-items: baseline;
}
.copy-line:first-child { border-top: 0; }
.copy-line .role {
  font-family: var(--f-mono); font-size: 10px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted);
}
.copy-line .text { color: var(--ink); font-size: 15px; line-height: 1.5; }
.copy-line .text .chars { color: var(--muted); font-size: 11px; font-family: var(--f-mono); margin-left: 8px; }

/* Storyboard frame */
.sb-frame {
  background: var(--navy); color: white;
  border-radius: 10px; padding: 14px;
  aspect-ratio: 16/9;
  display: flex; flex-direction: column; justify-content: space-between;
  position: relative; overflow: hidden;
}
.sb-frame .sb-t { font-family: var(--f-mono); font-size: 10px; opacity: .65; }
.sb-frame .sb-cap { font-size: 12px; line-height: 1.35; }

/* Misc */
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-row .pill { font-size: 11px; padding: 4px 10px; }

/* ─── Asset download wrapper ─── */
.asset-wrap {
  position: relative;
}
.asset-inner {
  border-radius: 4px; overflow: hidden;
}
.asset-overlay {
  position: absolute; top: 10px; right: 10px;
  display: flex; flex-direction: column; gap: 6px; align-items: end;
  opacity: 0; transform: translateY(-4px);
  transition: opacity .2s ease, transform .2s ease;
  pointer-events: none;
  z-index: 5;
}
.asset-wrap:hover .asset-overlay,
.asset-wrap:focus-within .asset-overlay {
  opacity: 1; transform: none;
  pointer-events: auto;
}
.asset-chip {
  font-family: var(--f-mono); font-size: 10px;
  background: rgba(11,19,64,.85); color: white;
  padding: 4px 8px; border-radius: 4px;
  letter-spacing: .06em;
}
.asset-dl-btn {
  background: white; color: var(--navy);
  border: 0; padding: 8px 12px; border-radius: 999px;
  font-family: var(--f-sans); font-weight: 700; font-size: 12px;
  letter-spacing: .04em;
  box-shadow: 0 8px 20px -6px rgba(0,0,0,.4);
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
}
.asset-dl-btn:hover { background: var(--brand); color: white; }
.asset-dl-btn:disabled { background: var(--cream-2); color: var(--muted); cursor: wait; }

/* ─── Copy button ─── */
.copy-btn {
  background: transparent; border: 1px solid var(--line);
  padding: 3px 8px; border-radius: 6px;
  font-family: var(--f-mono); font-size: 10px;
  letter-spacing: .06em; cursor: pointer;
  color: var(--muted);
  transition: all .15s ease;
  white-space: nowrap;
}
.copy-btn:hover { color: var(--brand); border-color: var(--brand); background: rgba(46,71,240,.05); }
.copy-btn.done { background: var(--brand); color: white; border-color: var(--brand); }

/* ─── Master export bar (sticky top) ─── */
.export-bar {
  position: sticky; top: 0; z-index: 60;
  background: var(--brand-ink); color: white;
  border-bottom: 1px solid rgba(255,255,255,.1);
  padding: 12px 28px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
}
.export-bar-meta {
  display: flex; align-items: center; gap: 12px;
  font-size: 13px;
}
.export-bar-meta b { color: white; }
.export-bar-meta .dot { color: rgba(255,255,255,.4); }
.export-bar-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.export-btn {
  padding: 10px 16px; border-radius: 999px;
  font-family: var(--f-sans); font-weight: 700; font-size: 13px;
  letter-spacing: .02em; cursor: pointer; border: 0;
  display: inline-flex; align-items: center; gap: 8px;
  white-space: nowrap;
  transition: transform .12s ease, background .2s ease;
}
.export-btn:active { transform: translateY(1px); }
.export-btn.primary {
  background: var(--red); color: white;
  box-shadow: 0 8px 24px -8px rgba(216,35,42,.6);
}
.export-btn.primary:hover { background: var(--red-deep); }
.export-btn.secondary {
  background: rgba(255,255,255,.1); color: white;
  border: 1px solid rgba(255,255,255,.2);
}
.export-btn.secondary:hover { background: rgba(255,255,255,.18); }
.export-btn:disabled { opacity: .55; cursor: wait; }

/* progress bar inside export bar */
.export-progress {
  height: 3px; background: rgba(255,255,255,.12);
  border-radius: 2px; flex: 1; max-width: 280px; overflow: hidden;
}
.export-progress > div {
  height: 100%; background: var(--red);
  transition: width .2s ease;
}
.export-progress-label {
  font-family: var(--f-mono); font-size: 11px; color: rgba(255,255,255,.7);
  letter-spacing: .04em;
}
