@import 'tailwindcss';

@custom-variant dark (&:is(.dark *));

@theme {
	/* Set your own font. */
	--font-sans: 'Geist', ui-sans-serif, system-ui, sans-serif;

	/* Alixan UI text sizes. */
	--text-md: 15px;
	--text-xm: 17px;

	/* Default container */
	--container-container: 1500px;
}

@theme inline {
	--color-background: var(--background);
	--color-foreground: var(--foreground);

	--color-card: var(--card);
	--color-card-foreground: var(--card-foreground);

	--color-popover: var(--popover);
	--color-popover-foreground: var(--popover-foreground);

	--color-primary: var(--primary);
	--color-primary-foreground: var(--primary-foreground);

	--color-secondary: var(--secondary);
	--color-secondary-foreground: var(--secondary-foreground);

	--color-muted: var(--muted);
	--color-muted-foreground: var(--muted-foreground);

	--color-accent: var(--accent);
	--color-accent-foreground: var(--accent-foreground);

	--color-destructive: var(--destructive);
	--color-destructive-foreground: var(--destructive-foreground);

	--color-border: var(--border);
	--color-input: var(--input);
	--color-ring: var(--ring);

	--radius-sm: calc(var(--radius) - 4px);
	--radius-md: calc(var(--radius) - 2px);
	--radius-lg: var(--radius);
	--radius-xl: calc(var(--radius) + 2px);
}

:root {
	--radius: 0.65rem;

	--background: oklch(1 0 0);
	--foreground: oklch(0.141 0.005 285.823);

	--card: hsl(0, 0%, 98.5%);
	--card-foreground: oklch(0.141 0.005 285.823);

	--popover: oklch(1 0 0);
	--popover-foreground: oklch(0.141 0.005 285.823);

	--primary: oklch(0.141 0.005 285.823);
	--primary-foreground: oklch(0.985 0 0);

	--secondary: oklch(0.967 0.001 286.375);
	--secondary-foreground: oklch(0.21 0.006 285.885);

	--muted: oklch(0.967 0.001 286.375);
	--muted-foreground: oklch(0.552 0.016 285.938);

	--accent: oklch(0.967 0.001 286.375);
	--accent-foreground: oklch(0.21 0.006 285.885);

	--destructive: oklch(0.577 0.245 27.325);
	--destructive-foreground: oklch(1 0 0);

	--border: oklch(0.92 0.004 286.32);
	--input: oklch(0.92 0.004 286.32);
	--ring: oklch(0.708 0 0);
}

.dark {
	--background: oklch(0.141 0.005 285.823);
	--foreground: oklch(0.985 0 0);

	--card: oklch(0.21 0.006 285.885);
	--card-foreground: oklch(0.985 0 0);

	--popover: oklch(0.21 0.006 285.885);
	--popover-foreground: oklch(0.985 0 0);

	--primary: oklch(0.985 0 0);
	--primary-foreground: oklch(0.141 0.005 285.823);

	--secondary: oklch(0.274 0.006 286.033);
	--secondary-foreground: oklch(0.985 0 0);

	--muted: oklch(0.274 0.006 286.033);
	--muted-foreground: oklch(0.705 0.015 286.067);

	--accent: oklch(0.274 0.006 286.033);
	--accent-foreground: oklch(0.985 0 0);

	--destructive: oklch(0.704 0.191 22.216);
	--destructive-foreground: oklch(0.985 0 0);

	--border: oklch(1 0 0 / 10%);
	--input: oklch(1 0 0 / 15%);
	--ring: oklch(0.556 0 0);
}

@layer base {
	*,
	::after,
	::before,
	::backdrop,
	::file-selector-button {
		border-color: var(--border);
	}

	* {
		@apply m-0 p-0 box-border scroll-smooth outline-none;
	}

	html,
	body {
		@apply size-full min-h-full bg-background text-foreground overflow-hidden;
	}

	body {
		::-webkit-scrollbar {
			width: 6px;
			height: 6px;
		}

		::-webkit-scrollbar-track {
			border-radius: 10px;
			background: color-mix(in srgb, var(--border) 20%, transparent);
		}

		::-webkit-scrollbar-thumb {
			border-radius: 10px;
			background: color-mix(in srgb, var(--muted-foreground) 20%, transparent);
			cursor: grabbing;
		}

		::-webkit-scrollbar-thumb:hover {
			background: color-mix(in srgb, var(--foreground) 40%, transparent);
		}
	}

	#root {
		@apply size-full min-h-full flex flex-col divide-y overflow-y-auto;
	}

	hr {
		@apply w-full h-px;
	}

	button:not(:disabled),
	p,
	span {
		color: inherit;
	}

	select {
		-webkit-appearance: none;
		-moz-appearance: none;
		appearance: none;
		background: transparent;
	}

	input::-webkit-inner-spin-button,
	input::-webkit-outer-spin-button {
		-webkit-appearance: none;
	}

	input[type='search']::-webkit-search-cancel-button {
		@apply hidden;

		-webkit-appearance: none;
		appearance: none;
	}

	input[type='number'] {
		-moz-appearance: textfield;
	}
}

@utility backdrop {
	@apply absolute inset-0 bg-black/30 dark:bg-black/80;
}
