/*
 * Philly Agent Match
 * Neutral on purpose: it inherits your theme's fonts and form fields. Corners are sharp by default.
 * To restyle, override the variables below in Avada > Options > Custom CSS, e.g.
 *   .pam { --pam-accent:#9b2c2c; --pam-radius:0; }
 * Buttons use Avada's button classes. To copy one specific homepage button exactly,
 * give that Avada Button the CSS class "pam-button-source".
 */

.pam {
	--pam-accent: var(--primary_color, #1f6feb);
	--pam-bg: #fff;
	--pam-text: #1d2630;
	--pam-muted: #5b6770;
	--pam-line: #cfd6dc;
	--pam-radius: 0;
	--pam-btn-radius: 0;
	--pam-err: #b3261e;
	box-sizing: border-box;
	color: var(--pam-text);
	font-family: inherit;
	line-height: 1.5;
	text-align: left;
	scroll-margin-top: 110px;
}
.pam *, .pam *::before, .pam *::after { box-sizing: inherit; }

/* Boxed card (default) or transparent "plain" to sit inside your own styled column */
.pam--card {
	background: var(--pam-bg);
	border: 1px solid var(--pam-line);
	border-radius: var(--pam-radius);
	box-shadow: 0 10px 30px rgba(0, 0, 0, .12);
	padding: 22px;
}
.pam--plain {
	--pam-muted: currentColor;
	--pam-line: rgba(127, 127, 127, .45);
	color: inherit;
}
.pam--plain .pam-count,
.pam--plain .pam-hint,
.pam--plain .pam-fine,
.pam--plain .pam-choice small { opacity: .8; }

.pam-sr {
	position: absolute; width: 1px; height: 1px; overflow: hidden;
	clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* Header + progress */
.pam .pam-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.pam .pam-title { margin: 0; font-size: 1.3em; font-weight: 700; line-height: 1.2; color: inherit; }
.pam .pam-count { margin: 0; font-size: .875em; color: var(--pam-muted); white-space: nowrap; }
.pam .pam-progress { height: 6px; background: rgba(127, 127, 127, .2); margin: 12px 0 18px; overflow: hidden; }
.pam .pam-progress span { display: block; height: 100%; width: 25%; background: var(--pam-accent); transition: width .3s; }

/*
 * Fixed height: the plugin measures its tallest step and sets min-height on .pam-body,
 * so the card never grows or shrinks between steps. Back/Continue stay in the same spot.
 */
.pam .pam-body { display: flex; flex-direction: column; }
.pam .pam-form { display: flex; flex-direction: column; flex: 1; margin: 0; }
.pam .pam-step { display: none; margin: 0; padding: 0; min-width: 0; }
.pam .pam-step.is-on { display: flex; flex-direction: column; flex: 1; }
.pam .pam-legend { margin: 0 0 14px; font-size: 1.1em; font-weight: 700; line-height: 1.3; color: inherit; }
.pam .pam-legend:focus { outline: none; }

/* Choice tiles */
.pam .pam-choices { display: grid; gap: 10px; align-content: start; }
.pam .pam-choice {
	display: flex; align-items: center; justify-content: space-between; gap: 12px;
	width: 100%; min-height: 60px; margin: 0; padding: 14px 16px; text-align: left;
	background: transparent; color: inherit;
	border: 2px solid var(--pam-line); border-radius: var(--pam-radius);
	font: inherit; font-weight: 600; line-height: 1.25; letter-spacing: normal; text-transform: none;
	box-shadow: none; cursor: pointer; transition: border-color .15s;
}
.pam .pam-choice small { display: block; margin-top: 2px; font-size: .875em; font-weight: 400; color: var(--pam-muted); }
.pam .pam-choice:hover { border-color: var(--pam-accent); background: transparent; color: inherit; }
.pam .pam-choice[aria-pressed="true"] { border-color: var(--pam-accent); box-shadow: inset 0 0 0 1px var(--pam-accent); }
.pam .pam-choices:not(.pam-chips) .pam-choice::after {
	content: ""; flex: none; width: 8px; height: 8px;
	border-top: 2px solid currentColor; border-right: 2px solid currentColor;
	transform: rotate(45deg); opacity: .5;
}
.pam .pam-chips { grid-template-columns: 1fr 1fr; }
.pam .pam-chips .pam-choice { justify-content: center; text-align: center; }

/* Fields: sizing only. Borders, colors, and fonts come from your theme's form styles. */
.pam .pam-field { margin: 0 0 12px; }
.pam .pam-field .pam-sr { position: absolute; }
.pam .pam-field input,
.pam .pam-field select { width: 100%; max-width: 100%; min-height: 48px; font-size: max(16px, 1em); }
.pam .pam-field [aria-invalid="true"] { border-color: var(--pam-err); }
.pam .pam-hint { margin: 0 0 14px; font-size: .9em; color: var(--pam-muted); }
.pam .pam-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.pam .pam-err { margin: 6px 0 0; color: var(--pam-err); font-size: .85em; line-height: 1.3; font-weight: 500; }
.pam [hidden] { display: none !important; }

/* Step 4 is compact so it fits inside the same height as step 1 */
.pam .pam-step[data-step="4"] .pam-field { margin: 0 0 6px; }
.pam .pam-step[data-step="4"] .pam-field--last { margin-bottom: 0; }
.pam .pam-step[data-step="4"] .pam-field input {
	height: 42px; min-height: 42px; padding-top: 0; padding-bottom: 0; line-height: 1.2; margin: 0;
}
.pam .pam-foot { margin-top: 6px; min-height: 2.7em; font-size: .76em; line-height: 1.35; }
.pam .pam-foot .pam-err,
.pam .pam-foot .pam-fine { margin: 0; font-size: 1em; line-height: inherit; }

/* Buttons: Back / Continue / Find My Agent sit at the bottom of every step */
.pam .pam-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 8px; }
.pam .pam-step[data-step="4"] .pam-actions { padding-top: 4px; }
.pam .pam-step[data-step="4"] .pam-legend { margin-bottom: 8px; }
.pam .pam-back {
	background: none; border: 0; box-shadow: none; border-radius: 0; padding: 8px 4px; min-height: 44px;
	color: inherit; font: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.pam .pam-back:hover { background: none; color: inherit; }
.pam .pam-actions .pam-btn { margin-left: auto; }

/* Same sharp edges on every plugin button, even when Avada's classes are applied */
.pam .pam-btn, .pam-sticky .pam-btn { border-radius: var(--pam-btn-radius, 0); }
/* Only used when "Button CSS classes" is blank and no source button is set */
.pam-btn--own {
	display: inline-flex; align-items: center; justify-content: center;
	min-height: 50px; padding: 0 28px; border: 0;
	background: var(--pam-accent, #1f6feb); color: #fff;
	font: inherit; font-weight: 700; letter-spacing: .02em; text-decoration: none; cursor: pointer;
}
.pam-btn--own:hover { filter: brightness(.9); color: #fff; }
.pam-btn[disabled] { opacity: .6; cursor: default; }

.pam .pam-fine { margin: 0; color: var(--pam-muted); }
.pam .pam-fine a { color: inherit; text-decoration: underline; }

/* Done */
.pam .pam-done-title { margin: 0 0 8px; font-size: 1.4em; font-weight: 700; line-height: 1.2; outline: none; color: inherit; }
.pam .pam-done p { margin: 10px 0 0; }
.pam .pam-done .pam-done-sum { font-weight: 700; }

.pam :focus-visible { outline: 3px solid var(--pam-accent); outline-offset: 2px; }

/* Sticky mobile bar */
.pam-sticky { --pam-accent: var(--primary_color, #1f6feb); display: none; }
@media (max-width: 800px) {
	.pam-sticky.is-ready {
		display: flex; align-items: center; gap: 10px;
		position: fixed; left: 0; right: 0; bottom: 0; z-index: 9990;
		padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
		background: #fff; border-top: 1px solid #d6dbe0; box-shadow: 0 -8px 24px rgba(0, 0, 0, .12);
		transition: transform .25s;
	}
	.pam-sticky.is-ready:not(.is-on) { visibility: hidden; transform: translateY(100%); }
	.pam-sticky .pam-sticky-cta { flex: 1; margin: 0; text-align: center; text-decoration: none; }
	.pam-sticky .pam-sticky-call {
		flex: none; width: 52px; height: 52px; display: grid; place-items: center;
		border: 2px solid #cfd6dc; border-radius: 0; color: #1d2630; background: #fff;
	}
	body.pam-sticky-on { padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
	body.pam-sticky-on #toTop { bottom: calc(88px + env(safe-area-inset-bottom, 0px)) !important; }
}

@media (max-width: 480px) {
	.pam--card { padding: 18px; }
}
@media (prefers-reduced-motion: reduce) {
	.pam *, .pam-sticky { transition: none !important; }
}
