/*
  Lead & enquiry management graphic (templates/_graphics/leads.twig): a quote
  request toast, a colourful pipeline board whose new deal is dragged across the
  columns by a cursor, and a burst when it is won.
*/
[data-g17-graphic="leads"] .g17g-roll { position: relative; display: inline-grid; overflow: hidden; vertical-align: bottom; }
[data-g17-graphic="leads"] .g17g-roll > * { grid-area: 1 / 1; white-space: nowrap; }
[data-g17-graphic="leads"] .g17g-chip svg { width: 1.15em; height: 1.15em; }

/* Toasts */
[data-g17-graphic="leads"] .g17g-toast { display: flex; align-items: center; gap: .6em; padding: .7em .95em .7em .7em; }
[data-g17-graphic="leads"] .g17g-toast .g17g-badge__icon { flex: none; width: 2em; height: 2em; }
[data-g17-graphic="leads"] .g17g-toast .g17g-av { width: 2.3em; height: 2.3em; font-size: .78em; }
[data-g17-graphic="leads"] .g17g-toast b { display: block; font-size: .72em; white-space: nowrap; }
[data-g17-graphic="leads"] .g17g-toast small { display: block; margin-top: .2em; font-size: .56em; color: var(--g17g-muted); white-space: nowrap; }

/* Board */
[data-g17-graphic="leads"] .g17g-reps { display: flex; }
[data-g17-graphic="leads"] .g17g-reps .g17g-av { box-shadow: 0 0 0 2px var(--g17g-card); }
[data-g17-graphic="leads"] .g17g-reps .g17g-av + .g17g-av { margin-left: -.12em; }
[data-g17-graphic="leads"] .g17g-head__end { display: flex; align-items: center; gap: .6em; }
[data-g17-graphic="leads"] .g17g-board { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); margin: 0 -.3em; }
[data-g17-graphic="leads"] .g17g-col { padding: 0 .3em; }
[data-g17-graphic="leads"] .g17g-col__in { position: relative; height: 17.2em; padding: .55em .5em; border-radius: .8em; background: var(--g17g-colbg); overflow: hidden; }
[data-g17-graphic="leads"] .g17g-col__in::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: .3em; background: var(--g17g-col); }
[data-g17-graphic="leads"] .g17g-col__drop { position: absolute; inset: 0; border-radius: inherit; background: var(--g17g-green-tint); box-shadow: inset 0 0 0 1.5px var(--g17g-green); opacity: 0; }
[data-g17-graphic="leads"] .g17g-col__head { position: relative; display: flex; align-items: flex-end; justify-content: space-between; height: 3em; padding: .2em .2em .5em; }
[data-g17-graphic="leads"] .g17g-col__name { display: flex; align-items: center; gap: .45em; font-size: .62em; font-weight: 700; color: var(--g17g-muted); white-space: nowrap; }
[data-g17-graphic="leads"] .g17g-col__name i { width: .8em; height: .8em; border-radius: 50%; background: var(--g17g-col); }
[data-g17-graphic="leads"] .g17g-col__total { font-size: .95em; font-weight: 800; letter-spacing: -.01em; }
[data-g17-graphic="leads"] .g17g-col__total .g17g-roll { justify-items: end; }
[data-g17-graphic="leads"] .g17g-deal {
    position: relative; display: flex; align-items: center; gap: .55em; height: 3.9em; margin-top: .5em; padding: 0 .6em; border-radius: .7em; background: var(--g17g-card);
    box-shadow: 0 .15em .5em var(--g17g-shadow-soft), 0 0 0 1px var(--g17g-edge);
}
[data-g17-graphic="leads"] .g17g-logo { flex: none; width: 2.3em; height: 2.3em; border-radius: .55em; overflow: hidden; background: var(--g17g-green-tint); }
[data-g17-graphic="leads"] .g17g-logo svg { width: 100%; height: 100%; }
[data-g17-graphic="leads"] .g17g-deal .g17g-row__text { flex: 1; min-width: 0; }
[data-g17-graphic="leads"] .g17g-deal .g17g-row__name { font-size: .7em; overflow: visible; }
[data-g17-graphic="leads"] .g17g-deal .g17g-row__meta { margin-top: .15em; font-size: .64em; font-weight: 600; color: var(--g17g-text-soft); }
[data-g17-graphic="leads"] .g17g-deal .g17g-av { width: 2.2em; height: 2.2em; font-size: .56em; }

/* The new deal sits in the third slot, over the columns. Columns have no gap,
   so it moves one column with each xPercent of -100. */
[data-g17-graphic="leads"] .g17g-mover { position: absolute; left: 66.667%; top: 12.85em; width: 33.333%; padding: 0 .8em; }
[data-g17-graphic="leads"] .g17g-mover .g17g-deal { margin-top: 0; }
[data-g17-graphic="leads"] .g17g-deal__lift { position: absolute; inset: 0; border-radius: inherit; box-shadow: 0 .8em 1.8em var(--g17g-shadow), 0 0 0 1.5px var(--g17g-green); opacity: 0; }
[data-g17-graphic="leads"] .g17g-deal__chip { position: absolute; top: -.75em; right: .5em; display: inline-grid; justify-items: end; }
[data-g17-graphic="leads"] .g17g-deal__chip > * { grid-area: 1 / 1; box-shadow: 0 0 0 2px var(--g17g-card); }

/* Cursor and a burst of dots. Each layer fills the stage, so xPercent and
   yPercent move it to a point on the stage. */
[data-g17-graphic="leads"] .g17g-layer { position: absolute; left: 0; top: 0; width: 100%; height: 100%; z-index: 8; pointer-events: none; }
[data-g17-graphic="leads"] .g17g-cursor svg { position: absolute; left: -.32em; top: -.2em; width: 1.55em; height: 1.55em; color: var(--g17g-text); filter: drop-shadow(0 .15em .25em var(--g17g-shadow)); }
[data-g17-graphic="leads"] .g17g-cursor__ring { position: absolute; left: -.9em; top: -.9em; width: 1.8em; height: 1.8em; border-radius: 50%; border: 2px solid var(--g17g-green); opacity: 0; }
[data-g17-graphic="leads"] .g17g-burst i { position: absolute; left: -.25em; top: -.25em; width: .5em; height: .5em; border-radius: 50%; background: var(--g17g-green); opacity: 0; }
[data-g17-graphic="leads"] .g17g-burst i:nth-child(even) { background: var(--g17g-purple); }

/* A client's own longer name keeps the routed toast on the stage */
[data-g17-graphic="leads"] [data-part="routed"] b { max-width: 12em; overflow: hidden; text-overflow: ellipsis; }
