/* Clickable version tag + build-details popover (see docs/version-tag.md). */
.version-tag {
  position: relative;
  display: inline-block;
}

.version-tag-button {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: inherit;
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.version-tag-button:hover,
.version-tag-button:focus-visible {
  color: var(--color-fg-1, inherit);
}

.version-tag-popover {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  z-index: 30;
  min-width: 12rem;
  max-width: min(18rem, calc(100vw - 24px));
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--color-border, rgba(0, 0, 0, 0.12));
  background: var(--color-bg-1, #fff);
  color: var(--color-fg-1, inherit);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
  text-align: left;
  line-height: 1.45;
}

.version-tag-updated {
  margin: 0 0 8px;
  font-size: 11px;
  color: var(--color-fg-2, inherit);
}

.version-tag-updated-label {
  font-weight: 600;
}

.version-tag-changelog {
  font-size: 11px;
  color: var(--color-fg-2, inherit);
  text-decoration: underline;
}

.version-tag-changelog:hover,
.version-tag-changelog:focus-visible {
  color: var(--color-fg-1, inherit);
}

@media (max-width: 402px) {
  .version-tag-popover {
    right: 0;
    left: auto;
    max-width: calc(100vw - 32px);
  }
}
