@import '@code-hike/mdx/dist/index.css' layer(base);
@import './primary-newsletter-cta.css' layer(utilities);
@import './tip-newsletter-cta.css' layer(utilities);
@import './video-block-newsletter-cta.css' layer(utilities);
@import './nprogress.css' layer(utilities);
@import './video/mux-player.css' layer(utilities);
@import './video/github-link.css' layer(utilities);
@import './video/lesson-completion-toggle.css' layer(utilities);
@import './video/lesson-description.css' layer(utilities);
@import './video/lesson-title.css' layer(utilities);
@import './video/module-lesson-list.css' layer(utilities);
@import './video/video-overlays.css' layer(utilities);
@import './video/video-transcript.css' layer(utilities);
@import './video/module-navigator.css' layer(utilities);
@import './focus-visible.css' layer(utilities);
@import './login.css' layer(utilities);
@import './commerce.css' layer(base);

@import 'tailwindcss';

@config '../../tailwind.config.ts';

/*
  The default border color has changed to `currentcolor` in Tailwind CSS v4,
  so we've added these compatibility styles to make sure everything still
  looks the same as it did with Tailwind CSS v3.

  If we ever want to remove these styles, we need to add an explicit border
  color utility to any element that depends on these defaults.
*/
@layer base {
	*,
	::after,
	::before,
	::backdrop,
	::file-selector-button {
		border-color: var(--color-gray-200, currentcolor);
	}
}

@layer base {
	:root {
		--nav-height: 4.5rem;
		--command-bar-height: 2.25rem;
		--pane-layout-height: calc(
			100vh - var(--nav-height) - var(--command-bar-height)
		);
		--code-editor-layout-height: calc(
			100vh - var(--nav-height) - var(--command-bar-height) - 30px
		);
		--background: 0 0% 99%;
		--foreground: 222.2 47.4% 11.2%;
		--muted: 210 40% 96.1%;
		--muted-foreground: 215.4 16.3% 46.9%;
		--popover: 0 0% 100%;
		--popover-foreground: 222.2 47.4% 11.2%;
		--border: 214.3 31.8% 91.4%;
		--input: 214.3 31.8% 91.4%;
		--card: 0 0% 100%;
		--card-foreground: 222.2 47.4% 11.2%;
		--primary: 222.2 47.4% 11.2%;
		--primary-foreground: 210 40% 98%;
		--secondary: 210 40% 96.1%;
		--secondary-foreground: 222.2 47.4% 11.2%;
		--accent: 210 40% 96.1%;
		--accent-foreground: 222.2 47.4% 11.2%;
		--destructive: 0 100% 50%;
		--destructive-foreground: 210 40% 98%;
		--ring: 215 20.2% 65.1%;
		--radius: 0.5rem;
		color-scheme: light;
	}

	.dark {
		--background: 224 71% 3%;
		--foreground: 213 31% 91%;
		--muted: 223 47% 11%;
		--muted-foreground: 215.4 16.3% 56.9%;
		--accent: 216 34% 17%;
		--accent-foreground: 210 40% 98%;
		--popover: 224 71% 4%;
		--popover-foreground: 215 20.2% 65.1%;
		--border: 216 34% 17%;
		--input: 216 34% 17%;
		--card: 224 71% 4%;
		--card-foreground: 213 31% 91%;
		--primary: 210 40% 98%;
		--primary-foreground: 222.2 47.4% 1.2%;
		--secondary: 222.2 47.4% 11.2%;
		--secondary-foreground: 210 40% 98%;
		--destructive: 0 63% 31%;
		--destructive-foreground: 210 40% 98%;
		--ring: 216 34% 17%;
		color-scheme: dark;
	}
}

@layer base {
	* {
		@apply border-border;
	}

	h1,
	h2,
	h3,
	h4,
	h5,
	h6 {
		@apply text-balance;
	}

	body {
		@apply bg-background text-foreground flex min-h-screen flex-col font-normal antialiased;
		font-feature-settings:
			'rlig' 1,
			'calt' 1;
	}

	html.dark .shiki,
	html.dark .shiki span {
		color: var(--shiki-dark) !important;
		background-color: var(--background) !important;
		/* Optional, if you also want font styles */
		font-style: var(--shiki-dark-font-style) !important;
		font-weight: var(--shiki-dark-font-weight) !important;
		text-decoration: var(--shiki-dark-text-decoration) !important;
	}
}
