/* Property Quiz – Costa del Sol
   ------------------------------------------------------------------
   This stylesheet only sets structure: grids, spacing and states. Fonts,
   colours, headings, buttons and fields all stay as the theme defines them.
   The few fallback rules use :where(), which carries zero specificity: if the
   theme styles inputs, selects or textareas itself, the theme wins.
   ------------------------------------------------------------------ */

.pq {
	box-sizing: border-box;
	max-width: var(--pq-max, 780px);
	margin-left: auto;
	margin-right: auto;
	font: inherit;
	color: inherit;
	text-align: left;
}

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

.pq--framed {
	padding: clamp(20px, 4vw, 40px);
	border: 1px solid;
	border-color: rgba(128, 128, 128, 0.3);
	border-color: color-mix(in srgb, currentColor 20%, transparent);
}

/* --- Panels ---------------------------------------------------------- */

.pq-panel {
	display: none;
}

.pq-panel.is-active {
	display: block;
	animation: pq-enter 0.3s ease both;
}

@keyframes pq-enter {
	from { opacity: 0; transform: translateY(8px); }
	to   { opacity: 1; transform: none; }
}

/* --- Copy: no fonts, vertical rhythm only -------------------------- */

.pq .pq-eyebrow {
	margin: 0 0 10px;
	font-size: 0.72em;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	opacity: 0.65;
}

.pq .pq-title,
.pq .pq-question {
	margin: 0 0 10px;
}

.pq .pq-lede,
.pq .pq-hint {
	margin: 0 0 26px;
	max-width: 52ch;
	opacity: 0.8;
}


/* --- Progress ------------------------------------------------------- */

.pq-progress {
	margin-bottom: 26px;
}

.pq-progress-meta {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 12px;
	margin-bottom: 8px;
	font-size: 0.72em;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	opacity: 0.65;
}

.pq-progress-track {
	height: 2px;
	background: rgba(128, 128, 128, 0.25);
	background: color-mix(in srgb, currentColor 18%, transparent);
}

.pq-progress-bar {
	height: 100%;
	width: 0;
	background: var(--pq-accent, currentColor);
	transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Options ----------------------------------------------------------- */

.pq-options {
	display: grid;
	gap: 12px;
	grid-template-columns: 1fr;
}

@media (min-width: 620px) {
	.pq-options { grid-template-columns: 1fr 1fr; }
	.pq-options--multi { gap: 10px; }
}

.pq .pq-option {
	position: relative;
	display: block;
	width: 100%;
	margin: 0;
	padding: 15px 48px 15px 17px;
	background: transparent;
	border: 1px solid;
	border-color: rgba(128, 128, 128, 0.35);
	border-color: color-mix(in srgb, currentColor 25%, transparent);
	border-radius: var(--pq-radius, 3px);
	font: inherit;
	color: inherit;
	text-align: left;
	text-transform: none;
	letter-spacing: normal;
	cursor: pointer;
	transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.pq .pq-option:hover {
	border-color: currentColor;
	transform: translateY(-1px);
}

.pq .pq-option:focus-visible {
	outline: 2px solid var(--pq-accent, currentColor);
	outline-offset: 2px;
}

.pq .pq-option[aria-pressed="true"] {
	border-color: var(--pq-accent, currentColor);
	box-shadow: inset 0 0 0 1px var(--pq-accent, currentColor);
}

/* The "open" option (Any / No preference) sets itself apart. */
.pq .pq-option--open {
	border-style: dashed;
}

.pq-option-label {
	display: block;
	line-height: 1.3;
}

.pq-option-hint {
	display: block;
	margin-top: 3px;
	font-size: 0.84em;
	opacity: 0.65;
}

.pq-option-mark {
	position: absolute;
	top: 50%;
	right: 16px;
	width: 17px;
	height: 17px;
	margin-top: -8.5px;
	border: 1px solid;
	border-color: rgba(128, 128, 128, 0.5);
	border-color: color-mix(in srgb, currentColor 40%, transparent);
	border-radius: 50%;
	transition: border-color 0.18s ease;
}

.pq-options--multi .pq-option-mark {
	border-radius: 3px;
}

.pq .pq-option[aria-pressed="true"] .pq-option-mark {
	border-color: var(--pq-accent, currentColor);
}

.pq .pq-option[aria-pressed="true"] .pq-option-mark::after {
	content: "";
	position: absolute;
	top: 3px;
	right: 3px;
	bottom: 3px;
	left: 3px;
	background: var(--pq-accent, currentColor);
	border-radius: inherit;
}

/* --- Navigation ------------------------------------------------------- */

.pq-nav {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: 24px;
}

.pq .pq-btn {
	font: inherit;
	cursor: pointer;
}

.pq .pq-btn[disabled] {
	opacity: 0.45;
	cursor: not-allowed;
}

/* The primary button is deliberately NOT styled: it inherits whatever the
   theme applies to <button> elements. Only when an accent colour is set in
   the settings does the quiz style it itself. */
.pq--accent .pq-btn--primary {
	padding: 13px 26px;
	background: var(--pq-accent);
	border: 1px solid var(--pq-accent);
	border-radius: var(--pq-radius, 3px);
	color: #fff;
	letter-spacing: 0.03em;
}

.pq--accent .pq-btn--primary:hover {
	filter: brightness(0.88);
}

/* The back control is deliberately a link, not a button. */
.pq .pq-btn--ghost {
	margin-right: auto;
	padding: 0;
	background: none;
	border: 0;
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 3px;
	opacity: 0.65;
}

.pq .pq-btn--ghost:hover {
	opacity: 1;
	background: none;
	color: inherit;
}

/* --- Fields ------------------------------------------------------------- */

.pq-fields {
	display: grid;
	gap: 16px;
	grid-template-columns: 1fr;
}

@media (min-width: 620px) {
	.pq-fields { grid-template-columns: 1fr 1fr; }
	.pq-field--full { grid-column: 1 / -1; }
}

.pq-field {
	display: block;
}

.pq-field-label {
	display: block;
	margin-bottom: 6px;
	font-size: 0.76em;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	opacity: 0.7;
}

/* Width and font are enforced; appearance is not. */
.pq .pq-field input,
.pq .pq-field select,
.pq .pq-field textarea {
	width: 100%;
	max-width: 100%;
	font: inherit;
}

/* Zero-specificity fallback: applies only if the theme says nothing. */
.pq:not(.pq--styled) :where(.pq-field input, .pq-field select, .pq-field textarea) {
	padding: 11px 13px;
	background: transparent;
	border: 1px solid rgba(128, 128, 128, 0.4);
	border-radius: var(--pq-radius, 3px);
	color: inherit;
}

.pq .pq-field .pq-invalid {
	border-color: #c0392b;
	box-shadow: inset 0 0 0 1px #c0392b;
}

.pq-consent {
	display: flex;
	gap: 10px;
	margin-top: 18px;
	font-size: 0.86em;
	line-height: 1.45;
	opacity: 0.85;
}

.pq-consent input {
	flex: 0 0 auto;
	margin-top: 3px;
	width: auto;
	accent-color: var(--pq-accent, currentColor);
}

.pq-hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.pq .pq-error {
	margin: 16px 0 0;
	padding: 10px 14px;
	border-left: 2px solid #c0392b;
	background: rgba(192, 57, 43, 0.07);
	font-size: 0.9em;
}

/* --- Result --------------------------------------------------------- */

.pq-plaque {
	padding: clamp(24px, 5vw, 40px);
	border: 1px solid;
	border-color: rgba(128, 128, 128, 0.4);
	border-color: color-mix(in srgb, currentColor 30%, transparent);
	outline: 1px solid;
	outline-color: rgba(128, 128, 128, 0.4);
	outline-color: color-mix(in srgb, currentColor 30%, transparent);
	outline-offset: 5px;
	text-align: center;
}

.pq .pq-figure {
	margin: 0;
	font-size: clamp(56px, 13vw, 92px);
	line-height: 1;
	font-variant-numeric: tabular-nums;
	color: var(--pq-accent, inherit);
}

.pq .pq-figure-label {
	margin: 8px 0 0;
	font-size: 0.78em;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	opacity: 0.7;
}

.pq-facts {
	display: grid;
	gap: 18px;
	margin: 28px 0 0;
	padding-top: 22px;
	border-top: 1px solid;
	border-top-color: rgba(128, 128, 128, 0.25);
	border-top-color: color-mix(in srgb, currentColor 18%, transparent);
	grid-template-columns: 1fr;
	text-align: left;
}

@media (min-width: 560px) {
	.pq-facts { grid-template-columns: repeat(3, 1fr); }
}

.pq-facts dt {
	margin-bottom: 4px;
	font-size: 0.7em;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	opacity: 0.65;
}

.pq-facts dd {
	margin: 0;
	font-size: 1.15em;
}

.pq-result-copy {
	margin: 26px 0 0;
	max-width: 56ch;
	opacity: 0.8;
}

.pq.is-loading {
	pointer-events: none;
}

.pq.is-loading .pq-btn--primary {
	opacity: 0.6;
}

@media (prefers-reduced-motion: reduce) {
	.pq-panel.is-active { animation: none; }
	.pq *, .pq *::before { transition-duration: 0.01ms !important; }
}

/* =========================================================================
   SITE PRESET  (.pq--styled)
   -------------------------------------------------------------------------
   Applied when "Site preset" is selected in the settings. It sets colour,
   weight, spacing and case — never a typeface: the quiz keeps whatever font
   the theme is already using, so it matches the rest of the site by default.
   Both colours come through from the settings as CSS variables.
   ========================================================================= */

.pq--styled {
	--pq-accent: #b49a62;
	--pq-ink: #1c1c1c;
	--pq-radius: 0;
	--pq-hair: rgba(28, 28, 28, 0.14);
	--pq-font: "Jost", "Helvetica Neue", Arial, sans-serif;
	--pq-base: 18px;
	color: var(--pq-ink);
	font-size: var(--pq-base);
	line-height: 1.6;
}

/* The preset owns its typography outright. Themes and page builders both
   target these elements aggressively, so the declarations that carry the
   design are enforced rather than suggested. */
.pq--styled,
.pq--styled button,
.pq--styled input,
.pq--styled select,
.pq--styled textarea,
.pq--styled h2,
.pq--styled h3,
.pq--styled p,
.pq--styled dt,
.pq--styled dd,
.pq--styled span,
.pq--styled label,
.pq--styled a {
	font-family: var(--pq-font) !important;
}

/* --- Headings and eyebrows --- */

.pq--styled .pq-eyebrow {
	margin-bottom: 14px;
	font-size: 0.76em !important;
	font-weight: 600 !important;
	letter-spacing: 0.2em !important;
	text-transform: uppercase !important;
	color: var(--pq-accent) !important;
	opacity: 1;
}

.pq--styled .pq-title {
	margin-bottom: 14px;
	font-size: clamp(1.6em, 4.4vw, 2.4em);
	font-weight: 300;
	line-height: 1.15;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: var(--pq-ink);
}

/* Questions stay in sentence case: capitals are for labels, not for
   sentences somebody has to read and answer. */
.pq--styled .pq-question {
	margin-bottom: 10px;
	font-size: clamp(1.42em, 3.4vw, 1.95em) !important;
	font-weight: 400 !important;
	line-height: 1.25;
	color: var(--pq-ink) !important;
}

.pq--styled .pq-lede,
.pq--styled .pq-hint {
	font-size: 1.02em;
	line-height: 1.6;
	color: var(--pq-ink);
	opacity: 0.72;
}


/* --- Progress --- */

.pq--styled .pq-progress {
	margin-bottom: 32px;
}

.pq--styled .pq-progress-meta {
	font-size: 0.72em;
	letter-spacing: 0.16em;
	opacity: 1;
	color: rgba(28, 28, 28, 0.6);
}

.pq--styled .pq-step-label {
	color: var(--pq-accent);
	font-weight: 600;
}

.pq--styled .pq-progress-track {
	height: 1px;
	background: var(--pq-hair);
}

.pq--styled .pq-progress-bar {
	height: 3px;
	margin-top: -1px;
	background: var(--pq-accent);
}

/* --- Answer options --- */

.pq--styled .pq-option {
	padding: 19px 52px 19px 22px;
	background: #fff !important;
	border: 1px solid var(--pq-hair) !important;
	border-radius: 0 !important;
	color: var(--pq-ink) !important;
}

.pq--styled .pq-option:hover {
	border-color: var(--pq-accent);
	transform: none;
	box-shadow: 0 2px 14px rgba(28, 28, 28, 0.06);
}

.pq--styled .pq-option-label {
	font-size: 1.04em;
	font-weight: 500;
}

.pq--styled .pq-option-hint {
	font-size: 0.88em;
	opacity: 0.68;
}

/* Selected reads as one of the site's solid gold blocks. */
.pq--styled .pq-option[aria-pressed="true"] {
	background: var(--pq-accent) !important;
	border-color: var(--pq-accent) !important;
	box-shadow: none;
	color: #fff !important;
}

.pq--styled .pq-option[aria-pressed="true"] .pq-option-label,
.pq--styled .pq-option[aria-pressed="true"] .pq-option-hint {
	color: #fff;
	opacity: 1;
}

.pq--styled .pq-option[aria-pressed="true"] .pq-option-hint {
	opacity: 0.75;
}

.pq--styled .pq-option-mark {
	width: 16px;
	height: 16px;
	margin-top: -8px;
	border-color: rgba(28, 28, 28, 0.25);
}

.pq--styled .pq-option[aria-pressed="true"] .pq-option-mark {
	border-color: #fff;
}

.pq--styled .pq-option[aria-pressed="true"] .pq-option-mark::after {
	background: #fff;
}

.pq--styled .pq-option--open {
	border-style: dashed;
}

/* --- Buttons --- */

.pq--styled .pq-btn--primary {
	padding: 15px 36px;
	background: var(--pq-accent) !important;
	border: 1px solid var(--pq-accent) !important;
	border-radius: 0 !important;
	font-size: 0.84em !important;
	font-weight: 600 !important;
	letter-spacing: 0.16em !important;
	text-transform: uppercase !important;
	color: #fff !important;
}

.pq--styled .pq-btn--primary:hover {
	background: var(--pq-ink) !important;
	border-color: var(--pq-ink) !important;
	color: #fff !important;
}

.pq--styled .pq-btn--ghost {
	font-size: 0.78em;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	text-decoration: none;
	border-bottom: 1px solid var(--pq-hair);
	padding-bottom: 2px;
	opacity: 0.7;
}

.pq--styled .pq-btn--ghost:hover {
	opacity: 1;
	border-bottom-color: var(--pq-accent);
}

/* --- Contact fields --- */

.pq--styled .pq-field-label {
	font-size: 0.76em;
	letter-spacing: 0.14em;
	opacity: 0.72;
}

.pq--styled .pq-field input,
.pq--styled .pq-field select,
.pq--styled .pq-field textarea {
	padding: 15px 16px !important;
	background: #f4f2ee !important;
	border: 1px solid transparent !important;
	border-radius: 0 !important;
	font-size: 1em !important;
	color: var(--pq-ink) !important;
	box-shadow: none !important;
	text-transform: none !important;
}

.pq--styled .pq-field input:focus,
.pq--styled .pq-field select:focus,
.pq--styled .pq-field textarea:focus {
	background: #fff;
	border-color: var(--pq-accent);
	outline: none;
}

.pq--styled .pq-consent {
	font-size: 0.9em;
	opacity: 0.82;
}

.pq--styled .pq-consent a {
	color: var(--pq-accent);
}

/* --- Result panel: the one dark band, like the site's --- */

.pq--styled .pq-plaque {
	padding: clamp(26px, 5vw, 42px) clamp(22px, 4vw, 40px);
	background: var(--pq-ink) !important;
	border: 0;
	outline: 0;
	color: #fff !important;
}

/* Hairline-and-diamond rule, borrowed from the site's section headers. */
.pq--styled .pq-plaque .pq-eyebrow {
	position: relative;
	display: inline-block;
	padding: 0 26px;
	margin-bottom: 18px;
}

.pq--styled .pq-plaque .pq-eyebrow::before,
.pq--styled .pq-plaque .pq-eyebrow::after {
	content: "";
	position: absolute;
	top: 50%;
	width: 16px;
	height: 1px;
	background: var(--pq-accent);
	opacity: 0.6;
}

.pq--styled .pq-plaque .pq-eyebrow::before { left: 0; }
.pq--styled .pq-plaque .pq-eyebrow::after  { right: 0; }

.pq--styled .pq-figure {
	font-size: clamp(3.4em, 12vw, 5.4em);
	font-weight: 300 !important;
	letter-spacing: -0.02em;
	color: var(--pq-accent) !important;
}

.pq--styled .pq-figure-label {
	margin-top: 10px;
	font-size: 0.78em;
	letter-spacing: 0.14em;
	color: #fff;
	opacity: 0.72;
}

.pq-shortlist {
	max-width: 34ch;
	margin: 26px auto 0;
	font-size: 17px;
	line-height: 1.5;
}

.pq-shortlist b {
	font-weight: 600;
}

.pq--styled .pq-shortlist {
	padding-top: 24px;
	border-top: 1px solid rgba(255, 255, 255, 0.16);
	color: #fff;
}

.pq--styled .pq-shortlist b {
	color: var(--pq-accent);
	font-size: 1.2em;
}

.pq--styled .pq-facts {
	margin-top: 30px;
	padding-top: 24px;
	border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.pq--styled .pq-facts dt {
	font-size: 0.72em;
	letter-spacing: 0.14em;
	color: #fff;
	opacity: 0.68;
}

.pq--styled .pq-facts dd {
	font-size: 1.24em;
	font-weight: 400;
	color: #fff;
}

.pq--styled .pq-result-copy {
	margin-top: 24px;
	font-size: 1.02em;
	line-height: 1.6;
	opacity: 0.78;
}

.pq--styled.pq--framed {
	padding: clamp(24px, 5vw, 46px);
	border: 1px solid var(--pq-hair);
}

.pq--styled .pq-error {
	background: rgba(192, 57, 43, 0.06);
	font-size: 0.95em;
}

/* --- Figures screen ----------------------------------------------------- */

.pq-panel--figures .pq-plaque {
	margin-bottom: 26px;
}

/* The call to action carries this screen, so it sits centred and alone,
   with the way back demoted to a link underneath. */
.pq-nav--center {
	flex-direction: column;
	align-items: center;
	gap: 16px;
}

.pq .pq-nav--center .pq-btn--ghost {
	margin-right: 0;
}

.pq .pq-btn--cta {
	min-width: 240px;
	justify-content: center;
}

.pq-plaque.is-loading .pq-figure,
.pq-plaque.is-loading .pq-figure-label,
.pq-plaque.is-loading .pq-facts {
	opacity: 0.25;
}

.pq-plaque.is-loading .pq-shortlist {
	opacity: 0.7;
}

.pq-plaque .pq-figure,
.pq-plaque .pq-facts,
.pq-plaque .pq-figure-label {
	transition: opacity 0.35s ease;
}

.pq-panel--done {
	max-width: 46ch;
}

.pq--styled .pq-btn--cta {
	padding: 19px 48px !important;
	font-size: 0.92em !important;
	letter-spacing: 0.18em !important;
}
