/*
  Badge 10 — Trend Badge — standalone HTML/CSS/JS implementation.
  No build step, no framework, no external dependency: copy index.html,
  this file, and script.js into any project as-is.
*/

.trend-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  border-radius: 9999px;
  border: 1px solid oklch(0.87 0 0);
  background-color: #ffffff;
  padding: 0.25rem 0.625rem;
  font-family:
    Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji",
    "Segoe UI Emoji";
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.trend-badge__icon {
  display: flex;
  width: 0.75rem;
  height: 0.75rem;
  flex-shrink: 0;
}

.trend-badge__icon svg {
  width: 100%;
  height: 100%;
}

.trend-badge--positive {
  color: oklch(0.55 0.15 155);
}
.trend-badge--negative {
  color: oklch(0.58 0.19 20);
}
.trend-badge--negative .trend-badge__icon svg {
  transform: rotate(180deg);
}
.trend-badge--neutral {
  color: oklch(0.5 0 0);
}

.trend-badge__value {
  display: inline-flex;
  animation: trend-badge-update 180ms ease-out;
}

@keyframes trend-badge-update {
  from {
    opacity: 0;
    transform: translateY(2px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.trend-badge__sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  .trend-badge__value {
    animation: none;
  }
}

/*
  Page layout — the canvas this resource is presented on. Adjust or drop it
  when placing the resource inside your own layout.
*/

body {
  margin: 0;
  font-family:
    Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: linear-gradient(to bottom, #fafafa, #f4f4f5);
}
.badge10-layout {
  display: flex;
  min-height: 20rem;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  padding: 1.5rem;
}
.badge10-layout__panel {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: center;
  gap: 0.75rem;
  border-radius: 1rem;
  border: 1px solid rgba(0, 0, 0, 0.05);
  background-color: #ffffff;
  padding: 1.5rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 16px 40px -16px rgba(0, 0, 0, 0.14);
}
.badge10-layout__card {
  display: flex;
  width: 8rem;
  flex-direction: column;
  gap: 0.375rem;
  border-radius: 0.75rem;
  border: 1px solid #e5e5e5;
  padding: 0.75rem;
}
.badge10-layout__label {
  font-size: 0.75rem;
  color: #737373;
}
.badge10-layout__cycle {
  border-radius: 9999px;
  border: 0;
  background: none;
  padding: 0;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 500;
  color: #737373;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}
.badge10-layout__cycle:hover {
  color: #0f172a;
}
