/* Sidebar icon mapping by route */

:root {
  --kr-icon-size: 16px;
  --kr-icon-margin: 8px;
  --kr-icon-color: currentColor;
}

/* Link icons */
nav a[href]::before {
  content: '';
  display: inline-block;
  width: var(--kr-icon-size);
  height: var(--kr-icon-size);
  mask-size: cover;
  -webkit-mask-size: cover;
  background-color: var(--kr-icon-color);
  margin-right: var(--kr-icon-margin);
}

/* Default fallback */
nav a[href]::before { mask-image: url('/icons/files.svg'); -webkit-mask-image: url('/icons/files.svg'); }

/* Top-level */
nav a[href='/']::before { mask-image: url('/icons/home.svg'); -webkit-mask-image: url('/icons/home.svg'); }

/* Getting started */
nav a[href='/authentication']::before { mask-image: url('/icons/auth.svg'); -webkit-mask-image: url('/icons/auth.svg'); }
nav a[href='/api-keys']::before { mask-image: url('/icons/apikeys.svg'); -webkit-mask-image: url('/icons/apikeys.svg'); }
nav a[href='/pricing']::before { mask-image: url('/icons/pricing.svg'); -webkit-mask-image: url('/icons/pricing.svg'); }
nav a[href='/models']::before { mask-image: url('/icons/models.svg'); -webkit-mask-image: url('/icons/models.svg'); }

/* Core endpoints */
nav a[href='/openai-streaming']::before { mask-image: url('/icons/streaming.svg'); -webkit-mask-image: url('/icons/streaming.svg'); }
nav a[href='/openai-responses']::before { mask-image: url('/icons/responses.svg'); -webkit-mask-image: url('/icons/responses.svg'); }
nav a[href='/anthropic-streaming']::before { mask-image: url('/icons/anthropic.svg'); -webkit-mask-image: url('/icons/anthropic.svg'); }
nav a[href='/schemas']::before { mask-image: url('/icons/schemas.svg'); -webkit-mask-image: url('/icons/schemas.svg'); }
nav a[href='/parameters']::before { mask-image: url('/icons/parameters.svg'); -webkit-mask-image: url('/icons/parameters.svg'); }
nav a[href='/cross-endpoint-compatibility']::before { mask-image: url('/icons/cross.svg'); -webkit-mask-image: url('/icons/cross.svg'); }

/* Developer tooling */
nav a[href='/popular-sdks']::before { mask-image: url('/icons/popular-sdks.svg'); -webkit-mask-image: url('/icons/popular-sdks.svg'); }
nav a[href='/cli-integration']::before { mask-image: url('/icons/cli.svg'); -webkit-mask-image: url('/icons/cli.svg'); }
nav a[href='/sdk-examples']::before { mask-image: url('/icons/sdk-examples.svg'); -webkit-mask-image: url('/icons/sdk-examples.svg'); }
nav a[href='/mcp-servers']::before { mask-image: url('/icons/mcp.svg'); -webkit-mask-image: url('/icons/mcp.svg'); }

/* Operations */
nav a[href='/usage-analytics']::before { mask-image: url('/icons/rate-limits.svg'); -webkit-mask-image: url('/icons/rate-limits.svg'); }
nav a[href='/usage-api']::before { mask-image: url('/icons/rate-limits.svg'); -webkit-mask-image: url('/icons/rate-limits.svg'); }
nav a[href='/rate-limits']::before { mask-image: url('/icons/rate-limits.svg'); -webkit-mask-image: url('/icons/rate-limits.svg'); }
nav a[href='/prompt-caching']::before { mask-image: url('/icons/models.svg'); -webkit-mask-image: url('/icons/models.svg'); }
nav a[href='/error-codes']::before { mask-image: url('/icons/error.svg'); -webkit-mask-image: url('/icons/error.svg'); }
nav a[href='/webhooks']::before { mask-image: url('/icons/mcp.svg'); -webkit-mask-image: url('/icons/mcp.svg'); }
nav a[href='/tokenize']::before { mask-image: url('/icons/tokenize.svg'); -webkit-mask-image: url('/icons/tokenize.svg'); }
nav a[href='/troubleshooting']::before { mask-image: url('/icons/troubleshooting.svg'); -webkit-mask-image: url('/icons/troubleshooting.svg'); }
nav a[href='/generations']::before { mask-image: url('/icons/apikeys.svg'); -webkit-mask-image: url('/icons/apikeys.svg'); }

/* Reference */
nav a[href='/events-openai-chat']::before { mask-image: url('/icons/streaming.svg'); -webkit-mask-image: url('/icons/streaming.svg'); }
nav a[href='/events-openai-responses']::before { mask-image: url('/icons/responses.svg'); -webkit-mask-image: url('/icons/responses.svg'); }
nav a[href='/events-anthropic']::before { mask-image: url('/icons/anthropic.svg'); -webkit-mask-image: url('/icons/anthropic.svg'); }
