/**
 * Ambassador Signup Block — styles.
 *
 * @package AmbassadorHub\Accounts\Blocks\Signup
 */

/* Cap wide-aligned block at a comfortable width and centre it. */
.wp-block-ambassadorhub-signup {
	/* Appearance settings → WP Global Styles → fallback. */
	--ambh-accent:        var(--ambh-color-primary, var(--wp--style--color--link, var(--wp--preset--color--primary, #2271b1)));
	--ambh-accent-hover:  var(--ambh-color-primary-hover, var(--wp--preset--color--primary, #1a5a8a));
	--ambh-border:        color-mix(in srgb, currentColor 18%, transparent);
	--ambh-surface:       color-mix(in srgb, currentColor  4%, transparent);
	margin-left: auto;
	margin-right: auto;
	font-family: inherit;
}

.ambh-auth-columns {
	display: grid;
	grid-template-columns: 1fr 1fr;
}

@media ( max-width: 600px ) {
	.ambh-auth-columns {
		grid-template-columns: 1fr;
	}

	.ambh-auth-box:first-child {
		padding-right: 0;
		padding-bottom: 32px;
	}

	.ambh-auth-box + .ambh-auth-box {
		padding-left: 0;
		padding-top: 32px;
		border-left: none;
		border-top: 1px solid var(--ambh-border);
	}
}

.ambh-auth-box:first-child {
	padding-right: 48px;
}

.ambh-auth-box + .ambh-auth-box {
	padding-left: 48px;
	border-left: 1px solid var(--ambh-border);
}


.ambh-auth-box h3 {
	min-height: 2.4em; /* keeps single-line and two-line titles the same height */
	margin-top: 0;
}

.ambh-auth-box label {
	display: block;
	margin-bottom: 4px;
	font-weight: 600;
}

.ambh-auth-box input,
.ambh-auth-button {
	width: 100%;
	box-sizing: border-box;
	padding: 0.5em 0.75em;
	font-size: 1em;
	font-family: inherit;
	color: inherit;
	background-color: transparent;
	border: 1px solid var(--ambh-border);
	border-radius: 3px;
}

.ambh-auth-button {
	display: inline-block;
}

.ambh-auth-button--primary {
	background: var(--ambh-accent);
	color: #fff;
	border: 1px solid var(--ambh-accent);
	border-radius: 3px;
	cursor: pointer;
	font-weight: 600;
}

.ambh-auth-button--primary:hover,
.ambh-auth-button--primary:focus {
	background: var(--ambh-accent-hover);
	border-color: var(--ambh-accent-hover);
	color: #fff;
}

.ambh-auth-error {
	padding: 0.6em 0.85em;
	margin-bottom: 1em;
	background: #fef2f2;
	border: 1px solid #fca5a5;
	border-radius: 4px;
	color: #b91c1c;
	font-size: 0.925em;
}

.ambh-auth-notice {
	padding: 0.75em 1em;
	margin-bottom: 1.25em;
	border-radius: 4px;
	font-size: 0.925em;
	grid-column: 1 / -1;
}

.ambh-auth-notice p {
	margin: 0;
}

.ambh-auth-notice--success {
	background: #f0fdf4;
	border: 1px solid #86efac;
	color: #166534;
}

.ambh-auth-notice--error {
	background: #fef2f2;
	border: 1px solid #fca5a5;
	color: #b91c1c;
}

/* ── Password strength meter ── */
.ambh-pw-strength {
	margin-top: 0.4em;
}

.ambh-pw-bars {
	display: flex;
	gap: 4px;
	margin-bottom: 0.5em;
}

.ambh-pw-bars span {
	flex: 1;
	height: 4px;
	border-radius: 2px;
	background: #e5e7eb;
	transition: background 0.2s;
}

.ambh-pw-bars span.ambh-pw-bar--weak    { background: #ef4444; }
.ambh-pw-bars span.ambh-pw-bar--fair    { background: #f97316; }
.ambh-pw-bars span.ambh-pw-bar--good    { background: #eab308; }
.ambh-pw-bars span.ambh-pw-bar--strong  { background: #22c55e; }

.ambh-pw-rules {
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 0.825em;
	color: #6b7280;
}

.ambh-pw-rules li::before {
	content: '\00d7\0020'; /* × */
	color: #ef4444;
	font-weight: 700;
}

.ambh-pw-rules li.ambh-pw-rule--met::before {
	content: '\2713\0020'; /* ✓ */
	color: #22c55e;
}

.ambh-pw-rules li.ambh-pw-rule--met {
	color: #374151;
}
