@import url("https://fonts.googleapis.com/css2?family=Cascadia+Mono:ital,wght@0,200..700;1,200..700&display=swap");

.sig + .sig {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  padding-top: 0.05rem;
}
.sig:has(+ .sig) {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  padding-bottom: 0.05rem;
}

body {
  --font-stack--monospace:
    "Cascadia Mono", "SFMono-Regular", Menlo, Consolas, Monaco,
    "Liberation Mono", "Lucida Console", monospace;
}

.sig:not(.sig-inline) {
  font-weight: 700;
}

.yuio-sig * {
  font-weight: 400;
}

p.rubric.cli-section-1 {
  margin-top: 1.5em;
}

p.rubric.cli-section-2 {
  font-weight: 700;
  text-transform: none;
}

code,
kbd,
pre,
samp {
  font-weight: 350;
}

pre.ascii-graphics {
  line-height: 1.3 !important;
}

.samp em::before {
  content: "{";
  font-style: normal;
  color: var(--color-foreground-muted);
}

.samp em::after {
  content: "}";
  font-style: normal;
  color: var(--color-foreground-muted);
}

.color-path-hl em::before {
  content: "{";
}

.color-path-hl em::after {
  content: "}";
}

.toc-tree a.reference code {
  white-space: nowrap;
}

.toc-scroll li {
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--color-toc-item-text);
}

.no-link-decorations a {
  color: var(--sd-color-card-text);
  text-decoration: none;
}

.api-ref-prefix {
  color: var(--color-foreground-muted);
}

.annotate + ol {
  display: none;
}

.annotation-trigger {
  /* Reset button styles */
  background: none;
  border: none;
  margin: 0 12px;
  cursor: pointer;

  /* Visual styling */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background-color: var(--color-background-item);
  text-align: center;
  color: var(--color-content-foreground);
  font-size: 14px;
  line-height: 18px;
  vertical-align: baseline;

  transition: background-color 0.15s ease;
}

/* Plus icon (default state) */
.annotation-trigger::before {
  content: "+";
}

/* Cross icon (expanded state) */
.annotation-trigger[aria-expanded="true"]::before {
  content: "×";
}

.annotation-trigger:hover {
  background-color: var(--color-toc-item-text--active);
}

.annotation-tooltip {
  /* Hidden by default */
  display: none;

  /* Positioning - appended to body */
  position: absolute;
  z-index: 10000;

  /* Sizing */
  min-width: 200px;
  max-width: 350px;

  /* Visual styling */
  background-color: var(--color-background-primary);
  color: var(--color-content-foreground);
  padding: 0.5rem 1rem;
  border-radius: 0.2rem;
  font-size: var(--admonition-font-size);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);

  /* Smooth transition */
  opacity: 0;
  transition: opacity 0.15s ease;
}

/* Visible state */
.annotation-tooltip.visible {
  display: block;
  opacity: 1;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .annotation-trigger {
    text-decoration: underline;
  }

  .annotation-trigger:focus {
    outline-width: 3px;
  }

  .annotation-tooltip {
    border: 2px solid #fff;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .annotation-trigger,
  .annotation-tooltip {
    transition: none;
  }
}
