/* Login, lost password and set password screens (includes/account-login.php).
   The navy panel's edge and the two bars beside it run at the angle of the
   slashes in the Maverick logo. !important is needed against the form rules in
   woocommerce-myaccount.css and style.css, which use it throughout. */

.md-auth {
	--md-navy: #1c2a3e;
	--md-blue: #3f88c5;
	--md-ink: #202223;
	--md-muted: #5b6776;
	--md-line: #c9d3df;
	--md-slant: -14deg;

	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 46fr) minmax(0, 54fr);
	min-height: 100vh;
	min-height: 100svh;
	overflow: hidden;
	background: #fff;
	color: var(--md-ink);
	font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	font-size: 16px;
	line-height: 1.5;
}

/* The login screens stand alone at every width. The logged-in account keeps the
   site header on phones (woocommerce-myaccount.css), so this is limited to them. */
body:has(.md-auth) #brx-header,
body:has(.md-auth) #brx-footer,
body:has(.md-auth) #fkcart-floating-toggler { display: none !important; }

/* ── Brand panel ── */
.md-auth__brand {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: 40px;
	padding: 48px clamp(32px, 5vw, 80px);
	color: #fff;
}
.md-auth__brand::before,
.md-auth__brand::after {
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	transform: skewX(var(--md-slant));
	transform-origin: 100% 0;
}
.md-auth__brand::before {
	left: -40vw;
	right: 0;
	background: var(--md-navy);
}
.md-auth__brand::after {
	right: -46px;
	width: 28px;
	background: var(--md-blue);
	box-shadow: 44px 0 0 #dbe7f2;
}
.md-auth__brand > * { position: relative; z-index: 1; }

.md-auth__logo { display: inline-block; align-self: flex-start; }
.md-auth__logo img { display: block; width: 190px; height: auto; }

.md-auth__headline {
	max-width: 11.5em;
	margin: 0;
	font-family: 'Barlow Semi Condensed', 'DM Sans', sans-serif;
	font-size: clamp(38px, 4.3vw, 66px);
	font-weight: 600;
	line-height: 1.04;
	letter-spacing: -.005em;
	color: #fff;
	text-wrap: balance;
}

.md-auth__call { margin: 0; font-size: 15px; color: #b9c6d6; }
.md-auth__call a { color: #fff; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* ── Form column ── */
.md-auth__main {
	display: flex;
	flex-direction: column;
	padding: 40px clamp(32px, 5vw, 72px) 48px clamp(96px, 11vw, 170px);
}
.md-auth__back {
	align-self: flex-end;
	font-size: 15px;
	font-weight: 500;
	color: var(--md-muted);
	text-decoration: none;
}
.md-auth__back:hover { color: var(--md-navy); text-decoration: underline; text-underline-offset: 3px; }

.md-auth__panel {
	width: 100%;
	max-width: 400px;
	margin-block: auto;
	padding-block: 40px;
}
.md-auth__title {
	margin: 0 0 28px;
	font-family: 'Barlow Semi Condensed', 'DM Sans', sans-serif;
	font-size: 36px;
	font-weight: 600;
	line-height: 1.1;
	color: var(--md-navy);
}
.md-auth__panel > p { margin: 0 0 20px; color: var(--md-muted); }

/* WooCommerce's own heading and two-column wrapper are replaced by the shell. */
.md-auth #customer_login,
.md-auth #customer_login .col-1 {
	display: block !important;
	width: 100% !important;
	max-width: none !important;
	float: none !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	background: none !important;
	box-shadow: none !important;
}
.md-auth #customer_login h2 { display: none !important; }

.md-auth form.woocommerce-form-login,
.md-auth form.lost_reset_password {
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: none !important;
	box-shadow: none !important;
}
.md-auth form > p:not(.form-row) { margin: 0 0 22px; color: var(--md-muted); }
.md-auth form .form-row {
	float: none !important;
	width: 100% !important;
	margin: 0 0 18px !important;
	padding: 0 !important;
}
.md-auth form label {
	display: block;
	margin: 0 0 6px !important;
	font-size: 15px !important;
	font-weight: 500 !important;
	color: var(--md-ink) !important;
}
.md-auth form label .required { display: none; }
.md-auth form .input-text {
	width: 100% !important;
	height: 52px !important;
	padding: 0 14px !important;
	border: 1.5px solid var(--md-line) !important;
	border-radius: 6px !important;
	background: #fff !important;
	box-shadow: none !important;
	color: var(--md-ink) !important;
	font: inherit !important;
}
.md-auth form .input-text:focus {
	border-color: var(--md-blue) !important;
	outline: 3px solid rgba(63, 136, 197, .25) !important;
	outline-offset: 0 !important;
}
.md-auth form .password-input { display: block; width: 100%; }
.md-auth form .show-password-input { top: 50% !important; right: 12px !important; transform: translateY(-50%); }

.md-auth form label.woocommerce-form-login__rememberme {
	display: flex !important;
	align-items: center;
	gap: 10px;
	margin: 2px 0 20px !important;
	font-weight: 400 !important;
	cursor: pointer;
}
.md-auth .woocommerce-form-login__rememberme input {
	width: 18px;
	height: 18px;
	margin: 0;
	accent-color: var(--md-navy);
}

.md-auth form .button {
	display: block !important;
	width: 100% !important;
	height: 54px !important;
	margin: 0 !important;
	padding: 0 20px !important;
	border: 0 !important;
	border-radius: 6px !important;
	background: var(--md-navy) !important;
	background-image: none !important;
	box-shadow: none !important;
	color: #fff !important;
	font: 600 16px/1 'DM Sans', sans-serif !important;
	cursor: pointer;
	transition: background-color .15s ease;
}
.md-auth form .button:hover { background: var(--md-blue) !important; transform: none !important; }

.md-auth .lost_password,
.md-auth__foot { margin: 0 !important; padding: 0 !important; font-size: 15px; }
.md-auth__foot { margin-top: 18px !important; }
.md-auth .lost_password a,
.md-auth__foot a {
	color: var(--md-navy) !important;
	font-weight: 500;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.md-auth a:focus-visible,
.md-auth button:focus-visible,
.md-auth input[type="checkbox"]:focus-visible {
	outline: 3px solid var(--md-blue);
	outline-offset: 2px;
}

/* Notices sit in the panel, directly above the form. */
.md-auth .woocommerce-notices-wrapper { padding: 0 !important; margin: 0; }
.md-auth .woocommerce-error,
.md-auth .woocommerce-message,
.md-auth .woocommerce-info {
	display: block !important;
	margin: 0 0 22px !important;
	padding: 13px 14px !important;
	border: 1.5px solid #b9d3e8 !important;
	border-radius: 6px !important;
	background: #f2f7fb !important;
	color: var(--md-ink) !important;
	font-size: 15px !important;
	line-height: 1.45 !important;
	list-style: none !important;
}
.md-auth .woocommerce-error {
	border-color: #f0b7b1 !important;
	background: #fff5f4 !important;
}
.md-auth .woocommerce-error:focus { outline: 0; }
.md-auth .woocommerce-error li {
	display: block !important;
	margin: 0 !important;
	padding: 0 0 0 30px !important;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Ccircle cx='10' cy='10' r='10' fill='%23d92d20'/%3E%3Cpath d='M10 5v6' stroke='%23fff' stroke-width='2' stroke-linecap='round'/%3E%3Ccircle cx='10' cy='14.5' r='1.2' fill='%23fff'/%3E%3C/svg%3E") 0 1px / 20px 20px no-repeat !important;
}
.md-auth .woocommerce-error::before,
.md-auth .woocommerce-message::before,
.md-auth .woocommerce-info::before { display: none !important; }

/* The fields the message is about. */
.md-auth__panel:has(.woocommerce-error) form .input-text:not(:focus) { border-color: #e39a93 !important; }

/* ── Tablets and phones: the panel becomes a band, its bottom edge on the same slant ── */
@media (max-width: 900px) {
	.md-auth { display: block; }
	.md-auth__brand {
		display: block;
		padding: 22px 20px 46px;
		background: var(--md-navy);
		clip-path: polygon(0 0, 100% 0, 100% calc(100% - 24px), 0 100%);
	}
	.md-auth__brand::before,
	.md-auth__brand::after,
	.md-auth__call { display: none; }
	.md-auth__logo img { width: 150px; }
	.md-auth__headline { margin-top: 20px; max-width: 14em; font-size: 30px; line-height: 1.1; }
	.md-auth__main { padding: 8px 20px 40px; }
	.md-auth__panel { max-width: 460px; margin-inline: auto; padding-block: 16px 0; }
	.md-auth__title { margin-bottom: 22px; font-size: 30px; }
}
