/**
 * Property Search - Auth Login widget styles
 *
 * Self-contained port of the static site's auth card (login page).
 * The plugin does not load Bootstrap, so the flex layout, floating
 * labels and form controls are recreated here. Colours are CSS custom
 * properties written by Elementor; values below are the design defaults.
 *
 * @package PropertySearch
 */

.ps-auth-wrapper {
	--ps-auth-wrap-grad-start: #00291d;
	--ps-auth-wrap-grad-mid: #003d2b;
	--ps-auth-wrap-grad-end: #006241;
	--ps-auth-wrap-deco-gold: rgba(255, 204, 0, 0.05);
	--ps-auth-wrap-deco-white: rgba(255, 255, 255, 0.02);
	--ps-auth-card-bg: #ffffff;
	--ps-auth-card-radius: 24px;
	--ps-auth-card-shadow: rgba(0, 0, 0, 0.4);
	--ps-auth-visual-grad-start: rgba(0, 61, 43, 0.9);
	--ps-auth-visual-grad-end: rgba(0, 98, 65, 0.8);
	--ps-auth-visual-image: none;
	--ps-auth-visual-image-opacity: 0.15;
	--ps-auth-visual-heading: #ffffff;
	--ps-auth-visual-subtitle: rgba(255, 255, 255, 0.8);
	--ps-auth-visual-feature: rgba(255, 255, 255, 0.8);
	--ps-auth-visual-feature-icon: #ffcc00;
	--ps-auth-side-bg: #ffffff;
	--ps-auth-logo: #003d2b;
	--ps-auth-logo-icon: #ffcc00;
	--ps-auth-title: #003d2b;
	--ps-auth-subtitle: #999999;
	--ps-auth-input-bg: #ffffff;
	--ps-auth-input-border: #e8ede9;
	--ps-auth-input-text: #212529;
	--ps-auth-label: #999999;
	--ps-auth-label-icon: #6c757d;
	--ps-auth-focus-border: #003d2b;
	--ps-auth-focus-ring: rgba(0, 61, 43, 0.1);
	--ps-auth-accent: #003d2b;
	--ps-auth-forgot-bg: #003d2b;
	--ps-auth-forgot-text: #ffcc00;
	--ps-auth-btn-grad-start: #003d2b;
	--ps-auth-btn-grad-end: #006241;
	--ps-auth-btn-text: #ffffff;
	--ps-auth-btn-shadow: rgba(0, 61, 43, 0.3);
	--ps-auth-divider-line: #e8ede9;
	--ps-auth-divider-text: #bbbbbb;
	--ps-auth-social-border: #e8ede9;
	--ps-auth-social-text: #555555;
	--ps-auth-social-hover-bg: #f0f7f4;
	--ps-auth-social-hover-border: #003d2b;
	--ps-auth-google: #dc3545;
	--ps-auth-facebook: #0d6efd;
	--ps-auth-bottom-text: #6c757d;
	--ps-auth-bottom-link: #003d2b;
	--ps-auth-success-bg: #e8f5e9;
	--ps-auth-success-text: #1b5e20;
	--ps-auth-error-bg: #fdecea;
	--ps-auth-error-text: #b71c1c;

	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
	overflow: hidden;
	padding: 40px 20px;
	background: linear-gradient(
		135deg,
		var(--ps-auth-wrap-grad-start) 0%,
		var(--ps-auth-wrap-grad-mid) 50%,
		var(--ps-auth-wrap-grad-end) 100%
	);
	font-family: inherit;
	line-height: 1.5;
}

.ps-auth-wrapper,
.ps-auth-wrapper * {
	box-sizing: border-box;
}

/* Decorative circles (mirror .auth-wrapper::before / ::after) */
.ps-auth-wrapper::before,
.ps-auth-wrapper::after {
	content: '';
	position: absolute;
	border-radius: 50%;
	pointer-events: none;
}

.ps-auth-wrapper::before {
	top: -150px;
	right: -150px;
	width: 500px;
	height: 500px;
	background: var(--ps-auth-wrap-deco-gold);
}

.ps-auth-wrapper::after {
	bottom: -100px;
	left: -100px;
	width: 400px;
	height: 400px;
	background: var(--ps-auth-wrap-deco-white);
}

/* Card (mirrors .auth-card) */
.ps-auth-card {
	position: relative;
	z-index: 1;
	display: flex;
	width: 100%;
	max-width: 1000px;
	background: var(--ps-auth-card-bg);
	border-radius: var(--ps-auth-card-radius);
	overflow: hidden;
	box-shadow: 0 30px 80px var(--ps-auth-card-shadow);
}

/* ------------------------------------------------------------------ */
/* Visual panel (mirrors .auth-visual)                                 */
/* ------------------------------------------------------------------ */

.ps-auth-visual {
	position: relative;
	flex: 0 0 45%;
	width: 45%;
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 50px;
	color: #ffffff;
	background: linear-gradient(
		135deg,
		var(--ps-auth-visual-grad-start),
		var(--ps-auth-visual-grad-end)
	);
	overflow: hidden;
}

/* Cover image painted over the gradient, muted like the static design */
.ps-auth-visual::before {
	content: '';
	position: absolute;
	inset: 0;
	background-image: var(--ps-auth-visual-image, url('../../images/auth/auth-side.jpg'));
	background-size: cover;
	background-position: center;
	opacity: var(--ps-auth-visual-image-opacity);
	pointer-events: none;
}

.ps-auth-visual-title {
	position: relative;
	z-index: 1;
	color: var(--ps-auth-visual-heading);
	font-size: 2rem;
	font-weight: 700;
	line-height: 1.25;
	margin: 0 0 20px;
}

.ps-auth-visual-subtitle {
	position: relative;
	z-index: 1;
	color: var(--ps-auth-visual-subtitle);
	line-height: 1.8;
	margin: 0 0 1.5rem;
}

.ps-auth-features {
	position: relative;
	z-index: 1;
}

.ps-auth-feature {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 14px;
	color: var(--ps-auth-visual-feature);
}

.ps-auth-feature:last-child {
	margin-bottom: 0;
}

.ps-auth-feature i,
.ps-auth-feature svg {
	flex: 0 0 auto;
	color: var(--ps-auth-visual-feature-icon);
	font-size: 1.1rem;
	width: 1.1em;
	height: 1.1em;
}

/* ------------------------------------------------------------------ */
/* Form side (mirrors .auth-form-side)                                 */
/* ------------------------------------------------------------------ */

.ps-auth-form-side {
	flex: 1 1 auto;
	min-width: 0;
	padding: 50px 45px;
	background: var(--ps-auth-side-bg);
}

/* Brand logo (mirrors .auth-logo) */
.ps-auth-logo {
	display: block;
	margin-bottom: 30px;
	font-size: 1.4rem;
	font-weight: 700;
	color: var(--ps-auth-logo);
	text-decoration: none;
}

.ps-auth-logo i,
.ps-auth-logo svg {
	color: var(--ps-auth-logo-icon);
	margin-right: 8px;
	width: 1em;
	height: 1em;
}

.ps-auth-title {
	font-size: 1.8rem;
	font-weight: 700;
	color: var(--ps-auth-title);
	margin: 0 0 5px;
}

.ps-auth-subtitle {
	color: var(--ps-auth-subtitle);
	margin: 0 0 30px;
}

/* Floating fields (self-contained Bootstrap .form-floating port) */
.ps-form-floating {
	position: relative;
	margin-bottom: 16px;
}

.ps-form-floating > .ps-form-control {
	width: 100%;
	height: 55px;
	padding: 16px;
	font-size: 1rem;
	color: var(--ps-auth-input-text);
	background-color: var(--ps-auth-input-bg);
	border: 2px solid var(--ps-auth-input-border);
	border-radius: 12px;
	outline: none;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ps-form-floating > .ps-form-control::placeholder {
	color: transparent;
}

.ps-form-floating > .ps-form-control:focus {
	border-color: var(--ps-auth-focus-border);
	box-shadow: 0 0 0 3px var(--ps-auth-focus-ring);
}

.ps-form-floating > label {
	position: absolute;
	top: 0;
	left: 0;
	display: flex;
	align-items: center;
	height: 100%;
	padding: 16px;
	color: var(--ps-auth-label);
	font-size: 1rem;
	pointer-events: none;
	transform-origin: 0 0;
	transition: opacity 0.1s ease, transform 0.1s ease;
	white-space: nowrap;
}

/* Masks the input border behind the floated label (Bootstrap trick) */
.ps-form-floating > label::after {
	content: '';
	position: absolute;
	inset: 1rem 0.375rem;
	z-index: -1;
	height: 1.5em;
	background-color: var(--ps-auth-input-bg);
	border-radius: 4px;
}

.ps-form-floating > label i,
.ps-form-floating > label svg {
	margin-right: 8px;
	color: var(--ps-auth-label-icon);
	width: 1em;
	height: 1em;
}

.ps-form-floating > .ps-form-control:focus ~ label,
.ps-form-floating > .ps-form-control:not(:placeholder-shown) ~ label {
	opacity: 0.75;
	transform: scale(0.85) translateY(-0.6rem) translateX(0.15rem);
}

/* Options row (mirrors .d-flex.justify-content-between) */
.ps-auth-options {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 1.5rem;
	flex-wrap: wrap;
}

.ps-form-check {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
	font-size: 0.875rem;
	color: var(--ps-auth-input-text);
}

.ps-form-check-input {
	width: 16px;
	height: 16px;
	margin: 0;
	accent-color: var(--ps-auth-accent);
	cursor: pointer;
}

.ps-form-check-label {
	font-size: 0.875rem;
}

/* Forgot password pill (mirrors .u-45) */
.ps-auth-forgot {
	display: inline-block;
	padding: 4px 12px;
	border-radius: 50px;
	background: var(--ps-auth-forgot-bg);
	color: var(--ps-auth-forgot-text);
	font-size: 0.875rem;
	font-weight: 700;
	text-decoration: none;
	transition: opacity 0.2s ease;
}

.ps-auth-forgot:hover {
	color: var(--ps-auth-forgot-text);
	opacity: 0.92;
}

/* Submit button (mirrors .btn-auth-main) */
.ps-auth-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	padding: 15px;
	border: none;
	border-radius: 12px;
	background: linear-gradient(
		135deg,
		var(--ps-auth-btn-grad-start),
		var(--ps-auth-btn-grad-end)
	);
	color: var(--ps-auth-btn-text);
	font-size: 1.05rem;
	font-weight: 700;
	cursor: pointer;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ps-auth-btn i,
.ps-auth-btn svg {
	width: 1em;
	height: 1em;
}

.ps-auth-btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 25px var(--ps-auth-btn-shadow);
	color: var(--ps-auth-btn-text);
}

.ps-auth-btn:focus-visible {
	outline: 2px solid var(--ps-auth-focus-border);
	outline-offset: 2px;
}

.ps-auth-btn.ps-is-loading,
.ps-auth-btn:disabled {
	cursor: progress;
	opacity: 0.85;
	transform: none;
	box-shadow: none;
}

/* Inline AJAX message (hidden until the JS reveals it) */
.ps-auth-message {
	margin-top: 12px;
	padding: 12px 16px;
	border-radius: 12px;
	font-size: 0.9rem;
	line-height: 1.5;
}

.ps-auth-message[hidden] {
	display: none;
}

.ps-auth-message.ps-is-success {
	background: var(--ps-auth-success-bg);
	color: var(--ps-auth-success-text);
}

.ps-auth-message.ps-is-error {
	background: var(--ps-auth-error-bg);
	color: var(--ps-auth-error-text);
}

/* Divider (mirrors .divider) */
.ps-auth-divider {
	display: flex;
	align-items: center;
	gap: 15px;
	margin: 25px 0;
}

.ps-auth-divider::before,
.ps-auth-divider::after {
	content: '';
	flex: 1 1 auto;
	height: 1px;
	background: var(--ps-auth-divider-line);
}

.ps-auth-divider span {
	color: var(--ps-auth-divider-text);
	font-size: 0.85rem;
}

/* Social login (mirrors .social-login) */
.ps-auth-social {
	display: flex;
	gap: 12px;
}

.ps-auth-social-link {
	flex: 1 1 0;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 12px;
	border: 2px solid var(--ps-auth-social-border);
	border-radius: 12px;
	color: var(--ps-auth-social-text);
	font-weight: 600;
	text-align: center;
	text-decoration: none;
	transition: border-color 0.3s ease, background-color 0.3s ease, color 0.3s ease;
}

.ps-auth-social-link i,
.ps-auth-social-link svg {
	width: 1em;
	height: 1em;
}

.ps-auth-social-link:hover {
	border-color: var(--ps-auth-social-hover-border);
	background: var(--ps-auth-social-hover-bg);
	color: var(--ps-auth-social-text);
}

.ps-auth-social-google i,
.ps-auth-social-google svg {
	color: var(--ps-auth-google);
}

.ps-auth-social-facebook i,
.ps-auth-social-facebook svg {
	color: var(--ps-auth-facebook);
}

/* Bottom register prompt (mirrors .text-center.mt-4.small) */
.ps-auth-bottom {
	margin: 1.5rem 0 0;
	text-align: center;
	font-size: 0.875rem;
	color: var(--ps-auth-bottom-text);
}

.ps-auth-bottom-prefix {
	margin-right: 4px;
}

.ps-auth-bottom-link {
	color: var(--ps-auth-bottom-link);
	font-weight: 700;
	text-decoration: none;
}

.ps-auth-bottom-link:hover {
	color: var(--ps-auth-bottom-link);
	text-decoration: underline;
}

/* ------------------------------------------------------------------ */
/* Responsive: visual panel hidden on tablet/mobile like the static    */
/* .auth-visual @ 991px rule                                            */
/* ------------------------------------------------------------------ */

@media (max-width: 991px) {
	.ps-auth-visual {
		display: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ps-auth-btn,
	.ps-auth-social-link,
	.ps-form-floating > .ps-form-control,
	.ps-form-floating > label {
		transition: none;
	}
}
