/* V6.2 prototype tokens — extends V6.1; right contact rail.
   Prefer Atlas role/color tokens elsewhere. Documented in README.md. */

.ca-theme-atlas,
.dark.ca-theme-inverse {
  /* SLA urgency chip */
  --v6-sla-bg: var(--ca-color-attention-soft);
  --v6-sla-fg: var(--ca-role-on-soft-attention);
  --v6-sla-border: var(--ca-color-attention-border);

  /* High-intent / lead-high chip */
  --v6-lead-high-bg: var(--ca-color-warning-soft, #fff3d6);
  --v6-lead-high-fg: var(--ca-role-on-soft-warning, #5c3d00);
  --v6-lead-high-border: var(--ca-color-warning-border, #c9a227);

  /* Delivery unknown (outbound receipt ambiguous) */
  --v6-delivery-unknown-fg: var(--ca-role-fg-muted);
  --v6-delivery-unknown-bg: var(--ca-role-bg-subtle);

  /* Internal note bubble */
  --v6-note-bg: var(--ca-color-agent-subtle, #f4eef6);
  --v6-note-fg: var(--ca-role-on-soft-agent, #5a2d6b);
  --v6-note-border: var(--ca-color-agent-border, #c9a8d4);
  --v6-note-stripe: var(--ca-color-agent-base, #a35bb4);

  /* Unread count pill */
  --v6-unread-pill-bg: var(--ca-role-accent);
  --v6-unread-pill-fg: var(--ca-role-fg-on-accent);

  /* Open / live status */
  --v6-open-pill-bg: var(--ca-color-context-soft);
  --v6-open-pill-fg: var(--ca-role-on-soft-context);

  /* Reply-target highlight */
  --v6-reply-target-ring: var(--ca-role-accent);
  --v6-reply-target-bg: var(--ca-color-action-subtle);

  /* Collision / viewers banner */
  --v6-collision-bg: var(--ca-color-warning-soft, #fff3d6);
  --v6-collision-fg: var(--ca-role-on-soft-warning, #5c3d00);
  --v6-collision-border: var(--ca-color-warning-border, #c9a227);

  /* AI proposal card */
  --v6-proposal-bg: var(--ca-color-agent-soft);
  --v6-proposal-fg: var(--ca-role-on-soft-agent);
  --v6-proposal-border: var(--ca-color-agent-border);

  /* Dense spacing scale */
  --v6-pad-x: 16px;
  --v6-pad-x-lg: 18px;
  --v6-row-gap: 6px;
  --v6-queue-pad-y: 10px;

  /* Source post / ad preview (in-thread) */
  --v6-post-preview-max: 300px;
  --v6-post-preview-max-wide: 440px;
  --v6-post-preview-radius: 10px;
  --v6-ratio-chip-bg: var(--ca-role-bg-subtle);
  --v6-ratio-chip-fg: var(--ca-role-fg-muted);

  /* V6.1 — richer creatives + Manual chrome */
  --v61-creative-portrait: linear-gradient(160deg, #c8e6d8 0%, #8ec5b0 28%, #5a9e9a 58%, #3d6f8c 100%);
  --v61-creative-wide: linear-gradient(125deg, #1a2332 0%, #2d4a5e 35%, #4a7a8c 62%, #c4a574 100%);
  --v61-creative-grain: radial-gradient(ellipse at 30% 20%, rgb(255 255 255 / .28), transparent 55%),
    radial-gradient(ellipse at 80% 70%, rgb(0 0 0 / .18), transparent 50%);
  --v61-play-bg: rgb(0 0 0 / .52);
  --v61-fail-bg: var(--ca-color-attention-soft);
  --v61-fail-fg: var(--ca-role-on-soft-attention);
  --v61-fail-border: var(--ca-color-attention-border);
  --v61-composer-tools-bg: var(--ca-role-bg);
  --v61-attr-fg: var(--ca-role-fg-muted);
  --v61-sla-header-bg: var(--ca-color-attention-soft);
  --v61-sla-header-fg: var(--ca-role-on-soft-attention);
  --v61-sla-header-border: var(--ca-color-attention-border);
  --v61-narrow-bp: 900px;

  /* V6.2 — contact right rail */
  --v62-rail-width: 280px;
  --v62-rail-section-py: 8px;
}


/* Light-theme fallbacks when warning soft tokens absent in some Atlas builds */
.ca-theme-atlas:not(.dark) {
  --v6-lead-high-bg: #fff3d6;
  --v6-lead-high-fg: #5c3d00;
  --v6-lead-high-border: #e0c36a;
  --v6-note-bg: #f6eef8;
  --v6-note-fg: #5a2d6b;
  --v6-note-border: #d4b8de;
  --v6-collision-bg: #fff6e0;
  --v6-collision-fg: #5c3d00;
  --v6-collision-border: #e0c36a;
  --v61-creative-portrait: linear-gradient(160deg, #d4efe3 0%, #9ecfba 30%, #6aada0 55%, #4a7f96 100%);
  --v61-creative-wide: linear-gradient(125deg, #1e2838 0%, #355568 38%, #5a8fa0 65%, #d4b484 100%);
}

.dark.ca-theme-inverse {
  --v6-lead-high-bg: var(--ca-color-warning-soft, #2a2110);
  --v6-lead-high-fg: var(--ca-role-on-soft-warning, #f0d48a);
  --v6-note-bg: var(--ca-color-agent-subtle);
  --v6-note-fg: var(--ca-role-on-soft-agent);
  --v6-collision-bg: var(--ca-color-warning-soft, #2a2110);
  --v6-collision-fg: var(--ca-role-on-soft-warning, #f0d48a);
  --v61-creative-portrait: linear-gradient(160deg, #2a4a3e 0%, #3d6b5c 30%, #2d5a62 60%, #1e3a4a 100%);
  --v61-creative-wide: linear-gradient(125deg, #0e141c 0%, #1a2e3c 40%, #2a4a58 70%, #5a4830 100%);
}
