/**
 * @file
 * FlowDrop Stat Card Component Styles
 */

.fd-stat-card {
  display: flex;
  align-items: flex-start;
  gap: var(--fd-space-4);
  padding: var(--fd-stat-card-padding);
  background-color: var(--fd-stat-card-bg);
  border: var(--fd-border-width) solid var(--fd-stat-card-border);
  border-radius: var(--fd-stat-card-radius);
  text-decoration: none;
  color: inherit;
  transition: box-shadow var(--fd-transition-fast),
              border-color var(--fd-transition-fast),
              transform var(--fd-transition-fast);
}

/* Clickable state */
.fd-stat-card--clickable {
  cursor: pointer;
}

.fd-stat-card--clickable:hover {
  box-shadow: var(--fd-shadow-md);
  border-color: var(--fd-color-gray-300);
}

.fd-stat-card--clickable:active {
  transform: scale(0.99);
}

/* Icon container */
.fd-stat-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  flex-shrink: 0;
  border-radius: var(--fd-radius-lg);
  background-color: var(--fd-stat-card-icon-bg);
  color: var(--fd-stat-card-icon-color);
  margin-block-start: 0;
}

.fd-stat-card__icon svg {
  width: 1.5rem;
  height: 1.5rem;
}

/* Content */
.fd-stat-card__content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.fd-stat-card__value {
  display: flex;
  align-items: baseline;
  gap: var(--fd-space-2);
  font-size: var(--fd-stat-card-value-size);
  font-weight: var(--fd-stat-card-value-weight);
  color: var(--fd-stat-card-value-color);
  line-height: 1.2;
}

.fd-stat-card__label {
  font-size: var(--fd-stat-card-label-size);
  font-weight: var(--fd-stat-card-label-weight);
  color: var(--fd-stat-card-label-color);
  margin-block-start: var(--fd-space-1);
}

/* Trend indicator */
.fd-stat-card__trend {
  display: inline-flex;
  align-items: center;
  gap: 0.125rem;
  font-size: var(--fd-font-size-sm);
  font-weight: var(--fd-font-weight-medium);
}

.fd-stat-card__trend--up {
  color: var(--fd-color-success-600);
}

.fd-stat-card__trend--down {
  color: var(--fd-color-error-600);
}

.fd-stat-card__trend--neutral {
  color: var(--fd-color-gray-500);
}

.fd-stat-card__trend-icon {
  width: 1rem;
  height: 1rem;
}

/* Arrow for clickable cards */
.fd-stat-card__arrow {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
  color: var(--fd-color-gray-400);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity var(--fd-transition-fast),
              transform var(--fd-transition-fast);
}

.fd-stat-card--clickable:hover .fd-stat-card__arrow {
  opacity: 1;
  transform: translateX(0);
}

/* ========================================================================
 * VARIANT STYLES
 * ======================================================================== */

/* Primary variant */
.fd-stat-card--primary .fd-stat-card__icon {
  background-color: var(--fd-color-primary-100);
  color: var(--fd-color-primary-600);
}

/* Success variant */
.fd-stat-card--success .fd-stat-card__icon {
  background-color: var(--fd-color-success-100);
  color: var(--fd-color-success-600);
}

/* Warning variant */
.fd-stat-card--warning .fd-stat-card__icon {
  background-color: var(--fd-color-warning-100);
  color: var(--fd-color-warning-600);
}

/* Error variant */
.fd-stat-card--error .fd-stat-card__icon {
  background-color: var(--fd-color-error-100);
  color: var(--fd-color-error-600);
}

