/* Sign-in page styles. Mirrors the shadcn theme in clients/web/app/globals.css
   so the Django-served login matches the web client. Hub has no Tailwind
   build, so the few utilities the page needs are written out by hand. */

@font-face {
	font-family: "Hanken Grotesk";
	src: url("../fonts/HankenGrotesk/HankenGrotesk-Variable.dfc9eea73f17.woff2") format("woff2");
	font-weight: 100 900;
	font-style: normal;
	font-display: swap;
}

:root {
	color-scheme: light dark;
	--background: oklch(1 0 0);
	--foreground: oklch(0.145 0 0);
	--muted: oklch(0.97 0 0);
	--muted-foreground: oklch(0.556 0 0);
	--border: oklch(0.922 0 0);
	--input: oklch(0.922 0 0);
	--ring: oklch(0.708 0 0);
	--radius: 0.625rem;
	--font-sans: "Hanken Grotesk", ui-sans-serif, system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
	:root {
		--background: oklch(0.145 0 0);
		--foreground: oklch(0.985 0 0);
		--muted: oklch(0.269 0 0);
		--muted-foreground: oklch(0.708 0 0);
		--border: oklch(1 0 0 / 10%);
		--input: oklch(1 0 0 / 15%);
		--ring: oklch(0.556 0 0);
	}
}

*,
*::before,
*::after {
	box-sizing: border-box;
	margin: 0;
}

html {
	font-family: var(--font-sans);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

body {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-height: 100dvh;
	padding: 3rem 1.5rem;
	background: var(--background);
	color: var(--foreground);
}

.login {
	width: 100%;
	max-width: 24rem;
	text-align: center;
}

.login-logo {
	display: block;
	margin: 0 auto 1.25rem;
}

.login-title {
	font-size: 1.5rem;
	line-height: 2rem;
	font-weight: 600;
	letter-spacing: -0.025em;
}

.login-subtitle {
	margin-top: 0.75rem;
	font-size: 1rem;
	line-height: 1.625;
	color: var(--muted-foreground);
}

.login-providers {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	margin-top: 1.5rem;
}

/* shadcn Button, variant="outline", sized like the web client's full-width
   actions (h-10 text-base). */
.login-provider {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	width: 100%;
	height: 2.5rem;
	padding: 0 0.625rem;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: var(--background);
	color: var(--foreground);
	font-size: 1rem;
	font-weight: 500;
	white-space: nowrap;
	text-decoration: none;
	outline: none;
	user-select: none;
	transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

.login-provider:hover {
	background: var(--muted);
}

.login-provider:focus-visible {
	border-color: var(--ring);
	box-shadow: 0 0 0 3px color-mix(in oklch, var(--ring) 50%, transparent);
}

.login-provider:active {
	transform: translateY(1px);
}

@media (prefers-color-scheme: dark) {
	.login-provider {
		border-color: var(--input);
		background: color-mix(in oklch, var(--input) 30%, transparent);
	}

	.login-provider:hover {
		background: color-mix(in oklch, var(--input) 50%, transparent);
	}
}

.login-provider img {
	width: 1.25rem;
	height: 1.25rem;
	flex-shrink: 0;
}

.login-in-app-browser {
	display: none;
	margin-top: 1.5rem;
	font-size: 0.875rem;
	line-height: 1.625;
	color: var(--muted-foreground);
}

.login-in-app-browser strong {
	font-weight: 600;
	color: var(--foreground);
}

.dot-loader {
	width: 7.5px;
	aspect-ratio: 1;
	margin-top: 1.5rem;
	border-radius: 50%;
	--dot-on: var(--foreground);
	--dot-off: color-mix(in oklch, var(--foreground) 13%, transparent);
	animation: dot-loader 1s infinite linear alternate;
}

@keyframes dot-loader {
	0% {
		box-shadow: 10px 0 var(--dot-on), -10px 0 var(--dot-off);
		background: var(--dot-on);
	}
	33% {
		box-shadow: 10px 0 var(--dot-on), -10px 0 var(--dot-off);
		background: var(--dot-off);
	}
	66% {
		box-shadow: 10px 0 var(--dot-off), -10px 0 var(--dot-on);
		background: var(--dot-off);
	}
	100% {
		box-shadow: 10px 0 var(--dot-off), -10px 0 var(--dot-on);
		background: var(--dot-on);
	}
}
