/**
 * PhysicalTherapist.com — Auth pages (login / register / lost password)
 * Reddit-inspired layout; brand colors + DM Sans. No third-party UI kits.
 *
 * @package X_Child
 */

/* --------------------------------------------------------------------------
   Page shell — full-viewport centered stage
   -------------------------------------------------------------------------- */
html:has(body.pt-auth-page),
body.pt-auth-page {
	background: #f5f7fa !important;
	min-height: 100% !important;
	height: 100% !important;
}

body.pt-auth-page {
	min-height: 100vh !important;
	min-height: 100dvh !important;
	margin: 0 !important;
	overflow-x: hidden;
}

body.pt-auth-page::before {
	opacity: 0.35;
}

/* Hide site chrome so the card can sit truly centered */
body.pt-auth-page .x-topbar,
body.pt-auth-page .x-navbar,
body.pt-auth-page .x-navbar-wrap,
body.pt-auth-page .x-brand,
body.pt-auth-page header.masthead,
body.pt-auth-page .x-header,
body.pt-auth-page #header,
body.pt-auth-page .x-header-landmark,
body.pt-auth-page .x-colophon,
body.pt-auth-page footer,
body.pt-auth-page .x-btn-widgetbar,
body.pt-auth-page .pt-side-nav,
body.pt-auth-page .pt-side-nav-toggle,
body.pt-auth-page #wpadminbar {
	display: none !important;
}

body.pt-auth-page #top.site,
body.pt-auth-page .site,
body.pt-auth-page .x-main,
body.pt-auth-page .x-container,
body.pt-auth-page .x-container.max,
body.pt-auth-page .x-container.main,
body.pt-auth-page .x-content-sidebar-wrap,
body.pt-auth-page .offset,
body.pt-auth-page .entry-wrap,
body.pt-auth-page .entry-content,
body.pt-auth-page .hentry,
body.pt-auth-page article,
body.pt-auth-page .elementor,
body.pt-auth-page .elementor-section,
body.pt-auth-page .elementor-container,
body.pt-auth-page .elementor-widget-wrap,
body.pt-auth-page .elementor-location-single,
body.pt-auth-page .elementor-location-header,
body.pt-auth-page .elementor-location-footer {
	max-width: none !important;
	width: 100% !important;
	margin: 0 !important;
	padding: 0 !important;
	background: transparent !important;
	border: 0 !important;
	box-shadow: none !important;
	float: none !important;
}

/* Flex chain: every ancestor fills the viewport and centers children */
body.pt-auth-page #top.site,
body.pt-auth-page .site,
body.pt-auth-page .x-container.main,
body.pt-auth-page .offset,
body.pt-auth-page .x-main,
body.pt-auth-page article.hentry,
body.pt-auth-page .entry-wrap,
body.pt-auth-page .entry-content,
body.pt-auth-page .elementor-location-single {
	display: flex !important;
	flex-direction: column !important;
	align-items: center !important;
	justify-content: center !important;
	min-height: 100vh !important;
	min-height: 100dvh !important;
	box-sizing: border-box !important;
}

body.pt-auth-page .entry-header,
body.pt-auth-page .page-title,
body.pt-auth-page .x-header-landmark,
body.pt-auth-page .entry-content > p,
body.pt-auth-page .entry-content > h1,
body.pt-auth-page .entry-content > h2,
body.pt-auth-page .elementor-widget-theme-post-title,
body.pt-auth-page .elementor-widget-heading:not(:has(.pt-auth)),
body.pt-auth-page .elementor-widget-text-editor {
	display: none !important;
}

/* --------------------------------------------------------------------------
   Card — viewport-centered on all auth page templates
   -------------------------------------------------------------------------- */
body.pt-auth-page .tml,
body.pt-auth-page .theme-my-login,
body.pt-auth-page .pt-auth.tml,
.pt-auth.tml {
	position: fixed !important;
	top: 50% !important;
	left: 50% !important;
	transform: translate(-50%, -50%) !important;
	z-index: 1000;
	width: calc(100% - 2rem);
	max-width: 480px;
	max-height: calc(100vh - 2rem);
	max-height: calc(100dvh - 2rem);
	margin: 0 !important;
	padding: 2rem 1.75rem 1.75rem !important;
	background: #ffffff !important;
	border: 1px solid #e8edf2 !important;
	border-radius: 16px !important;
	box-shadow:
		0 1px 2px rgba(26, 35, 50, 0.04),
		0 16px 40px rgba(26, 35, 50, 0.08) !important;
	box-sizing: border-box;
	font-family: var(--pt-font, "DM Sans", "Segoe UI", system-ui, sans-serif);
	color: var(--pt-ink, #1a2332);
	overflow-x: hidden;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}

/* Keep page background filling the screen behind the fixed card */
body.pt-auth-page #top.site,
body.pt-auth-page .site {
	min-height: 100vh !important;
	min-height: 100dvh !important;
	background: transparent !important;
}

.pt-auth__close {
	position: absolute;
	top: 0.85rem;
	right: 0.85rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2rem;
	height: 2rem;
	border-radius: 999px;
	background: #edeff1;
	color: #1a2332 !important;
	font-size: 1.35rem;
	line-height: 1;
	text-decoration: none !important;
	transition: background 0.18s var(--pt-ease, ease), transform 0.18s var(--pt-ease, ease);
}

.pt-auth__close:hover,
.pt-auth__close:focus-visible {
	background: #e2e5e9;
	transform: scale(1.04);
	outline: none;
}

.pt-auth__header {
	text-align: center;
	margin-bottom: 1.35rem;
}

.pt-auth__logo {
	display: inline-flex;
	margin: 0 auto 1rem;
	max-width: 180px;
}

.pt-auth__logo img {
	display: block;
	width: auto;
	max-width: 100%;
	height: auto;
	max-height: 48px;
	object-fit: contain;
}

.pt-auth__title {
	margin: 0 0 0.55rem !important;
	font-size: clamp(1.45rem, 2.5vw, 1.7rem) !important;
	font-weight: 700 !important;
	letter-spacing: -0.02em;
	color: #1a2332 !important;
	font-family: inherit !important;
	line-height: 1.25 !important;
}

.pt-auth__legal {
	margin: 0 auto;
	max-width: 26rem;
	font-size: 0.8125rem;
	line-height: 1.45;
	color: #7a8699;
}

.pt-auth__legal a,
.pt-auth__link {
	color: var(--pt-blue, #0066a1) !important;
	text-decoration: none !important;
	font-weight: 500;
}

.pt-auth__legal a:hover,
.pt-auth__link:hover {
	color: var(--pt-blue-hover, #005286) !important;
	text-decoration: underline !important;
}

/* --------------------------------------------------------------------------
   Social
   -------------------------------------------------------------------------- */
.pt-auth__social {
	display: flex;
	flex-direction: column;
	gap: 0.65rem;
	margin-bottom: 1rem;
}

.pt-auth__social .nsl-container,
.pt-auth__social .nsl-container-buttons,
.pt-auth__social .nsl-container-buttons a,
.pt-auth__social .nsl-button {
	width: 100% !important;
	max-width: 100% !important;
	margin: 0 !important;
}

.pt-auth__social .nsl-container {
	padding: 0 !important;
}

.pt-auth__social .nsl-button {
	border-radius: 999px !important;
	min-height: 2.75rem !important;
	border: 1px solid #dadce0 !important;
	box-shadow: none !important;
	font-family: inherit !important;
	font-weight: 600 !important;
	transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease !important;
}

.pt-auth__social .nsl-button:hover {
	background: #f8f9fa !important;
	transform: translateY(-1px);
}

.pt-auth__google {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.65rem;
	width: 100%;
	min-height: 2.75rem;
	padding: 0.65rem 1rem;
	border: 1px solid #dadce0;
	border-radius: 999px;
	background: #fff;
	color: #1a2332 !important;
	font-family: inherit;
	font-size: 0.9375rem;
	font-weight: 600;
	text-decoration: none !important;
	cursor: pointer;
	transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
	box-sizing: border-box;
}

.pt-auth__google:hover:not([aria-disabled="true"]),
.pt-auth__google:focus-visible:not([aria-disabled="true"]) {
	background: #f8f9fa;
	border-color: #c9ced4;
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(26, 35, 50, 0.06);
	outline: none;
}

.pt-auth__google[aria-disabled="true"] {
	opacity: 0.72;
	cursor: not-allowed;
}

.pt-auth__google-icon {
	flex: 0 0 auto;
	width: 18px;
	height: 18px;
}

.pt-auth__google-note {
	margin: 0.15rem 0 0;
	font-size: 0.75rem;
	line-height: 1.35;
	color: #7a8699;
	text-align: center;
}

/* --------------------------------------------------------------------------
   Divider
   -------------------------------------------------------------------------- */
.pt-auth__divider {
	display: flex;
	align-items: center;
	gap: 0.85rem;
	margin: 0.35rem 0 1.15rem;
	color: #9aa3b2;
	font-size: 0.7rem;
	font-weight: 600;
	letter-spacing: 0.08em;
}

.pt-auth__divider::before,
.pt-auth__divider::after {
	content: "";
	flex: 1;
	height: 1px;
	background: #e3e8ef;
}

/* --------------------------------------------------------------------------
   Fields (floating labels)
   -------------------------------------------------------------------------- */
.pt-auth__form {
	display: flex;
	flex-direction: column;
	gap: 0.85rem;
}

.pt-auth__field {
	position: relative;
	margin: 0 !important;
}

.pt-auth .pt-auth__input,
.pt-auth input.input,
.pt-auth input[type="text"],
.pt-auth input[type="email"],
.pt-auth input[type="password"] {
	width: 100% !important;
	max-width: 100% !important;
	height: 3.25rem !important;
	margin: 0 !important;
	padding: 1.15rem 0.95rem 0.45rem !important;
	border: 1px solid transparent !important;
	border-radius: 14px !important;
	background: #edeff1 !important;
	color: #1a2332 !important;
	font-family: inherit !important;
	font-size: 0.975rem !important;
	line-height: 1.3 !important;
	box-shadow: none !important;
	outline: none !important;
	transition: background 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease !important;
	box-sizing: border-box !important;
}

.pt-auth__field--password .pt-auth__input,
.pt-auth__field--password input {
	padding-right: 2.85rem !important;
}

.pt-auth__label {
	position: absolute;
	left: 0.95rem;
	top: 50%;
	transform: translateY(-50%);
	margin: 0 !important;
	padding: 0;
	font-size: 0.975rem;
	font-weight: 500;
	color: #7a8699;
	pointer-events: none;
	transition: top 0.16s ease, transform 0.16s ease, font-size 0.16s ease, color 0.16s ease;
	background: transparent;
}

.pt-auth__req {
	color: #c53030;
	margin-left: 0.1rem;
}

.pt-auth__input:focus,
.pt-auth input.input:focus,
.pt-auth__field.is-filled .pt-auth__input,
.pt-auth__field.is-filled input.input,
.pt-auth__field:focus-within .pt-auth__input {
	background: #fff !important;
	border-color: var(--pt-blue, #0066a1) !important;
	box-shadow: 0 0 0 3px rgba(0, 102, 161, 0.14) !important;
}

.pt-auth__input:focus + .pt-auth__label,
.pt-auth__input:not(:placeholder-shown) + .pt-auth__label,
.pt-auth__field.is-filled .pt-auth__label,
.pt-auth__field:focus-within .pt-auth__label,
.pt-auth__field.is-enhanced.is-filled label,
.pt-auth__field.is-enhanced:focus-within label {
	top: 0.42rem;
	transform: none;
	font-size: 0.7rem;
	font-weight: 600;
	color: var(--pt-blue, #0066a1);
}

.pt-auth__field.is-invalid .pt-auth__input,
.pt-auth__field.is-invalid input {
	border-color: #e53e3e !important;
	box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.12) !important;
}

.pt-auth__toggle-pass {
	position: absolute;
	top: 50%;
	right: 0.45rem;
	transform: translateY(-50%);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.25rem;
	height: 2.25rem;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: #7a8699;
	cursor: pointer;
	transition: color 0.15s ease, background 0.15s ease;
}

.pt-auth__toggle-pass:hover,
.pt-auth__toggle-pass:focus-visible {
	color: var(--pt-blue, #0066a1);
	background: rgba(0, 102, 161, 0.08);
	outline: none;
}

.pt-auth__eye--hide {
	display: none;
}

.pt-auth__toggle-pass[aria-pressed="true"] .pt-auth__eye--show {
	display: none;
}

.pt-auth__toggle-pass[aria-pressed="true"] .pt-auth__eye--hide {
	display: block;
}

/* Custom-passwords module fields → same floating look */
.pt-auth .tml-user-pass1-wrap,
.pt-auth .tml-user-pass2-wrap {
	position: relative;
	margin: 0 !important;
}

.pt-auth .tml-user-pass1-wrap label,
.pt-auth .tml-user-pass2-wrap label {
	position: absolute;
	left: 0.95rem;
	top: 50%;
	transform: translateY(-50%);
	margin: 0 !important;
	font-size: 0.975rem;
	font-weight: 500;
	color: #7a8699;
	pointer-events: none;
	transition: top 0.16s ease, transform 0.16s ease, font-size 0.16s ease, color 0.16s ease;
}

.pt-auth .tml-user-pass1-wrap.is-filled label,
.pt-auth .tml-user-pass1-wrap:focus-within label,
.pt-auth .tml-user-pass2-wrap.is-filled label,
.pt-auth .tml-user-pass2-wrap:focus-within label {
	top: 0.42rem;
	transform: none;
	font-size: 0.7rem;
	font-weight: 600;
	color: var(--pt-blue, #0066a1);
}

/* --------------------------------------------------------------------------
   Strength meter
   -------------------------------------------------------------------------- */
.pt-auth__strength {
	margin: -0.25rem 0 0.15rem;
}

.pt-auth__strength-bar {
	display: flex;
	gap: 0.35rem;
	height: 4px;
}

.pt-auth__strength-seg {
	flex: 1;
	border-radius: 999px;
	background: #e2e8f0;
	transition: background 0.2s ease;
}

.pt-auth__strength[data-score="1"] .pt-auth__strength-seg:nth-child(1) {
	background: #e53e3e;
}

.pt-auth__strength[data-score="2"] .pt-auth__strength-seg:nth-child(-n+2) {
	background: #dd6b20;
}

.pt-auth__strength[data-score="3"] .pt-auth__strength-seg:nth-child(-n+3) {
	background: #d69e2e;
}

.pt-auth__strength[data-score="4"] .pt-auth__strength-seg {
	background: #38a169;
}

.pt-auth__strength-label {
	margin: 0.35rem 0 0;
	font-size: 0.75rem;
	color: #7a8699;
	min-height: 1em;
}

/* --------------------------------------------------------------------------
   Row / checks / actions
   -------------------------------------------------------------------------- */
.pt-auth__row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	flex-wrap: wrap;
	margin: 0.15rem 0 0.25rem;
}

.pt-auth__check {
	display: inline-flex;
	align-items: flex-start;
	gap: 0.55rem;
	margin: 0.15rem 0 0 !important;
	font-size: 0.875rem;
	color: #4a5568;
	cursor: pointer;
	line-height: 1.4;
}

.pt-auth__check input {
	width: 1.05rem !important;
	height: 1.05rem !important;
	margin: 0.15rem 0 0 !important;
	padding: 0 !important;
	accent-color: var(--pt-blue, #0066a1);
	flex: 0 0 auto;
	border-radius: 4px !important;
	background: #fff !important;
	border: 1px solid #cbd5e1 !important;
	box-shadow: none !important;
}

.pt-auth__check a {
	color: var(--pt-blue, #0066a1) !important;
}

.pt-auth__submit-wrap {
	margin: 0.65rem 0 0 !important;
}

.pt-auth__btn,
.pt-auth input[type="submit"],
.pt-auth button[type="submit"] {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	width: 100% !important;
	min-height: 3rem !important;
	padding: 0.75rem 1.25rem !important;
	border: 0 !important;
	border-radius: 999px !important;
	background: var(--pt-blue, #0066a1) !important;
	color: #fff !important;
	font-family: inherit !important;
	font-size: 1rem !important;
	font-weight: 700 !important;
	letter-spacing: 0.01em;
	cursor: pointer;
	box-shadow: none !important;
	transition: background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease !important;
}

.pt-auth__btn:hover,
.pt-auth__btn:focus-visible,
.pt-auth button[type="submit"]:hover,
.pt-auth button[type="submit"]:focus-visible {
	background: var(--pt-blue-hover, #005286) !important;
	transform: translateY(-1px);
	box-shadow: 0 8px 20px rgba(0, 102, 161, 0.22) !important;
	outline: none;
}

.pt-auth__btn:disabled,
.pt-auth__btn.is-disabled {
	background: #c5ccd6 !important;
	color: #fff !important;
	cursor: not-allowed;
	transform: none !important;
	box-shadow: none !important;
}

.pt-auth__switch {
	margin: 1.15rem 0 0 !important;
	text-align: center;
	font-size: 0.9rem;
	color: #4a5568;
}

.pt-auth__hint,
.pt-auth .tml-registration-confirmation {
	margin: 0 !important;
	font-size: 0.8rem;
	color: #7a8699;
	line-height: 1.4;
}

.pt-auth .tml-registration-confirmation:empty {
	display: none;
}

/* Hide default TML action links — we render our own switch row */
.pt-auth .tml-action-links {
	display: none !important;
}

.pt-auth .message,
.pt-auth .error,
.pt-auth #login_error,
.pt-auth .tml-error {
	margin: 0 0 0.85rem !important;
	padding: 0.75rem 0.9rem !important;
	border-radius: 12px !important;
	border: 1px solid transparent !important;
	font-size: 0.875rem !important;
	line-height: 1.45;
}

.pt-auth .error,
.pt-auth #login_error,
.pt-auth .tml-error {
	background: #fff5f5 !important;
	border-color: #feb2b2 !important;
	color: #9b2c2c !important;
}

.pt-auth .message {
	background: #ebf8ff !important;
	border-color: #90cdf4 !important;
	color: #2c5282 !important;
}

/* Hide leftover labels from module markup we restyle */
.pt-auth p.tml-rememberme-wrap,
.pt-auth .tml-rememberme-submit-wrap {
	margin: 0;
}

@media (max-width: 480px) {
	.pt-auth.tml {
		padding: 1.65rem 1.15rem 1.35rem !important;
		border-radius: 14px !important;
	}

	.pt-auth__row {
		flex-direction: column;
		align-items: flex-start;
	}
}

@media (prefers-reduced-motion: reduce) {
	.pt-auth *,
	.pt-auth *::before,
	.pt-auth *::after {
		transition: none !important;
		animation: none !important;
	}
}
