/* ============================================================
   Project Enquiry Popup
   ============================================================ */

/* ── Base / reset ────────────────────────────────────────── */
.peq-popup *,
.peq-popup *::before,
.peq-popup *::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

/* ── Overlay wrapper ─────────────────────────────────────── */
.peq-popup {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}

.peq-popup[hidden] {
	display: none;
}

/* Animation states */
.peq-popup.peq-is-opening {
	display: flex;
}
.peq-popup.peq-is-opening .peq-backdrop {
	animation: peqFadeIn 0.3s ease forwards;
}
.peq-popup.peq-is-opening .peq-modal {
	animation: peqSlideUp 0.35s cubic-bezier(0.34, 1.2, 0.64, 1) forwards;
}
.peq-popup.peq-is-closing .peq-backdrop {
	animation: peqFadeOut 0.25s ease forwards;
}
.peq-popup.peq-is-closing .peq-modal {
	animation: peqSlideDown 0.25s ease forwards;
}

@keyframes peqFadeIn    { from { opacity: 0; } to { opacity: 1; } }
@keyframes peqFadeOut   { from { opacity: 1; } to { opacity: 0; } }
@keyframes peqSlideUp   { from { opacity: 0; transform: translateY(28px) scale(0.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes peqSlideDown { from { opacity: 1; transform: translateY(0) scale(1); } to { opacity: 0; transform: translateY(20px) scale(0.97); } }

/* ── Backdrop ─────────────────────────────────────────────── */
.peq-backdrop {
	position: fixed;
	inset: 0;
	background: rgba(10, 15, 30, 0.72);
	backdrop-filter: blur(3px);
	-webkit-backdrop-filter: blur(3px);
}

/* ── Modal ────────────────────────────────────────────────── */
.peq-modal {
	position: relative;
	z-index: 1;
	display: flex;
	width: 100%;
	max-width: 900px;
	max-height: calc(100vh - 32px);
	background: #fff;
	border-radius: 16px;
	overflow: hidden;
	box-shadow: 0 32px 80px rgba(0, 0, 0, 0.35);
}

/* ── Close button ─────────────────────────────────────────── */
.peq-close {
	position: absolute;
	top: 14px;
	right: 14px;
	z-index: 10;
	width: 36px;
	height: 36px;
	background: rgba(255, 255, 255, 0.9);
	border: none;
	border-radius: 50%;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
	transition: background 0.2s, transform 0.2s;
	color: #333;
}
.peq-close:hover {
	background: #fff;
	transform: scale(1.1);
}
.peq-close:focus-visible {
	outline: 2px solid #1a2c4e;
	outline-offset: 2px;
}
.peq-close svg {
	width: 18px;
	height: 18px;
	fill: currentColor;
	display: block;
}

/* ── Left panel — featured image ──────────────────────────── */
.peq-left {
	flex: 0 0 42%;
	position: relative;
	overflow: hidden;
	background: #1a2c4e;
	min-height: 340px;
}
.peq-left img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.peq-left-placeholder {
	width: 100%;
	height: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 14px;
	color: rgba(255, 255, 255, 0.5);
	padding: 24px;
	text-align: center;
}
.peq-left-placeholder svg {
	width: 64px;
	height: 64px;
	fill: currentColor;
	opacity: 0.4;
}
.peq-left-placeholder span {
	font-size: 15px;
	font-weight: 500;
}

/* subtle gradient over image for depth */
.peq-left::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(135deg, rgba(26,44,78,0.18) 0%, transparent 60%);
	pointer-events: none;
}

/* ── Right panel — form ────────────────────────────────────── */
.peq-right {
	flex: 1;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}
.peq-right-inner {
	padding: 36px 36px 32px;
	display: flex;
	flex-direction: column;
	gap: 18px;
}

/* ── Title ────────────────────────────────────────────────── */
.peq-title {
	font-size: 1.35rem;
	font-weight: 700;
	color: #1a2c4e;
	line-height: 1.3;
}
.peq-project-name {
	display: block;
	font-size: 1.05em;
	color: #c8942a; /* gold accent — adjust to match site */
}
.peq-subtitle {
	font-size: 0.875rem;
	color: #666;
	margin-top: -10px;
}

/* ── Form ─────────────────────────────────────────────────── */
.peq-form {
	display: flex;
	flex-direction: column;
	gap: 14px;
}
.peq-row--2 {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
}
.peq-field {
	display: flex;
	flex-direction: column;
	gap: 5px;
}
.peq-field label {
	font-size: 0.8rem;
	font-weight: 600;
	color: #444;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}
.peq-field label span {
	color: #c0392b;
}
.peq-optional {
	font-weight: 400;
	text-transform: none;
	letter-spacing: 0;
	color: #999;
}
.peq-field input,
.peq-field textarea {
	width: 100%;
	padding: 10px 13px;
	border: 1.5px solid #d8dde6;
	border-radius: 8px;
	font-size: 0.9rem;
	color: #222;
	background: #fafbfc;
	transition: border-color 0.2s, box-shadow 0.2s;
	font-family: inherit;
	-webkit-appearance: none;
}
.peq-field input:focus,
.peq-field textarea:focus {
	outline: none;
	border-color: #1a2c4e;
	background: #fff;
	box-shadow: 0 0 0 3px rgba(26, 44, 78, 0.1);
}
.peq-field input.peq-invalid,
.peq-field textarea.peq-invalid {
	border-color: #c0392b;
}
.peq-field textarea {
	resize: vertical;
	min-height: 80px;
}

/* ── Error message ────────────────────────────────────────── */
.peq-error {
	font-size: 0.85rem;
	color: #c0392b;
	background: #fdf2f2;
	border: 1px solid #f5c6c6;
	border-radius: 7px;
	padding: 10px 13px;
}
.peq-error[hidden] { display: none; }

/* ── Buttons ──────────────────────────────────────────────── */
.peq-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	padding: 13px 20px;
	border: none;
	border-radius: 9px;
	font-size: 0.95rem;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none;
	transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
	font-family: inherit;
}
.peq-btn:focus-visible {
	outline: 2px solid #1a2c4e;
	outline-offset: 3px;
}

/* Submit */
.peq-btn--submit {
	background: #1a2c4e;
	color: #fff;
	position: relative;
}
.peq-btn--submit:hover {
	background: #243d6e;
	box-shadow: 0 4px 16px rgba(26, 44, 78, 0.3);
}
.peq-btn--submit:active { transform: scale(0.98); }
.peq-btn--submit[disabled] {
	opacity: 0.7;
	cursor: not-allowed;
}

/* Spinner */
.peq-btn-spinner {
	display: none;
	width: 16px;
	height: 16px;
	border: 2px solid rgba(255,255,255,0.35);
	border-top-color: #fff;
	border-radius: 50%;
	animation: peqSpin 0.7s linear infinite;
}
.peq-btn--submit.peq-is-loading .peq-btn-label { display: none; }
.peq-btn--submit.peq-is-loading .peq-btn-spinner { display: block; }

@keyframes peqSpin { to { transform: rotate(360deg); } }

/* Call button */
.peq-btn--call {
	background: #f0f4f9;
	color: #1a2c4e;
	border: 1.5px solid #d0d9e8;
	text-align: center;
}
.peq-btn--call:hover {
	background: #e4ecf7;
	border-color: #1a2c4e;
}
.peq-btn--call svg {
	width: 22px;
	height: 22px;
	fill: #1a2c4e;
	flex-shrink: 0;
}
.peq-btn--call span {
	display: flex;
	flex-direction: column;
	line-height: 1.2;
	text-align: left;
}
.peq-btn--call strong {
	font-size: 0.9rem;
}
.peq-btn--call small {
	font-size: 0.78rem;
	font-weight: 400;
	color: #555;
}

/* ── OR divider ───────────────────────────────────────────── */
.peq-or {
	display: flex;
	align-items: center;
	gap: 12px;
	color: #aaa;
	font-size: 0.8rem;
	font-weight: 600;
	letter-spacing: 0.06em;
}
.peq-or::before,
.peq-or::after {
	content: '';
	flex: 1;
	height: 1px;
	background: #e4e8f0;
}

/* ── Success state ────────────────────────────────────────── */
.peq-success {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 14px;
	padding: 20px;
	text-align: center;
	color: #1a7a4a;
}
.peq-success[hidden] { display: none; }
.peq-success svg {
	width: 52px;
	height: 52px;
	fill: #1a7a4a;
}
.peq-success p {
	font-size: 0.95rem;
	font-weight: 500;
}

/* ── Responsive ───────────────────────────────────────────── */
@media ( max-width: 720px ) {
	.peq-modal {
		flex-direction: column;
		max-height: calc(100vh - 24px);
		border-radius: 14px;
	}
	.peq-left {
		flex: 0 0 180px;
		min-height: 180px;
	}
	.peq-right-inner {
		padding: 24px 20px 28px;
		gap: 14px;
	}
	.peq-row--2 {
		grid-template-columns: 1fr;
	}
	.peq-title {
		font-size: 1.1rem;
	}
}

@media ( max-width: 420px ) {
	.peq-popup {
		padding: 8px;
	}
	.peq-modal {
		max-height: calc(100vh - 16px);
		border-radius: 12px;
	}
	.peq-left {
		flex: 0 0 140px;
		min-height: 140px;
	}
}
