@layer components {
  /* Lexical Editor Component */

  /* Container wrapper for toolbar + editor */
  .bc-lexical-editor-container {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--color-neutral-200);
    border-radius: var(--radius-control, var(--radius-md));
    background-color: var(--color-neutral-50);
    overflow: hidden;
    transition: all
      var(--motion-transition-fast, var(--motion-duration-fast, 0.2s))
      var(--motion-easing-standard, cubic-bezier(0.2, 0, 0, 1));
  }

  /* Fixed height mode on container: fill parent, constrain children */
  .bc-lexical-editor-container--fixed {
    height: 100%;
  }

  /* Editor surface (contenteditable) */
  .bc-lexical-editor {
    position: relative;
    min-height: 150px;
    padding: 1rem;
    outline: none;
    font-family: inherit;
    font-size: inherit;
    line-height: 1.6;
    color: var(--color-neutral-900);
    background-color: var(--color-white);
  }

  /* Fixed height mode: fill container, scroll on overflow */
  .bc-lexical-editor--fixed {
    flex: 1 1 0;
    overflow-y: auto;
  }

  /* Auto height mode: grow with content */
  .bc-lexical-editor--auto {
    overflow-y: visible;
  }

  /* Focus state */
  .bc-lexical-editor-container:focus-within {
    border-color: var(--color-primary-500);
    box-shadow: 0 0 0 2px var(--color-primary-100);
  }

  /* Error state */
  .bc-lexical-editor-container--error {
    border-color: var(--color-danger-600);
  }

  .bc-lexical-editor-container--error:focus-within {
    border-color: var(--color-danger-600);
    box-shadow: 0 0 0 2px var(--color-danger-100);
  }

  /* Read-only state */
  .bc-lexical-editor--readonly {
    cursor: default;
    background-color: var(--color-neutral-100);
    color: var(--color-neutral-700);
  }

  /* Placeholder styling */
  .bc-lexical-editor [data-lexical-placeholder] {
    color: var(--color-neutral-400);
    pointer-events: none;
    position: absolute;
    top: 1rem;
    left: 1rem;
    user-select: none;
    font-style: italic;
  }

  /* Typography within editor */
  .bc-lexical-editor h1 {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
  }

  .bc-lexical-editor h1:first-child {
    margin-top: 0;
  }

  .bc-lexical-editor h2 {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.3;
    margin-top: 1.25rem;
    margin-bottom: 0.625rem;
  }

  .bc-lexical-editor h2:first-child {
    margin-top: 0;
  }

  .bc-lexical-editor h3 {
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.4;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
  }

  .bc-lexical-editor h3:first-child {
    margin-top: 0;
  }

  .bc-lexical-editor h4 {
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.5;
    margin-top: 0.875rem;
    margin-bottom: 0.5rem;
  }

  .bc-lexical-editor h4:first-child {
    margin-top: 0;
  }

  .bc-lexical-editor h5 {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.5;
    margin-top: 0.75rem;
    margin-bottom: 0.5rem;
  }

  .bc-lexical-editor h5:first-child {
    margin-top: 0;
  }

  .bc-lexical-editor h6 {
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.5;
    margin-top: 0.75rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }

  .bc-lexical-editor h6:first-child {
    margin-top: 0;
  }

  .bc-lexical-editor p {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
  }

  .bc-lexical-editor p:first-child {
    margin-top: 0;
  }

  .bc-lexical-editor p:last-child {
    margin-bottom: 0;
  }

  .bc-lexical-editor blockquote {
    margin: 1rem 0;
    padding-left: 1rem;
    border-left: 4px solid var(--color-neutral-300);
    color: var(--color-neutral-700);
    font-style: italic;
  }

  .bc-lexical-editor ul,
  .bc-lexical-editor ol {
    margin: 0.75rem 0;
    padding-left: 1.5rem;
  }

  .bc-lexical-editor ul {
    list-style-type: disc;
  }

  .bc-lexical-editor ol {
    list-style-type: decimal;
  }

  .bc-lexical-editor li {
    margin: 0.25rem 0;
  }

  .bc-lexical-editor code {
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.875em;
    background-color: var(--color-neutral-100);
    color: var(--color-neutral-800);
    padding: 0.125rem 0.375rem;
    border-radius: var(--radius-xs, 0.25rem);
  }

  .bc-lexical-editor pre {
    margin: 1rem 0;
    padding: 1rem;
    background-color: var(--color-neutral-100);
    border-radius: var(--radius-md, 0.5rem);
    overflow-x: auto;
    border: 1px solid var(--color-neutral-200);
  }

  .bc-lexical-editor pre code {
    background-color: transparent;
    padding: 0;
    border-radius: 0;
    font-size: 0.875rem;
    line-height: 1.5;
  }

  .bc-lexical-editor a {
    color: var(--color-primary-600);
    text-decoration: underline;
    text-underline-offset: 0.125rem;
    cursor: pointer;
  }

  .bc-lexical-editor a:hover {
    color: var(--color-primary-700);
  }

  .bc-lexical-editor hr {
    margin: 1.5rem 0;
    border: none;
    border-top: 2px solid var(--color-neutral-200);
  }

  .bc-lexical-editor strong,
  .bc-lexical-bold {
    font-weight: 700;
  }

  .bc-lexical-editor em,
  .bc-lexical-italic {
    font-style: italic;
  }

  .bc-lexical-editor u,
  .bc-lexical-underline {
    text-decoration: underline;
  }

  .bc-lexical-editor s,
  .bc-lexical-strikethrough {
    text-decoration: line-through;
  }

  .bc-lexical-code {
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.875em;
    background-color: var(--color-neutral-100);
    color: var(--color-neutral-800);
    padding: 0.125rem 0.375rem;
    border-radius: var(--radius-xs, 0.25rem);
  }

  .dark .bc-lexical-code {
    background-color: var(--color-neutral-800);
    color: var(--color-neutral-200);
  }

  /* Check list items */
  .bc-lexical-li-checked,
  .bc-lexical-li-unchecked {
    list-style-type: none;
    position: relative;
    padding-left: 1.5rem;
    margin-left: -1.5rem;
  }

  .bc-lexical-li-checked::before,
  .bc-lexical-li-unchecked::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.35em;
    width: 1em;
    height: 1em;
    border: 2px solid var(--color-neutral-400);
    border-radius: var(--radius-xs, 0.25rem);
    cursor: pointer;
  }

  .bc-lexical-li-checked::before {
    background-color: var(--color-primary-500);
    border-color: var(--color-primary-500);
  }

  .bc-lexical-li-checked::after {
    content: '';
    position: absolute;
    left: 0.25em;
    top: 0.45em;
    width: 0.5em;
    height: 0.25em;
    border-left: 2px solid white;
    border-bottom: 2px solid white;
    transform: rotate(-45deg);
  }

  .bc-lexical-li-checked {
    text-decoration: line-through;
    color: var(--color-neutral-500);
  }

  .dark .bc-lexical-li-checked::before {
    background-color: var(--color-primary-400);
    border-color: var(--color-primary-400);
  }

  .dark .bc-lexical-li-unchecked::before {
    border-color: var(--color-neutral-600);
  }

  /* Dark mode styles */
  .dark .bc-lexical-editor-container {
    background-color: var(--color-neutral-800);
    border-color: var(--color-neutral-700);
  }

  .dark .bc-lexical-editor {
    background-color: var(--bg-surface);
    color: var(--text-normal);
  }

  .dark .bc-lexical-editor-container:focus-within {
    border-color: var(--color-primary-400);
    box-shadow: 0 0 0 2px var(--color-primary-900);
  }

  .dark .bc-lexical-editor-container--error {
    border-color: var(--color-danger-400);
  }

  .dark .bc-lexical-editor-container--error:focus-within {
    border-color: var(--color-danger-400);
    box-shadow: 0 0 0 2px var(--color-danger-900);
  }

  .dark .bc-lexical-editor--readonly {
    background-color: var(--color-neutral-900);
  }

  .dark .bc-lexical-editor [data-lexical-placeholder] {
    color: var(--color-neutral-500);
  }

  .dark .bc-lexical-editor blockquote {
    border-left-color: var(--color-neutral-600);
  }

  .dark .bc-lexical-editor code {
    background-color: var(--color-neutral-800);
    color: var(--color-neutral-200);
  }

  .dark .bc-lexical-editor pre {
    background-color: var(--color-neutral-900);
    border-color: var(--color-neutral-700);
  }

  .dark .bc-lexical-editor a {
    color: var(--color-primary-400);
  }

  .dark .bc-lexical-editor a:hover {
    color: var(--color-primary-300);
  }

  .dark .bc-lexical-editor hr {
    border-top-color: var(--color-neutral-700);
  }

  /* Collaboration: Remote cursors and selections */
  .bc-lexical-collaboration-cursor {
    position: absolute;
    pointer-events: none;
    user-select: none;
  }

  .bc-lexical-collaboration-cursor__caret {
    position: absolute;
    width: 2px;
    height: 1.2em;
    background-color: currentColor;
    animation: bc-lexical-cursor-blink 1s infinite;
  }

  .bc-lexical-collaboration-cursor__name {
    position: absolute;
    top: -20px;
    left: 0;
    padding: 2px 6px;
    background-color: currentColor;
    color: white;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.2s;
  }

  .bc-lexical-collaboration-cursor:hover
    .bc-lexical-collaboration-cursor__name {
    opacity: 1;
  }

  .bc-lexical-collaboration-selection {
    position: absolute;
    pointer-events: none;
    background-color: currentColor;
    opacity: 0.3;
  }

  @keyframes bc-lexical-cursor-blink {
    0%,
    49% {
      opacity: 1;
    }
    50%,
    100% {
      opacity: 0;
    }
  }

  /* Accessibility */
  @media (prefers-reduced-motion: reduce) {
    .bc-lexical-editor-container {
      transition: none;
    }
  }

  @media (prefers-contrast: high) {
    .bc-lexical-editor-container {
      border-width: 2px;
    }

    .bc-lexical-editor-container:focus-within {
      box-shadow: 0 0 0 3px var(--color-primary-100);
    }

    .dark .bc-lexical-editor-container:focus-within {
      box-shadow: 0 0 0 3px var(--color-primary-900);
    }
  }
}

@layer components {
  /* Lexical Editor Toolbar */

  /* Toolbar positioned at top of editor container */
  .bc-lexical-toolbar {
    border-bottom: 1px solid var(--color-neutral-200);
    border-radius: 0;
    border: none;
    background-color: var(--color-neutral-50);
    padding: var(--spacing-xs) var(--spacing-sm);
    flex-wrap: wrap;
  }

  .dark .bc-lexical-toolbar {
    background-color: var(--color-neutral-800);
  }

  /* When toolbar is inside the editor container, add bottom border */
  .bc-lexical-editor-container > .bc-lexical-toolbar {
    border-bottom: 1px solid var(--color-neutral-200);
  }

  .dark .bc-lexical-editor-container > .bc-lexical-toolbar {
    border-bottom-color: var(--color-neutral-700);
  }

  /* Bottom position variant */
  .bc-lexical-toolbar--bottom {
    border-bottom: none;
    border-top: 1px solid var(--color-neutral-200);
  }

  .dark .bc-lexical-toolbar--bottom {
    border-top-color: var(--color-neutral-700);
  }

  /* Hidden state for readOnly mode */
  .bc-lexical-toolbar--hidden {
    display: none;
  }

  /* Toolbar selects (font family/size) */
  .bc-lexical-toolbar-select {
    height: 28px;
    padding: 0 var(--spacing-xs);
    border: 1px solid var(--color-neutral-300);
    border-radius: var(--radius-sm);
    background-color: var(--bg-surface);
    color: var(--color-neutral-900);
    font-size: 0.75rem;
    cursor: pointer;
  }

  .dark .bc-lexical-toolbar-select {
    border-color: var(--color-neutral-600);
    background-color: var(--color-neutral-700);
    color: var(--color-neutral-100);
  }

  /* Color picker labels */
  .bc-lexical-toolbar-color {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 28px;
    height: 28px;
    cursor: pointer;
    border-radius: var(--radius-sm);
  }

  .bc-lexical-toolbar-color:hover {
    background-color: var(--color-neutral-200);
  }

  .dark .bc-lexical-toolbar-color:hover {
    background-color: var(--color-neutral-600);
  }

  .bc-lexical-toolbar-color input[type='color'] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    border: none;
    padding: 0;
  }

  .bc-lexical-toolbar-color-icon {
    font-size: 0.875rem;
    font-weight: 700;
    pointer-events: none;
    line-height: 1;
  }

  .bc-lexical-toolbar-color-icon--highlight {
    background-color: #ffff00;
    padding: 0 2px;
    border-radius: 2px;
  }

  .bc-lexical-toolbar-color-icon--bg {
    font-size: 1rem;
  }

  /* Responsive: compact toolbar on small containers */
  @container (max-width: 400px) {
    .bc-lexical-toolbar {
      padding: var(--spacing-xs) var(--spacing-xs);
      gap: var(--spacing-xs);
    }
  }
}

@layer components {
  /* Lexical Floating Toolbar */

  .bc-floating-toolbar {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-xs);
    border-radius: var(--radius-md);
    background-color: var(--color-white);
    border: 1px solid var(--color-neutral-200);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    z-index: 1000;
    animation: bc-floating-toolbar-enter 0.15s ease-out;
  }

  .dark .bc-floating-toolbar {
    background-color: var(--color-neutral-800);
    border-color: var(--color-neutral-700);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  }

  @keyframes bc-floating-toolbar-enter {
    from {
      opacity: 0;
      transform: translateX(-50%) translateY(4px);
    }
    to {
      opacity: 1;
      transform: translateX(-50%) translateY(0);
    }
  }

  /* Slash Command Palette */

  .bc-slash-command-palette {
    min-width: 280px;
    max-width: 360px;
    max-height: 400px;
    overflow-y: auto;
    border-radius: var(--radius-md);
    background-color: var(--color-white);
    border: 1px solid var(--color-neutral-200);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    padding: var(--spacing-xs);
    z-index: 1000;
    animation: bc-slash-palette-enter 0.12s ease-out;
  }

  .dark .bc-slash-command-palette {
    background-color: var(--color-neutral-800);
    border-color: var(--color-neutral-700);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  }

  @keyframes bc-slash-palette-enter {
    from {
      opacity: 0;
      transform: translateY(-4px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .bc-slash-command-palette__item {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background-color 0.12s ease;
  }

  .bc-slash-command-palette__item:hover,
  .bc-slash-command-palette__item[aria-selected='true'] {
    background-color: var(--color-primary-50);
  }

  .dark .bc-slash-command-palette__item:hover,
  .dark .bc-slash-command-palette__item[aria-selected='true'] {
    background-color: var(--color-primary-900);
  }

  .bc-slash-command-palette__icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
  }

  .bc-slash-command-palette__content {
    flex: 1;
    min-width: 0;
  }

  .bc-slash-command-palette__label {
    font-weight: 500;
    font-size: var(--font-size-sm);
    color: var(--color-neutral-900);
    margin-bottom: 2px;
  }

  .dark .bc-slash-command-palette__label {
    color: var(--color-neutral-100);
  }

  .bc-slash-command-palette__description {
    font-size: var(--font-size-xs);
    color: var(--color-neutral-500);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .bc-slash-command-palette__category {
    font-size: var(--font-size-xs);
    color: var(--color-neutral-500);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    background-color: var(--color-neutral-100);
    flex-shrink: 0;
  }

  .dark .bc-slash-command-palette__category {
    background-color: var(--color-neutral-700);
    color: var(--color-neutral-400);
  }

  .bc-slash-command-palette__empty {
    padding: var(--spacing-md);
    color: var(--color-neutral-500);
    text-align: center;
    font-size: var(--font-size-sm);
  }

  /* Block Handle */

  .bc-block-handle {
    z-index: 999;
    animation: bc-block-handle-enter 0.1s ease-out;
  }

  @keyframes bc-block-handle-enter {
    from {
      opacity: 0;
    }
    to {
      opacity: 1;
    }
  }

  .bc-block-handle__button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: 1px solid var(--color-neutral-200);
    border-radius: var(--radius-sm);
    background-color: var(--color-white);
    color: var(--color-neutral-400);
    cursor: pointer;
    padding: 0;
    transition: all 0.12s ease;
  }

  .bc-block-handle__button:hover {
    background-color: var(--color-neutral-100);
    color: var(--color-neutral-600);
    border-color: var(--color-neutral-300);
  }

  .bc-block-handle__button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
  }

  .dark .bc-block-handle__button {
    background-color: var(--color-neutral-800);
    border-color: var(--color-neutral-700);
    color: var(--color-neutral-500);
  }

  .dark .bc-block-handle__button:hover {
    background-color: var(--color-neutral-700);
    color: var(--color-neutral-300);
    border-color: var(--color-neutral-600);
  }
}

@layer components {
  /* Lexical Table Component */

  /* Table structure */
  .bc-lexical-table {
    border-collapse: collapse;
    border-spacing: 0;
    width: 100%;
    margin: 1rem 0;
    overflow: hidden;
    table-layout: fixed;
  }

  .bc-lexical-table-row {
    border-bottom: 1px solid var(--color-neutral-200);
  }

  .bc-lexical-table-cell,
  .bc-lexical-table-cell-header {
    border: 1px solid var(--color-neutral-200);
    padding: 0.5rem 0.75rem;
    position: relative;
    vertical-align: top;
    min-width: 75px;
  }

  .bc-lexical-table-cell-header {
    background-color: var(--color-neutral-50);
    font-weight: 600;
    text-align: left;
  }

  /* Selected cell highlight */
  .bc-lexical-table-cell--selected {
    background-color: var(--color-primary-50);
    outline: 2px solid var(--color-primary-500);
    outline-offset: -2px;
  }

  /* Table context menu */
  .bc-table-context-menu {
    display: flex;
    flex-direction: column;
  }

  .bc-table-menu-button {
    font-family: inherit;
    line-height: 1.5;
    white-space: nowrap;
  }

  .bc-table-menu-button:hover:not(:disabled) {
    background-color: var(--color-neutral-100);
  }

  .bc-table-menu-button:active:not(:disabled) {
    background-color: var(--color-neutral-200);
  }

  .bc-table-menu-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
  }

  .bc-table-menu-separator {
    /* Separator styling defined inline in component */
  }

  /* Dark mode styles */
  .dark .bc-lexical-table-cell,
  .dark .bc-lexical-table-cell-header {
    border-color: var(--color-neutral-700);
  }

  .dark .bc-lexical-table-row {
    border-bottom-color: var(--color-neutral-700);
  }

  .dark .bc-lexical-table-cell-header {
    background-color: var(--color-neutral-800);
  }

  .dark .bc-lexical-table-cell--selected {
    background-color: var(--color-primary-900);
    outline-color: var(--color-primary-400);
  }

  .dark .bc-table-context-menu {
    background-color: var(--color-neutral-800);
    border-color: var(--color-neutral-700);
  }

  .dark .bc-table-menu-button {
    color: var(--color-neutral-100);
  }

  .dark .bc-table-menu-button:hover:not(:disabled) {
    background-color: var(--color-neutral-700);
  }

  .dark .bc-table-menu-button:active:not(:disabled) {
    background-color: var(--color-neutral-600);
  }

  .dark .bc-table-menu-separator {
    background-color: var(--color-neutral-700);
  }

  /* Accessibility */
  @media (prefers-reduced-motion: reduce) {
    .bc-table-menu-button {
      transition: none;
    }
  }

  @media (prefers-contrast: high) {
    .bc-lexical-table-cell,
    .bc-lexical-table-cell-header {
      border-width: 2px;
    }

    .bc-lexical-table-cell--selected {
      outline-width: 3px;
    }
  }
}

@layer components {
  /* Lexical Code Block Component */

  /* Code block structure */
  .bc-lexical-code-block {
    position: relative;
    margin: 1rem 0;
    padding: 1rem;
    background-color: var(--color-neutral-50);
    border: 1px solid var(--color-neutral-200);
    border-radius: var(--radius-md);
    overflow-x: auto;
    font-family:
      'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
  }

  /* Language selector */
  .bc-code-language-selector {
    /* Positioning handled inline */
  }

  .bc-code-language-button:hover:not(:disabled) {
    background-color: var(--color-neutral-200);
    border-color: var(--color-neutral-400);
  }

  .bc-code-language-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
  }

  .bc-code-language-dropdown {
    /* Dropdown styling handled inline */
  }

  .bc-code-language-option:hover {
    background-color: var(--color-neutral-100);
  }

  .bc-code-language-option:active {
    background-color: var(--color-neutral-200);
  }

  /* Syntax highlighting token colors (light theme) */
  .bc-lexical-code-block .token.comment,
  .bc-lexical-code-block .token.prolog,
  .bc-lexical-code-block .token.doctype,
  .bc-lexical-code-block .token.cdata {
    color: #6a737d;
    font-style: italic;
  }

  .bc-lexical-code-block .token.punctuation {
    color: #24292e;
  }

  .bc-lexical-code-block .token.property,
  .bc-lexical-code-block .token.tag,
  .bc-lexical-code-block .token.boolean,
  .bc-lexical-code-block .token.number,
  .bc-lexical-code-block .token.constant,
  .bc-lexical-code-block .token.symbol,
  .bc-lexical-code-block .token.deleted {
    color: #005cc5;
  }

  .bc-lexical-code-block .token.selector,
  .bc-lexical-code-block .token.attr-name,
  .bc-lexical-code-block .token.string,
  .bc-lexical-code-block .token.char,
  .bc-lexical-code-block .token.builtin,
  .bc-lexical-code-block .token.inserted {
    color: #032f62;
  }

  .bc-lexical-code-block .token.operator,
  .bc-lexical-code-block .token.entity,
  .bc-lexical-code-block .token.url,
  .bc-lexical-code-block .language-css .token.string,
  .bc-lexical-code-block .style .token.string {
    color: #d73a49;
  }

  .bc-lexical-code-block .token.atrule,
  .bc-lexical-code-block .token.attr-value,
  .bc-lexical-code-block .token.keyword {
    color: #d73a49;
  }

  .bc-lexical-code-block .token.function,
  .bc-lexical-code-block .token.class-name {
    color: #6f42c1;
  }

  .bc-lexical-code-block .token.regex,
  .bc-lexical-code-block .token.important,
  .bc-lexical-code-block .token.variable {
    color: #e36209;
  }

  /* Line numbers (optional) */
  .bc-lexical-code-block--with-line-numbers {
    padding-left: 3.5rem;
  }

  .bc-lexical-code-block .line-number {
    position: absolute;
    left: 0;
    width: 3rem;
    text-align: right;
    color: var(--color-neutral-400);
    user-select: none;
    padding-right: 1rem;
  }

  /* Dark mode styles */
  .dark .bc-lexical-code-block {
    background-color: var(--color-neutral-900);
    border-color: var(--color-neutral-700);
    color: var(--color-neutral-100);
  }

  .dark .bc-code-language-button {
    background-color: var(--color-neutral-800);
    border-color: var(--color-neutral-600);
    color: var(--color-neutral-200);
  }

  .dark .bc-code-language-button:hover:not(:disabled) {
    background-color: var(--color-neutral-700);
    border-color: var(--color-neutral-500);
  }

  .dark .bc-code-language-dropdown {
    background-color: var(--color-neutral-800);
    border-color: var(--color-neutral-700);
  }

  .dark .bc-code-language-option {
    color: var(--color-neutral-100);
  }

  .dark .bc-code-language-option:hover {
    background-color: var(--color-neutral-700);
  }

  .dark .bc-code-language-option:active {
    background-color: var(--color-neutral-600);
  }

  /* Syntax highlighting token colors (dark theme) */
  .dark .bc-lexical-code-block .token.comment,
  .dark .bc-lexical-code-block .token.prolog,
  .dark .bc-lexical-code-block .token.doctype,
  .dark .bc-lexical-code-block .token.cdata {
    color: #8b949e;
  }

  .dark .bc-lexical-code-block .token.punctuation {
    color: #c9d1d9;
  }

  .dark .bc-lexical-code-block .token.property,
  .dark .bc-lexical-code-block .token.tag,
  .dark .bc-lexical-code-block .token.boolean,
  .dark .bc-lexical-code-block .token.number,
  .dark .bc-lexical-code-block .token.constant,
  .dark .bc-lexical-code-block .token.symbol,
  .dark .bc-lexical-code-block .token.deleted {
    color: #79c0ff;
  }

  .dark .bc-lexical-code-block .token.selector,
  .dark .bc-lexical-code-block .token.attr-name,
  .dark .bc-lexical-code-block .token.string,
  .dark .bc-lexical-code-block .token.char,
  .dark .bc-lexical-code-block .token.builtin,
  .dark .bc-lexical-code-block .token.inserted {
    color: #a5d6ff;
  }

  .dark .bc-lexical-code-block .token.operator,
  .dark .bc-lexical-code-block .token.entity,
  .dark .bc-lexical-code-block .token.url,
  .dark .bc-lexical-code-block .language-css .token.string,
  .dark .bc-lexical-code-block .style .token.string {
    color: #ff7b72;
  }

  .dark .bc-lexical-code-block .token.atrule,
  .dark .bc-lexical-code-block .token.attr-value,
  .dark .bc-lexical-code-block .token.keyword {
    color: #ff7b72;
  }

  .dark .bc-lexical-code-block .token.function,
  .dark .bc-lexical-code-block .token.class-name {
    color: #d2a8ff;
  }

  .dark .bc-lexical-code-block .token.regex,
  .dark .bc-lexical-code-block .token.important,
  .dark .bc-lexical-code-block .token.variable {
    color: #ffa657;
  }

  .dark .bc-lexical-code-block .line-number {
    color: var(--color-neutral-600);
  }

  /* Accessibility */
  @media (prefers-reduced-motion: reduce) {
    .bc-code-language-button,
    .bc-code-language-option {
      transition: none;
    }
  }

  @media (prefers-contrast: high) {
    .bc-lexical-code-block {
      border-width: 2px;
    }
  }
}

