/* Position7 Contact — front-end forms.
   Tokens taken from the live position7.com theme (Poppins, accent #009fe3, 6px radius).
   Override any of them from the theme's Additional CSS, e.g. .p7contact-form { --p7contact-accent: #009fe3; } */
.p7contact-form {
	--p7contact-accent: #009fe3;
	--p7contact-accent-hover: #0088c2;
	--p7contact-text: #3a3a3a;
	--p7contact-muted: #4b4f58;
	--p7contact-border: rgba(58, 58, 58, .25);
	--p7contact-field-bg: rgba(58, 58, 58, .02);
	--p7contact-req: #d63638;
	--p7contact-error: #c62828;
	--p7contact-radius: 6px;
	--p7contact-font: Poppins, Arial, sans-serif;
	color: var(--p7contact-text);
	font-family: var(--p7contact-font);
	max-width: 100%;
}

.p7contact-form *,
.p7contact-form *::before,
.p7contact-form *::after { box-sizing: border-box; }

/* Layout */
.p7contact-row--2 {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0 20px;
}
.p7contact-field { margin: 0 0 20px; min-width: 0; }

.p7contact-form label {
	display: block;
	margin: 0 0 8px;
	font-family: var(--p7contact-font);
	font-size: 16px;
	font-weight: 500;
	line-height: 1.4;
	color: var(--p7contact-text);
}
.p7contact-req { color: var(--p7contact-req); }

/* Fields — 16px text stops iOS Safari zooming in on focus */
.p7contact-form input[type="text"],
.p7contact-form input[type="email"],
.p7contact-form textarea {
	display: block;
	width: 100%;
	max-width: 100%;
	min-height: 44px;
	margin: 0;
	padding: 10px 12px;
	border: 1px solid var(--p7contact-border);
	border-radius: var(--p7contact-radius);
	background: var(--p7contact-field-bg);
	box-shadow: none;
	color: var(--p7contact-text);
	font-family: var(--p7contact-font);
	font-size: 16px;
	line-height: 1.5;
	-webkit-appearance: none;
	appearance: none;
	transition: border-color .15s ease, box-shadow .15s ease;
}
.p7contact-form textarea {
	min-height: 140px;
	resize: vertical;
}
.p7contact-form input::placeholder,
.p7contact-form textarea::placeholder { color: var(--p7contact-muted); opacity: .7; }

.p7contact-form input:focus,
.p7contact-form textarea:focus {
	outline: none;
	border-color: var(--p7contact-accent);
	box-shadow: 0 0 0 3px rgba(0, 159, 227, .18);
}

/* Validation */
.p7contact-error {
	display: none;
	margin-top: 6px;
	font-size: 14px;
	line-height: 1.4;
	color: var(--p7contact-error);
}
.p7contact-field.is-invalid .p7contact-error { display: block; }
.p7contact-field.is-invalid input,
.p7contact-field.is-invalid textarea { border-color: var(--p7contact-error); }

/* Button — matches the theme's SEND button */
.p7contact-form .p7contact-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 46px;
	margin: 0;
	padding: 10px 24px;
	border: 0;
	border-radius: var(--p7contact-radius);
	background: var(--p7contact-accent);
	color: #fff;
	font-family: var(--p7contact-font);
	font-size: 16px;
	font-weight: 500;
	line-height: 1.2;
	letter-spacing: 2px;
	text-transform: uppercase;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
	transition: background-color .15s ease;
}
.p7contact-form .p7contact-button:hover { background: var(--p7contact-accent-hover); }
.p7contact-form .p7contact-button:focus-visible {
	outline: 2px solid var(--p7contact-accent);
	outline-offset: 2px;
}
.p7contact-form .p7contact-button[disabled] { opacity: .65; cursor: wait; }

.p7contact-small {
	margin: 12px 0 0;
	font-size: 13px;
	line-height: 1.5;
	color: var(--p7contact-muted);
}
.p7contact-small a { color: var(--p7contact-accent); text-decoration: underline; }

/* Status messages */
.p7contact-notice,
.p7contact-live:not(:empty) {
	margin: 16px 0 0;
	padding: 12px 16px;
	border-radius: var(--p7contact-radius);
	border-left: 4px solid;
	font-size: 15px;
	line-height: 1.5;
}
.p7contact-notice { margin: 0 0 16px; }
.p7contact-notice--ok,
.p7contact-live.is-ok { background: #e6f6fd; border-color: var(--p7contact-accent); color: #0b4f6c; }
.p7contact-notice--error,
.p7contact-live.is-error { background: #fdecec; border-color: var(--p7contact-error); color: #7f1d1d; }

/* Honeypot (also hidden inline in the markup) */
.p7contact-hp {
	position: absolute !important;
	left: -10000px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}
.p7contact-sr {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0);
	white-space: nowrap; border: 0;
}

/* Newsletter (footer) */
.p7contact-newsletter { width: 100%; }
.p7contact-newsletter .p7contact-nl-row {
	display: flex;
	gap: 10px;
	align-items: flex-start;
}
.p7contact-newsletter .p7contact-field { flex: 1 1 auto; margin: 0; }
.p7contact-newsletter input[type="email"] { border-color: rgba(0, 159, 227, .65); }
.p7contact-newsletter .p7contact-button { flex: 0 0 auto; }

/* Narrow containers (footer columns) and phones: stack everything, full-width button */
@media (max-width: 600px) {
	.p7contact-row--2 { grid-template-columns: 1fr; }
	.p7contact-form .p7contact-actions .p7contact-button { width: 100%; }
}
@media (max-width: 480px) {
	.p7contact-newsletter .p7contact-nl-row { flex-direction: column; align-items: stretch; }
	.p7contact-newsletter .p7contact-button { width: 100%; }
}
/* Footer widgets are often narrow even on desktop */
.p7contact-newsletter.p7contact-stacked .p7contact-nl-row { flex-direction: column; align-items: stretch; }
.p7contact-newsletter.p7contact-stacked .p7contact-button { width: 100%; }

@media (prefers-reduced-motion: reduce) {
	.p7contact-form * { transition: none !important; }
}

/* ===== Newsletter popup ===== */
.p7contact-popup[hidden] { display: none !important; }
.p7contact-popup {
	--p7contact-popup-heading: #3a3a3a;
	--p7contact-popup-z: 9990; /* below typical cookie-consent bars, above sticky headers */
	position: fixed;
	inset: 0;
	z-index: var(--p7contact-popup-z);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	font-family: Poppins, Arial, sans-serif;
}
.p7contact-popup__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(20, 24, 28, .55);
	opacity: 0;
	transition: opacity .25s ease;
}
.p7contact-popup__panel {
	position: relative;
	width: 100%;
	max-width: 600px;
	max-height: calc(100vh - 32px);
	overflow-y: auto;
	padding: 48px 48px 36px;
	background: #fff;
	border-radius: 10px;
	box-shadow: 0 24px 70px rgba(0, 0, 0, .28);
	text-align: center;
	opacity: 0;
	transform: translateY(16px);
	transition: opacity .25s ease, transform .25s ease;
}
.p7contact-popup__panel:focus { outline: none; }
.p7contact-popup.is-open .p7contact-popup__backdrop { opacity: 1; }
.p7contact-popup.is-open .p7contact-popup__panel { opacity: 1; transform: none; }

.p7contact-popup__close {
	position: absolute;
	top: 8px;
	right: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: #3a3a3a;
	cursor: pointer;
}
.p7contact-popup__close:hover { background: rgba(0, 0, 0, .06); }
.p7contact-popup__close:focus-visible { outline: 2px solid #009fe3; outline-offset: 2px; }

.p7contact-popup__title {
	margin: 0 0 14px;
	padding: 0 12px;
	font-family: Poppins, Arial, sans-serif;
	font-size: 32px;
	font-weight: 800;
	line-height: 1.15;
	letter-spacing: -.01em;
	text-transform: uppercase;
	color: var(--p7contact-popup-heading);
}
.p7contact-popup__text {
	margin: 0 0 28px;
	font-size: 17px;
	line-height: 1.5;
	color: #4b4f58;
}
.p7contact-popup .p7contact-newsletter { text-align: left; }
.p7contact-popup .p7contact-small { text-align: center; }

html.p7contact-popup-lock { overflow: hidden; }

/* Touch devices and narrow screens: a bottom panel instead of a full-screen cover
   (keeps the page usable, in line with Google's guidance on intrusive mobile
   interstitials). popup.js sets .is-sheet, so CSS and behaviour always agree. */
.p7contact-popup.is-sheet {
	inset: auto 0 0 0;
	padding: 0;
	align-items: flex-end;
}
.p7contact-popup.is-sheet .p7contact-popup__backdrop { display: none; }
.p7contact-popup.is-sheet .p7contact-popup__panel {
	max-width: 600px;
	max-height: 75vh;
	margin: 0 auto;
	padding: 30px 20px calc(18px + env(safe-area-inset-bottom, 0px));
	border-radius: 16px 16px 0 0;
	box-shadow: 0 -10px 40px rgba(0, 0, 0, .22);
	transform: translateY(100%);
}
.p7contact-popup.is-sheet.is-open .p7contact-popup__panel { transform: none; }
.p7contact-popup.is-sheet .p7contact-popup__title { font-size: 22px; padding: 0 36px; margin-bottom: 8px; }
.p7contact-popup.is-sheet .p7contact-popup__text { font-size: 15px; margin-bottom: 18px; }
.p7contact-popup.is-sheet .p7contact-small { margin-top: 10px; font-size: 12px; }
@media (max-height: 500px) {
	/* phone in landscape: keep it compact */
	.p7contact-popup.is-sheet .p7contact-popup__panel { padding-top: 18px; }
	.p7contact-popup.is-sheet .p7contact-popup__title { font-size: 18px; }
	.p7contact-popup.is-sheet .p7contact-popup__text { display: none; }
}

@media (prefers-reduced-motion: reduce) {
	.p7contact-popup__backdrop,
	.p7contact-popup__panel { transition: none; }
}
