/* wa-lint: skip */
/* Blog-hero: Belægning — sparkline-stil */

.blog-hero-density {
  width: 100%;
  aspect-ratio: 600 / 380;
  background: rgb(255, 255, 255);
  border-radius: 24px;
  box-shadow: 0 1px 0 rgba(49, 79, 89, 0.04), 0 30px 60px -20px rgba(49, 79, 89, 0.25);
  padding: 0;
  position: relative;
  overflow: hidden;
}
[data-theme="dark"] .blog-hero-density { background: var(--surface); }

.blog-hero-density__slider {
  display: flex;
  width: 200%;
  height: 100%;
  animation: blog-density-slide 14s ease-in-out infinite;
}

.blog-hero-density__panel {
  width: 50%;
  height: 100%;
  flex-shrink: 0;
  padding: 16px 24px 18px;
  display: flex;
  flex-direction: column;
}

.blog-hero-density__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(49, 79, 89, 0.10);
  margin-bottom: 14px;
  font-family: var(--font-display, system-ui), sans-serif;
}

.blog-hero-density__title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: clamp(12px, 1.5vw, 15px);
  font-weight: 700;
  color: var(--primary, rgb(49, 79, 89));
}

.blog-hero-density__sub {
  padding: 3px 9px;
  border-radius: 999px;
  font-size: clamp(9px, 1.1vw, 11px);
  font-weight: 700;
}
.blog-hero-density__sub--low {
  background: rgba(239, 68, 68, 0.10);
  color: rgb(185, 28, 28);
}
.blog-hero-density__sub--good {
  background: rgba(0, 136, 60, 0.12);
  color: var(--brand-success, rgb(0, 136, 60));
}

/* ─── Metric (big number) ────────────────────────────────────────── */
.blog-hero-density__metric {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 10px;
}

.blog-hero-density__num {
  font-family: var(--font-display, system-ui), sans-serif;
  font-size: clamp(36px, 5.5vw, 56px);
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.blog-hero-density__num--low  { color: rgb(239, 68, 68); }
.blog-hero-density__num--good { color: var(--brand-success, rgb(0, 136, 60)); }

.blog-hero-density__unit {
  font-family: var(--font-display, system-ui), sans-serif;
  font-size: clamp(11px, 1.3vw, 14px);
  font-weight: 600;
  color: rgba(49, 79, 89, 0.55);
  letter-spacing: 0.02em;
}

/* ─── Sparkline ─────────────────────────────────────────────────── */
.blog-hero-density__spark {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 0;
}

.blog-hero-density__spark svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}

.blog-hero-density__spark-labels {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-display, system-ui), sans-serif;
  font-size: clamp(8px, 0.95vw, 10px);
  font-weight: 600;
  color: rgba(49, 79, 89, 0.45);
  letter-spacing: 0.04em;
}

/* ─── Zone label ────────────────────────────────────────────────── */
.blog-hero-density__zone-label {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(49, 79, 89, 0.04);
  font-family: var(--font-display, system-ui), sans-serif;
  font-size: clamp(10px, 1.2vw, 12px);
  color: var(--text, rgb(29, 35, 39));
}
[data-theme="dark"] .blog-hero-density__zone-label {
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.85);
}

.blog-hero-density__zone-label strong {
  color: var(--brand-success, rgb(0, 136, 60));
  font-weight: 700;
}

.blog-hero-density__zone-mark {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  flex-shrink: 0;
}
.blog-hero-density__zone-mark--low  { background: rgb(239, 68, 68); }
.blog-hero-density__zone-mark--good { background: var(--brand-success, rgb(0, 136, 60)); }

@keyframes blog-density-slide {
  0%, 30%    { transform: translateX(0); }
  40%, 93%   { transform: translateX(-50%); }
  100%       { transform: translateX(0); }
}

@media (prefers-reduced-motion: reduce) {
  .blog-hero-density__slider { animation: none; transform: translateX(-50%); }
}
