/* Context usage meter (inline in toolbar) */

.claudian-context-meter {
  position: relative;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-inline-start: 8px;
  cursor: default;
}

/* Custom tooltip */
.claudian-context-meter::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 6px;
  padding: 4px 8px;
  font-size: 11px;
  color: var(--text-normal);
  background: var(--background-secondary);
  border: 1px solid var(--background-modifier-border);
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease, visibility 0.15s ease;
  pointer-events: none;
  z-index: 100;
}

.claudian-context-meter:hover::after {
  opacity: 1;
  visibility: visible;
}

.claudian-context-meter-gauge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}

.claudian-context-meter-gauge svg {
  width: 16px;
  height: 16px;
}

.claudian-meter-bg {
  stroke: var(--background-modifier-border);
}

.claudian-meter-fill {
  stroke: var(--claudian-brand);
  transition: stroke-dashoffset 0.3s ease, stroke 0.3s ease;
}

.claudian-context-meter-percent {
  font-size: 11px;
  color: var(--claudian-brand);
  min-width: 24px;
  text-align: end;
  transition: color 0.3s ease;
}

/* Warning state (> 80%) - pale red */
.claudian-context-meter.warning .claudian-meter-fill {
  stroke: #E57373;
}

.claudian-context-meter.warning .claudian-context-meter-percent {
  color: #E57373;
}
