/* 5th Axis — Login Form */

.axis5th-login {
	--axis5th-login-panel-bg: #ffffff;
	--axis5th-login-panel-border: #e5e5e5;
	--axis5th-login-accent: #dd2828;
	--axis5th-login-label-color: #1a1a1a;
	--axis5th-login-text-color: #6c6c6c;
	--axis5th-login-input-border: #cccccc;
	--axis5th-login-input-focus: #dd2828;
	--axis5th-login-btn-bg: #dd2828;
	--axis5th-login-btn-color: #ffffff;
	--axis5th-login-signup-color: #dd2828;

	max-width: 620px;
	background: #FFFFFF;
	border: 1px solid #E4E4E7;
	box-shadow: 0px 4px 6px -1px #0000001A;

	padding: 2.5rem;
}

.axis5th-login--logged-in {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	color: var( --axis5th-login-text-color );
}

.axis5th-login--logged-in a {
	color: var( --axis5th-login-accent );
}

.axis5th-login--pending p {
	margin: 0;
	color: var( --axis5th-login-text-color );
	line-height: 1.6;
}

.axis5th-login__notices {
	margin-bottom: 1.25rem;
}

.axis5th-login__notices .woocommerce-error,
.axis5th-login__notices .woocommerce-message {
	list-style: none;
	margin: 0 0 0.75rem;
	padding: 0.75rem 1rem;
	font-size: 0.85rem;
	border-left: 3px solid var( --axis5th-login-accent );
	background: #fbeaea;
	color: #7a1216;
}

/* Keep WooCommerce's notice icon clear of the text, single left border only. */
.axis5th-login__notices .woocommerce-error,
.axis5th-login__notices .woocommerce-message,
.axis5th-login__notices .woocommerce-info {
	position: relative;
	padding: 0.85rem 1rem 0.85rem 2.75rem;
	border-top: 0;
	line-height: 1.5;
}

.axis5th-login__notices .woocommerce-error::before,
.axis5th-login__notices .woocommerce-message::before,
.axis5th-login__notices .woocommerce-info::before {
	left: 1rem;
	top: 0.85rem;
	font-size: 1rem;
	line-height: 1.5;
}

.axis5th-login__notices .woocommerce-error li {
	margin: 0;
}

.axis5th-login__notices .woocommerce-message {
	background: #eaf6ec;
	color: #1e5e2b;
	border-left-color: #2e7d32;
}

/* reCAPTCHA box on the Sign Up form */
.axis5th-login__captcha {
	margin: 0 0 1.25rem;
}

.axis5th-login__heading {
	margin: 0 0 1.75rem;
	font-size: 48px;
	font-weight: 700;
	color: var(--e-global-color-accent);
}

.axis5th-login__heading-accent {
	color: var(--e-global-color-primary);
}

.axis5th-login__row {
	display: flex;
	gap: 1.5rem;
	margin-bottom: 1.25rem;
}

.axis5th-login__field {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.axis5th-login__field label {
	font-family: var( --e-global-typography-57475c0-font-family ), Sans-serif;
	font-size: 14px;
	font-weight: 400;
	text-transform: uppercase;
	color: var(--e-global-color-accent);
}

.axis5th-login__field .required {
	color: var(--e-global-color-primary);
}

.axis5th-login__input {
	width: 100%;
	padding: 0.7rem 0.9rem;
	font-size: 0.9rem;
	border: 1px solid var( --axis5th-login-input-border );
	border-radius: 2px;
	background: #ffffff;
	color: var( --axis5th-login-label-color );
	transition: border-color 0.2s ease;
}

.axis5th-login__input:focus {
	outline: none;
	border-color: var( --axis5th-login-input-focus );
}

.axis5th-login__password-wrap {
	position: relative;
	display: flex;
	align-items: center;
}

.axis5th-login__password-wrap .axis5th-login__input {
	padding-right: 2.5rem;
}

.axis5th-login__password-toggle {
	position: absolute;
	right: 0.7rem;
	background: none;
	border: none;
	padding: 0;
	cursor: pointer;
	color: #9a9a9a;
	display: flex;
	align-items: center;
}

.axis5th-login__password-toggle:hover {
	color: var( --axis5th-login-label-color );
}

/* Two-state eye. Only toggles that render both spans are affected — the ones
   still carrying a single inline icon are untouched by these rules. */
.axis5th-login__eye {
	display: inline-flex;
	align-items: center;
}

.axis5th-login__eye .axis5th-icon,
.axis5th-login__eye svg {
	width: 18px;
	height: 18px;
	display: block;
}

/* Masked is the resting state, so the open eye starts hidden. `is-visible` is
   set by the toggle script when the password becomes readable. */
.axis5th-login__eye--open {
	display: none;
}

.axis5th-login__password-toggle.is-visible .axis5th-login__eye--closed {
	display: none;
}

.axis5th-login__password-toggle.is-visible .axis5th-login__eye--open {
	display: inline-flex;
}

.axis5th-login__row--meta {
	align-items: center;
	justify-content: space-between;
	font-size: 0.85rem;
}

.axis5th-login__remember {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	color: #6C6C6C;
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
}

.axis5th-login__remember input {
	margin: 0;
}

.axis5th-login__forgot {
	color: #6C6C6C;
	text-decoration: underline;
	font-size: 14px;
	font-weight: 500;
}

.axis5th-login__row--actions {
	align-items: center;
	justify-content: space-between;
	gap: 2rem;
	margin-top: 30px;
}

.axis5th-login__terms {
	margin: 0;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.5;
	color: #333333;
}

.axis5th-login__terms a {
	color: var(--e-global-color-accent);
	text-decoration: underline;
	white-space: nowrap;
}

.axis5th-login__btn {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.6rem;
	padding: 10px 16px;
	font-size: 0.9rem;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
	border-radius: 2px;
	transition: opacity 0.2s ease;
}

.axis5th-login__btn:hover {
	opacity: 0.85;
}

.axis5th-login__btn--primary {
	background: var(--e-global-color-primary);
	color: var(--e-global-color-e735d4d);
	border: 1px solid var(--e-global-color-primary);
	min-width: 240px;
}

/* Create Account, before the consent box is ticked. Muted rather than hidden
   so it's clear the button exists and something is needed to unlock it, and
   the not-allowed cursor says so on hover. The rule sits after the --primary
   colours above so it wins without a flag. */
.axis5th-login__btn[disabled] {
	opacity: 0.45;
	cursor: not-allowed;
	pointer-events: auto;
}

.axis5th-login__btn[disabled]:hover {
	opacity: 0.45;
}

.axis5th-login__btn--secondary {
	background: transparent;
	color: var(--e-global-color-primary);
	border: 1px solid var( --e-global-color-primary );
	min-width: 240px;
}
.axis5th-login__btn--secondary:hover{
	color: var(--e-global-color-primary);
}

.axis5th-login__divider {
	position: relative;
	text-align: center;
	margin: 1.5rem 0;
	height: 1px;
	background: #e5e5e5;
}

.axis5th-login__divider span {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate( -50%, -50% );
	background: var( --axis5th-login-panel-bg );
	padding: 0 0.75rem;
	font-size: 0.75rem;
	color: var( --axis5th-login-text-color );
}

.axis5th-login__row--signup {
	align-items: center;
	justify-content: space-between;
}

.axis5th-login__signup-prompt {
	font-size: 0.85rem;
	color: #b3b3b3;
}

/* Signup-specific: wider panel, multi-section layout */

.axis5th-login--signup {
	max-width: 720px;
}

.axis5th-login__section-title {
	margin: 0 0 1.25rem;
	padding-bottom: 0.75rem;
	font-size: 1.05rem;
	font-weight: 700;
	color: var( --axis5th-login-label-color );
	border-bottom: 1px solid #ececec;
}

.axis5th-login--signup .axis5th-login__section-title:not( :first-of-type ) {
	margin-top: 2rem;
}

.axis5th-login__row--3col .axis5th-login__field {
	flex: 1;
}

.axis5th-login__field--full {
	flex: 1 1 100%;
}

.axis5th-login__select {
	appearance: none;
	background-image: url( "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236c6c6c' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E" );
	background-repeat: no-repeat;
	background-position: right 0.75rem center;
	background-size: 16px;
	padding-right: 2.25rem;
	cursor: pointer;
}

.axis5th-login__checkbox {
	display: flex;
	align-items: flex-start;
	gap: 0.6rem;
	margin-bottom: 1.5rem;
	font-size: 0.82rem;
	line-height: 1.5;
	color: var( --axis5th-login-text-color );
	cursor: pointer;
}

.axis5th-login__checkbox input {
	margin-top: 0.2rem;
	flex: 0 0 auto;
}

.axis5th-login__row--signup-submit {
	justify-content: flex-end;
	margin-bottom: 1.5rem;
}

/* Signup: B2BKing block, revealed when the chosen User Type is a B2B one */

.axis5th-login__b2bking[hidden],
.axis5th-login__b2bking [hidden] {
	display: none !important;
}

.axis5th-login__b2bking {
	margin-bottom: 1.25rem;
}

.axis5th-login--signup .axis5th-login__b2bking-title {
	margin-top: 2rem;
}

.axis5th-login__b2bking-grid {
	display: grid;
	grid-template-columns: repeat( 2, minmax( 0, 1fr ) );
	gap: 1.25rem 1.5rem;
}

.axis5th-login__b2bking-grid .axis5th-login__field--full {
	grid-column: 1 / -1;
}

.axis5th-login__group-label {
	font-family: var( --e-global-typography-57475c0-font-family ), Sans-serif;
	font-size: 14px;
	font-weight: 400;
	text-transform: uppercase;
	color: var(--e-global-color-accent);
}

.axis5th-login__group-label .required {
	color: var(--e-global-color-primary);
}

/* Inside .axis5th-login__field a <label> is styled as a field label; a checkbox / radio option is not one. */
.axis5th-login__b2bking .axis5th-login__field .axis5th-login__checkbox {
	margin-bottom: 0;
	font-size: 0.82rem;
	font-weight: 400;
	text-transform: none;
	font-family: inherit;
	color: var( --axis5th-login-text-color );
}

.axis5th-login__b2bking textarea.axis5th-login__input {
	min-height: 96px;
	resize: vertical;
	font-family: inherit;
}

.axis5th-login__hint {
	font-size: 0.75rem;
	color: var( --axis5th-login-text-color );
}

@media ( max-width: 767px ) {
	.axis5th-login__b2bking-grid {
		grid-template-columns: minmax( 0, 1fr );
	}
}

/* Shared required-field validation state (login + signup forms) */

.axis5th-login__field--invalid .axis5th-login__input,
.axis5th-login__field--invalid .axis5th-login__select {
	border-color: #c4191f;
}

.axis5th-login__field-error {
	font-size: 0.75rem;
	color: #c4191f;
	margin: -0.2rem 0 0;
}

/* Tablet / mobile only — desktop login/signup panel unchanged above. */
@media ( max-width: 767px ) {
	.axis5th-login {
		padding: 1.75rem;
		max-width: 100%;
		box-sizing: border-box;
	}

	.axis5th-login__heading {
		font-size: clamp( 32px, 8vw, 42px );
		line-height: 1.1;
	}

	.axis5th-login__row,
	.axis5th-login__row--actions,
	.axis5th-login__row--signup,
	.axis5th-login__row--3col {
		flex-direction: column;
		align-items: stretch;
		gap: 1rem;
	}

	.axis5th-login__btn--primary,
	.axis5th-login__btn--secondary {
		min-width: 0;
		width: 100%;
	}

	.axis5th-login__row--signup-submit,
	.axis5th-login__row--actions {
		justify-content: stretch;
	}

	.axis5th-login__terms {
		font-size: 13px;
	}
}

@media ( max-width: 479px ) {
	.axis5th-login {
		padding: 1.25rem;
	}

	.axis5th-login__heading {
		font-size: 28px;
		margin-bottom: 1.25rem;
	}
}
