/* ==========================================================================
   JPC VELORA — lead capture (leads.js): pop-up, forms, floor-plan viewer,
   side rail + mobile action bar. Re-uses the site's own tokens and controls.
   ========================================================================== */

/* ---------- modal shell ---------- */
.vl { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 24px; visibility: hidden; pointer-events: none; }
.vl.is-open { visibility: visible; pointer-events: auto; }
.vl__veil { position: absolute; inset: 0; background: rgba(11,22,36,.84); opacity: 0; transition: opacity .5s ease; }
.vl.is-open .vl__veil { opacity: 1; }
.vl__card {
  position: relative; width: min(540px, 100%); max-height: calc(100vh - 48px); max-height: calc(100svh - 48px);
  overflow-y: auto; overscroll-behavior: contain;
  background: var(--navy-2); color: var(--cream);
  border: 1px solid rgba(184,154,82,.35);
  box-shadow: 0 40px 90px -24px rgba(0,0,0,.75);
  padding: 34px 40px 28px;
  opacity: 0; transform: translateY(24px) scale(.985);
  transition: opacity .45s ease, transform .8s var(--ease);
  scrollbar-width: thin; scrollbar-color: rgba(184,154,82,.4) transparent;
}
.vl.is-open .vl__card { opacity: 1; transform: none; }
.vl__x { position: absolute; top: 18px; right: 18px; width: 34px; height: 34px; background: none; border: 0; cursor: pointer; z-index: 2; }
.vl__x span { position: absolute; left: 7px; right: 7px; top: 50%; height: 1px; background: var(--sand); transition: background-color .3s; }
.vl__x span:first-child { transform: rotate(45deg); }
.vl__x span:last-child { transform: rotate(-45deg); }
.vl__x:hover span { background: var(--gold); }
.vl__step[hidden] { display: none; }

.vf .rs-enquiry__title { font-size: clamp(24px, 2.2vw, 30px); }
.vf .rs-enquiry__sub { margin: 8px 0 18px; font-size: 13px; }
.vf .rs-eyebrow { display: block; margin-bottom: 14px; }
.vf .rs-field { margin-bottom: 16px; }
.vf .rs-field label { margin-bottom: 6px; }
.vf .rs-field input { padding-bottom: 8px; }
.vf .rs-field label i, .vl-chips legend i { font-style: normal; text-transform: none; letter-spacing: .5px; color: var(--mist); }
.vf .rs-enquiry__error { min-height: 0; margin: 0 0 8px; }
.vf .rs-enquiry__error:empty { display: none; }
.vf .rs-enquiry__submit { margin-top: 0; padding: 14px 20px; }
.vl__row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 22px; }
.vl__hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.vl__back { margin: -4px 0 10px; padding: 4px 0; background: none; border: 0; font: inherit; font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--gold); cursor: pointer; transition: color .25s; }
.vl__back:hover { color: var(--cream); }

/* step 1 — who are you */
.vl__opt {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: 18px; width: 100%;
  margin-bottom: 12px; padding: 20px 22px; text-align: left;
  background: transparent; color: var(--cream); font-family: var(--sans);
  border: 1px solid rgba(229,222,209,.22); cursor: pointer;
  transition: border-color .3s, background-color .3s;
}
.vl__opt b { display: block; font-family: var(--head); font-style: normal; font-weight: 400; font-size: 18px; line-height: 1.25; color: var(--cream); }
.vl__opt small { display: block; margin-top: 6px; font-size: 11px; letter-spacing: .8px; text-transform: uppercase; color: var(--taupe); }
.vl__opt i { flex: 0 0 auto; width: 26px; height: 1px; background: var(--gold); position: relative; transition: transform .5s var(--ease); }
.vl__opt i::after { content: ''; position: absolute; right: 0; top: -3px; width: 7px; height: 7px; border-top: 1px solid var(--gold); border-right: 1px solid var(--gold); transform: rotate(45deg); }
.vl__opt:hover, .vl__opt:focus-visible { border-color: var(--gold); background: rgba(184,154,82,.08); }
.vl__opt:hover i, .vl__opt:focus-visible i { transform: translateX(6px); }

/* phone (+91) */
.vl-phone { display: flex; align-items: baseline; gap: 10px; border-bottom: 1px solid rgba(229,222,209,.3); transition: border-color .3s; }
.vl-phone:focus-within { border-bottom-color: var(--gold); }
.vl-phone span { font-size: 15px; color: var(--gold); }
.rs-field .vl-phone input { border-bottom: 0; flex: 1; min-width: 0; }
.rs-field.is-invalid .vl-phone { border-bottom-color: #c98a7a; }

/* choice chips */
.vl-chips { margin: 0 0 14px; padding: 0; border: 0; min-width: 0; }
.vl-chips legend { padding: 0; margin-bottom: 8px; font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--gold); }
.vl-chips label { display: inline-block; margin: 0 6px 6px 0; position: relative; }
.vl-chips input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.vl-chips span {
  display: inline-block; padding: 7px 14px; border: 1px solid rgba(229,222,209,.28); border-radius: 100px;
  font-size: 12px; letter-spacing: 1px; text-transform: uppercase; color: var(--sand); white-space: nowrap;
  transition: background-color .25s, color .25s, border-color .25s;
}
.vl-chips label:hover span { border-color: var(--gold); }
.vl-chips input:checked + span { background: var(--gold); border-color: var(--gold); color: var(--navy); }
.vl-chips input:focus-visible + span { outline: 1px solid var(--gold); outline-offset: 3px; }

/* thank-you */
.vl__done-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
.vl__done-actions .rs-btn { padding: 13px 28px; font-size: 12px; }

/* ---------- floor-plan viewer ---------- */
.vl--plans { padding: 20px; }
.vp__card { width: min(1180px, 100%); max-height: calc(100vh - 40px); max-height: calc(100svh - 40px); padding: 28px 34px 22px; display: flex; flex-direction: column; overflow: hidden; }
.vp__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding-right: 0; margin-bottom: 18px; }
.vp__head .rs-eyebrow { margin-bottom: 8px; }
.vp__head .rs-enquiry__title { font-size: clamp(24px, 2.2vw, 30px); }
.vp__tools { display: flex; align-items: center; gap: 14px; }
.vl__x--inline { position: relative; top: auto; right: auto; }
.vp__tabs { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 12px; margin-bottom: 10px; scrollbar-width: none; }
.vp__tabs::-webkit-scrollbar { display: none; }
.vp__tabs button {
  flex: 0 0 auto; padding: 9px 18px; background: transparent; border: 1px solid rgba(229,222,209,.28); border-radius: 100px; cursor: pointer;
  font-family: var(--sans); font-size: 12px; letter-spacing: 1px; text-transform: uppercase; color: var(--sand);
  transition: background-color .25s, color .25s, border-color .25s;
}
.vp__tabs button:hover { border-color: var(--gold); }
.vp__tabs button[aria-selected="true"] { background: var(--gold); border-color: var(--gold); color: var(--navy); }
.vp__stage { position: relative; flex: 1 1 auto; min-height: 0; display: flex; }
.vp__scroll { flex: 1; min-height: 0; overflow: auto; display: flex; align-items: center; justify-content: center; background: var(--navy); border: 1px solid rgba(229,222,209,.12); cursor: zoom-in; scrollbar-width: thin; scrollbar-color: rgba(184,154,82,.4) transparent; }
.vp__img { display: block; max-width: 100%; max-height: calc(100svh - 270px); width: auto; height: auto; transition: opacity .35s ease; user-select: none; }
.vp__img.is-swap { opacity: .15; }
.vp__scroll.is-zoom { display: block; cursor: zoom-out; }
.vp__scroll.is-zoom .vp__img { max-width: none; max-height: none; width: 210%; }
.vp__nav { position: absolute; top: 50%; z-index: 2; width: 44px; height: 44px; margin-top: -22px; background: rgba(11,22,36,.78); border: 1px solid rgba(184,154,82,.45); border-radius: 50%; cursor: pointer; transition: background-color .25s; }
.vp__nav:hover { background: var(--gold); }
.vp__nav--prev { left: 12px; } .vp__nav--next { right: 12px; }
.vp__nav i { position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; border-left: 1px solid var(--cream); border-bottom: 1px solid var(--cream); transform: translate(-30%, -50%) rotate(45deg); }
.vp__nav--next i { transform: translate(-70%, -50%) rotate(-135deg); }
.vp__nav:hover i { border-color: var(--navy); }
.vp__hint { margin: 12px 0 0; font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--mist); text-align: center; }

/* ---------- header actions ---------- */
.rs-header__actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.rs-header .rs-btn--sm { padding: 11px 22px; }
.rs-btn--sm.rs-btn--solid { color: var(--navy); }
.rs-btn--sm.rs-btn--solid:hover, .rs-btn--sm.rs-btn--solid:focus-visible { color: var(--cream); }

/* ---------- desktop side rail ---------- */
.vl-rail { position: fixed; right: 0; top: 50%; z-index: 800; display: flex; flex-direction: column; gap: 1px; transform: translateY(-50%); transition: opacity .6s ease, transform .6s var(--ease); }
.vl-rail button {
  writing-mode: vertical-rl; transform: rotate(180deg); padding: 20px 11px; background: var(--navy);
  border: 1px solid rgba(184,154,82,.55); border-right: 0; color: var(--cream); cursor: pointer;
  font-family: var(--sans); font-size: 11px; font-weight: 500; letter-spacing: 3px; text-transform: uppercase;
  transition: background-color .25s, color .25s;
}
.vl-rail button:hover, .vl-rail button:focus-visible { background: var(--gold); color: var(--navy); }
.is-loading .vl-rail, .is-loading .vl-bar { opacity: 0; pointer-events: none; }
.vl-bar { display: none; }

/* ---------- RERA / trust ---------- */
.rs-a__rera { font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--taupe); }
.rs-legal__ph { font-style: normal; color: var(--taupe); }
.rs-footer__legal { flex-direction: column; align-items: flex-start; gap: 6px; }
.rs-footer__legal-row { display: flex; align-items: center; gap: 24px; }
.rs-footer__legal-label { font-family: var(--serif); font-style: normal; font-size: 15px; color: var(--mist); }

/* ---------- mobile ---------- */
@media (max-width: 899.98px) {
  .rs-header__actions { display: none; }
  .vl-rail { display: none; }
  .vl { padding: 0; align-items: end; }
  .vl__card { width: 100%; max-height: 92vh; max-height: 92svh; padding: 40px 22px calc(26px + env(safe-area-inset-bottom)); border-width: 1px 0 0; transform: translateY(40px); }
  .vl.is-open .vl__card { transform: none; }
  .vl__card::before { content: ''; position: absolute; top: 12px; left: 50%; width: 38px; height: 2px; margin-left: -19px; background: rgba(229,222,209,.25); }
  .vl__x { top: 10px; right: 10px; width: 44px; height: 44px; }
  .vl__row { grid-template-columns: 1fr; }
  .rs-field input, .vf .rs-field input { font-size: 16px; } /* no iOS zoom-on-focus */
  .vl-chips span { padding: 10px 15px; }

  .vl--plans { padding: 0; }
  .vp__card { max-height: 100svh; height: 100svh; padding: 18px 14px 14px; border-width: 0; }
  .vp__head { margin-bottom: 10px; }
  .vp__tools .rs-btn { display: none; }
  .vp__img { max-height: none; width: 100%; }
  .vp__scroll { align-items: flex-start; }
  .vp__scroll.is-zoom .vp__img { width: 260%; }
  .vp__nav { display: none; }

  .vl-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 880; display: flex; gap: 8px;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: rgba(11,22,36,.94);
    border-top: 1px solid rgba(184,154,82,.35); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    transition: opacity .6s ease, transform .6s var(--ease);
  }
  .vl-bar button {
    flex: 1; min-height: 46px; padding: 0 6px; background: transparent; border: 1px solid var(--gold); border-radius: 100px; color: var(--cream);
    font-family: var(--sans); font-size: 12px; font-weight: 500; letter-spacing: 1px; text-transform: uppercase; cursor: pointer;
  }
  .vl-bar button.is-primary { background: var(--gold); color: var(--navy); }
  .rs-menu.is-open ~ .vl-bar { transform: translateY(110%); }
  .has-vbar .rs-footer { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  .has-vbar .vc { bottom: calc(76px + env(safe-area-inset-bottom)); }
  .rs-menu__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; max-width: 360px; }
  .rs-menu__actions .rs-btn { padding: 14px 10px; font-size: 12px; }
  .rs-menu__actions .rs-btn:first-child { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  .vl__card, .vl__veil, .vl-rail, .vl-bar { transition: none; }
}

/* short laptop screens: keep the submit button in view without scrolling */
@media (min-width: 900px) and (max-height: 860px) {
  .vl__card { padding: 26px 36px 22px; }
  .vf .rs-enquiry__sub { margin-bottom: 12px; }
  .vf .rs-field, .vl-chips { margin-bottom: 11px; }
  .vl-chips span { padding: 6px 13px; }
}

/* ---------- hero enquiry panel (compact flow) ---------- */
.rs-a__enq .rs-enquiry__title { font-size: 22px; }
.rs-a__enq .rs-enquiry__sub { display: none; }
.rs-a__enq .rs-eyebrow { margin-bottom: 8px; }
.rs-a__enq .vl__opt { padding: 14px 16px; margin-bottom: 10px; }
.rs-a__enq .vl__opt:last-child { margin-bottom: 0; }
.rs-a__enq .vl__opt b { font-size: 17px; }
.rs-a__enq .vl__opt i { width: 18px; }
.rs-a__enq .vf .rs-enquiry__title, .rs-a__enq.vf .rs-enquiry__title { margin-bottom: 14px; }
.rs-a__enq .rs-field { margin-bottom: 12px; }
.rs-a__enq .vl__row--tight { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.rs-a__enq .vl-chips { margin-bottom: 10px; }
.rs-a__enq .vl__back { margin: -2px 0 8px; }
.rs-a__enq .rs-enquiry__submit { padding: 13px 20px; }
.rs-a__enq .vl__done-actions { flex-direction: column; align-items: stretch; }
.rs-a__enq .vl__done-actions .rs-btn { width: 100%; }
.rs-a__enq .rs-enquiry__sub[data-vl-done-sub] { display: block; margin: 8px 0 14px; }
@media (min-width: 900px) and (max-height: 780px) {
  .rs-a__enq .rs-field { margin-bottom: 8px; }
  .rs-a__enq .vl__opt { padding: 11px 14px; }
}

/* all action buttons yellow */
.vl-bar button, .vl-bar button.is-primary { background: var(--gold); border-color: var(--gold); color: var(--navy); }

/* special offer strip inside the pop-up */
.vl__offer { display: flex; align-items: center; gap: 14px; margin: 0 46px 20px 0; padding: 11px 16px 11px 12px; border: 1px solid rgba(184,154,82,.6); background: linear-gradient(90deg, rgba(184,154,82,.24), rgba(184,154,82,.06)); }
.vl__offer-ico { flex: 0 0 auto; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--gold); color: var(--navy); }
.vl__offer-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.vl__offer-txt b { font-family: var(--head); font-weight: 600; font-size: 15px; letter-spacing: .2px; color: var(--cream); }
.vl__offer-txt small { font-size: 10.5px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--taupe); }
.vf[data-step-now="done"] .vl__offer { display: none; }
@media (max-width: 899.98px) { .vl__offer { margin-right: 40px; } .vl__offer-txt b { font-size: 14px; } }
@media (min-width: 900px) and (max-height: 780px) {
  .vl__offer { padding: 7px 12px 7px 9px; margin-bottom: 10px; }
  .vl__offer-ico { width: 28px; height: 28px; }
  .vl__offer-ico svg { width: 17px; height: 17px; }
  .vl__offer-txt small { display: none; }
}
.rs-footer__legal { flex-direction: row; align-items: center; gap: 18px; }
@media (max-width: 899.98px) { .rs-footer__legal { flex-direction: column; align-items: flex-start; } }

/* wider pop-up form: more room, fewer wrapped rows */
@media (min-width: 900px) {
  .vl__card { width: min(780px, 100%); padding: 44px 56px 38px; }
  .vl__row { gap: 0 36px; }
  .vf .rs-field { margin-bottom: 22px; }
  .vl-chips { margin-bottom: 20px; }
  .vl-chips label { margin: 0 10px 10px 0; }
  .vl-chips span { padding: 9px 18px; }
  .vf .rs-enquiry__title { font-size: clamp(28px, 2.4vw, 34px); }
  .vf .rs-enquiry__sub { margin: 10px 0 22px; font-size: 14px; }
  .vl__offer { margin-right: 52px; margin-bottom: 24px; }
  .vf .rs-enquiry__submit { margin-top: 6px; padding: 16px 20px; }
}
@media (min-width: 900px) and (max-height: 820px) {
  .vl__card { padding: 30px 48px 26px; }
  .vf .rs-field, .vl-chips { margin-bottom: 14px; }
  .vl__offer { margin-bottom: 14px; }
  .vf .rs-enquiry__sub { margin-bottom: 14px; }
}
@media (min-width: 900px) {
  .vl__card { padding: 36px 56px 30px; }
  .vf .rs-field { margin-bottom: 18px; }
  .vl-chips { margin-bottom: 16px; }
  .vl-chips label { margin-bottom: 8px; }
  .vl__offer { margin-bottom: 18px; }
  .vf .rs-enquiry__sub { margin: 8px 0 18px; }
  .vf .rs-enquiry__submit { padding: 15px 20px; }
}
@media (min-width: 900px) { .vl__card { width: min(640px, 100%); } }
@media (min-width: 900px) { .vf .rs-enquiry__sub { white-space: nowrap; } }
