/*
  Shared Login Box — CSS
  ======================
  Shared visual for the /login page of every project tagged `sharedlogin`
  in mani.yaml. Modelled on the Whakapapa login card.

  Copy this file into the repo (full copy, never a symlink — same rule as
  robots.txt) and link it from the login page:
    <link rel="stylesheet" href="/path/to/login-box.css">

  The box inherits each site's own design through the CSS custom properties
  below. Override them in the site's own stylesheet to match its palette;
  the fallbacks give a neutral light look.
*/

/* Self-contained sizing: the box must not rely on a site-wide reset. */
.login-box-wrap,
.login-box,
.login-box * {
	box-sizing: border-box;
}

.login-box-wrap {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: min(70dvh, 36rem);
	padding: 1.5rem;
}

.login-box {
	width: 100%;
	max-width: 22rem;
	padding: 1.75rem 1.5rem;
	border: 1px solid var(--login-border, #d0d7de);
	border-radius: 0.5rem;
	background-color: var(--login-surface, #ffffff);
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
	color: var(--login-text, #1f2328);
}

/* Project title, always first */
.login-box-title {
	margin: 0;
	font-size: 1.35rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	text-align: center;
	color: var(--login-text, #1f2328);
}

/* Project emoji (same emoji as the project's Bifrost card), below the title */
.login-box-emoji {
	margin: 0.5rem 0 1.25rem;
	font-size: 2.25rem;
	line-height: 1;
	text-align: center;
}

.login-box-field {
	margin-bottom: 1rem;
}

/* Caption above each input */
.login-box-label {
	display: block;
	margin-bottom: 0.35rem;
	font-size: 0.875rem;
	color: var(--login-muted, #57606a);
}

.login-box-input {
	display: block;
	width: 100%;
	padding: 0.5rem 0.75rem;
	border: 1px solid var(--login-border, #d0d7de);
	border-radius: 0.375rem;
	background-color: var(--login-input-surface, var(--login-surface, #ffffff));
	color: var(--login-text, #1f2328);
	font: inherit;
}

.login-box-input:focus {
	outline: 2px solid var(--login-accent, #35b880);
	outline-offset: -1px;
	border-color: var(--login-accent, #35b880);
}

.login-box-error {
	margin: 0 0 1rem;
	font-size: 0.875rem;
	color: var(--login-error, #b42318);
}

.login-box-submit {
	display: block;
	width: 100%;
	padding: 0.55rem 0.75rem;
	border: 0;
	border-radius: 0.375rem;
	background-color: var(--login-accent, #35b880);
	color: var(--login-accent-contrast, #ffffff);
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}

.login-box-submit:hover,
.login-box-submit:focus-visible {
	filter: brightness(1.06);
}
