/*
 * PRONYX — GITEX meeting request page (/gitex-meeting/)
 *
 * Layout: the booth-location visual as the hero, then the intro + form section below it.
 * Self-contained and scoped to .px-gm. Layout responds to the component's own width (container queries), so it
 * renders the same in the plugin's full-width template or inside a theme content column.
 * Reuses pronyx-v25 tokens and its form system (.px-field, .px-btn). Square corners, as everywhere on pronyx.co.
 */

.px-gm {
	--gm-navy: var(--navy, #113255);
	--gm-ink: var(--ink, #0A1B2E);
	--gm-lime: var(--lime, #F4F1EB);
	--gm-stone: var(--stone, #E7E2D8);
	--gm-copper: var(--copper, #B5713F);
	--gm-steel-ink: var(--steel-ink, #4A6582);
	--gm-mono: "IBM Plex Mono", ui-monospace, monospace;

	container: pxgm / inline-size;
	display: block;
	max-width: none;
	margin: 0;
	padding: 0;
	font-size: 16px;
	line-height: 1.5;
	color: var(--gm-navy);
}
.px-gm *, .px-gm *::before, .px-gm *::after { box-sizing: border-box; }
/* Neutralise content-column typography if the shortcode is placed inside .px-prose */
.px-gm img { margin: 0; max-width: 100%; }
.px-gm p { margin: 0; }
/* Fallbacks for theme utilities the component relies on */
.px-gm .px-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.px-gm .px-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* (A container can't query itself, so spacing lives on .px-gm__inner.) */
.px-gm__inner {
	max-width: 1200px;
	margin-inline: auto;
	padding: 16px 16px 56px;
}
@container pxgm (min-width: 600px) { .px-gm__inner { padding: 32px 32px 88px; } }
@container pxgm (min-width: 960px) { .px-gm__inner { padding: 40px 40px 104px; } }

/* ---------- Hero: the booth-location visual (complete, never cropped) ---------- */

.px-gm__hero { margin: 0; background: var(--gm-ink); }
.px-gm__hero-img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 1672 / 941; /* reserves space before the image loads: no layout shift */
	object-fit: contain;
	background: var(--gm-ink);
}

/* Text summary of the booth: always available, shown where the artwork's own text gets too small to read */
.px-gm__booth {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 6px 16px;
	padding: 12px 16px 14px;
	background: var(--gm-ink);
	color: #fff;
	border-top: 1px solid rgba(255, 255, 255, .12);
}
.px-gm__booth-main { display: flex; align-items: center; gap: 10px; font-stretch: 112%; font-weight: 600; font-size: 17px; line-height: 1.2; }
.px-gm__booth-main svg { width: 18px; height: 18px; flex: none; color: var(--gm-copper); }
.px-gm__booth-meta { font-family: var(--gm-mono); font-size: 12px; letter-spacing: .04em; color: var(--gm-stone); }

/* Wide layouts: the artwork's own booth text is comfortably legible, so the summary stays for assistive tech only */
@container pxgm (min-width: 960px) {
	.px-gm__booth { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
}

/* ---------- Intro + form ---------- */

.px-gm__body { display: grid; gap: 24px; margin-top: 28px; }
@container pxgm (min-width: 600px) { .px-gm__body { gap: 32px; margin-top: 44px; } }
@container pxgm (min-width: 960px) {
	.px-gm__body {
		grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
		gap: clamp(40px, 6cqi, 80px);
		align-items: start;
		margin-top: 56px;
	}
	.px-gm__intro { position: sticky; top: 24px; padding-top: 8px; }
}

.px-gm__intro { container: pxgmi / inline-size; min-width: 0; }
.px-gm .px-crumbs { margin-bottom: 8px; }
.px-gm__eyebrow {
	margin: 0 0 12px;
	font-weight: 600;
	font-size: 12px;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--gm-steel-ink);
}
.px-gm__title {
	margin: 0;
	max-width: 16ch;
	font-family: inherit;
	font-stretch: 112%;
	font-weight: 500; /* as the theme's .px-h2 section headings */
	font-size: clamp(26px, 8.4cqi, 40px);
	line-height: 1.06;
	letter-spacing: -.005em;
	text-wrap: balance;
	color: var(--gm-navy);
}
.px-gm__rule { display: block; width: 72px; height: 6px; margin: 18px 0 16px; background: var(--gm-copper); }
.px-gm__lede { max-width: 46ch; font-size: clamp(16px, 4cqi, 18px); line-height: 1.55; }
.px-gm__lede strong { font-weight: 600; }

.px-gm__form-col { container: pxgmc / inline-size; min-width: 0; }
.px-gm__form-wrap { padding: 20px; background: var(--gm-lime); }
@container pxgmc (min-width: 480px) { .px-gm__form-wrap { padding: 32px; } }
@container pxgmc (min-width: 620px) { .px-gm__form-wrap { padding: 40px; } }

/* ---------- Form ---------- */

.px-gm-form { display: flex; flex-direction: column; gap: 18px; }
.px-gm-form[hidden], .px-gm-success[hidden] { display: none; }
.px-gm-form__note { font-size: 14px; color: var(--gm-steel-ink); }
.px-gm-form__grid { display: grid; gap: 18px; }
@container pxgmc (min-width: 460px) {
	.px-gm-form__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px 16px; }
}
.px-gm-form .px-field { min-width: 0; }
.px-gm-form .px-field input,
.px-gm-form .px-field select,
.px-gm-form .px-field textarea { width: 100%; }

/* Phone: compact dialing-code picker + number */
.px-gm-phone__row { display: flex; gap: 8px; min-width: 0; }
.px-gm-phone__row input { flex: 1; min-width: 0; }
.px-gm-dial { position: relative; flex: 0 0 auto; }
.px-gm-dial select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.px-gm-dial__face {
	display: flex;
	align-items: center;
	gap: 8px;
	height: 48px;
	min-width: 92px;
	padding: 0 12px 0 14px;
	border: 1px solid var(--field, #7D8EA2);
	background: #fff;
	font-size: 16px;
	font-variant-numeric: tabular-nums;
	pointer-events: none;
	transition: border-color var(--t-fast, 160ms) ease, box-shadow var(--t-fast, 160ms) ease;
}
.px-gm-dial__face svg { width: 12px; height: 12px; margin-left: auto; flex: none; }
.px-gm-dial:hover .px-gm-dial__face { border-color: var(--gm-navy); }
.px-gm-dial:focus-within .px-gm-dial__face { border-color: var(--gm-navy); box-shadow: 0 0 0 1px var(--gm-navy); }
.px-gm-dial select:focus-visible + .px-gm-dial__face { outline: 2px solid var(--gm-navy); outline-offset: 2px; }

/* Native select with the theme's field look and a consistent chevron */
.px-gm-form .px-field > select {
	appearance: none;
	-webkit-appearance: none;
	padding-right: 40px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%23113255' stroke-width='1.5'%3E%3Cpath d='M2 4.5l4 4 4-4'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
	background-size: 12px;
	cursor: pointer;
}
.px-gm-form select:invalid { color: var(--gm-steel-ink); }
.px-gm-form select option { color: var(--gm-navy); }

.px-gm-count { align-self: flex-end; font-family: var(--gm-mono); font-size: 12px; color: var(--gm-steel-ink); }

/* Submit + loading */
.px-gm-form__submit { display: flex; flex-direction: column; gap: 12px; margin-top: 4px; }
.px-gm-form .px-btn { width: 100%; border: 0; }
@container pxgmc (min-width: 460px) {
	.px-gm-form__submit { flex-direction: row; align-items: center; gap: 20px; }
	.px-gm-form .px-btn { width: auto; min-width: 240px; flex: none; }
}
.px-gm-form .px-btn .px-gm-spin { display: none; width: 16px; height: 16px; border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff; border-radius: 50%; animation: px-gm-spin 800ms linear infinite; }
.px-gm-form[aria-busy="true"] .px-btn .px-gm-spin { display: inline-block; }
.px-gm-form[aria-busy="true"] .px-btn .px-gm-arrow { display: none; }
@keyframes px-gm-spin { to { transform: rotate(360deg); } }

/* Data-use notice (informational; no checkbox) */
.px-gm-notice { font-size: 13px; line-height: 1.5; color: var(--gm-steel-ink); max-width: 46ch; }

/* Success */
.px-gm-success { display: flex; flex-direction: column; align-items: flex-start; gap: 22px; }
.px-gm-success:focus { outline: none; }
.px-gm-success__icon { display: grid; place-items: center; width: 52px; height: 52px; background: var(--gm-navy); color: #fff; }
.px-gm-success__icon svg { width: 22px; height: 22px; }
.px-gm-success__msg { max-width: 40ch; font-size: 19px; line-height: 1.45; }
.px-gm-success__msg strong { display: block; margin-bottom: 8px; font-stretch: 112%; font-weight: 600; font-size: 24px; line-height: 1.15; }

@media (prefers-reduced-motion: reduce) {
	.px-gm-form .px-btn .px-gm-spin { animation: none; }
}
