/*
  Tooltip 07 — Data Tooltip — 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.
*/

:root {
  --tooltip-accent: #39ff14;
  --tooltip-fg: oklch(0.145 0 0);
}

.tooltip07 {
  position: relative;
  display: inline-flex;
  font-family:
    Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji",
    "Segoe UI Emoji";
}

.tooltip07__marker {
  display: block;
  height: 0.75rem;
  width: 0.75rem;
  border-radius: 9999px;
  border: 2px solid #ffffff;
  background-color: var(--tooltip-fg);
  padding: 0;
  cursor: pointer;
  outline: none;
  transition: transform 150ms ease-out;
}

.tooltip07__marker:hover,
.tooltip07__marker:focus-visible {
  transform: scale(1.25);
}

.tooltip07__marker:focus-visible {
  outline: 2px solid var(--tooltip-fg);
  outline-offset: 2px;
}

.tooltip07__bubble {
  position: absolute;
  bottom: 100%;
  left: 50%;
  z-index: 10;
  margin-bottom: 0.625rem;
  display: block;
  width: max-content;
  min-width: 9rem;
  transform: translateX(-50%);
  border-radius: 0.5rem;
  background-color: var(--tooltip-fg);
  padding: 0.625rem 0.75rem;
  box-shadow: 0 8px 24px -8px rgba(0, 0, 0, 0.35);
  transform-origin: bottom center;
  animation: tooltip07-in 160ms ease-out both;
}

.tooltip07__bubble[hidden] {
  display: none;
}

@keyframes tooltip07-in {
  from {
    opacity: 0;
    transform: translateX(-50%) scale(0.92);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) scale(1);
  }
}

.tooltip07__metric-label {
  display: block;
  font-size: 0.6875rem;
  line-height: 1;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.6);
}

.tooltip07__value {
  display: block;
  margin-top: 0.25rem;
  font-size: 1rem;
  line-height: 1;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #ffffff;
}

.tooltip07__delta {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.75rem;
  line-height: 1;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, 0.6);
}

.tooltip07__delta--positive {
  color: var(--tooltip-accent);
}

.tooltip07__arrow {
  position: absolute;
  top: 100%;
  left: 50%;
  height: 0.5rem;
  width: 0.5rem;
  transform: translate(-50%, -4px) rotate(45deg);
  background-color: var(--tooltip-fg);
}

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

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

*,
*::before,
*::after {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family:
    Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: linear-gradient(to bottom, #fafafa, #f4f4f5);
}
.tooltip07-layout {
  display: flex;
  min-height: 14rem;
  align-items: center;
  justify-content: center;
  padding: 2.5rem;
}
.tooltip07-layout__panel {
  width: 100%;
  max-width: 32rem;
  border: 1px solid oklch(0.9 0 0);
  border-radius: 1rem;
  background: #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);
}
.tooltip07-layout__title {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: oklch(0.5 0 0);
}
.tooltip07-layout__chart {
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
  height: 7rem;
  margin-top: 1rem;
}
.tooltip07-layout__bar-wrap {
  position: relative;
  flex: 1;
}
.tooltip07-layout__bar {
  width: 100%;
  border-radius: 0.25rem 0.25rem 0 0;
  background: oklch(0.9 0 0);
}
.tooltip07-layout__bar--active {
  background: oklch(0.145 0 0);
}
.tooltip07-layout__marker-slot {
  position: absolute;
  top: -0.375rem;
  left: 50%;
  transform: translateX(-50%);
}
