/*
  Tooltip 05 — Status 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);
  --tooltip-muted: oklch(0.5 0 0);
  --tooltip-border: oklch(0.85 0 0);
  --tooltip-border-hover: oklch(0.72 0 0);
}

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

.tooltip05__trigger {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  border-radius: 9999px;
  border: 1px solid var(--tooltip-border);
  background-color: #ffffff;
  padding: 0.25rem 0.625rem;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--tooltip-fg);
  cursor: pointer;
  outline: none;
  transition: border-color 150ms ease-out;
}

.tooltip05__trigger:hover {
  border-color: var(--tooltip-border-hover);
}

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

.tooltip05__dot {
  display: block;
  height: 0.375rem;
  width: 0.375rem;
  border-radius: 9999px;
  background-color: var(--tooltip-muted);
}

.tooltip05__dot--healthy {
  background-color: var(--tooltip-accent);
  animation: tooltip05-pulse 1.8s ease-in-out infinite;
}

.tooltip05__dot--in-bubble.tooltip05__dot--healthy {
  background-color: var(--tooltip-accent);
}

@keyframes tooltip05-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
}

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

.tooltip05__bubble[hidden] {
  display: none;
}

@keyframes tooltip05-in {
  from {
    opacity: 0;
    transform: translate(-50%, 4px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

.tooltip05__status-row {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.tooltip05__status {
  font-size: 0.75rem;
  line-height: 1.35;
  font-weight: 600;
  color: #ffffff;
}

.tooltip05__meta {
  display: block;
  margin-top: 0.125rem;
  font-size: 0.75rem;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.7);
}

.tooltip05__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) {
  .tooltip05__bubble {
    animation: none;
  }
  .tooltip05__dot--healthy {
    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);
}
.tooltip05-layout {
  display: flex;
  min-height: 14rem;
  align-items: center;
  justify-content: center;
  padding: 2.5rem;
}
.tooltip05-layout__panel {
  display: flex;
  width: 100%;
  max-width: 28rem;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  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);
}
.tooltip05-layout__title {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: oklch(0.145 0 0);
}
.tooltip05-layout__subtitle {
  margin: 0.125rem 0 0;
  font-size: 0.75rem;
  color: oklch(0.5 0 0);
}
