/* Core.Blazor KPI card primitive */
.core-kpi-card {
  display: grid;
  gap: var(--kendo-spacing-2);
  background: var(--core-token-component-kpi-background);
  border: var(--core-token-semantic-border-width) solid var(--core-token-component-kpi-border);
  border-radius: var(--core-token-component-kpi-radius);
  padding: var(--core-token-component-kpi-padding);
  box-shadow: var(--core-token-component-kpi-elevation);
  color: var(--core-token-component-kpi-value-color);
  transition:
    box-shadow var(--core-token-component-kpi-motion-duration) var(--core-token-component-kpi-motion-easing),
    border-color var(--core-token-component-kpi-motion-duration) var(--core-token-component-kpi-motion-easing);
}

.core-kpi-card:hover {
  box-shadow: var(--elevation-2);
}

.core-kpi-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--kendo-spacing-2);
}

.core-kpi-card__title {
  margin: 0;
  font-size: var(--core-token-component-kpi-label-size);
  font-weight: var(--core-token-component-kpi-label-weight);
  color: var(--core-token-component-kpi-label-color);
}

.core-kpi-card__icon {
  color: var(--core-token-component-kpi-icon-color);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.core-kpi-card__value {
  font-size: var(--core-token-component-kpi-value-size);
  font-weight: var(--core-token-component-kpi-value-weight);
  color: var(--core-token-component-kpi-value-color);
  line-height: var(--core-token-line-heights-tight);
}

.core-kpi-card__delta {
  display: flex;
  align-items: center;
  gap: var(--kendo-spacing-1);
  font-size: var(--core-token-component-kpi-delta-size);
  font-weight: var(--core-token-component-kpi-delta-weight);
}

.core-kpi-card__delta-symbol {
  line-height: 1;
}

.core-kpi-card__delta-value {
  line-height: 1;
}

.core-kpi-card__delta-label {
  margin-left: var(--kendo-spacing-1);
  font-size: var(--core-token-component-kpi-delta-label-size);
  color: var(--core-token-component-kpi-delta-label-color);
}

.core-kpi-card__delta--up {
  color: var(--core-token-component-kpi-trend-positive);
}

.core-kpi-card__delta--down {
  color: var(--core-token-component-kpi-trend-negative);
}

.core-kpi-card__delta--neutral {
  color: var(--core-token-component-kpi-trend-neutral);
}

.core-kpi-card__sparkline {
  margin-top: var(--kendo-spacing-2);
  min-height: var(--kendo-spacing-6);
  color: var(--core-token-component-kpi-sparkline-color);
  background: var(--core-token-component-kpi-sparkline-background);
  border-radius: var(--core-token-radius-sm);
  padding: var(--kendo-spacing-1);
}

.core-kpi-card--compact {
  gap: var(--kendo-spacing-1);
  padding: var(--kendo-spacing-3);
}

[data-core-reduced-motion="true"] .core-kpi-card {
  transition: none;
}
