/* ==========================================================================
   Modern Mobile-Responsive Authentication Theme (Sign In & Register)
   Author: Antigravity AI
   Version: 2.0.0
   ========================================================================== */

:root {
	--ml-auth-primary: #c59d5f;
	--ml-auth-primary-hover: #b38a4d;
	--ml-auth-primary-rgb: 197, 157, 95;
	--ml-auth-dark: #12141d;
	--ml-auth-dark-card: #ffffff;
	--ml-auth-text-main: #1e293b;
	--ml-auth-text-muted: #64748b;
	--ml-auth-border: #e2e8f0;
	--ml-auth-border-focus: #c59d5f;
	--ml-auth-bg-subtle: #f8fafc;
	--ml-auth-radius: 12px;
	--ml-auth-shadow: 0 16px 40px -8px rgba(15, 23, 42, 0.08), 0 4px 12px -2px rgba(15, 23, 42, 0.04);
	--ml-auth-transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Wrapper */
.ml-auth-page-wrapper {
	min-height: calc(100vh - 140px);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 30px 16px 90px 16px; /* Extra bottom padding for mobile bottom nav */
	background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	box-sizing: border-box;
}

/* Card Container */
.ml-auth-card {
	width: 100%;
	max-width: 440px;
	background: #ffffff;
	border-radius: 18px;
	box-shadow: var(--ml-auth-shadow);
	border: 1px solid rgba(226, 232, 240, 0.8);
	padding: 32px 28px;
	position: relative;
	overflow: hidden;
	box-sizing: border-box;
	transition: var(--ml-auth-transition);
}

.ml-auth-card::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 4px;
	background: linear-gradient(90deg, #c59d5f 0%, #dfb775 50%, #c59d5f 100%);
}

/* Card Header */
.ml-auth-card-header {
	text-align: center;
	margin-bottom: 24px;
}

.ml-auth-logo-badge {
	width: 52px;
	height: 52px;
	margin: 0 auto 14px auto;
	background: linear-gradient(135deg, #12141d 0%, #1e2230 100%);
	color: #c59d5f;
	border-radius: 14px;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 8px 20px -4px rgba(18, 20, 29, 0.2);
}

.ml-auth-title {
	font-size: 22px;
	font-weight: 700;
	color: var(--ml-auth-text-main);
	margin: 0 0 6px 0;
	letter-spacing: -0.02em;
}

.ml-auth-subtitle {
	font-size: 13.5px;
	color: var(--ml-auth-text-muted);
	margin: 0;
	line-height: 1.5;
}

/* Segmented Pill Tabs */
.ml-auth-tabs-container {
	display: flex;
	background: #f1f5f9;
	padding: 5px;
	border-radius: 14px;
	margin-bottom: 24px;
	position: relative;
	gap: 6px;
}

.ml-auth-tab-btn {
	flex: 1;
	padding: 11px 18px;
	font-size: 14px;
	font-weight: 600;
	color: var(--ml-auth-text-muted);
	background: transparent;
	border: none;
	border-radius: 10px;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	transition: var(--ml-auth-transition);
	outline: none;
	-webkit-tap-highlight-color: transparent;
}

.ml-auth-tab-btn:hover {
	color: var(--ml-auth-text-main);
}

.ml-auth-tab-btn.active {
	background: #ffffff;
	color: var(--ml-auth-text-main);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
}

.ml-auth-tab-btn svg {
	stroke: currentColor;
}

/* Panels & Form Visibility */
.ml-auth-form-panel {
	display: none !important;
}

.ml-auth-form-panel.active {
	display: block !important;
	visibility: visible !important;
	opacity: 1 !important;
	animation: mlAuthFadeIn 0.25s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.ml-auth-form-panel.active form,
.ml-auth-form-panel.active .ml-modern-auth-form,
.ml-auth-form-panel.active .ml-auth-submit-wrap {
	display: block !important;
	visibility: visible !important;
	opacity: 1 !important;
}

@keyframes mlAuthFadeIn {
	from {
		opacity: 0;
		transform: translateY(4px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Form Groups & Inputs */
.ml-modern-auth-form {
	margin: 0;
	padding: 0;
}

.ml-auth-fields-group {
	display: flex !important;
	flex-direction: column !important;
	gap: 20px !important;
	margin-bottom: 20px !important;
}

.ml-input-field-wrap {
	display: flex !important;
	flex-direction: column !important;
	gap: 8px !important;
	margin-bottom: 4px !important;
	width: 100% !important;
}

.ml-field-header-row {
	display: flex !important;
	justify-content: space-between !important;
	align-items: center !important;
	margin-bottom: 2px !important;
}

.ml-field-label {
	display: inline-flex !important;
	align-items: center !important;
	gap: 6px !important;
	font-size: 13px !important;
	font-weight: 600 !important;
	color: #334155 !important;
	margin: 0 0 2px 0 !important;
}

.ml-field-icon {
	stroke: #64748b;
}

.ml-required-mark {
	color: #ef4444;
	font-weight: 700;
}

.ml-forgot-link {
	font-size: 12.5px;
	font-weight: 600;
	color: #c59d5f;
	text-decoration: none;
	transition: var(--ml-auth-transition);
}

.ml-forgot-link:hover {
	color: #a67c3b;
	text-decoration: underline;
}

/* Text Inputs */
.ml-input-control-box {
	position: relative;
	width: 100%;
}

.ml-text-input,
.ml-modern-auth-form input[type="text"],
.ml-modern-auth-form input[type="email"],
.ml-modern-auth-form input[type="password"],
.ml-modern-auth-form input[type="tel"] {
	width: 100% !important;
	height: 46px !important;
	padding: 0 14px !important;
	font-size: 14px !important;
	color: #0f172a !important;
	background-color: #f8fafc !important;
	border: 1.5px solid #e2e8f0 !important;
	border-radius: 10px !important;
	transition: var(--ml-auth-transition) !important;
	outline: none !important;
	box-sizing: border-box !important;
	font-family: inherit !important;
	font-weight: 500 !important;
}

.ml-text-input::placeholder,
.ml-modern-auth-form input::placeholder {
	color: #94a3b8 !important;
	opacity: 1 !important;
	font-weight: 400 !important;
	-webkit-text-fill-color: #94a3b8 !important;
}

.ml-text-input::-webkit-input-placeholder,
.ml-modern-auth-form input::-webkit-input-placeholder {
	color: #94a3b8 !important;
	opacity: 1 !important;
	font-weight: 400 !important;
	-webkit-text-fill-color: #94a3b8 !important;
}

.ml-text-input::-moz-placeholder,
.ml-modern-auth-form input::-moz-placeholder {
	color: #94a3b8 !important;
	opacity: 1 !important;
	font-weight: 400 !important;
}

.ml-text-input:focus,
.ml-modern-auth-form input[type="text"]:focus,
.ml-modern-auth-form input[type="email"]:focus,
.ml-modern-auth-form input[type="password"]:focus,
.ml-modern-auth-form input[type="tel"]:focus {
	background-color: #ffffff !important;
	border-color: #c59d5f !important;
	box-shadow: 0 0 0 3.5px rgba(197, 157, 95, 0.16) !important;
}

.ml-input-control-box.with-toggle .ml-text-input {
	padding-right: 44px !important;
}

.ml-pwd-toggle-btn {
	position: absolute;
	right: 4px;
	top: 50%;
	transform: translateY(-50%);
	width: 38px;
	height: 38px;
	background: transparent;
	border: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #94a3b8;
	border-radius: 8px;
	transition: var(--ml-auth-transition);
	outline: none;
}

.ml-pwd-toggle-btn:hover {
	color: var(--ml-auth-text-main);
	background: #f1f5f9;
}

/* Custom Checkbox */
.ml-auth-meta-row {
	display: flex !important;
	align-items: center !important;
	justify-content: space-between !important;
	margin-top: 8px !important;
	margin-bottom: 24px !important;
}

.ml-custom-checkbox-wrap {
	display: inline-flex !important;
	align-items: center !important;
	gap: 8px !important;
	cursor: pointer !important;
	user-select: none !important;
	font-size: 13px !important;
	color: #475569 !important;
	margin: 0 !important;
}

.ml-custom-checkbox-wrap input {
	display: none !important;
}

.ml-checkbox-box {
	width: 18px !important;
	height: 18px !important;
	border: 1.5px solid #cbd5e1 !important;
	border-radius: 5px !important;
	background: #ffffff !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	transition: var(--ml-auth-transition) !important;
}

.ml-custom-checkbox-wrap input:checked + .ml-checkbox-box {
	background: #c59d5f !important;
	border-color: #c59d5f !important;
}

.ml-custom-checkbox-wrap input:checked + .ml-checkbox-box::after {
	content: "" !important;
	width: 5px !important;
	height: 9px !important;
	border: solid #ffffff !important;
	border-width: 0 2px 2px 0 !important;
	transform: rotate(45deg) translate(-1px, -1px) !important;
}

/* Submit Buttons */
.ml-auth-submit-wrap {
	margin-top: 8px !important;
	margin-bottom: 14px !important;
}

.ml-primary-btn {
	width: 100% !important;
	height: 48px !important;
	background: linear-gradient(135deg, #c59d5f 0%, #a67c3b 100%) !important;
	color: #ffffff !important;
	font-size: 15px !important;
	font-weight: 600 !important;
	border: none !important;
	border-radius: 10px !important;
	cursor: pointer !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	gap: 10px !important;
	box-shadow: 0 6px 18px -2px rgba(197, 157, 95, 0.35) !important;
	transition: var(--ml-auth-transition) !important;
	outline: none !important;
	letter-spacing: 0.01em !important;
	text-decoration: none !important;
}

.ml-primary-btn:hover {
	background: linear-gradient(135deg, #d4ac6e 0%, #b38744 100%) !important;
	box-shadow: 0 8px 22px -2px rgba(197, 157, 95, 0.45) !important;
	transform: translateY(-1px) !important;
	color: #ffffff !important;
}

.ml-primary-btn:active {
	transform: translateY(1px) !important;
	box-shadow: 0 2px 8px rgba(197, 157, 95, 0.25) !important;
}

.ml-primary-btn.register-btn {
	background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%) !important;
	box-shadow: 0 6px 18px -2px rgba(15, 23, 42, 0.3) !important;
}

.ml-primary-btn.register-btn:hover {
	background: linear-gradient(135deg, #334155 0%, #1e293b 100%) !important;
	box-shadow: 0 8px 22px -2px rgba(15, 23, 42, 0.4) !important;
}

/* Privacy Note */
.ml-privacy-policy-note {
	margin-top: 14px;
	font-size: 12px;
	color: #64748b;
	line-height: 1.5;
	text-align: center;
}

.ml-privacy-policy-note a {
	color: #c59d5f;
	text-decoration: none;
	font-weight: 500;
}

.ml-privacy-policy-note a:hover {
	text-decoration: underline;
}

/* Card Footer */
.ml-auth-card-footer {
	margin-top: 24px;
	padding-top: 18px;
	border-top: 1px solid #f1f5f9;
	text-align: center;
}

.ml-auth-security-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 11.5px;
	color: #94a3b8;
	margin: 0;
}

.ml-auth-security-badge svg {
	stroke: #10b981;
}

/* Notices / Alerts Styling Fix */
.ml-auth-notices {
	margin-bottom: 20px !important;
	width: 100% !important;
}

.ml-auth-notices .woocommerce-error,
.ml-auth-notices .woocommerce-message,
.ml-auth-notices .woocommerce-info,
.ml-notice-banner {
	position: relative !important;
	padding: 12px 16px 12px 42px !important;
	border-radius: 10px !important;
	font-size: 13.5px !important;
	margin: 0 0 18px 0 !important;
	line-height: 1.5 !important;
	list-style: none !important;
	box-sizing: border-box !important;
	display: block !important;
	text-align: left !important;
	overflow: hidden !important;
}

.ml-auth-notices .woocommerce-error li,
.ml-auth-notices .woocommerce-message li,
.ml-auth-notices .woocommerce-info li {
	margin: 0 !important;
	padding: 0 !important;
	list-style: none !important;
	display: block !important;
	font-size: 13.5px !important;
	line-height: 1.5 !important;
}

.ml-auth-notices .woocommerce-error strong,
.ml-auth-notices .woocommerce-message strong,
.ml-auth-notices .woocommerce-info strong {
	font-weight: 700 !important;
}

/* Clear icon positioning - prevents icon overlapping text */
.ml-auth-notices .woocommerce-error::before,
.ml-auth-notices .woocommerce-message::before,
.ml-auth-notices .woocommerce-info::before {
	position: absolute !important;
	left: 14px !important;
	top: 13px !important;
	transform: none !important;
	margin: 0 !important;
	padding: 0 !important;
	width: 18px !important;
	height: 18px !important;
	line-height: 18px !important;
	font-size: 14px !important;
	font-family: inherit !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	z-index: 2 !important;
}

/* Prevent double icons on inner li elements */
.ml-auth-notices .woocommerce-error li::before,
.ml-auth-notices .woocommerce-message li::before,
.ml-auth-notices .woocommerce-info li::before {
	display: none !important;
	content: none !important;
}

.ml-auth-notices .woocommerce-error,
.ml-notice-banner.warning {
	background: #fef2f2 !important;
	color: #991b1b !important;
	border: 1px solid #fecaca !important;
}

.ml-auth-notices .woocommerce-error::before {
	content: "⚠️" !important;
}

.ml-auth-notices .woocommerce-message {
	background: #f0fdf4 !important;
	color: #166534 !important;
	border: 1px solid #bbf7d0 !important;
}

.ml-auth-notices .woocommerce-message::before {
	content: "✓" !important;
	color: #166534 !important;
	font-weight: 700 !important;
}

.ml-auth-notices .woocommerce-info {
	background: #eff6ff !important;
	color: #1e40af !important;
	border: 1px solid #bfdbfe !important;
}

.ml-auth-notices .woocommerce-info::before {
	content: "ℹ️" !important;
}

/* ==========================================================================
   XOOTIX / MOBILE OTP LOGIN PLUGIN STYLING OVERRIDES
   ========================================================================== */

.xoo-ml-phinput-cont,
.xoo-ml-phone-login-cont {
	margin: 0 0 16px 0 !important;
	padding: 0 !important;
	border: none !important;
	width: 100% !important;
}

.xoo-ml-phinput-cont > label,
.xoo-ml-phone-login-cont > label {
	display: block !important;
	font-size: 13px !important;
	font-weight: 600 !important;
	color: #334155 !important;
	margin-bottom: 6px !important;
}

/* Country code + Phone input row */
.xoo-ml-has-cc {
	display: flex !important;
	align-items: stretch !important;
	gap: 8px !important;
	width: 100% !important;
}

.xoo-ml-phone-cc {
	width: 110px !important;
	min-width: 100px !important;
	max-width: 120px !important;
	height: 46px !important;
	padding: 0 10px !important;
	background-color: #f8fafc !important;
	border: 1.5px solid #e2e8f0 !important;
	border-radius: 10px !important;
	font-size: 13.5px !important;
	font-weight: 600 !important;
	color: #1e293b !important;
	outline: none !important;
	cursor: pointer !important;
	appearance: auto !important;
}

.xoo-ml-phone-cc:focus {
	border-color: #c59d5f !important;
	background-color: #ffffff !important;
	box-shadow: 0 0 0 3px rgba(197, 157, 95, 0.15) !important;
}

.xoo-ml-regphin,
.xoo-ml-loginphin {
	flex: 1 !important;
	position: relative !important;
	width: auto !important;
}

.xoo-ml-phone-input {
	width: 100% !important;
	height: 46px !important;
	padding: 0 14px !important;
	background-color: #f8fafc !important;
	border: 1.5px solid #e2e8f0 !important;
	border-radius: 10px !important;
	font-size: 14px !important;
	font-weight: 500 !important;
	outline: none !important;
	box-sizing: border-box !important;
}

.xoo-ml-phone-input:focus {
	background-color: #ffffff !important;
	border-color: #c59d5f !important;
	box-shadow: 0 0 0 3px rgba(197, 157, 95, 0.15) !important;
}

.xoo-ml-reg-phone-change {
	position: absolute !important;
	right: 12px !important;
	top: 50% !important;
	transform: translateY(-50%) !important;
	font-size: 12px !important;
	font-weight: 600 !important;
	color: #c59d5f !important;
	cursor: pointer !important;
}

/* Centered "Or" Divider */
.xoo-ml-or-divider-wrap,
.xoo-ml-or,
span.xoo-ml-or {
	display: flex !important;
	align-items: center !important;
	text-align: center !important;
	justify-content: center !important;
	color: #94a3b8 !important;
	font-size: 13px !important;
	font-weight: 600 !important;
	text-transform: uppercase !important;
	letter-spacing: 0.08em !important;
	margin: 22px 0 18px 0 !important;
	width: 100% !important;
}

.xoo-ml-or::before,
.xoo-ml-or::after,
span.xoo-ml-or::before,
span.xoo-ml-or::after {
	content: "" !important;
	flex: 1 !important;
	border-bottom: 1px solid #e2e8f0 !important;
}

.xoo-ml-or:not(:empty)::before,
span.xoo-ml-or:not(:empty)::before {
	margin-right: 14px !important;
}

.xoo-ml-or:not(:empty)::after,
span.xoo-ml-or:not(:empty)::after {
	margin-left: 14px !important;
}

/* Hide redundant OTP header button & bottom Email/Password switch button */
.xoo-ml-open-lwo-btn,
.xoo-ml-low-back,
.xoo-ml-lwo-form-placeholder > .xoo-ml-or,
.xoo-ml-lwo-form-placeholder > span.xoo-ml-or {
	display: none !important;
}

.xoo-ml-lwo-form-placeholder {
	display: block !important;
}

/* Xootix Action Buttons */
.xoo-ml-login-otp-btn,
.xoo-ml-btn,
button.xoo-ml-btn {
	width: 100% !important;
	height: 46px !important;
	border-radius: 10px !important;
	font-size: 14px !important;
	font-weight: 600 !important;
	cursor: pointer !important;
	margin: 8px 0 !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	gap: 8px !important;
	transition: var(--ml-auth-transition) !important;
	border: none !important;
	outline: none !important;
}

.xoo-ml-login-otp-btn {
	background: linear-gradient(135deg, #c59d5f 0%, #a67c3b 100%) !important;
	color: #ffffff !important;
	box-shadow: 0 4px 14px rgba(197, 157, 95, 0.3) !important;
}

.xoo-ml-login-otp-btn:hover {
	background: linear-gradient(135deg, #d4ac6e 0%, #b38744 100%) !important;
	box-shadow: 0 6px 18px rgba(197, 157, 95, 0.4) !important;
}

.xoo-ml-otpbox {
	background: #ffffff !important;
	border: 1.5px solid #e2e8f0 !important;
	border-radius: 10px !important;
	padding: 18px !important;
	margin-top: 14px !important;
}

.xoo-ml-otp-input {
	height: 48px !important;
	font-size: 20px !important;
	letter-spacing: 6px !important;
	text-align: center !important;
	border: 1.5px solid #c59d5f !important;
	border-radius: 10px !important;
	font-weight: 700 !important;
}

/* Clean up MyListing overrides */
.woocommerce-account .sign-in-wrapper,
.woocommerce-account .login-container {
	width: 100% !important;
	background: transparent !important;
	min-height: auto !important;
	padding: 0 !important;
}

.woocommerce-account .login-content {
	width: 100% !important;
}

.woocommerce-account .login-bg-container {
	display: none !important;
}

/* ==========================================================================
   MOBILE RESPONSIVENESS
   ========================================================================== */

@media screen and (max-width: 480px) {
	.ml-auth-page-wrapper {
		padding: 16px 12px 100px 12px;
	}

	.ml-auth-card {
		padding: 24px 18px;
		border-radius: 16px;
	}

	.ml-auth-title {
		font-size: 20px;
	}

	.ml-auth-subtitle {
		font-size: 12.5px;
	}

	.ml-auth-tab-btn {
		padding: 9px 12px;
		font-size: 13.5px;
	}

	.ml-text-input,
	.ml-primary-btn {
		height: 46px !important;
	}

	.xoo-ml-phone-cc {
		width: 95px !important;
		min-width: 90px !important;
		font-size: 12.5px !important;
	}
}

@media screen and (max-width: 360px) {
	.ml-auth-card {
		padding: 20px 14px;
	}

	.ml-auth-tab-btn {
		font-size: 12.5px;
		padding: 8px 6px;
	}

	.ml-auth-title {
		font-size: 18px;
	}
}
