/* IdP pages — shared design-system components over token custom properties.
   Form controls are @eearomatics/ui-components <Input>/<Button>; their class
   names (.input-*, .button.*) are styled here against the tokens, ported
   from apps/web global.css so both apps render the same baseline. Token CSS
   lives in src/tokens.css (generated copy of packages/tokens — dark default,
   light via [data-theme]; never hand-edit a token value). Branding text comes
   from @eearomatics/idp-ports. */

* {
	box-sizing: border-box;
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: var(--font-body);
	line-height: 1.5;
}

/* Links — accent gold clears AA against both theme backgrounds. */
a {
	color: var(--accent);
	text-decoration: none;
}
a:hover {
	text-decoration: underline;
}
a:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
}

.idp-shell {
	min-height: 100vh;
	display: grid;
	place-items: center;
	padding: 2rem 1rem;
}

.idp-card {
	width: 100%;
	max-width: 24rem;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	padding: 2rem;
	box-shadow: var(--shadow-sm);
}

.idp-logo {
	font-family: var(--font-display);
	font-weight: 600;
	font-size: 1.25rem;
	margin: 0 0 1.5rem;
}

.idp-title {
	font-size: 1.25rem;
	margin: 0 0 0.25rem;
}

.idp-sub {
	color: var(--text-muted);
	font-size: 0.9rem;
	margin: 0 0 1.25rem;
}

/* Forms: roomy vertical rhythm — label, control, hint/error group together
   inside .input-wrapper; groups and the submit button separated by 1rem. */
.idp-card form {
	display: grid;
	gap: 1rem;
	margin-bottom: 1rem;
}

.idp-error {
	color: var(--danger);
	background: var(--danger-bg);
	border: 1px solid var(--danger);
	border-radius: var(--radius);
	padding: 0.5rem 0.75rem;
	font-size: 0.875rem;
	margin-bottom: 1rem;
}

.idp-notice {
	background: var(--success-bg);
	border: 1px solid var(--success);
	border-radius: var(--radius);
	padding: 0.5rem 0.75rem;
	font-size: 0.875rem;
	margin-bottom: 1rem;
}

.idp-links {
	display: flex;
	justify-content: space-between;
	font-size: 0.875rem;
	margin-top: 1rem;
}

.idp-scope-list {
	list-style: none;
	padding: 0;
	margin: 0 0 1.25rem;
}

.idp-scope-list li {
	padding: 0.5rem 0.75rem;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	margin-bottom: 0.5rem;
	font-size: 0.9rem;
}

.idp-scope-list code {
	font-family: var(--font-mono);
	font-size: 0.8rem;
	color: var(--text-muted);
}

.idp-actions {
	display: grid;
	gap: 0.5rem;
	grid-template-columns: 1fr 1fr;
}

/* --- ui-components: Input (ported from apps/web global.css) -------------- */

.input-wrapper {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
}
.input-container {
	position: relative;
	display: flex;
	align-items: center;
}
.input-label {
	font-size: 0.8rem;
	font-weight: 600;
	color: var(--text-muted);
	text-transform: uppercase;
	letter-spacing: 0.03em;
}
.input-required {
	color: var(--danger);
	margin-left: 2px;
}
.input-field {
	padding: 0.5rem 0.75rem;
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	background: var(--surface);
	color: var(--text);
	font-size: 0.9rem;
	font-family: inherit;
	width: 100%;
	transition: border-color 0.15s, box-shadow 0.15s;
}
.input-field:focus {
	outline: none;
	border-color: var(--primary);
	box-shadow: 0 0 0 3px var(--primary-light);
}
.input-hint {
	font-size: 0.75rem;
	color: var(--text-muted);
	margin: 0;
}
.input-error {
	font-size: 0.75rem;
	color: var(--danger);
	margin: 0;
}

/* --- ui-components: Button (ported from apps/web global.css) ------------- */

button {
	font-family: inherit;
}
.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	font-family: inherit;
	font-weight: 600;
	cursor: pointer;
	border: none;
	border-radius: var(--radius-sm);
	transition: all 0.15s ease;
	white-space: nowrap;
	text-decoration: none;
	position: relative;
	overflow: hidden;
	box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.08), inset 0 -3px 0
		rgba(0, 0, 0, 0.12);
}
.button:disabled {
	cursor: not-allowed;
	opacity: 0.45;
}
.button:focus-visible {
	outline: none;
	box-shadow: var(--ring), inset 0 3px 0 rgba(255, 255, 255, 0.08), inset 0 -3px
		0 rgba(0, 0, 0, 0.12);
}
/* Gold primary — the radial shine + gold gradient ARE the button's
   background (same shared-surface treatment as apps/web). */
.button.primary {
	background: radial-gradient(
			ellipse 80% 60% at var(--shine-x, 50%) var(--shine-y, 20%),
			rgba(255, 250, 220, 0.45),
			transparent 55%
		), var(--gold-grad);
	color: #1a1000;
	box-shadow: inset 0 3px 0 rgba(255, 240, 180, 0.15), inset 0 -3px 0
		rgba(0, 0, 0, 0.2);
}
.button.secondary {
	background: var(--muted);
	color: var(--text);
}
.button.secondary:hover {
	background: var(--popover);
}
.button.md {
	padding: 0.5rem 1rem;
	font-size: 0.875rem;
	min-height: 38px;
}
.button.full-width {
	width: 100%;
}
.button-content {
	display: inline-flex;
	align-items: center;
}
