/*!
 * Themeasy — Animated Chart
 *
 * Bar, donut and line charts built so the markup is ALREADY the finished
 * drawing: bars carry their fraction in a custom property, the donut ships a
 * stroke-dashoffset of 0 and the line a complete path. GSAP animates from zero
 * on view, which means no-JS, no-GSAP, the editor (--static) and
 * prefers-reduced-motion all land on the same fully drawn chart with nothing
 * left hidden.
 *
 * No SVG <text> anywhere: every label, value and legend row is real HTML, so
 * typography controls apply and nothing scales into blurriness. The line SVG
 * stretches with preserveAspectRatio="none" while its stroke stays true via
 * vector-effect, and the dots ride on top as percentage-positioned HTML.
 *
 * Colors resolve in three steps: an explicit swatch wins
 * (--tms-animated-chart-item-color), otherwise the .is-c1…is-c6 palette cycles
 * off the theme tokens, so dark mode keeps working with no control set.
 *
 * Tokens consumed: --tms-primary-color, --tms-heading-color, --tms-body-color,
 * --tms-border-color, --tms-white-color, --tms-transition-fast.
 *
 * @author Themeasy
 * @link https://themeasy.co
 * @since 1.0.0
 */
.tms-animated-chart{--tms-animated-chart-bar-gap:18%;--tms-animated-chart-legend-gap:16px;--tms-animated-chart-label-color:var(--tms-body-color,#4b5563);--tms-animated-chart-grid-color:var(--tms-border-color,#e5e7eb);--tms-animated-chart-dot-size:12px;--tms-animated-chart-plot-height:320px;--tms-animated-chart-dim:1;display:block;position:relative}.tms-animated-chart .is-c1{--tms-animated-chart-item-color:var(--tms-primary-color,#2563eb)}.tms-animated-chart .is-c2{--tms-animated-chart-item-color:color-mix(in srgb, var(--tms-primary-color,#2563eb) 72%, transparent)}.tms-animated-chart .is-c3{--tms-animated-chart-item-color:var(--tms-heading-color,#111827)}.tms-animated-chart .is-c4{--tms-animated-chart-item-color:color-mix(in srgb, var(--tms-primary-color,#2563eb) 45%, transparent)}.tms-animated-chart .is-c5{--tms-animated-chart-item-color:color-mix(in srgb, var(--tms-heading-color,#111827) 55%, transparent)}.tms-animated-chart .is-c6{--tms-animated-chart-item-color:color-mix(in srgb, var(--tms-primary-color,#2563eb) 25%, transparent)}.tms-animated-chart__canvas{display:block;position:relative}.tms-animated-chart__plot{height:var(--tms-animated-chart-plot-height);width:100%;position:relative}.tms-animated-chart__grid{pointer-events:none;position:absolute;top:0;bottom:0;left:0;right:0}.tms-animated-chart__gridline{left:0;right:0;top:var(--tms-animated-chart-gridline-offset,0%);background-color:var(--tms-animated-chart-grid-color);opacity:.7;height:1px;position:absolute}.tms-animated-chart__bars{justify-content:space-between;align-items:flex-end;gap:var(--tms-animated-chart-bar-gap);height:100%;display:flex;position:relative}.tms-animated-chart__bar{min-width:0;height:100%;opacity:var(--tms-animated-chart-dim);transition:opacity var(--tms-transition-fast,.2s ease);flex-direction:column;flex:1 1 0;justify-content:flex-end;align-items:center;display:flex;position:relative}.tms-animated-chart__bar-value{color:var(--tms-heading-color,#111827);font-size:var(--tms-font-size-sm);font-variant-numeric:tabular-nums;white-space:nowrap;margin-bottom:6px;font-weight:600;line-height:1.2}.tms-animated-chart__bar-fill{width:100%;height:calc(var(--tms-animated-chart-frac,0) * 100%);background-color:var(--tms-animated-chart-item-color,var(--tms-primary-color,#2563eb));transform-origin:bottom;border-radius:6px 6px 0 0;min-height:2px;display:block}.tms-animated-chart__donut{aspect-ratio:1;width:260px;max-width:100%;margin-inline-start:auto;margin-inline-end:auto;position:relative}.tms-animated-chart__donut-svg{width:100%;height:100%;display:block;overflow:visible}.tms-animated-chart__segment{fill:none;stroke:var(--tms-animated-chart-item-color,var(--tms-primary-color,#2563eb));stroke-linecap:butt;opacity:var(--tms-animated-chart-dim);pointer-events:stroke;transition:opacity var(--tms-transition-fast,.2s ease)}.tms-animated-chart__center{pointer-events:none;text-align:center;flex-direction:column;justify-content:center;align-items:center;gap:2px;display:flex;position:absolute;top:0;bottom:0;left:0;right:0}.tms-animated-chart__center-value{color:var(--tms-heading-color,#111827);font-variant-numeric:tabular-nums;font-size:1.75rem;font-weight:700;line-height:1.1}.tms-animated-chart__center-label{color:var(--tms-animated-chart-label-color);font-size:var(--tms-font-size-sm);line-height:1.3}.tms-animated-chart__line-svg{width:100%;height:100%;display:block;position:absolute;top:0;bottom:0;left:0;right:0;overflow:visible}.tms-animated-chart__line{fill:none;stroke:var(--tms-animated-chart-line-color,var(--tms-primary-color,#2563eb));stroke-width:3px;stroke-linecap:round;stroke-linejoin:round}.tms-animated-chart__area{fill:var(--tms-animated-chart-line-color,var(--tms-primary-color,#2563eb));stroke:none;opacity:.12}.tms-animated-chart__dot{width:var(--tms-animated-chart-dot-size);height:var(--tms-animated-chart-dot-size);border:2px solid var(--tms-white-color,#fff);background-color:var(--tms-animated-chart-item-color,var(--tms-animated-chart-line-color,var(--tms-primary-color,#2563eb)));opacity:var(--tms-animated-chart-dim);transition:opacity var(--tms-transition-fast,.2s ease), scale var(--tms-transition-fast,.2s ease);border-radius:50%;position:absolute;translate:-50% -50%}.tms-animated-chart__dot:hover{scale:1.25}.tms-animated-chart__point-value-wrap{pointer-events:none;margin-top:-22px;position:absolute;translate:-50% -50%}.tms-animated-chart__point-value{color:var(--tms-heading-color,#111827);font-size:var(--tms-font-size-sm);font-variant-numeric:tabular-nums;white-space:nowrap;font-weight:600;line-height:1.2;display:block}.tms-animated-chart__labels{justify-content:space-between;gap:var(--tms-animated-chart-bar-gap);margin-top:10px;display:flex}.tms-animated-chart__label{min-width:0;font-family:var(--tms-accent-font);font-size:var(--tms-font-size-xs);font-weight:var(--tms-accent-font-weight);line-height:var(--tms-accent-line-height);text-transform:uppercase;text-align:center;color:var(--tms-animated-chart-label-color);text-overflow:ellipsis;white-space:nowrap;flex:1 1 0;overflow:hidden}.tms-animated-chart__labels--pinned{height:1.3em;display:block;position:relative}.tms-animated-chart__labels--pinned .tms-animated-chart__label{max-width:96px;position:absolute;translate:-50%}.tms-animated-chart__labels--pinned .tms-animated-chart__label:first-child{text-align:left;translate:0}.tms-animated-chart__labels--pinned .tms-animated-chart__label:last-child{text-align:right;translate:-100%}.tms-animated-chart__labels--pinned .tms-animated-chart__label:first-child:last-child{text-align:center;translate:-50%}.tms-animated-chart__legend{gap:var(--tms-animated-chart-legend-gap);flex-wrap:wrap;margin:18px 0 0;padding:0;list-style:none;display:flex}.tms-animated-chart__legend-item{color:var(--tms-body-color,#4b5563);font-size:var(--tms-font-size-sm);align-items:center;gap:8px;line-height:1.4;display:inline-flex}.tms-animated-chart__legend-swatch{background-color:var(--tms-animated-chart-item-color,var(--tms-primary-color,#2563eb));border-radius:3px;flex:none;width:12px;height:12px}.tms-animated-chart__legend-value{font-variant-numeric:tabular-nums;font-weight:600}.tms-animated-chart__tooltip{z-index:2;background-color:var(--tms-heading-color,#111827);color:var(--tms-white-color,#fff);font-size:var(--tms-font-size-sm);white-space:nowrap;pointer-events:none;border-radius:6px;padding:6px 10px;line-height:1.35;display:none;position:absolute;top:0;left:0;translate:-50% -100%;box-shadow:0 6px 18px #0000002e}.tms-animated-chart__tooltip--visible{display:block}.tms-animated-chart__tooltip--below{translate:-50% 12px}.tms-animated-chart--hovering .tms-animated-chart__bar,.tms-animated-chart--hovering .tms-animated-chart__segment,.tms-animated-chart--hovering .tms-animated-chart__dot{--tms-animated-chart-dim:.35}.tms-animated-chart--hovering .tms-animated-chart__bar.is-active,.tms-animated-chart--hovering .tms-animated-chart__segment.is-active,.tms-animated-chart--hovering .tms-animated-chart__dot.is-active{--tms-animated-chart-dim:1}.tms-animated-chart__data{white-space:nowrap;clip-path:inset(50%);border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}@media (max-width:767px){.tms-animated-chart{--tms-animated-chart-bar-gap:12%}.tms-animated-chart__bar-value,.tms-animated-chart__point-value,.tms-animated-chart__label{font-size:var(--tms-font-size-sm)}.tms-animated-chart__center-value{font-size:1.5rem}}@media (max-width:575px){.tms-animated-chart{--tms-animated-chart-bar-gap:8%;--tms-animated-chart-dot-size:10px}.tms-animated-chart__bar-value,.tms-animated-chart__point-value{font-size:var(--tms-font-size-sm)}}@media (prefers-reduced-motion:reduce){.tms-animated-chart__bar,.tms-animated-chart__segment,.tms-animated-chart__dot{transition:none}.tms-animated-chart__dot:hover{scale:1}}