/* ── SHARED COMPONENTS ─────────────────────────── */

/* SVG logo inline helper */
.logo-svg path { fill: currentColor; }

/* Animated number counter */
.counter-animate { transition: all 1.5s ease; }

/* Lazy loaded images */
img.lazy { opacity: 0; transition: opacity 0.4s ease; }
img.lazy.loaded { opacity: 1; }

/* Chart tooltips */
.chart-tooltip {
  position: absolute;
  background: var(--bg-hover);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-size: 0.78rem;
  color: var(--text-primary);
  pointer-events: none;
  white-space: nowrap;
  z-index: 50;
}

/* Sticky sidebar */
@media (min-width: 1025px) {
  .sidebar-sticky { position: sticky; top: 84px; }
}

/* Scroll to top */
#scroll-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  border: none;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  box-shadow: 0 4px 16px rgba(252,61,119,0.4);
  z-index: 500;
  transition: all var(--transition);
}
#scroll-top.visible { display: flex; }
#scroll-top:hover { background: var(--accent-hover); transform: translateY(-2px); }

/* Cookie bar */
#cookie-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  z-index: 900;
  font-size: 0.85rem;
  color: var(--text-muted);
}
#cookie-bar p { flex: 1; min-width: 200px; margin: 0; }
#cookie-bar a { color: var(--accent); }
#cookie-accept {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 9px 22px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--transition);
}
#cookie-accept:hover { background: var(--accent-hover); }

/* Safe area bottom padding for phones with notch */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  #cookie-bar { padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
  .mobile-nav { padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
}
