[data-rehype-pretty-code-figure] pre {
  @apply px-0;
}

[data-rehype-pretty-code-figure] code {
  @apply text-sm !leading-loose md:text-base border-0 p-0;
}

[data-rehype-pretty-code-figure] code[data-line-numbers] {
  counter-reset: line;
}

[data-rehype-pretty-code-figure] code[data-line-numbers] > [data-line]::before {
  counter-increment: line;
  content: counter(line);
  @apply mr-4 inline-block w-4 text-right text-gray-500;
}

[data-rehype-pretty-code-figure] [data-line] {
  @apply border-l-2 border-l-transparent px-3;
}

[data-rehype-pretty-code-figure] [data-highlighted-line] {
  background: rgba(200, 200, 255, 0.1);
  @apply border-l-blue-400;
}

[data-rehype-pretty-code-figure] [data-highlighted-chars] {
  @apply rounded bg-zinc-600/50;
  box-shadow: 0 0 0 4px rgb(82 82 91 / 0.5);
}

[data-rehype-pretty-code-figure] [data-chars-id] {
  @apply border-b-2 p-1 shadow-none;
}

.subheading-anchor {
  @apply no-underline before:content-["#"] hover:before:content-["#"] -ml-4 before:text-background hover:before:text-primary transition-colors before:mr-1 before:text-lg;
}

/* Table column styling for permissions tables only */
table.permissions-table {
  table-layout: fixed !important;
}

table.permissions-table th:nth-child(1),
table.permissions-table td:nth-child(1) {
  width: 20% !important;
  word-wrap: break-word !important;
  overflow-wrap: break-word !important;
  hyphens: auto !important;
  word-break: break-word !important;
}

table.permissions-table th:nth-child(2),
table.permissions-table td:nth-child(2) {
  width: 15% !important;
  word-wrap: break-word !important;
  overflow-wrap: break-word !important;
  hyphens: auto !important;
  word-break: break-word !important;
}

table.permissions-table th:nth-child(3),
table.permissions-table td:nth-child(3) {
  width: 45% !important;
  word-break: normal !important;
}

table.permissions-table th:nth-child(4),
table.permissions-table td:nth-child(4) {
  width: 20% !important;
  word-wrap: break-word !important;
  overflow-wrap: break-word !important;
  hyphens: auto !important;
  word-break: break-word !important;
}
