import { readFileSync } from 'node:fs'
import { fileURLToPath } from 'node:url'
import { dirname, resolve } from 'node:path'
import { describe, expect, it } from 'vitest'

const __dirname = dirname(fileURLToPath(import.meta.url))

describe('surgical observatory theme', () => {
  const css = readFileSync(resolve(__dirname, '../styles/theme.css'), 'utf8')

  it('defines shell layout tokens', () => {
    expect(css).toContain('--shell-rail-width:')
    expect(css).toContain('--shell-context-width:')
    expect(css).toContain('--shell-status-height:')
    expect(css).toContain('--page-context-height:')
  })

  it('defines workspace surface tokens', () => {
    expect(css).toContain('--workspace-bg:')
    expect(css).toContain('--shell-bg-deep:')
    expect(css).toContain('--shell-bg:')
    expect(css).toContain('--motion-fast:')
  })

  it('preserves existing brand tokens', () => {
    expect(css).toContain('--color-brand: #2b1f99')
    expect(css).toContain('--color-accent: #3ad4d8')
  })
})
