/* Estate Dreams · Property Selection Quiz (Popup — Expanded 1060×610 Edition)
 * Namespace: .ed-pquiz-* (strictly scoped, zero global leaks)
 * Client tokens from dreams-estate.com: Manrope 400/600, #ec2427, #d71921, #1a1a1a, #242424, #ffffff, #f5f5f5, #666666
 */

.ed-pquiz-backdrop {
  --ed-red: #ec2427;
  --ed-red-hover: #d71921;
  --ed-red-soft: rgba(236, 36, 39, 0.08);
  --ed-black: #1a1a1a;
  --ed-dark: #242424;
  --ed-white: #ffffff;
  --ed-muted-bg: #f5f5f5;
  --ed-border: #e2e2e2;
  --ed-text: #1a1a1a;
  --ed-text-sub: #666666;
  --ed-font: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(12, 13, 16, 0.76);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.22s ease, visibility 0.22s ease;
  font-family: var(--ed-font);
  color: var(--ed-text);
  box-sizing: border-box;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}

.ed-pquiz-backdrop *,
.ed-pquiz-backdrop *::before,
.ed-pquiz-backdrop *::after {
  box-sizing: border-box;
  font-family: inherit;
}

.ed-pquiz-backdrop.ed-pquiz-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Main Dialog — spacious 1060×610 premium Marquiz proportion */
.ed-pquiz-dialog {
  position: relative;
  width: min(1060px, 100%);
  height: min(610px, calc(100dvh - 36px));
  display: grid;
  grid-template-columns: minmax(0, 1fr) 336px;
  background: var(--ed-white);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 32px 84px rgba(0, 0, 0, 0.48);
  transform: translateY(12px) scale(0.985);
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.ed-pquiz-backdrop.ed-pquiz-open .ed-pquiz-dialog {
  transform: translateY(0) scale(1);
}

/* Welcome Screen Mode switches layout to full-bleed 2-column showcase */
.ed-pquiz-dialog.ed-pquiz-is-welcome {
  grid-template-columns: minmax(0, 1fr);
}

.ed-pquiz-dialog.ed-pquiz-is-welcome .ed-pquiz-side,
.ed-pquiz-dialog.ed-pquiz-is-welcome .ed-pquiz-head,
.ed-pquiz-dialog.ed-pquiz-is-welcome .ed-pquiz-foot,
.ed-pquiz-dialog.ed-pquiz-is-welcome .ed-pquiz-mob-banner {
  display: none;
}

.ed-pquiz-dialog.ed-pquiz-is-welcome .ed-pquiz-body {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Close button */
.ed-pquiz-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 20;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  background: rgba(26, 26, 26, 0.78);
  backdrop-filter: blur(6px);
  color: var(--ed-white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: background 0.16s ease, transform 0.16s ease;
}

.ed-pquiz-close:hover {
  background: var(--ed-red);
  border-color: var(--ed-red);
}

.ed-pquiz-close:focus-visible {
  outline: 2px solid var(--ed-red);
  outline-offset: 2px;
}

/* =========================================================================
   WELCOME SCREEN (STEP 0)
   ========================================================================= */
.ed-pquiz-welcome {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 500px;
  height: 100%;
  min-height: 0;
}

.ed-pquiz-welcome-left {
  padding: 32px 38px 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--ed-white);
  min-width: 0;
}

.ed-pquiz-welcome-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.ed-pquiz-welcome-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.ed-pquiz-welcome-logo img {
  width: 82px;
  height: 36px;
  object-fit: contain;
  display: block;
}

.ed-pquiz-welcome-time {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-radius: 99px;
  background: var(--ed-muted-bg);
  color: var(--ed-black);
  font-size: 12.5px;
  font-weight: 600;
}

.ed-pquiz-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #27c26c;
  box-shadow: 0 0 0 3px rgba(39, 194, 108, 0.22);
  flex-shrink: 0;
}

.ed-pquiz-welcome-title {
  margin: 0 0 12px;
  font-size: 31px;
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.02em;
  color: var(--ed-black);
}

.ed-pquiz-welcome-desc {
  margin: 0 0 26px;
  font-size: 14.5px;
  line-height: 1.48;
  color: var(--ed-text-sub);
  max-width: 455px;
}

.ed-pquiz-welcome-metrics {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 28px;
}

.ed-pquiz-metric-card {
  padding: 0;
  border: 0;
  background: transparent;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 14px;
}

.ed-pquiz-metric-ico {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--ed-red-soft);
  color: var(--ed-red);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ed-pquiz-metric-val {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--ed-black);
  line-height: 1.24;
  margin-bottom: 2px;
}

.ed-pquiz-metric-lbl {
  display: block;
  font-size: 12.5px;
  line-height: 1.3;
  color: var(--ed-text-sub);
}

.ed-pquiz-welcome-cta-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: nowrap;
}

.ed-pquiz-start-btn {
  height: 52px;
  padding: 0 22px;
  border: 0;
  border-radius: 10px;
  background: var(--ed-red);
  color: var(--ed-white);
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  box-shadow: 0 10px 26px rgba(236, 36, 39, 0.34);
  transition: background 0.16s ease, transform 0.14s ease, box-shadow 0.16s ease;
}

.ed-pquiz-start-btn:hover {
  background: var(--ed-red-hover);
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(215, 25, 33, 0.42);
}

.ed-pquiz-start-btn:focus-visible {
  outline: 2px solid var(--ed-black);
  outline-offset: 3px;
}

.ed-pquiz-welcome-bonus {
  font-size: 12px;
  line-height: 1.36;
  color: var(--ed-text-sub);
  flex: 1 1 auto;
  min-width: 0;
}

.ed-pquiz-welcome-right {
  position: relative;
  height: 100%;
  overflow: hidden;
  background: #14151a;
}

.ed-pquiz-welcome-hero {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.ed-pquiz-welcome-scrim {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(16, 17, 22, 0) 0%, rgba(16, 17, 22, 0) 64%, rgba(16, 17, 22, 0.34) 100%);
}

.ed-pquiz-welcome-glass {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 24px;
  padding: 16px 18px;
  border-radius: 14px;
  background: rgba(24, 25, 30, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--ed-white);
}

.ed-pquiz-welcome-glass-tag {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 6px;
  background: var(--ed-red);
  color: var(--ed-white);
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 8px;
}

.ed-pquiz-welcome-glass-text {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.92);
}

/* =========================================================================
   QUESTION & CONTACT SHELL (STEPS 1..6)
   ========================================================================= */
.ed-pquiz-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  height: 100%;
  background: var(--ed-white);
}

.ed-pquiz-mob-banner {
  display: none;
}

.ed-pquiz-head {
  padding: 20px 34px 14px;
  border-bottom: 1px solid #efefef;
  flex-shrink: 0;
}

.ed-pquiz-eyebrow-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.ed-pquiz-offer {
  margin: 0;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ed-text-sub);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.ed-pquiz-offer-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ed-red);
  flex-shrink: 0;
}

.ed-pquiz-step-badge {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ed-red);
  background: var(--ed-red-soft);
  padding: 4px 12px;
  border-radius: 999px;
  white-space: nowrap;
}

.ed-pquiz-progress-track {
  width: 100%;
  height: 5px;
  border-radius: 999px;
  background: #ececec;
  overflow: hidden;
}

.ed-pquiz-progress-fill {
  height: 100%;
  width: 20%;
  border-radius: 999px;
  background: var(--ed-red);
  transition: width 0.28s ease;
}

.ed-pquiz-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 22px 34px 18px;
}

.ed-pquiz-step {
  display: none;
}

.ed-pquiz-step.ed-pquiz-step-active {
  display: block;
  height: 100%;
  animation: edPquizFade 0.22s ease;
}

@keyframes edPquizFade {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

.ed-pquiz-question {
  margin: 0 0 6px;
  font-size: 25px;
  font-weight: 600;
  line-height: 1.24;
  letter-spacing: -0.015em;
  color: var(--ed-black);
}

.ed-pquiz-hint {
  margin: 0 0 18px;
  font-size: 14px;
  font-weight: 400;
  color: var(--ed-text-sub);
  line-height: 1.42;
}

/* Option Grids */
.ed-pquiz-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.ed-pquiz-options--photo-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
}

.ed-pquiz-options--photo-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

/* Standard & Icon Option Cards */
.ed-pquiz-opt {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  padding: 15px 16px;
  border: 1.5px solid var(--ed-border);
  border-radius: 12px;
  background: var(--ed-white);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, transform 0.14s ease;
}

.ed-pquiz-opt:hover {
  border-color: #bebebe;
  background: #fafafa;
  transform: translateY(-1px);
}

.ed-pquiz-opt.ed-pquiz-opt-selected {
  border-color: var(--ed-red);
  background: var(--ed-red-soft);
  box-shadow: 0 4px 14px rgba(236, 36, 39, 0.12);
}

.ed-pquiz-opt input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.ed-pquiz-opt:has(input:focus-visible) {
  outline: 2px solid var(--ed-red);
  outline-offset: 2px;
}

/* Icon Badge inside Step 1 cards */
.ed-pquiz-opt-ico {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--ed-muted-bg);
  color: var(--ed-black);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.16s ease, color 0.16s ease;
}

.ed-pquiz-opt.ed-pquiz-opt-selected .ed-pquiz-opt-ico {
  background: var(--ed-red);
  color: var(--ed-white);
}

/* Radio / Checkbox indicator */
.ed-pquiz-opt-control {
  width: 20px;
  height: 20px;
  margin-top: 1px;
  flex-shrink: 0;
  border: 1.5px solid #c5c5c5;
  border-radius: 50%;
  background: var(--ed-white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.16s ease, background 0.16s ease;
}

.ed-pquiz-opt[data-type="checkbox"] .ed-pquiz-opt-control {
  border-radius: 6px;
}

.ed-pquiz-opt.ed-pquiz-opt-selected .ed-pquiz-opt-control {
  border-color: var(--ed-red);
  background: var(--ed-red);
}

.ed-pquiz-opt-control::after {
  content: "";
  display: block;
  opacity: 0;
  transition: opacity 0.14s ease;
}

.ed-pquiz-opt[data-type="radio"] .ed-pquiz-opt-control::after {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ed-white);
}

.ed-pquiz-opt[data-type="checkbox"] .ed-pquiz-opt-control::after {
  width: 11px;
  height: 6px;
  border-left: 2px solid var(--ed-white);
  border-bottom: 2px solid var(--ed-white);
  transform: rotate(-45deg) translate(1px, -1px);
}

.ed-pquiz-opt.ed-pquiz-opt-selected .ed-pquiz-opt-control::after {
  opacity: 1;
}

.ed-pquiz-opt-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  flex: 1;
}

.ed-pquiz-opt-title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.28;
  color: var(--ed-black);
}

.ed-pquiz-opt-desc {
  font-size: 12.5px;
  font-weight: 400;
  line-height: 1.35;
  color: var(--ed-text-sub);
}

/* Yield Visual Meter Bar inside Step 5 cards */
.ed-pquiz-yield-bar {
  margin-top: 8px;
  height: 5px;
  width: 100%;
  border-radius: 99px;
  background: #e9e9e9;
  overflow: hidden;
}

.ed-pquiz-yield-bar > span {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: var(--ed-red);
}

.ed-pquiz-yield-bar > .ed-pquiz-meter-18 { width: 18%; }
.ed-pquiz-yield-bar > .ed-pquiz-meter-40 { width: 40%; }
.ed-pquiz-yield-bar > .ed-pquiz-meter-68 { width: 68%; }
.ed-pquiz-yield-bar > .ed-pquiz-meter-95 { width: 95%; }

/* PHOTO OPTION CARDS (Step 2 Property Types & Step 4 Dubai Districts) */
.ed-pquiz-opt--photo {
  flex-direction: column;
  padding: 0;
  gap: 0;
  overflow: hidden;
}

.ed-pquiz-opt-media {
  position: relative;
  width: 100%;
  height: 104px;
  overflow: hidden;
  background: #222;
}

.ed-pquiz-options--photo-3 .ed-pquiz-opt-media {
  height: 92px;
}

.ed-pquiz-opt-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.28s ease;
}

.ed-pquiz-opt--photo:hover .ed-pquiz-opt-media img {
  transform: scale(1.04);
}

.ed-pquiz-opt--photo .ed-pquiz-opt-control {
  position: absolute;
  top: 8px;
  right: 8px;
  margin: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
  border-color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.92);
}

.ed-pquiz-opt--photo.ed-pquiz-opt-selected .ed-pquiz-opt-control {
  background: var(--ed-red);
  border-color: var(--ed-red);
}

.ed-pquiz-opt-photo-body {
  padding: 10px 12px 11px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
}

.ed-pquiz-options--photo-3 .ed-pquiz-opt-photo-body {
  padding: 8px 10px 9px;
}

.ed-pquiz-options--photo-3 .ed-pquiz-opt-title {
  font-size: 13.5px;
}

.ed-pquiz-options--photo-3 .ed-pquiz-opt-desc {
  font-size: 11.5px;
}

/* Budget pill tag on Step 3 */
.ed-pquiz-opt-pill {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 99px;
  background: var(--ed-red);
  color: var(--ed-white);
  font-size: 10.5px;
  font-weight: 600;
  vertical-align: middle;
}

/* Validation inline message */
.ed-pquiz-error {
  margin: 10px 0 0;
  min-height: 18px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ed-red-hover);
}

.ed-pquiz-error:empty {
  display: none;
}

/* Final Lead Form Step */
.ed-pquiz-channels {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.ed-pquiz-channel {
  flex: 1 1 130px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 44px;
  padding: 0 14px;
  border: 1.5px solid var(--ed-border);
  border-radius: 10px;
  background: var(--ed-white);
  color: var(--ed-black);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.ed-pquiz-channel:hover {
  border-color: #b8b8b8;
}

.ed-pquiz-channel.ed-pquiz-channel-active {
  border-color: var(--ed-red);
  background: var(--ed-red-soft);
  color: var(--ed-red-hover);
}

.ed-pquiz-channel:focus-visible {
  outline: 2px solid var(--ed-red);
  outline-offset: 2px;
}

.ed-pquiz-fields {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.ed-pquiz-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ed-pquiz-field label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ed-text-sub);
}

.ed-pquiz-field input {
  width: 100%;
  height: 48px;
  padding: 0 15px;
  border: 1.5px solid #d8d8d8;
  border-radius: 10px;
  background: var(--ed-white);
  color: var(--ed-black);
  font-size: 15px;
  font-weight: 400;
  transition: border-color 0.16s ease;
}

.ed-pquiz-field input:focus {
  outline: none;
  border-color: var(--ed-red);
}

.ed-pquiz-field input.ed-pquiz-invalid {
  border-color: var(--ed-red-hover);
  background: #fff8f8;
}

.ed-pquiz-submit-btn {
  width: 100%;
  height: 52px;
  border: 0;
  border-radius: 10px;
  background: var(--ed-red);
  color: var(--ed-white);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 8px 22px rgba(236, 36, 39, 0.3);
  transition: background 0.16s ease;
}

.ed-pquiz-submit-btn:hover {
  background: var(--ed-red-hover);
}

.ed-pquiz-submit-btn:focus-visible {
  outline: 2px solid var(--ed-black);
  outline-offset: 2px;
}

.ed-pquiz-consent {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 14px;
  cursor: pointer;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--ed-text-sub);
}

.ed-pquiz-consent input[type="checkbox"] {
  width: 17px;
  height: 17px;
  margin: 1px 0 0;
  flex-shrink: 0;
  accent-color: var(--ed-red);
  cursor: pointer;
}

.ed-pquiz-consent a {
  color: var(--ed-red-hover);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.ed-pquiz-consent a:hover {
  color: var(--ed-black);
}

.ed-pquiz-consent.ed-pquiz-invalid {
  color: var(--ed-red-hover);
}

.ed-pquiz-step[data-kind="contact"].ed-pquiz-step-active {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.ed-pquiz-form {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
}

.ed-pquiz-contact-back-wrap {
  margin-top: auto;
  padding-top: 16px;
  display: flex;
  justify-content: flex-start;
}

.ed-pquiz-btn-back-sm {
  height: 40px;
  font-size: 13.5px;
  padding: 0 16px;
}

/* Thank You Screen */
.ed-pquiz-success {
  padding: 6px 0;
}

.ed-pquiz-success-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--ed-red-soft);
  color: var(--ed-red);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.ed-pquiz-summary {
  margin: 16px 0 20px;
  padding: 14px 18px;
  border-radius: 12px;
  background: var(--ed-muted-bg);
  border: 1px solid #eaeaea;
  display: grid;
  gap: 8px;
  font-size: 13.5px;
}

.ed-pquiz-summary-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.ed-pquiz-summary-row span {
  color: var(--ed-text-sub);
  flex-shrink: 0;
}

.ed-pquiz-summary-row strong {
  color: var(--ed-black);
  font-weight: 600;
  text-align: right;
}

.ed-pquiz-success-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Footer Nav Bar */
.ed-pquiz-foot {
  padding: 14px 34px 20px;
  border-top: 1px solid #efefef;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
  background: var(--ed-white);
}

.ed-pquiz-foot[hidden] {
  display: none;
}

.ed-pquiz-btn-back {
  height: 44px;
  padding: 0 18px;
  border: 1.5px solid var(--ed-border);
  border-radius: 9px;
  background: var(--ed-white);
  color: var(--ed-black);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: border-color 0.16s ease, background 0.16s ease;
}

.ed-pquiz-btn-back:hover:not(:disabled) {
  border-color: #bdbdbd;
  background: #f7f7f7;
}

.ed-pquiz-btn-back:disabled {
  opacity: 0.4;
  cursor: default;
}

.ed-pquiz-btn-next {
  height: 44px;
  padding: 0 26px;
  border: 0;
  border-radius: 9px;
  background: var(--ed-red);
  color: var(--ed-white);
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background 0.16s ease;
}

.ed-pquiz-btn-next:hover {
  background: var(--ed-red-hover);
}

.ed-pquiz-btn-back:focus-visible,
.ed-pquiz-btn-next:focus-visible {
  outline: 2px solid var(--ed-red);
  outline-offset: 2px;
}

/* Right Visual & Adviser Sidebar (Desktop 336px) */
.ed-pquiz-side {
  display: flex;
  flex-direction: column;
  background: var(--ed-black);
  color: var(--ed-white);
  min-height: 0;
  height: 100%;
  position: relative;
}

.ed-pquiz-visual-wrap {
  position: relative;
  height: 230px;
  flex-shrink: 0;
  overflow: hidden;
  background: radial-gradient(circle at 50% 42%, #2c2d34 0%, #14151a 100%);
}

.ed-pquiz-visual-wrap img.ed-pquiz-side-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  display: block;
  transition: opacity 0.25s ease;
}

.ed-pquiz-visual-wrap.ed-pquiz-visual-contain {
  height: 274px;
  background: radial-gradient(circle at 50% 54%, #2d2f38 0%, #16171d 100%);
}

.ed-pquiz-visual-wrap.ed-pquiz-visual-contain img.ed-pquiz-side-photo {
  object-fit: contain;
  padding: 46px 10px 6px;
}

.ed-pquiz-visual-scrim {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(20, 20, 24, 0.14) 0%, rgba(20, 20, 24, 0) 48%, rgba(26, 26, 26, 0.92) 100%);
}

.ed-pquiz-visual-wrap.ed-pquiz-visual-contain .ed-pquiz-visual-scrim {
  background: linear-gradient(180deg, rgba(20, 20, 24, 0) 0%, rgba(20, 20, 24, 0) 78%, rgba(26, 26, 26, 0.82) 100%);
}

.ed-pquiz-brand-pill {
  position: absolute;
  top: 14px;
  left: 16px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  padding: 0;
  border-radius: 0;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: 0;
}

.ed-pquiz-brand-pill img {
  width: 78px;
  height: 34px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.36));
}

.ed-pquiz-side-content {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 12px 22px 20px;
  gap: 12px;
}

.ed-pquiz-tip-box {
  padding: 15px 16px;
  border-radius: 14px;
  background: var(--ed-dark);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.ed-pquiz-tip-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.ed-pquiz-tip-avatar-wrap {
  position: relative;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.ed-pquiz-tip-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 20%;
  display: block;
  border: 1.5px solid rgba(255, 255, 255, 0.22);
}

.ed-pquiz-tip-badge {
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #27c26c;
  border: 1.5px solid var(--ed-dark);
}

.ed-pquiz-tip-title {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ed-white);
}

.ed-pquiz-tip-text {
  margin: 0;
  font-size: 13px;
  line-height: 1.48;
  color: rgba(255, 255, 255, 0.84);
}

.ed-pquiz-perks-title {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.54);
}

.ed-pquiz-perks {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 9px;
}

.ed-pquiz-perks li {
  position: relative;
  padding-left: 16px;
  font-size: 13px;
  line-height: 1.38;
  color: rgba(255, 255, 255, 0.9);
}

.ed-pquiz-perks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ed-red);
}

/* =========================================================================
   TABLET & MOBILE RESPONSIVE
   ========================================================================= */
@media (max-width: 960px) {
  .ed-pquiz-dialog {
    grid-template-columns: 1fr;
    width: min(640px, 100%);
    height: auto;
    max-height: calc(100dvh - 24px);
  }

  .ed-pquiz-side {
    display: none;
  }

  .ed-pquiz-welcome {
    grid-template-columns: 1fr;
    height: auto;
    overflow-y: auto;
  }

  .ed-pquiz-welcome-right {
    order: -1;
    height: 204px;
  }

  .ed-pquiz-welcome-glass {
    left: 16px;
    right: 16px;
    bottom: 14px;
    padding: 12px 15px;
  }

  .ed-pquiz-welcome-left {
    padding: 22px 24px 24px;
  }

  .ed-pquiz-welcome-title {
    font-size: 25px;
  }

  .ed-pquiz-mob-banner {
    display: block;
    position: relative;
    height: 78px;
    flex-shrink: 0;
    overflow: hidden;
    background: var(--ed-black);
  }

  .ed-pquiz-mob-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }

  .ed-pquiz-mob-banner-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(20, 20, 24, 0.88) 0%, rgba(20, 20, 24, 0.45) 68%, rgba(20, 20, 24, 0.32) 100%);
    display: flex;
    align-items: center;
    padding: 0 54px 0 18px;
  }

  .ed-pquiz-mob-banner-overlay strong {
    font-size: 14.5px;
    font-weight: 600;
    color: var(--ed-white);
    line-height: 1.28;
  }

  .ed-pquiz-eyebrow-row {
    justify-content: flex-end;
    margin-bottom: 8px;
  }

  .ed-pquiz-offer {
    display: none;
  }
}

@media (max-width: 600px) {
  .ed-pquiz-backdrop {
    padding: 10px;
    /*align-items: center;*/
    align-items: flex-start;
      overflow-y: auto;
  }

  .ed-pquiz-dialog {
    width: 100%;
    /*max-height: calc(100dvh - 20px);*/
    max-height: max-content;
    border-radius: 16px;
  }

  .ed-pquiz-close {
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
  }

  .ed-pquiz-welcome-right {
    height: 174px;
  }

  .ed-pquiz-welcome-glass {
    left: 12px;
    right: 12px;
    bottom: 10px;
    padding: 9px 12px;
  }

  .ed-pquiz-welcome-glass-tag {
    margin-bottom: 5px;
  }

  .ed-pquiz-welcome-glass-text {
    font-size: 11.5px;
  }

  .ed-pquiz-welcome-left {
    padding: 16px 16px 18px;
  }

  .ed-pquiz-welcome-top {
    margin-bottom: 10px;
  }

  .ed-pquiz-welcome-logo img {
    width: 68px;
    height: 28px;
  }

  .ed-pquiz-welcome-time {
    font-size: 11px;
    padding: 4px 9px;
  }

  .ed-pquiz-welcome-title {
    font-size: 21px;
    margin-bottom: 8px;
  }

  .ed-pquiz-welcome-desc {
    font-size: 13px;
    margin-bottom: 14px;
  }

  .ed-pquiz-welcome-metrics {
    gap: 13px;
    margin-bottom: 18px;
  }

  .ed-pquiz-metric-card {
    padding: 0;
    gap: 10px;
  }

  .ed-pquiz-metric-ico {
    width: 30px;
    height: 30px;
    border-radius: 8px;
  }

  .ed-pquiz-welcome-cta-row {
    flex-wrap: wrap;
    gap: 10px;
  }

  .ed-pquiz-metric-val {
    font-size: 13px;
  }

  .ed-pquiz-metric-lbl {
    font-size: 10.5px;
  }

  .ed-pquiz-start-btn {
    width: 100%;
    justify-content: center;
    height: 46px;
    font-size: 14.5px;
  }

  .ed-pquiz-welcome-bonus {
    max-width: none;
    font-size: 11.5px;
    text-align: center;
  }

  .ed-pquiz-mob-banner {
    height: 68px;
  }

  .ed-pquiz-head {
    padding: 10px 16px;
  }

  .ed-pquiz-body {
    padding: 14px 16px 12px;
  }

  .ed-pquiz-question {
    font-size: 19px;
  }

  .ed-pquiz-hint {
    font-size: 12.5px;
    margin-bottom: 12px;
  }

  .ed-pquiz-options {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .ed-pquiz-options--photo-2,
  .ed-pquiz-options--photo-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .ed-pquiz-opt {
    padding: 11px 12px;
  }

  .ed-pquiz-opt--photo {
    padding: 0;
  }

  .ed-pquiz-opt-media,
  .ed-pquiz-options--photo-3 .ed-pquiz-opt-media {
    height: 76px;
  }

  .ed-pquiz-opt-photo-body,
  .ed-pquiz-options--photo-3 .ed-pquiz-opt-photo-body {
    padding: 7px 8px 8px;
  }

  .ed-pquiz-opt-title,
  .ed-pquiz-options--photo-3 .ed-pquiz-opt-title {
    font-size: 12.5px;
  }

  .ed-pquiz-opt-desc,
  .ed-pquiz-options--photo-3 .ed-pquiz-opt-desc {
    font-size: 11px;
  }

  .ed-pquiz-opt-ico {
    width: 34px;
    height: 34px;
  }

  .ed-pquiz-fields {
    grid-template-columns: 1fr;
  }

  .ed-pquiz-foot {
    padding: 12px 16px 14px;
  }

  .ed-pquiz-btn-back,
  .ed-pquiz-btn-next {
    height: 40px;
    font-size: 13.5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ed-pquiz-backdrop,
  .ed-pquiz-dialog,
  .ed-pquiz-progress-fill,
  .ed-pquiz-opt,
  .ed-pquiz-opt-media img,
  .ed-pquiz-step.ed-pquiz-step-active {
    transition: none;
    animation: none;
  }
}


/* =========================================================================
   PRO INTERACTIVE ADDITIONS: Live Match Counter, Budget Slider, Locked Teaser
   ========================================================================= */
.ed-pquiz-head-right {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.ed-pquiz-match-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 999px;
  background: #f4f5f7;
  border: 1px solid #e5e7eb;
  color: var(--ed-black);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.ed-pquiz-match-pill.is-pulsing {
  transform: scale(1.05);
  background: #fff1f2;
  border-color: rgba(236, 36, 39, 0.35);
}

.ed-pquiz-match-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #27c26c;
  flex-shrink: 0;
}

/* Interactive Budget Range Slider on Step 3 */
.ed-pquiz-slider-box {
  margin: 0 0 10px;
  padding: 9px 14px 8px;
  border-radius: 12px;
  background: #f8f8fa;
  border: 1px solid #ececef;
}

.ed-pquiz-slider-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 5px;
}

.ed-pquiz-slider-lbl {
  font-size: 12px;
  font-weight: 600;
  color: var(--ed-text-sub);
}

.ed-pquiz-slider-val {
  font-size: 16.5px;
  font-weight: 600;
  color: var(--ed-red);
  letter-spacing: -0.01em;
}

.ed-pquiz-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 99px;
  background: #e2e4e9;
  outline: none;
  cursor: pointer;
}

.ed-pquiz-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--ed-red);
  border: 3px solid #ffffff;
  box-shadow: 0 3px 10px rgba(236, 36, 39, 0.42);
  cursor: pointer;
  transition: transform 0.14s ease;
}

.ed-pquiz-range::-webkit-slider-thumb:hover {
  transform: scale(1.1);
}

.ed-pquiz-range::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--ed-red);
  border: 3px solid #ffffff;
  box-shadow: 0 3px 10px rgba(236, 36, 39, 0.42);
  cursor: pointer;
}

.ed-pquiz-slider-scale {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 11px;
  color: #888;
}

/* Tighten Step 3 cards so slider + 6 options fit at strictly 0 overflow in 1060x610 */
.ed-pquiz-step[data-key="budget"] .ed-pquiz-question {
  margin-bottom: 4px;
}
.ed-pquiz-step[data-key="budget"] .ed-pquiz-hint {
  margin-bottom: 9px;
}
.ed-pquiz-step[data-key="budget"] .ed-pquiz-opt {
  padding: 8px 12px;
}
.ed-pquiz-step[data-key="budget"] .ed-pquiz-opt-desc {
  line-height: 1.25;
}
.ed-pquiz-step[data-key="budget"] .ed-pquiz-options {
  gap: 7px;
}

/* Locked / Frosted Shortlist Teaser inside Right Sidebar on Contact Step */
.ed-pquiz-teaser-wrap {
  display: none;
  flex-direction: column;
  gap: 9px;
}

.ed-pquiz-dialog.ed-pquiz-on-contact .ed-pquiz-perks-block,
.ed-pquiz-dialog.ed-pquiz-on-contact .ed-pquiz-tip-box {
  display: none;
}

.ed-pquiz-dialog.ed-pquiz-on-contact .ed-pquiz-teaser-wrap {
  display: flex;
}

.ed-pquiz-teaser-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.ed-pquiz-teaser-title {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.25;
}

.ed-pquiz-teaser-lock {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 99px;
  background: rgba(236, 36, 39, 0.22);
  color: #ff9497;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

.ed-pquiz-teaser-list {
  display: grid;
  gap: 7px;
}

.ed-pquiz-teaser-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 9px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.09);
}

.ed-pquiz-teaser-thumb {
  width: 46px;
  height: 36px;
  border-radius: 7px;
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
}

.ed-pquiz-teaser-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ed-pquiz-teaser-info {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ed-pquiz-teaser-name {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  filter: blur(3.5px);
  user-select: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ed-pquiz-teaser-meta {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.68);
  display: flex;
  align-items: center;
  gap: 6px;
}

.ed-pquiz-teaser-roi {
  color: #4ade80;
  font-weight: 600;
}

@media (max-width: 600px) {
  .ed-pquiz-match-pill { font-size: 10.5px; padding: 3px 8px; }
  .ed-pquiz-slider-box { padding: 10px 12px; margin-bottom: 10px; }
  .ed-pquiz-slider-val { font-size: 15.5px; }
}
