/**
 * Topmedicus guest authentication
 * Mobile-first and isolated behind the tm-auth-page body class.
 */

.tm-auth-page {
	--tm-auth-text: #2d3134;
	--tm-auth-muted: #5f6964;
	--tm-auth-green: #587a11;
	--tm-auth-green-hover: #46620c;
	--tm-auth-brand: #83b70b;
	--tm-auth-sage: #e6ece8;
	--tm-auth-sage-light: #f2f5f3;
	--tm-auth-nude-light: #fdf8f5;
	--tm-auth-border: #e2e7e4;
	--tm-auth-focus: rgba(88, 122, 17, 0.24);
}

.tm-auth-page #content.site-main {
	background:
		radial-gradient(circle at 5% 8%, rgba(230, 236, 232, 0.82), transparent 27rem),
		linear-gradient(180deg, #f8faf8 0%, #ffffff 72%);
	overflow: hidden;
}

/* The account template supplies the real page H1. Suppress the legacy title if an old page revision restores it. */
.tm-auth-page .site-main .elementor-element-47183bf {
	display: none;
}

.tm-auth-page .site-main > .page-content > .elementor > .e-con:last-child {
	padding-block: clamp(22px, 5vw, 64px) clamp(48px, 8vw, 100px);
}

.tm-auth-page .site-main > .page-content > .elementor > .e-con:last-child > .e-con-inner {
	max-width: 1160px;
	padding-inline: 16px;
}

.tm-auth-page .site-main .elementor-widget-text-editor,
.tm-auth-page .site-main .elementor-widget-shortcode {
	color: var(--tm-auth-text);
	font-family: "Jost", sans-serif;
}

.tm-auth-page .site-main .elementor-widget-container > p:empty {
	display: none;
}

body.tm-auth-page .woocommerce {
	color: var(--tm-auth-text);
	font-family: "Jost", sans-serif;
	margin: 0;
	max-width: none;
	padding: 0;
}

.tm-auth-shell,
.tm-auth-shell *,
.tm-auth-shell *::before,
.tm-auth-shell *::after {
	box-sizing: border-box;
}

.tm-auth-shell {
	display: flex;
	flex-direction: column;
	gap: 16px;
	margin: 0 auto;
	max-width: 1120px;
	width: 100%;
}

/*
 * display:contents lets mobile place the heading before the form and the
 * benefit details after it. Desktop restores a single editorial side panel.
 */
.tm-auth-story {
	display: contents;
}

.tm-auth-story-heading {
	background:
		radial-gradient(circle at 92% -20%, rgba(203, 168, 122, 0.24), transparent 12rem),
		linear-gradient(145deg, var(--tm-auth-sage-light), var(--tm-auth-nude-light));
	border: 1px solid var(--tm-auth-border);
	border-radius: 20px;
	order: 1;
	padding: 25px 22px 27px;
}

.tm-auth-eyebrow,
.tm-auth-card-eyebrow {
	color: #607068;
	display: block;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.14em;
	line-height: 1.4;
	text-transform: uppercase;
}

.tm-auth-story-heading h1 {
	color: var(--tm-auth-text);
	font-family: "Playfair Display", serif;
	font-size: clamp(32px, 9vw, 42px);
	font-weight: 500;
	letter-spacing: -0.025em;
	line-height: 1.06;
	margin: 9px 0 12px;
	max-width: 12ch;
}

.tm-auth-story-heading p {
	color: var(--tm-auth-muted);
	font-size: 15px;
	line-height: 1.6;
	margin: 0;
	max-width: 39rem;
}

.tm-auth-card {
	background: #fff;
	border: 1px solid var(--tm-auth-border);
	border-radius: 20px;
	box-shadow: 0 18px 55px rgba(45, 49, 52, 0.08);
	order: 2;
	padding: 22px;
	position: relative;
	z-index: 1;
}

.tm-auth-card-header {
	border-bottom: 1px solid var(--tm-auth-border);
	margin-bottom: 25px;
	padding-bottom: 18px;
}

.tm-auth-card-eyebrow {
	margin-bottom: 12px;
}

.tm-auth-tabs {
	background: var(--tm-auth-sage-light);
	border: 1px solid var(--tm-auth-border);
	border-radius: 999px;
	display: none;
	gap: 4px;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	padding: 4px;
}

.tm-auth-tabs-ready .tm-auth-tabs {
	display: grid;
}

.tm-auth-tabs button {
	appearance: none;
	background: transparent;
	border: 0;
	border-radius: 999px;
	color: var(--tm-auth-muted);
	cursor: pointer;
	font-family: "Jost", sans-serif;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
	min-height: 44px;
	padding: 10px 12px;
	position: relative;
	transition: background-color 160ms ease, box-shadow 160ms ease, color 160ms ease;
	width: 100%;
}

.tm-auth-tabs button[aria-selected="true"] {
	background: #fff;
	box-shadow: 0 3px 12px rgba(45, 49, 52, 0.08);
	color: var(--tm-auth-text);
}

.tm-auth-tabs button[aria-selected="true"]::after {
	background: var(--tm-auth-brand);
	border-radius: 999px;
	bottom: 7px;
	content: "";
	height: 2px;
	left: 50%;
	position: absolute;
	transform: translateX(-50%);
	width: 20px;
}

body.tm-auth-page #customer_login {
	display: grid !important;
	gap: 28px;
	grid-template-columns: minmax(0, 1fr) !important;
	margin: 0;
	width: 100%;
}

body.tm-auth-page #customer_login > :is(.u-column1, .u-column2) {
	background: transparent;
	border: 0;
	border-radius: 0;
	float: none !important;
	margin: 0 !important;
	min-width: 0;
	padding: 0;
	width: 100% !important;
}

.tm-auth-tabs-ready #customer_login > [hidden] {
	display: none !important;
}

body.tm-auth-page #customer_login h2 {
	color: var(--tm-auth-text);
	font-family: "Playfair Display", serif;
	font-size: clamp(28px, 7vw, 34px);
	font-weight: 500;
	letter-spacing: -0.02em;
	line-height: 1.15;
	margin: 0 0 23px;
}

body.tm-auth-page #customer_login form.login,
body.tm-auth-page #customer_login form.register {
	background: transparent;
	border: 0;
	margin: 0;
	padding: 0;
}

body.tm-auth-page #customer_login form p {
	line-height: 1.45;
	margin: 0 0 17px;
	padding: 0;
}

body.tm-auth-page #customer_login form br,
body.tm-auth-page #customer_login form > p:empty,
body.tm-auth-page #customer_login form > .clear {
	display: none;
}

body.tm-auth-page #customer_login form label {
	color: var(--tm-auth-text);
	display: block;
	font-family: "Jost", sans-serif;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.4;
	margin: 0 0 8px;
}

body.tm-auth-page #customer_login form .required {
	color: #a64136;
}

body.tm-auth-page #customer_login .input-text {
	appearance: none;
	background: #fff;
	border: 1px solid #cfd7d2;
	border-radius: 12px;
	box-shadow: none;
	color: var(--tm-auth-text);
	font-family: "Jost", sans-serif;
	font-size: 16px;
	height: 52px;
	line-height: 1.3;
	margin: 0;
	padding: 12px 14px;
	transition: border-color 160ms ease, box-shadow 160ms ease;
	width: 100%;
}

body.tm-auth-page #customer_login .password-input {
	display: block;
	width: 100%;
}

body.tm-auth-page #customer_login .input-text:hover {
	border-color: #aebbb3;
}

body.tm-auth-page #customer_login .input-text:focus {
	border-color: var(--tm-auth-green);
	box-shadow: 0 0 0 4px var(--tm-auth-focus);
	outline: 0;
}

body.tm-auth-page #customer_login .show-password-input {
	color: var(--tm-auth-muted);
	top: 0.88em;
}

body.tm-auth-page #customer_login .woocommerce-form-login > .form-row:not(.form-row-wide) {
	display: grid;
	gap: 14px;
	margin-top: 4px;
}

body.tm-auth-page #customer_login .woocommerce-form-login__rememberme,
body.tm-auth-page #customer_login .mailchimp-newsletter label {
	align-items: flex-start;
	cursor: pointer;
	display: flex;
	font-size: 14px;
	font-weight: 400;
	gap: 9px;
	margin: 0;
}

body.tm-auth-page #customer_login input[type="checkbox"] {
	accent-color: var(--tm-auth-green);
	flex: 0 0 auto;
	height: 18px;
	margin: 1px 0 0;
	width: 18px;
}

body.tm-auth-page #customer_login button[type="submit"] {
	appearance: none;
	background: var(--tm-auth-green) !important;
	border: 1px solid var(--tm-auth-green) !important;
	border-radius: 999px !important;
	box-shadow: 0 8px 20px rgba(88, 122, 17, 0.2);
	color: #fff !important;
	cursor: pointer;
	display: inline-flex;
	font-family: "Jost", sans-serif;
	font-size: 15px;
	font-weight: 700;
	justify-content: center;
	letter-spacing: 0.025em;
	line-height: 1.2;
	margin: 0;
	min-height: 50px;
	padding: 14px 22px !important;
	text-align: center;
	text-decoration: none;
	text-transform: none;
	transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
	width: 100%;
}

body.tm-auth-page #customer_login button[type="submit"]:hover {
	background: var(--tm-auth-green-hover) !important;
	border-color: var(--tm-auth-green-hover) !important;
	box-shadow: 0 10px 24px rgba(70, 98, 12, 0.24);
	transform: translateY(-1px);
}

body.tm-auth-page #customer_login .lost_password {
	font-size: 14px;
	margin: -4px 0 0;
	text-align: center;
}

body.tm-auth-page #customer_login a {
	color: #425e0b;
	font-weight: 600;
	text-decoration: underline;
	text-decoration-color: rgba(66, 94, 11, 0.3);
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

body.tm-auth-page #customer_login a:hover {
	color: var(--tm-auth-green-hover);
	text-decoration-color: currentColor;
}

body.tm-auth-page #customer_login .woocommerce-form-register {
	display: grid;
	gap: 0 14px;
	grid-template-columns: minmax(0, 1fr);
}

body.tm-auth-page #customer_login .woocommerce-form-register > * {
	grid-column: 1 / -1;
}

body.tm-auth-page #customer_login :is(.form-row-first, .form-row-last) {
	float: none;
	width: 100%;
}

body.tm-auth-page #customer_login .woocommerce-form-register > p:not(.form-row) {
	color: var(--tm-auth-muted);
	font-size: 13px;
	line-height: 1.55;
}

body.tm-auth-page #customer_login .mailchimp-newsletter {
	background: var(--tm-auth-sage-light);
	border-radius: 12px;
	margin-top: 2px;
	padding: 13px 14px;
}

body.tm-auth-page #customer_login .mailchimp-newsletter label span {
	color: var(--tm-auth-muted);
	font-size: 13px;
	line-height: 1.5;
}

body.tm-auth-page #customer_login .woocommerce-privacy-policy-text {
	border-top: 1px solid var(--tm-auth-border);
	color: var(--tm-auth-muted);
	font-size: 12px;
	line-height: 1.55;
	margin-top: 2px;
	padding-top: 15px;
}

body.tm-auth-page #customer_login .woocommerce-privacy-policy-text p {
	margin-bottom: 14px;
}

.tm-auth-benefits {
	background: var(--tm-auth-sage-light);
	border: 1px solid var(--tm-auth-border);
	border-radius: 20px;
	display: grid;
	gap: 4px;
	order: 3;
	padding: 13px;
}

.tm-auth-benefit {
	align-items: flex-start;
	border-radius: 13px;
	display: grid;
	gap: 12px;
	grid-template-columns: 38px minmax(0, 1fr);
	padding: 10px;
}

.tm-auth-benefit-icon {
	align-items: center;
	background: #fff;
	border: 1px solid rgba(88, 122, 17, 0.14);
	border-radius: 50%;
	color: var(--tm-auth-green);
	display: inline-flex;
	height: 38px;
	justify-content: center;
	width: 38px;
}

.tm-auth-benefit-icon svg {
	fill: none;
	height: 19px;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 1.7;
	width: 19px;
}

.tm-auth-benefit strong,
.tm-auth-benefit small {
	display: block;
}

.tm-auth-benefit strong {
	color: var(--tm-auth-text);
	font-size: 14px;
	line-height: 1.35;
	margin: 1px 0 3px;
}

.tm-auth-benefit small {
	color: var(--tm-auth-muted);
	font-size: 12px;
	line-height: 1.45;
}

.tm-auth-secure {
	align-items: center;
	color: var(--tm-auth-muted);
	display: flex;
	font-size: 12px;
	gap: 8px;
	justify-content: center;
	margin: 0;
	order: 4;
	padding: 3px 0;
}

.tm-auth-secure svg {
	fill: none;
	height: 17px;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 1.7;
	width: 17px;
}

body.tm-auth-page .woocommerce-notices-wrapper:not(:empty) {
	margin: 0 0 20px;
}

body.tm-auth-page .woocommerce-error,
body.tm-auth-page .woocommerce-message,
body.tm-auth-page .woocommerce-info {
	background: #fff9f7;
	border: 1px solid #edd4cd;
	border-radius: 12px;
	color: var(--tm-auth-text);
	font-size: 14px;
	line-height: 1.5;
	margin: 0;
	padding: 14px 16px 14px 42px;
}

.tm-auth-shell :is(a, button, input):focus-visible {
	box-shadow: 0 0 0 4px var(--tm-auth-focus);
	outline: 2px solid var(--tm-auth-green);
	outline-offset: 2px;
}

@media (min-width: 520px) {
	.tm-auth-card {
		padding: 30px;
	}

	body.tm-auth-page #customer_login .woocommerce-form-register {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	body.tm-auth-page #customer_login .woocommerce-form-register > .form-row-first {
		grid-column: 1;
	}

	body.tm-auth-page #customer_login .woocommerce-form-register > .form-row-last {
		grid-column: 2;
	}
}

@media (min-width: 768px) and (max-width: 959px) {
	.tm-auth-shell {
		max-width: 680px;
	}

	.tm-auth-story-heading,
	.tm-auth-benefits {
		padding-inline: 30px;
	}
}

@media (min-width: 960px) {
	.tm-auth-shell {
		background: #fff;
		border: 1px solid var(--tm-auth-border);
		border-radius: 26px;
		box-shadow: 0 26px 80px rgba(45, 49, 52, 0.1);
		display: grid;
		gap: 0;
		grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
		min-height: 620px;
		overflow: hidden;
	}

	.tm-auth-story {
		background:
			radial-gradient(circle at 105% -8%, rgba(203, 168, 122, 0.25), transparent 16rem),
			radial-gradient(circle at -20% 105%, rgba(131, 183, 11, 0.12), transparent 20rem),
			linear-gradient(145deg, var(--tm-auth-sage-light), var(--tm-auth-nude-light));
		display: flex;
		flex-direction: column;
		justify-content: center;
		min-width: 0;
		padding: clamp(38px, 5vw, 62px);
		position: relative;
	}

	.tm-auth-story::after {
		border: 1px solid rgba(88, 122, 17, 0.16);
		border-radius: 50%;
		content: "";
		height: 210px;
		position: absolute;
		right: -128px;
		top: -105px;
		width: 210px;
	}

	.tm-auth-story-heading {
		background: transparent;
		border: 0;
		border-radius: 0;
		order: initial;
		padding: 0;
		position: relative;
		z-index: 1;
	}

	.tm-auth-story-heading h1 {
		font-size: clamp(40px, 4vw, 55px);
		margin-top: 13px;
	}

	.tm-auth-story-heading p {
		font-size: 16px;
	}

	.tm-auth-benefits {
		background: transparent;
		border: 0;
		border-radius: 0;
		gap: 5px;
		margin-top: 31px;
		order: initial;
		padding: 0;
		position: relative;
		z-index: 1;
	}

	.tm-auth-benefit {
		background: rgba(255, 255, 255, 0.48);
		border: 1px solid rgba(255, 255, 255, 0.66);
		padding: 11px;
	}

	.tm-auth-secure {
		justify-content: flex-start;
		margin-top: 25px;
		order: initial;
		position: relative;
		z-index: 1;
	}

	.tm-auth-card {
		align-self: center;
		border: 0;
		border-radius: 0;
		box-shadow: none;
		order: initial;
		padding: clamp(40px, 5vw, 66px);
	}
}

@media (prefers-reduced-motion: reduce) {
	.tm-auth-shell *,
	.tm-auth-shell *::before,
	.tm-auth-shell *::after {
		scroll-behavior: auto !important;
		transition-duration: 0.01ms !important;
	}
}
