.b2b-login-page {
	padding: 72px 24px 96px 24px;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-start;
	color: #000000;
}

.b2b-login-container {
	width: 100%;
	max-width: 720px;
	margin: 0 auto;
	text-align: center;
	display: flex;
	flex-direction: column;
	align-items: center;
}

/* --------------------------------------------------------------------------
   Header & Typography
   -------------------------------------------------------------------------- */

.b2b-login-title {
	font-family: inherit;
	font-size: 52px;
	font-weight: 800;
	line-height: 1.15;
	letter-spacing: -0.025em;
	color: #000000;
	margin: 0 0 16px 0;
	padding: 0;
	text-align: center;
}

.b2b-login-desc {
	font-family: inherit;
	font-size: 16px;
	font-weight: 400;
	line-height: 1.55;
	color: var(--wp--preset--color--muted);
	max-width: 540px;
	margin: 0 auto;
	text-align: center;
}

/* --------------------------------------------------------------------------
   Form Layout & Fields
   -------------------------------------------------------------------------- */

.b2b-login-form {
	width: 100%;
	max-width: 600px;
	margin: 24px auto 0 auto;
	text-align: left;
	box-sizing: border-box;
}
.b2b-hint,
.b2b-driver-recovery-notice {
	padding: 16px;
	width: 100%;
	background: color-mix(in srgb, var(--wp--preset--color--accent) 10%, #ffff);
	border-radius: 28px;
	margin-bottom: 24px;
	text-align: center;
	border: 1px solid var(--wp--preset--color--accent);
	box-sizing: border-box;
	color: #000000;
	font-size: 14px;
	line-height: 1.45;
}

.b2b-hint p,
.b2b-driver-recovery-notice p {
	margin: 0;
}

.b2b-form-group {
	margin-bottom: 20px;
	width: 100%;
	box-sizing: border-box;
}

.b2b-form-group:last-of-type {
	margin-bottom: 28px;
}

.b2b-form-label {
	display: block;
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	color: #111111;
	margin-bottom: 8px;
	line-height: 1.3;
	text-align: left;
}

.b2b-form-input {
	display: block;
	width: 100%;
	height: 48px;
	padding: 0 16px;
	font-family: inherit;
	font-size: 15px;
	line-height: 48px;
	color: #111111;
	background-color: #ffffff;
	border: 1px solid #d1d5db;
	border-radius: 8px;
	box-sizing: border-box;
	outline: none;
	transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
	-webkit-appearance: none;
	appearance: none;
}

.b2b-form-input::placeholder {
	color: var(--wp--preset--color--muted);
	opacity: 1;
}

.b2b-form-input:focus {
	border-color: #000000;
	box-shadow: 0 0 0 1px #000000;
}

.b2b-form-input.has-error {
	border-color: var(--wp--preset--color--accent);
	box-shadow: 0 0 0 1px var(--wp--preset--color--accent);
}

/* --------------------------------------------------------------------------
   Submit Button (Pirelli Red, Pill-Shaped)
   -------------------------------------------------------------------------- */

.b2b-login-button {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 45px;
	padding: 0 24px;
	background-color: var(--wp--preset--color--accent);
	color: #ffffff !important;
	font-family: inherit;
	font-size: 15px;
	font-weight: 600;
	letter-spacing: -0.01em;
	text-decoration: none;
	border: none;
	border-radius: 9999px;
	cursor: pointer;
	box-sizing: border-box;
	transition: background-color 0.15s ease, opacity 0.15s ease, transform 0.05s ease;
	position: relative;
	user-select: none;
	-webkit-appearance: none;
	appearance: none;
}

.b2b-login-button:hover {
	background-color: var(--wp--preset--color--secondary);
	color: var(--wp--preset--color--accent) !important;
	border: 2px solid var(--wp--preset--color--accent);
}

.b2b-login-button:active {
	transform: scale(0.995);
}

.b2b-login-button:focus-visible {
	outline: 2px solid #000000;
	outline-offset: 2px;
}

.b2b-login-button[disabled],
.b2b-login-button.is-loading {
	opacity: 0.85;
	cursor: not-allowed;
	pointer-events: none;
}

/* Loading Spinner on button */
.b2b-button-spinner {
	display: none;
	width: 18px;
	height: 18px;
	border: 2px solid rgba(255, 255, 255, 0.35);
	border-top-color: #ffffff;
	border-radius: 50%;
	animation: b2b-spin 0.65s linear infinite;
	margin-right: 8px;
}

.b2b-login-button.is-loading .b2b-button-spinner {
	display: inline-block;
}

@keyframes b2b-spin {
	to {
		transform: rotate(360deg);
	}
}

/* --------------------------------------------------------------------------
   Password Recovery Link
   -------------------------------------------------------------------------- */

.b2b-lost-password-wrapper {
	margin-top: 20px;
	text-align: left;
	width: 100%;
}

.b2b-lost-password-link,
.b2b-back-to-login-link {
	display: inline-flex;
	align-items: center;
	color: var(--wp--preset--color--accent);
	font-family: inherit;
	font-size: 14px;
	font-weight: 500;
	text-decoration: none;
	transition: color 0.15s ease, text-decoration 0.15s ease;
}

.b2b-lost-password-link:hover,
.b2b-lost-password-link:focus-visible,
.b2b-back-to-login-link:hover,
.b2b-back-to-login-link:focus-visible {
	color: var(--wp--preset--color--accent);
	text-decoration: underline;
}

.b2b-lost-password-link .b2b-arrow,
.b2b-back-to-login-link .b2b-arrow {
	display: inline-block;
	margin-left: 6px;
	font-weight: 600;
	font-size: 13px;
	transition: transform 0.15s ease;
}

.b2b-lost-password-link:hover .b2b-arrow {
	transform: translateX(2px);
}

.b2b-back-to-login-link .b2b-arrow {
	margin-left: 0;
	margin-right: 6px;
}

.b2b-back-to-login-link:hover .b2b-arrow {
	transform: translateX(-2px);
}

/* --------------------------------------------------------------------------
   Alerts & Error Messages
   -------------------------------------------------------------------------- */

.b2b-alert {
	width: 100%;
	max-width: 600px;
	margin: 0 auto 24px auto;
	padding: 12px 16px;
	border-radius: 8px;
	font-size: 14px;
	line-height: 1.45;
	text-align: left;
	box-sizing: border-box;
}

.b2b-alert-error {
	background-color: #fef2f2;
	border: 1px solid #fecaca;
	color: #991b1b;
}

.b2b-alert-error ul {
	margin: 0;
	padding-left: 18px;
}

.b2b-alert-error li {
	margin: 4px 0;
}

.b2b-alert-success {
	background-color: #f0fdf4;
	border: 1px solid #bbf7d0;
	color: #166534;
}

/* Override standard woocommerce notices inside b2b container */
.b2b-login-container .woocommerce-error,
.b2b-login-container .woocommerce-message,
.b2b-login-container .woocommerce-info {
	width: 100%;
	max-width: 600px;
	margin: 0 auto 24px auto !important;
	border-radius: 8px !important;
	font-size: 14px !important;
	text-align: left !important;
	box-sizing: border-box !important;
}

.b2b-login-container .woocommerce-error {
	background-color: #fef2f2 !important;
	border: 1px solid #fecaca !important;
	border-top: 1px solid #fecaca !important;
	color: #991b1b !important;
	padding: 12px 16px 12px 36px !important;
}

.b2b-login-container .woocommerce-error::before {
	color: #991b1b !important;
	top: 12px !important;
	left: 14px !important;
}

.b2b-login-container .woocommerce-message {
	background-color: #f0fdf4 !important;
	border: 1px solid #bbf7d0 !important;
	border-top: 1px solid #bbf7d0 !important;
	color: #166534 !important;
	padding: 12px 16px 12px 36px !important;
}

.b2b-login-container .woocommerce-message::before {
	color: #166534 !important;
	top: 12px !important;
	left: 14px !important;
}

.b2b-login-container .woocommerce-info {
	background-color: #eff6ff !important;
	border: 1px solid #bfdbfe !important;
	border-top: 1px solid #bfdbfe !important;
	color: #1e40af !important;
	padding: 12px 16px 12px 36px !important;
}

.b2b-login-container .woocommerce-info::before {
	color: #1e40af !important;
	top: 12px !important;
	left: 14px !important;
}

/* --------------------------------------------------------------------------
   Confirmation Card & Actions
   -------------------------------------------------------------------------- */

.b2b-confirmation-card {
	width: 100%;
	max-width: 600px;
	margin: 24px auto 0 auto;
	text-align: center;
	box-sizing: border-box;
}

.b2b-confirmation-desc {
	margin: 0 auto 28px auto;
	text-align: center;
	font-size: 15px;
	line-height: 1.55;
	color: var(--wp--preset--color--muted);
	max-width: 540px;
}

.b2b-confirmation-actions {
	width: 100%;
	margin-bottom: 20px;
}

.b2b-confirmation-actions .b2b-login-button {
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
}

.b2b-confirmation-back {
	text-align: center;
}

/* --------------------------------------------------------------------------
   Logged-in State Card
   -------------------------------------------------------------------------- */

.b2b-already-logged-in {
	width: 100%;
	max-width: 440px;
	margin: 48px auto 0 auto;
	text-align: center;
}

.b2b-already-logged-in p {
	font-size: 16px;
	color: #374151;
	margin-bottom: 24px;
}

.b2b-already-logged-in .b2b-user-name {
	font-weight: 700;
	color: #111111;
}

.b2b-logged-in-actions {
	display: flex;
	flex-direction: column;
	gap: 12px;
	width: 100%;
}

.b2b-button-secondary {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 45px;
	padding: 0 24px;
	background-color: #f3f4f6;
	color: #111111 !important;
	font-size: 15px;
	font-weight: 600;
	text-decoration: none;
	border-radius: 9999px;
	border: 1px solid #e5e7eb;
	box-sizing: border-box;
	transition: background-color 0.15s ease;
}

.b2b-button-secondary:hover {
	background-color: #e5e7eb;
}

/* --------------------------------------------------------------------------
   Responsive Breakpoints
   -------------------------------------------------------------------------- */

@media (max-width: 768px) {
	.b2b-login-page {
		padding: 56px 20px 80px 20px;
	}

	.b2b-login-title {
		font-size: 34px;
		margin-bottom: 14px;
	}

	.b2b-login-desc {
		font-size: 15px;
		line-height: 1.5;
	}

	.b2b-login-form {
		margin-top: 44px;
	}
}

@media (max-width: 480px) {
	.b2b-login-page {
		padding: 40px 16px 64px 16px;
	}

	.b2b-login-title {
		font-size: 32px;
		line-height: 1.2;
		letter-spacing: -0.015em;
		margin-bottom: 12px;
	}

	.b2b-login-desc {
		font-size: 14px;
		line-height: 1.45;
		padding: 0 4px;
	}

	.b2b-login-form {
		margin-top: 36px;
		width: 100%;
	}

	.b2b-hint{
		width: 90%;
	}

	.b2b-form-input {
		height: 48px;
		font-size: 16px; /* Prevents auto-zoom on iOS */
		padding: 0 14px;
	}

	.b2b-login-button {
		height: 45px;
		font-size: 15px;
	}
}
