/* The headcount chart and the Employee trends and Departments panels of the Company insights card (pitchiq#828).
   Markup: brief-company-trend.jsx. Values are the Figma's (file T51wh9ODKWVeqS1lLXRmkb: 568:17242, 537:12648,
   422:47662, 633:2360, 633:2361); a token is used wherever it equals the Figma value. */

/* ── Panel (the content area of the Company insights card) ── */
.ebce-panel { box-sizing: border-box; display: flex; flex-direction: column; align-items: stretch; width: 100%; padding: 24px 16px; font-family: var(--evsh-font); }

/* ── Employee trends: latest observation, period and comparison ── */
.ebce-trend-summary { display: flex; flex-direction: column; gap: 4px; padding: 0 12px 32px 0; }   /* 12 + 20 below */
.ebce-trend-count { margin: 0; font-size: 18px; line-height: 24px; font-weight: 900; color: var(--evsh-neutral-1); white-space: nowrap; }   /* heading/heading-3 */
.ebce-trend-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ebce-trend-period { font-size: 12px; line-height: 18px; font-weight: 500; color: var(--evsh-neutral-3); white-space: nowrap; }   /* body/body-4 */
.ebce-change { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; line-height: 18px; font-weight: 500; white-space: nowrap; }
.ebce-change--down { color: var(--evsh-red-3); }
.ebce-change--up { color: var(--evsh-green-1); }
.ebce-change-icon { flex: none; display: block; }
.ebce-change-icon path { stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.ebce-change-icon--up { transform: scaleY(-1); }

/* ── Headcount chart ── */
.ebce-chart { display: flex; flex-direction: column; gap: 8px; width: 100%; min-width: 0; font-family: var(--evsh-font); }
.ebce-plot { position: relative; width: 100%; }
.ebce-track { position: absolute; top: 0; bottom: 0; }
.ebce-track--hover { pointer-events: none; }
.ebce-series, .ebce-grid { position: absolute; left: 0; top: 0; display: block; overflow: visible; }
.ebce-line { stroke: #c19528; stroke-width: 3; stroke-linecap: round; }   /* gold/gold-1 */
.ebce-marker { fill: #c19528; stroke: #c19528; stroke-width: 2.11416; }
.ebce-gridline { stroke: var(--evsh-neutral-blue-2); stroke-width: 1; stroke-dasharray: 2 2; }
.ebce-fade { position: absolute; top: 0; width: 32px; height: 197px; pointer-events: none; }
.ebce-fade--left { left: 0; background: linear-gradient(to right, #fff, rgba(255, 255, 255, 0)); }
.ebce-fade--right { right: 0; background: linear-gradient(to left, #fff, rgba(255, 255, 255, 0)); }
.ebce-axis-label { position: absolute; left: 12px; padding: 8px 4px; background: var(--evsh-white); font-size: 10px; line-height: 18px; font-weight: 500; color: var(--evsh-neutral-3); white-space: nowrap; }

/* Period labels: the first and last at the plot's edges, the others centred under their observation. */
.ebce-periods { position: relative; height: 20px; font-size: 10px; line-height: 18px; font-weight: 500; color: var(--evsh-neutral-3); white-space: nowrap; }
.ebce-periods-track { position: absolute; top: 0; bottom: 0; }
.ebce-period { position: absolute; top: 0; transform: translateX(-50%); }
.ebce-period--first { left: 0; transform: none; }
.ebce-period--last { right: 0; transform: none; }

/* Hover and focus: one invisible target per observation, the guide and the popover. */
.ebce-target { position: absolute; top: 0; bottom: 0; width: 16px; margin: 0; padding: 0; border: 0; background: none; transform: translateX(-50%); pointer-events: none; outline: none; }
.ebce-guide { position: absolute; top: 0; display: flex; flex-direction: column; align-items: center; width: 12px; transform: translateX(-50%); }
.ebce-guide-handle { flex: none; width: 12px; height: 12px; margin-bottom: -4px; border-radius: 50%; background: var(--evsh-neutral-1); }
.ebce-guide-line { flex: 1 0 0; width: 2px; min-height: 1px; border-radius: 8px; background: var(--evsh-neutral-1); }
.ebce-popover { position: absolute; z-index: 1; box-sizing: border-box; display: flex; flex-direction: column; gap: 8px; width: 130px; padding: 16px; border-radius: 32px; background: var(--evsh-white); filter: drop-shadow(0 4px 6px rgba(0, 32, 47, 0.13)); transform: translateY(-50%); }
.ebce-popover-count { display: flex; align-items: center; gap: 8px; }
.ebce-popover-icon { position: relative; flex: none; width: 16px; height: 16px; }
.ebce-popover-icon img { position: absolute; left: 0.12px; top: 0.77px; display: block; width: 15.7671px; height: 14.4545px; max-width: none; }
.ebce-popover-value { flex: 1 0 0; min-width: 1px; font-size: 16px; line-height: 24px; font-weight: 600; color: var(--evsh-neutral-1); }   /* subtitle/subtitle-1 */
.ebce-popover-period { margin: 0; font-size: 12px; line-height: 18px; font-weight: 900; color: var(--evsh-neutral-2); }   /* subtitle/subtitle-4 */
.ebce-popover-caret { position: absolute; left: -8px; top: 50%; display: flex; align-items: center; justify-content: center; width: 8px; height: 14px; transform: translateY(-50%); }
.ebce-popover-caret img { flex: none; display: block; width: 14px; height: 8px; max-width: none; transform: rotate(90deg); }
.ebce-popover--flipped .ebce-popover-caret { left: auto; right: -8px; }
.ebce-popover--flipped .ebce-popover-caret img { transform: rotate(-90deg); }

/* Compact (Overview card): the plot only, with a thinner line and smaller markers (pitchiq#908). */
.ebce-chart--compact .ebce-line { stroke-width: 1.8; }
.ebce-chart--compact .ebce-marker { r: 3px; stroke-width: 1; }

/* Insufficient data (Overview card): the neutral dotted guide in the chart's space. */
/* The same box as the compact chart it stands in for (CHART_SIZES.compact: 100 tall, 16 in at each side). */
.ebce-placeholder { box-sizing: border-box; width: 100%; padding: 0 16px; }
.ebce-placeholder-svg { display: block; overflow: visible; }
.ebce-placeholder-guide { stroke: var(--evsh-neutral-blue-2); stroke-width: 1.5; stroke-linecap: round; stroke-dasharray: 0.9936 3.9745; }

/* ── Departments: name, relative bar, count ── */
/* pitchiq#914 item 7 (Figma 420:47062): a 140px name column, 18px rows 33px apart (15px between them); a name too
   long for the column goes on two lines (36px). 24px to the bars (prototype `.department-chart`, pitchiq#908). */
.ebce-depts { display: grid; grid-template-columns: 140px minmax(0, 1fr) minmax(40px, max-content); column-gap: 12px; row-gap: 15px; align-items: center; box-sizing: border-box; width: 100%; padding: 4px 0; }
.ebce-dept { display: contents; }
.ebce-dept-name { display: flex; align-items: center; font-size: 14px; line-height: 18px; font-weight: 400; color: var(--evsh-neutral-1); overflow-wrap: anywhere; }
.ebce-dept-track { display: block; height: 6px; border-radius: 8px; background: var(--evsh-neutral-blue-4); }
.ebce-dept-bar { display: block; height: 6px; border-radius: 8px; background: #d1ae63; }
.ebce-dept-count { font-size: 14px; line-height: 18px; font-weight: 600; color: var(--evsh-neutral-1); text-align: right; white-space: nowrap; }   /* subtitle/subtitle-3 */

/* 700px and narrower (prototype; pitchiq#908): Departments with a 36 count column, 16 between the columns. */
@media (max-width: 700px) {
  .ebce-depts { grid-template-columns: minmax(0, 140px) minmax(0, 1fr) 36px; column-gap: 12px; }
}
