/* Turium signup-page additions on top of auth-background.css.
 *
 * Keep style names scoped to .login-content / .for-signup so we don't
 * accidentally bleed into the login page.
 *
 * NOTE: this stylesheet is *only* loaded on /signup (auth/www/signup.html);
 * the login page does NOT include it. Any rule here is automatically
 * scoped to the signup page even if the selector is general.
 */

/* Override login.bundle.scss's `.for-signup { display: none; }` (which
 * exists because /login uses .for-signup as a tab toggled by JS). On a
 * standalone signup page that default would render an empty viewport;
 * force visibility unconditionally. */
section.for-signup {
	display: block !important;
}

/* Keep the signup flow fully inside the viewport on laptop heights. */
#login-background {
	height: 100vh;
	padding: 16px 0;
	overflow: hidden;
}

.login-content.page-card {
	max-width: 300px;
}

/* Field labels — the login form hides labels via .sr-only, but the
 * signup form has more fields so visible labels orient the user.
 * Bootstrap's default label color is too dark for our background. */
.login-content .form-label {
	color: #ffffff !important;
	font-size: 10px !important;
	font-weight: 500 !important;
	letter-spacing: 0.2px;
	text-transform: uppercase;
	margin-bottom: 4px !important;
	display: block;
}

/* Helper text under fields ("We'll use this…", "At least 8 characters",
 * status messages) and the page subtitle ("Your address is the
 * foundation of your Turium identity."). Bootstrap's text-muted is
 * gray-on-white-friendly, which on our dark glass card disappears
 * entirely. Force pure white so the copy is crisp on the dark card. */
.login-content small.text-muted,
.login-content .text-muted,
.login-content p.text-muted,
.login-content .page-card-head p.text-muted {
	color: #ffffff !important;
}

/* Username + @domain composite field. The whole thing reuses .form-control
 * styling but reserves space on the right for the @<domain> suffix. */
.login-content .username-field {
	position: relative;
}

.login-content .username-input {
	padding-right: 136px !important;
}

.login-content .username-domain {
	position: absolute;
	right: 12px;
	top: 50%;
	transform: translateY(-50%);
	font-size: 12px;
	color: rgba(255, 255, 255, 0.6);
	background: transparent;
	pointer-events: none;
	z-index: 2;
	max-width: 130px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.login-content .username-status,
.login-content .password-status,
.login-content .confirm-password-status {
	font-size: 10px;
	min-height: 12px; /* reserve space so layout doesn't jump */
}

.login-content .text-success {
	color: rgba(110, 231, 183, 0.95) !important;
}

.login-content .text-danger {
	color: rgba(252, 165, 165, 0.95) !important;
}

/* Side-by-side first/last name row */
.login-content .form-row {
	display: flex;
	flex-wrap: wrap;
	margin-left: -8px;
	margin-right: -8px;
}

.login-content .form-row > .col-6 {
	flex: 0 0 50%;
	max-width: 50%;
	padding-left: 8px;
	padding-right: 8px;
	box-sizing: border-box;
}

/* Terms checkbox row. Bootstrap labels can inherit dim colors from
 * ancestor .form-control wrappers; force the wrapper + inner span to a
 * legible color so users actually see what they're agreeing to. */
.login-content .terms-label,
.login-content .terms-label > span {
	color: #ffffff !important;
}

.login-content .terms-label {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	cursor: pointer;
	user-select: none;
	font-size: 10px;
	font-weight: 400;
	margin-bottom: 0;
	text-transform: none;       /* override the .form-label uppercase */
	letter-spacing: normal;
}

.login-content .terms-label input[type="checkbox"] {
	margin-top: 2px;
	width: 14px;
	height: 14px;
	accent-color: #ffffff;
	cursor: pointer;
	flex-shrink: 0;
}

.login-content .terms-label .terms-link {
	color: #ffffff !important;
	text-decoration: none;
	border-bottom: 1px dashed rgba(255, 255, 255, 0.4);
}

.login-content .terms-label .terms-link:hover {
	border-bottom-color: rgba(255, 255, 255, 0.8);
}

/* Inline alert bubble for hard errors (rate limit, server validation,
 * exception bubbling). Lives at the bottom of the form body. */
.login-content .signup-alert {
	background: rgba(255, 82, 82, 0.12);
	border: 1px solid rgba(255, 82, 82, 0.35);
	border-radius: 8px;
	color: rgba(254, 226, 226, 0.95);
	padding: 8px 10px;
	font-size: 10px;
	line-height: 1.5;
}

.login-content .signup-alert.d-none {
	display: none !important;
}

/* Disabled / pending submit state */
.login-content .btn-signup[disabled] {
	cursor: not-allowed;
	opacity: 0.7;
}

/* Tighten vertical rhythm a bit on the longer signup card */
.login-content .form-group {
	margin-bottom: 3px;
}

.login-content .page-card-body {
	padding-top: 0;
	padding-bottom: 2px;
}

.login-content .page-card-head {
	padding-top: 4px;
	padding-bottom: 2px;
}

.login-content .page-card-head h4 {
	font-size: 16px;
	line-height: 1.1;
	margin-bottom: 1px;
}

.login-content .page-card-head p {
	font-size: 8px;
	line-height: 1.3;
}

.login-content .form-control {
	height: 26px !important;
	padding-top: 2px !important;
	padding-bottom: 2px !important;
	padding-left: 30px !important;
	font-size: 10px !important;
}

.login-content .password-field .form-control {
	padding-right: 62px !important;
}

.login-content .field-icon {
	left: 9px !important;
}

.login-content .toggle-password {
	right: 12px !important;
	font-size: 9px;
}

.login-content .page-card-actions {
	padding-top: 4px;
}

.login-content .btn-signup {
	height: 28px !important;
	padding: 4px 8px !important;
	font-size: 11px;
}

.sign-up-message {
	margin-top: 4px;
	font-size: 11px;
}
