/**
 * Property Search - Auth Forgot Password widget styles
 *
 * Self-contained port of the static site's forgot-password card. The
 * plugin does not load Bootstrap, so the flex layout, floating label
 * and two-part logo are recreated here. Colours are CSS custom
 * properties written by Elementor; values below are the design defaults.
 *
 * @package PropertySearch
 */

.ps-forgot-wrapper {
	--ps-forgot-grad-start: #00291d;
	--ps-forgot-grad-mid: #003d2b;
	--ps-forgot-grad-end: #006241;
	--ps-forgot-deco-gold: rgba(255, 204, 0, 0.05);
	--ps-forgot-deco-white: rgba(255, 255, 255, 0.02);
	--ps-forgot-card-bg: #ffffff;
	--ps-forgot-card-radius: 24px;
	--ps-forgot-card-shadow: rgba(0, 0, 0, 0.4);
	--ps-forgot-visual-image: none;
	--ps-forgot-visual-image-opacity: 0.2;
	--ps-forgot-visual-grad-start: rgba(0, 61, 43, 0.9);
	--ps-forgot-visual-grad-end: rgba(0, 98, 65, 0.8);
	--ps-forgot-visual-heading: #ffffff;
	--ps-forgot-visual-subtitle: rgba(255, 255, 255, 0.8);
	--ps-forgot-trust-bg: rgba(255, 255, 255, 0.1);
	--ps-forgot-trust-icon: #ffcc00;
	--ps-forgot-trust-title: #ffffff;
	--ps-forgot-trust-desc: rgba(255, 255, 255, 0.7);
	--ps-forgot-side-bg: #ffffff;
	--ps-forgot-logo-icon-grad-start: #006241;
	--ps-forgot-logo-icon-grad-end: #003d2b;
	--ps-forgot-logo-icon-border: #ffcc00;
	--ps-forgot-logo-icon-ring: rgba(0, 61, 43, 0.3);
	--ps-forgot-logo-letters: #ffcc00;
	--ps-forgot-logo-main: #003d2b;
	--ps-forgot-logo-accent: #ffcc00;
	--ps-forgot-logo-tagline: #6c757d;
	--ps-forgot-icon-wrap-bg: rgba(255, 204, 0, 0.15);
	--ps-forgot-icon-wrap-border: rgba(255, 204, 0, 0.3);
	--ps-forgot-icon-wrap-color: #ffcc00;
	--ps-forgot-title: #003d2b;
	--ps-forgot-subtitle: #6c757d;
	--ps-forgot-input-bg: #ffffff;
	--ps-forgot-input-border: #e8ede9;
	--ps-forgot-input-text: #212529;
	--ps-forgot-label: #999999;
	--ps-forgot-label-icon: #6c757d;
	--ps-forgot-focus-border: #003d2b;
	--ps-forgot-focus-ring: rgba(0, 61, 43, 0.1);
	--ps-forgot-btn-grad-start: #003d2b;
	--ps-forgot-btn-grad-end: #006241;
	--ps-forgot-btn-text: #ffffff;
	--ps-forgot-btn-shadow: rgba(0, 61, 43, 0.2);
	--ps-forgot-btn-hover-shadow: rgba(0, 61, 43, 0.35);
	--ps-forgot-back: #003d2b;
	--ps-forgot-back-hover: #006241;
	--ps-forgot-success-icon-bg: #d4edda;
	--ps-forgot-success-icon-color: #28a745;
	--ps-forgot-success-email: #003d2b;
	--ps-forgot-success-bg: #e8f5e9;
	--ps-forgot-success-text: #1b5e20;
	--ps-forgot-error-bg: #fdecea;
	--ps-forgot-error-text: #b71c1c;

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

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

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

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

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

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

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

.ps-forgot-form-side {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 50px;
	background: var(--ps-forgot-side-bg);
}

/* Two-part logo (mirrors .logo-wrap / .logo-icon / .logo-text) */
.ps-forgot-logo {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 30px;
	text-decoration: none;
}

.ps-forgot-logo-icon {
	flex: 0 0 auto;
	width: 52px;
	height: 52px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(
		135deg,
		var(--ps-forgot-logo-icon-grad-start),
		var(--ps-forgot-logo-icon-grad-end)
	);
	border: 3px solid var(--ps-forgot-logo-icon-border);
	box-shadow: 0 0 0 4px var(--ps-forgot-logo-icon-ring);
}

.ps-forgot-logo-icon span {
	color: var(--ps-forgot-logo-letters);
	font-weight: 700;
	font-size: 1.3rem;
	font-style: italic;
}

.ps-forgot-logo-text {
	display: flex;
	flex-direction: column;
	line-height: 1.15;
}

.ps-forgot-logo-main {
	font-size: 1.35rem;
	font-weight: 700;
	letter-spacing: 1px;
	color: var(--ps-forgot-logo-main);
}

.ps-forgot-logo-main em {
	color: var(--ps-forgot-logo-accent);
	font-style: normal;
}

.ps-forgot-logo-tagline {
	font-size: 0.72rem;
	letter-spacing: 1px;
	color: var(--ps-forgot-logo-tagline);
}

/* Header icon tile (mirrors .auth-icon-wrap) */
.ps-forgot-icon-wrap {
	width: 70px;
	height: 70px;
	margin-bottom: 24px;
	border-radius: 20px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 2rem;
	color: var(--ps-forgot-icon-wrap-color);
	background: var(--ps-forgot-icon-wrap-bg);
	border: 2px solid var(--ps-forgot-icon-wrap-border);
}

.ps-forgot-icon-wrap i,
.ps-forgot-icon-wrap svg {
	width: 1em;
	height: 1em;
}

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

.ps-forgot-subtitle {
	color: var(--ps-forgot-subtitle);
	line-height: 1.6;
	margin: 0 0 30px;
}

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

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

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

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

.ps-form-floating > label {
	position: absolute;
	top: 0;
	left: 0;
	display: flex;
	align-items: center;
	height: 100%;
	padding: 16px 20px;
	color: var(--ps-forgot-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-forgot-input-bg);
	border-radius: 4px;
}

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

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

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

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

.ps-forgot-btn:hover {
	transform: translateY(-3px);
	box-shadow: 0 12px 30px var(--ps-forgot-btn-hover-shadow);
	color: var(--ps-forgot-btn-text);
}

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

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

/* Inline AJAX message */
.ps-forgot-message {
	margin-top: 12px;
	padding: 12px 16px;
	border-radius: 12px;
	font-size: 0.9rem;
	line-height: 1.5;
}

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

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

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

/* Back link (mirrors .back-link) */
.ps-forgot-back {
	display: inline-block;
	width: 100%;
	margin-top: 24px;
	text-align: center;
	color: var(--ps-forgot-back);
	font-weight: 600;
	text-decoration: none;
	transition: color 0.3s ease, transform 0.3s ease;
}

.ps-forgot-back i,
.ps-forgot-back svg {
	margin-right: 8px;
	width: 1em;
	height: 1em;
}

.ps-forgot-back:hover {
	color: var(--ps-forgot-back-hover);
	transform: translateX(-5px);
}

/* ------------------------------------------------------------------ */
/* Success state (mirrors .success-state / .success-icon)              */
/* ------------------------------------------------------------------ */

.ps-forgot-success {
	display: none;
	text-align: center;
}

.ps-forgot-wrapper.ps-is-success .ps-forgot-form-panel,
.ps-forgot-wrapper.ps-is-success .ps-forgot-back {
	display: none;
}

.ps-forgot-wrapper.ps-is-success .ps-forgot-success {
	display: block;
}

.ps-forgot-success-icon {
	width: 80px;
	height: 80px;
	margin: 0 auto 24px;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 2.5rem;
	background: var(--ps-forgot-success-icon-bg);
	color: var(--ps-forgot-success-icon-color);
}

.ps-forgot-success-icon i,
.ps-forgot-success-icon svg {
	width: 1em;
	height: 1em;
}

.ps-forgot-success-email {
	color: var(--ps-forgot-success-email);
	font-weight: 700;
	word-break: break-all;
}

.ps-forgot-success .ps-forgot-btn {
	margin-top: 8px;
}

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

.ps-forgot-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-forgot-visual-grad-start),
		var(--ps-forgot-visual-grad-end)
	);
	overflow: hidden;
}

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

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

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

/* Trust block (mirrors the .u-29 glass card with .mt-4 spacing) */
.ps-forgot-trust-list {
	position: relative;
	z-index: 1;
	margin-top: 1.5rem;
	display: grid;
	gap: 14px;
}

.ps-forgot-trust {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 16px;
	border-radius: 16px;
	background: var(--ps-forgot-trust-bg);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	text-align: left;
}

.ps-forgot-trust-icon {
	flex: 0 0 auto;
	display: inline-flex;
	font-size: 2rem;
	color: var(--ps-forgot-trust-icon);
}

.ps-forgot-trust-icon i,
.ps-forgot-trust-icon svg {
	width: 1em;
	height: 1em;
}

.ps-forgot-trust-body {
	display: flex;
	flex-direction: column;
}

.ps-forgot-trust-title {
	font-weight: 700;
	color: var(--ps-forgot-trust-title);
}

.ps-forgot-trust-desc {
	font-size: 0.875rem;
	color: var(--ps-forgot-trust-desc);
}

/* ------------------------------------------------------------------ */
/* Responsive                                                           */
/* ------------------------------------------------------------------ */

/* The visual panel hides below 991px like the static .auth-visual rule */
@media (max-width: 991px) {
	.ps-forgot-visual {
		display: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ps-forgot-btn,
	.ps-forgot-back,
	.ps-forgot-control {
		transition: none;
	}
}
