/* ============================================================
   TRAVEL STORY — Lead pop-ups (welcome enquiry + exit intent)
   Two-panel modal: Kashmir visual on the left, short form on
   the right. Markup is injected by js/leadpop.js, so every page
   only needs this stylesheet and that script.
   ============================================================ */

.lp-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9000;                 /* over nav/wa-float (900–2000), under the custom cursor (10000) */
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(20, 32, 26, 0.74);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.45s var(--ease), visibility 0.45s var(--ease);
}
.lp-backdrop.is-open { opacity: 1; visibility: visible; }

.lp-modal {
  position: relative;
  width: min(940px, 100%);
  max-width: 100%;
  max-height: min(90vh, 780px);
  display: grid;
  grid-template-columns: 0.82fr 1fr;
  background: var(--paper);
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  transform: translateY(22px) scale(0.97);
  transition: transform 0.55s var(--ease);
}
.lp-backdrop.is-open .lp-modal { transform: none; }
/* grid children default to min-width:auto, which lets a long field
   push the modal wider than the phone, and a long form push it taller than
   its own max-height — at which point the overflow:hidden above eats the
   submit button. Pin them to the track in both directions. */
.lp-modal > * { min-width: 0; min-height: 0; }

/* ---------- Left: visual panel ---------- */
.lp-visual {
  position: relative;
  background: var(--ink);
  min-height: 320px;
  overflow: hidden;
}
.lp-visual img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.06);
  transition: transform 8s var(--ease);
}
.lp-backdrop.is-open .lp-visual img { transform: scale(1); }
.lp-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(165deg, rgba(20, 32, 26, 0.34) 0%, rgba(20, 32, 26, 0.68) 55%, rgba(20, 32, 26, 0.92) 100%);
}

.lp-visual-inner {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 26px;
  padding: 44px 38px 34px;
  color: #fff;
}
.lp-visual-inner .script-accent { font-size: 1.6rem; margin-bottom: 10px; color: var(--saffron); }
.lp-visual h2 {
  color: #fff;
  font-size: clamp(1.9rem, 3vw, 2.5rem);
  line-height: 1.08;
}
.lp-visual p {
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.82);
  margin-top: 12px;
  max-width: 34ch;
}
.lp-visual p strong { color: #fff; font-weight: 500; }

/* Support badge (the "24x7 call us" block in the reference, done in our palette) */
.lp-badge {
  background: rgba(247, 242, 230, 0.96);
  border-left: 3px solid var(--saffron);
  padding: 16px 20px;
  color: var(--ink);
}
.lp-badge .lp-badge-label {
  display: block;
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  color: var(--gold-dark);
  margin-bottom: 4px;
}
.lp-badge a {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.2;
  display: block;
}
.lp-badge a:hover { color: var(--gold-dark); }
.lp-badge small { display: block; font-size: 0.68rem; color: var(--grey); margin-top: 2px; }

/* ---------- Right: form panel ---------- */
.lp-panel {
  overscroll-behavior: contain;   /* scrolling the form must not scroll the page behind it */
  padding: 46px 44px 40px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.lp-panel > .eyebrow { margin-bottom: 14px; }
.lp-panel h3 { font-size: clamp(1.5rem, 2.4vw, 1.95rem); margin-bottom: 6px; }
.lp-panel .lp-sub { font-size: 0.88rem; color: var(--grey); margin-bottom: 26px; }

.lp-form .lp-field { margin-bottom: 20px; }
/* auto-fit, not a viewport query: the panel is narrow on a tablet too,
   and a date input has a stubborn intrinsic width that would otherwise
   push the whole modal past the screen edge */
.lp-form .lp-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 20px; }
.lp-form .lp-row > * { min-width: 0; }
.lp-form label {
  display: block;
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  color: var(--grey);
  margin-bottom: 7px;
}
.lp-form label .req { color: var(--chinar); }
/* "optional" should read as permission, not as a warning: muted and lower
   case, the opposite weight of the red asterisk it replaces. */
.lp-form label .opt {
  color: var(--grey);
  text-transform: none;
  letter-spacing: 0.4px;
  font-size: 0.92em;
  opacity: 0.7;
}

/* The reason to hand over a number, placed exactly where the hesitation is. */
.lp-hint {
  font-size: 0.66rem;
  color: var(--grey);
  margin-top: 7px;
  line-height: 1.5;
}

/* Says what is missing, instead of leaving a red underline to interpret. */
.lp-error {
  display: none;
  font-size: 0.72rem;
  color: var(--chinar);
  margin: 2px 0 12px;
  line-height: 1.5;
}
.lp-form input,
.lp-form select {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  padding: 11px 2px;
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 0.98rem;
  color: var(--ink);
  border-radius: 0;
  transition: border-color 0.4s;
}
.lp-form input:focus,
.lp-form select:focus { outline: none; border-color: var(--gold); }
.lp-form input::placeholder { color: #b3b7b3; }
.lp-form input:user-invalid { border-bottom-color: var(--chinar); }

/* Phone: country-code select welded to the number input */
/* The country gets its own line. A name like "United Arab Emirates
   (+971)" cannot share a row with the number without one of the two
   being squeezed to nothing or clipped mid-word. */
.lp-phone { display: grid; grid-template-columns: 1fr; gap: 12px; }
.lp-phone select { width: 100%; }

.lp-form .btn { display: block; width: 100%; margin-top: 8px; text-align: center; }
.lp-note {
  font-size: 0.68rem;
  color: var(--grey);
  margin-top: 16px;
  line-height: 1.6;
}

/* Close */
.lp-close {
  position: absolute;
  top: 14px;
  right: 16px;
  z-index: 4;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  transition: 0.35s var(--ease);
}
.lp-close:hover { background: var(--ink); color: #fff; transform: rotate(90deg); }

/* Dismiss link under the form — an honest way out beats a hidden × */
.lp-dismiss {
  margin-top: 18px;
  background: none;
  border: 0;
  font-family: var(--font-body);
  font-size: 0.68rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--grey);
  cursor: pointer;
  align-self: center;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
}
.lp-dismiss:hover { color: var(--ink); border-bottom-color: var(--line); }

/* ---------- Success state ---------- */
.lp-done { display: none; text-align: center; margin: auto 0; }
.lp-modal.is-done .lp-form,
.lp-modal.is-done .lp-panel > .eyebrow,
.lp-modal.is-done .lp-panel > h3,
.lp-modal.is-done .lp-panel > .lp-sub,
.lp-modal.is-done .lp-panel > .lp-dismiss { display: none; }
.lp-modal.is-done .lp-done { display: block; }
.lp-done .lp-tick {
  width: 62px;
  height: 62px;
  margin: 0 auto 22px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--gold-dark);
  font-size: 1.5rem;
}
.lp-done h3 { margin-bottom: 12px; }
.lp-done p { font-size: 0.9rem; color: var(--grey); }
.lp-done .btn { display: block; width: 100%; margin-top: 14px; text-align: center; }
.lp-done .lp-wa { margin-top: 24px; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .lp-modal { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); max-height: 92vh; }
  .lp-visual { min-height: 170px; max-height: 210px; }
  .lp-visual-inner { padding: 26px 26px 22px; gap: 16px; justify-content: flex-end; }
  .lp-visual p { display: none; }
  .lp-badge { display: none; }          /* the sticky WhatsApp button already covers this on phones */
  .lp-panel { padding: 30px 26px 28px; }
}
@media (max-width: 480px) {
  .lp-backdrop { padding: 0; }
  .lp-modal { width: 100%; max-height: 100vh; height: 100%; }
  .lp-visual { min-height: 140px; max-height: 150px; }
}

@media (prefers-reduced-motion: reduce) {
  .lp-modal,
  .lp-visual img { transition: none; transform: none; }
}

/* ---------- Already answered ----------
   A question the visitor has answered elsewhere is shown back to them as a
   chip, not re-asked as an empty field. */
.lp-answered { display: none !important; }

.lp-summary {
  background: var(--cream);
  border-left: 3px solid var(--saffron);
  padding: 14px 18px;
  margin-bottom: 24px;
}
.lp-sum-label {
  display: block;
  font-size: 0.58rem;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  color: var(--gold-dark);
  margin-bottom: 8px;
}
.lp-summary ul { display: flex; flex-wrap: wrap; gap: 7px; }
.lp-summary li {
  font-size: 0.76rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 5px 12px;
}
.lp-sum-edit {
  margin-top: 10px;
  background: none;
  border: 0;
  padding: 0;
  font-family: var(--font-body);
  font-size: 0.62rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--grey);
  cursor: pointer;
  border-bottom: 1px solid var(--line);
}
.lp-sum-edit:hover { color: var(--gold-dark); border-bottom-color: var(--gold); }
