/* ==========================================================================
   Off-plan project requirements popup — split layout
   Left: dark panel with the step-by-step requirements wizard.
   Right: the project's main image.
   Applied by adding .op-theme to the overlay and .op-popup to the dialog.
   Shared by the AZHA, Tiger Downtown and off-plan listing popups.
   ========================================================================== */

.op-theme {
  --op-bg: #0b1f1b;
  --op-gold: #d3b06f;
  --op-gold-strong: #e2c48a;
  --op-line: rgba(211, 176, 111, 0.45);
  --op-line-soft: rgba(211, 176, 111, 0.22);
  --op-text: #f4efe6;
  --op-muted: rgba(244, 239, 230, 0.66);
  --op-field: rgba(255, 255, 255, 0.04);
  background: rgba(6, 14, 12, 0.72);
  padding: 20px;
}

/* ---------- Frame ---------- */
.op-theme .op-popup {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  width: 100%;
  max-width: 1080px;
  min-height: min(680px, calc(100dvh - 40px));
  max-height: calc(100vh - 40px);
  max-height: calc(100dvh - 40px);
  padding: 0;
  overflow: hidden;
  background: var(--op-bg);
  color: var(--op-text);
  border: 1px solid var(--op-line);
  border-radius: 24px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

.op-theme .op-popup-body {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow-y: auto;
  padding: 40px 44px 26px;
  scrollbar-width: thin;
  scrollbar-color: var(--op-line) transparent;
}

.op-theme .op-popup-body > form,
.op-theme .op-popup-body > .tiger-lead-panel {
  flex: 0 0 auto;
}

.op-theme .op-popup .tiger-lead-panel {
  background: transparent;
  box-shadow: none;
  border-radius: 0;
}

/* ---------- Image side ---------- */
.op-theme .op-popup-media {
  position: relative;
  margin: 0;
  min-height: 100%;
  background: #12302a;
  border-left: 1px solid var(--op-line);
}

.op-theme .op-popup-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.op-theme .op-popup-media::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 40%;
  background: linear-gradient(to top, rgba(6, 14, 12, 0.7), transparent);
  pointer-events: none;
}

.op-theme .op-popup-media figcaption {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 20px;
  z-index: 1;
  color: #ffffff;
  font-family: var(--font-heading);
  font-size: 1.05rem;
  line-height: 1.3;
}

.op-theme .op-popup-media figcaption small {
  display: block;
  margin-top: 4px;
  font-family: var(--font-body);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--op-gold-strong);
}

/* ---------- Close button (sits over the image) ---------- */
.op-theme .op-popup .tiger-popup-close,
.op-theme .op-popup .lead-popup-close {
  top: 16px;
  right: 16px;
  z-index: 3;
  width: 38px;
  height: 38px;
  background: rgba(6, 14, 12, 0.6);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(6px);
}

.op-theme .op-popup .tiger-popup-close:hover,
.op-theme .op-popup .lead-popup-close:hover {
  background: var(--op-gold);
  border-color: var(--op-gold);
  color: var(--op-bg);
}

/* ---------- Brand line + heading ---------- */
.op-theme .op-popup .tiger-eyebrow,
.op-theme .op-popup .lead-popup-eyebrow {
  display: block;
  color: var(--op-text);
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  margin: 0 0 14px;
}

.op-theme .op-popup .tiger-h2,
.op-theme .op-popup .op-popup-title {
  color: var(--op-gold);
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: clamp(1.6rem, 2.6vw, 2.15rem);
  line-height: 1.1;
  margin: 0 0 10px;
}

.op-theme .op-popup .tiger-lede,
.op-theme .op-popup .azha-popup-intro {
  color: var(--op-muted);
  font-size: 0.92rem;
  line-height: 1.55;
  margin: 0;
}

.op-theme .op-popup .lead-popup-progress {
  margin: 14px 0 18px;
}

.op-theme .op-popup .lead-popup-project {
  background: transparent;
  color: var(--op-gold);
  border: 1px solid var(--op-line);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
}

/* ---------- Progress ---------- */
.op-theme .op-popup .azha-progress-track,
.op-theme .op-popup .tiger-wizard-progress,
.op-theme .op-popup .lead-popup-progress {
  background: var(--op-line-soft);
  height: 3px;
}

.op-theme .op-popup .azha-progress-bar,
.op-theme .op-popup .tiger-wizard-progress-fill,
.op-theme .op-popup .lead-popup-progress-fill {
  background: var(--op-gold);
}

.op-theme .op-popup .azha-progress-label,
.op-theme .op-popup .tiger-wizard-count {
  color: var(--op-gold);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

/* ---------- Questions ---------- */
.op-theme .op-popup legend,
.op-theme .op-popup .tiger-wizard-question,
.op-theme .op-popup .lead-popup-question {
  color: var(--op-text);
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 1.22rem;
}

.op-theme .op-popup .azha-step-hint,
.op-theme .op-popup .tiger-wizard-hint {
  color: var(--op-muted);
}

/* ---------- Option boxes ---------- */
.op-theme .op-popup .azha-option,
.op-theme .op-popup .tiger-option-chip,
.op-theme .op-popup .lead-popup-option {
  background: transparent;
  color: var(--op-text);
  border: 1px solid var(--op-line);
  border-radius: 12px;
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 0.98rem;
  text-align: left;
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.op-theme .op-popup .azha-option:hover,
.op-theme .op-popup .tiger-option-chip:hover,
.op-theme .op-popup .lead-popup-option:hover {
  background: rgba(211, 176, 111, 0.1);
  border-color: var(--op-gold);
}

.op-theme .op-popup .azha-option[aria-pressed="true"],
.op-theme .op-popup .tiger-option-chip[aria-pressed="true"] {
  background: var(--op-gold);
  border-color: var(--op-gold);
  color: var(--op-bg);
}

.op-theme .op-popup .azha-option:focus-visible,
.op-theme .op-popup .tiger-option-chip:focus-visible,
.op-theme .op-popup .lead-popup-option:focus-visible {
  outline: 2px solid var(--op-gold-strong);
  outline-offset: 2px;
}

/* ---------- Contact fields ---------- */
.op-theme .op-popup .tiger-lead-field label,
.op-theme .op-popup .lead-popup-field label {
  color: var(--op-gold);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
}

.op-theme .op-popup .tiger-lead-field input,
.op-theme .op-popup .tiger-lead-field select,
.op-theme .op-popup .lead-popup-field input {
  background: var(--op-field);
  color: var(--op-text);
  border: 1px solid var(--op-line);
  border-radius: 10px;
}

.op-theme .op-popup .tiger-lead-field select option {
  color: #0b1f1b;
}

.op-theme .op-popup input::placeholder {
  color: rgba(244, 239, 230, 0.38);
}

.op-theme .op-popup .tiger-lead-field input:focus,
.op-theme .op-popup .tiger-lead-field select:focus,
.op-theme .op-popup .lead-popup-field input:focus {
  outline: none;
  border-color: var(--op-gold);
  box-shadow: 0 0 0 3px rgba(211, 176, 111, 0.18);
}

.op-theme .op-popup .field-error,
.op-theme .op-popup .azha-step-error {
  color: #f0a58f;
}

.op-theme .op-popup .lead-popup-field.has-error input {
  border-color: #f0a58f;
  box-shadow: none;
}

.op-theme .op-popup .azha-privacy-note,
.op-theme .op-popup .lead-popup-note {
  color: var(--op-muted);
}

.op-theme .op-popup .azha-privacy-note a,
.op-theme .op-popup .lead-popup-note a {
  color: var(--op-gold);
}

/* ---------- Buttons ---------- */
.op-theme .op-popup .btn-primary,
.op-theme .op-popup .lead-popup-submit {
  background: var(--op-gold);
  border: 1px solid var(--op-gold);
  color: var(--op-bg);
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  box-shadow: none;
}

.op-theme .op-popup .btn-primary:hover,
.op-theme .op-popup .lead-popup-submit:hover {
  background: var(--op-gold-strong);
  border-color: var(--op-gold-strong);
  color: var(--op-bg);
}

.op-theme .op-popup .btn-outline {
  background: transparent;
  border: 1px solid var(--op-line);
  color: var(--op-text);
  border-radius: 6px;
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.op-theme .op-popup .btn-outline:hover {
  border-color: var(--op-gold);
  color: var(--op-gold);
  background: transparent;
}

.op-theme .op-popup .tiger-wizard-back,
.op-theme .op-popup .lead-popup-back {
  color: var(--op-muted);
  letter-spacing: 0.08em;
}

.op-theme .op-popup .tiger-wizard-back:hover,
.op-theme .op-popup .lead-popup-back:hover {
  color: var(--op-gold);
}

/* ---------- Result screen ---------- */
.op-theme .op-popup .tiger-lead-success h3,
.op-theme .op-popup .lead-popup-success h2 {
  color: var(--op-gold);
  font-family: var(--font-heading);
  font-weight: 500;
}

.op-theme .op-popup .tiger-lead-success p,
.op-theme .op-popup .lead-popup-success p,
.op-theme .op-popup .azha-reference-label {
  color: var(--op-muted);
}

.op-theme .op-popup .azha-reference {
  background: transparent;
  color: var(--op-gold);
  border: 1px dashed var(--op-line);
}

/* ---------- Footer line (the spacer pushes it to the bottom of the panel) ---------- */
.op-theme .op-popup-spacer {
  flex: 1 0 18px;
}

.op-theme .op-popup-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--op-line-soft);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--op-muted);
}

.op-theme .op-popup-foot a {
  color: var(--op-text);
  text-decoration: none;
}

.op-theme .op-popup-foot a:hover {
  color: var(--op-gold);
}

/* ---------- Tablet / phone: single column, image becomes a slim banner ---------- */
@media (max-width: 860px) {
  .op-theme {
    padding: 12px;
  }

  .op-theme .op-popup {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
    max-width: 560px;
    min-height: 0;
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
    border-radius: 20px;
  }

  .op-theme .op-popup-media {
    order: -1;
    height: 88px;
    min-height: 0;
    border-left: 0;
    border-bottom: 1px solid var(--op-line);
  }

  .op-theme .op-popup-media figcaption {
    left: 18px;
    bottom: 12px;
    font-size: 0.95rem;
  }

  .op-theme .op-popup-body {
    padding: 22px 18px 16px;
  }

  .op-theme .op-popup .tiger-h2,
  .op-theme .op-popup .op-popup-title {
    font-size: 1.4rem;
  }

  .op-theme .op-popup .tiger-eyebrow,
  .op-theme .op-popup .lead-popup-eyebrow {
    font-size: 0.7rem;
    margin-bottom: 8px;
  }

  /* The WhatsApp button and mobile bar already cover contact on phones. */
  .op-theme .op-popup-foot {
    display: none;
  }

  .op-theme .op-popup-spacer {
    flex-basis: 0;
  }
}

/* Short phones: drop the banner so every step still fits without scrolling. */
@media (max-width: 860px) and (max-height: 760px) {
  .op-theme .op-popup {
    grid-template-rows: minmax(0, 1fr);
  }

  .op-theme .op-popup-media {
    display: none;
  }

  .op-theme .op-popup .tiger-popup-close,
  .op-theme .op-popup .lead-popup-close {
    top: 12px;
    right: 12px;
    width: 34px;
    height: 34px;
  }
}

/* Short laptop screens: tighter vertical rhythm. */
@media (min-width: 861px) and (max-height: 720px) {
  .op-theme .op-popup-body {
    padding: 28px 36px 18px;
  }

  .op-theme .op-popup .tiger-h2,
  .op-theme .op-popup .op-popup-title {
    font-size: 1.5rem;
  }

  .op-theme .op-popup-foot {
    padding-top: 10px;
  }
}

/* Small phones (e.g. 360x640): compact type and spacing. */
@media (max-width: 860px) and (max-height: 700px) {
  .op-theme .op-popup-body {
    padding: 18px 16px 14px;
  }

  .op-theme .op-popup .tiger-eyebrow,
  .op-theme .op-popup .lead-popup-eyebrow {
    display: none;
  }

  .op-theme .op-popup .tiger-h2,
  .op-theme .op-popup .op-popup-title {
    font-size: 1.2rem;
    margin: 0 44px 6px 0;
  }

  .op-theme .op-popup legend,
  .op-theme .op-popup .tiger-wizard-question,
  .op-theme .op-popup .lead-popup-question {
    font-size: 1.05rem;
  }

  .op-theme .op-popup .azha-option,
  .op-theme .op-popup .tiger-option-chip,
  .op-theme .op-popup .lead-popup-option {
    min-height: 40px;
    padding-top: 8px;
    padding-bottom: 8px;
    font-size: 0.88rem;
  }

  .op-theme .op-popup .lead-popup-progress {
    margin: 10px 0 12px;
  }

  .op-theme .op-popup .lead-popup-project {
    margin-bottom: 6px;
    padding: 4px 12px;
  }

  .op-theme .op-popup .tiger-lead-field,
  .op-theme .op-popup .lead-popup-field {
    margin-bottom: 8px;
  }

  .op-theme .op-popup .tiger-lead-field input,
  .op-theme .op-popup .tiger-lead-field select,
  .op-theme .op-popup .lead-popup-field input {
    min-height: 40px;
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .op-theme .op-popup .lead-popup-field {
    gap: 4px;
  }

  .op-theme .op-popup .lead-popup-note,
  .op-theme .op-popup .azha-privacy-note {
    font-size: 0.74rem;
    margin-bottom: 8px;
  }
}

/* Keep email addresses in their normal lowercase form. */
.op-theme .op-popup-foot a[href^="mailto:"] {
  text-transform: none;
  letter-spacing: 0.04em;
}
