/* =====================================================
   SEASONAL PROMOTION — Popup Modal (Option 1)
   Wide landscape editorial popup:
   full-bleed Himalayan image + layered navy glass
   content panel. FlyPrivy Jet navy/gold system.
   Fully responsive (horizontal & vertical).
   ===================================================== */

/* ─────────────────────────────────────────────
   PROMOTIONAL POPUP — centered modal overlay
   ───────────────────────────────────────────── */
.promo-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 250000; /* above header (100000) and call-widget-wrapper (200000) */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(12px, 2.5vh, 24px) clamp(12px, 2.5vw, 24px);
  background: rgba(6, 11, 16, 0.76);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
  box-sizing: border-box;
}

.promo-modal-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

/* Honour the hidden attribute despite the flex display above */
.promo-modal-overlay[hidden] {
  display: none;
}

/* ─────────────────────────────────────────────
   PAGE LOCK — no background scroll, header & floating widgets hidden
   Applied on <html> while the popup is open.
   ───────────────────────────────────────────── */
html.fpj-promo-lock,
html.fpj-promo-lock body {
  overflow: hidden !important;
  overscroll-behavior: none;
}

html.fpj-promo-lock .header-section,
html.fpj-promo-lock .call-widget-wrapper,
html.fpj-promo-lock #quick-form-widget,
html.fpj-promo-lock .mobile-fab-btn {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* ─────────────────────────────────────────────
   MODAL CONTAINER
   ───────────────────────────────────────────── */
.promo-modal {
  position: relative;
  display: flex;
  align-items: stretch;
  width: min(980px, 100%);
  height: auto;
  min-height: 0;
  max-height: calc(100vh - 28px);
  max-height: calc(100dvh - 28px);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(250, 205, 81, 0.28);
  background: #0B1826;
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.65);
  overflow: hidden;
  transform: translateY(16px);
  transition: transform 0.45s cubic-bezier(0.33, 0.7, 0.3, 1);
  box-sizing: border-box;
}

.promo-modal-overlay.is-open .promo-modal {
  transform: translateY(0);
}

/* Full-bleed campaign visual behind everything */
.promo-modal-bg {
  position: absolute;
  inset: 0;
}

.promo-modal-bg img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Single background visual that melts into the card colour
   at the centre and reveals the photograph toward the edges */
.promo-modal-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 78% 90% at 50% 50%,
    #0B1826 22%,
    rgba(11, 24, 38, 0.88) 46%,
    rgba(11, 24, 38, 0.42) 72%,
    rgba(11, 24, 38, 0.10) 100%
  );
  pointer-events: none;
}

/* ─────────────────────────────────────────────
   CONTENT PANEL (Left Side)
   Scrollable inside if viewport height is small
   ───────────────────────────────────────────── */
.promo-modal-panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 540px;
  min-height: 0;
  max-height: 100%;
  padding: clamp(18px, 2.8vh, 34px) clamp(22px, 3vw, 42px);
  gap: clamp(8px, 1.3vh, 12px);
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  box-sizing: border-box;
}

/* Custom subtle luxury scrollbar for the modal panel */
.promo-modal-panel::-webkit-scrollbar {
  width: 5px;
}
.promo-modal-panel::-webkit-scrollbar-track {
  background: rgba(11, 24, 38, 0.4);
  border-radius: 4px;
}
.promo-modal-panel::-webkit-scrollbar-thumb {
  background: rgba(250, 205, 81, 0.35);
  border-radius: 4px;
}
.promo-modal-panel::-webkit-scrollbar-thumb:hover {
  background: rgba(250, 205, 81, 0.65);
}
.promo-modal-panel {
  scrollbar-width: thin;
  scrollbar-color: rgba(250, 205, 81, 0.35) transparent;
}

/* ─────────────────────────────────────────────
   GALLERY (Right Side, 2 × 2 photo grid)
   Responsive to both viewport width & height
   ───────────────────────────────────────────── */
.promo-modal-gallery {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  align-self: center;
  margin-left: auto;
  margin-right: clamp(16px, 2.5vw, 36px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(8px, 1.4vh, 12px);
  width: min(clamp(250px, 36vw, 390px), 48vh);
  box-sizing: border-box;
}

.promo-modal-gallery figure {
  position: relative;
  margin: 0;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(250, 205, 81, 0.28);
  overflow: hidden;
  box-shadow: 0 14px 34px rgba(0, 8, 16, 0.45);
}

.promo-modal-gallery img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Soft navy fade so the tiles seat into the scene */
.promo-modal-gallery figure::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11, 24, 38, 0) 60%, rgba(11, 24, 38, 0.38) 100%);
  pointer-events: none;
}

/* ─────────────────────────────────────────────
   TYPOGRAPHY
   ───────────────────────────────────────────── */
.promo-modal-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-size: clamp(10px, 1.1vh, 12px);
  font-weight: 800;
  letter-spacing: clamp(2.5px, 0.35vw, 3.5px);
  text-transform: uppercase;
  color: var(--color-accent);
  line-height: 1;
  text-shadow: var(--text-shadow-gold);
}

.promo-modal-eyebrow::before {
  content: "";
  width: clamp(20px, 2.5vw, 34px);
  height: 1px;
  background: var(--decorative-gold);
  flex-shrink: 0;
}

.promo-modal-title {
  font-family: var(--font-heading);
  font-size: clamp(26px, min(3.6vw, 4.6vh), 42px);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.1;
  color: var(--color-text);
  margin: 0;
  text-shadow: var(--text-shadow-heading);
}

.promo-modal-sub {
  font-family: var(--font-body);
  font-size: clamp(13px, min(1.2vw, 1.8vh), 15px);
  line-height: clamp(1.4, 2vh, 1.55);
  color: var(--color-text-soft);
  margin: 0;
  max-width: 44ch;
}

/* Compact destination items — 2 × 2 plain list */
.promo-modal-points {
  list-style: none;
  margin: clamp(2px, 0.6vh, 6px) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(5px, 1vh, 8px) clamp(10px, 1.4vw, 16px);
  width: 100%;
  box-sizing: border-box;
}

.promo-modal-points li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  font-family: var(--font-body);
  font-size: clamp(12.5px, min(1.2vw, 2vh), 15.5px);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text);
}

.promo-modal-points li::before {
  content: "✦";
  font-size: 10px;
  color: var(--color-accent);
  line-height: 1;
}

/* ─────────────────────────────────────────────
   FORM & INPUTS (Vertically Responsive)
   ───────────────────────────────────────────── */
.promo-modal-form {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: clamp(7px, 1.1vh, 11px);
  margin-top: clamp(6px, 1.2vh, 12px);
  margin-bottom: clamp(2px, 0.6vh, 6px);
  box-sizing: border-box;
}

.promo-input-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

.promo-input {
  width: 100%;
  height: clamp(42px, 5.8vh, 52px);
  background: rgba(20, 32, 48, 0.55);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(220, 187, 135, 0.24);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: clamp(13.5px, 1.1vw, 15px);
  padding: 0 clamp(14px, 1.6vw, 20px);
  border-radius: 10px;
  outline: none;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
  box-sizing: border-box;
}

.promo-input::placeholder {
  color: rgba(248, 245, 240, 0.68);
  font-weight: 400;
}

.promo-input:hover {
  border-color: rgba(229, 199, 135, 0.45);
}

.promo-input:focus {
  border-color: rgba(229, 199, 135, 0.65);
  background: rgba(20, 32, 48, 0.75);
  box-shadow: 0 0 0 2px rgba(229, 199, 135, 0.08);
  outline: none;
}

.promo-input.is-invalid {
  border-color: rgba(239, 83, 80, 0.75);
}

.promo-input.is-invalid:focus {
  box-shadow: 0 0 0 2px rgba(239, 83, 80, 0.15);
}

.promo-error-text {
  color: #ff8a80;
  font-size: 12px;
  line-height: 1.3;
  margin-top: 3px;
  margin-left: 4px;
  display: none;
}

.promo-error-text.is-visible {
  display: block;
}

/* CTA & Submit Button */
.promo-modal-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: clamp(6px, 1.2vh, 12px);
  padding: clamp(10px, 1.4vh, 14px) clamp(22px, 2.5vw, 34px);
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--gold-gradient);
  font-family: var(--font-body);
  font-size: clamp(11.5px, 1.1vw, 13px);
  font-weight: 800;
  letter-spacing: clamp(2px, 0.25vw, 3px);
  text-transform: uppercase;
  color: #111C26;
  text-decoration: none;
  box-shadow: var(--shadow-btn-gold);
  transition: transform 0.3s ease, box-shadow 0.3s ease, filter 0.3s ease;
  box-sizing: border-box;
}

.promo-submit-btn {
  width: 100%;
  height: clamp(44px, 6vh, 52px);
  padding: 0 28px;
  margin-top: clamp(3px, 0.6vh, 6px);
}

.promo-modal-cta i {
  font-size: 15px;
  transition: transform 0.3s ease;
}

.promo-modal-cta:hover,
.promo-modal-cta:focus-visible {
  transform: translateY(-2px);
  box-shadow: var(--shadow-gold-strong);
  outline: none;
  color: #111C26;
}

.promo-modal-cta:hover i {
  transform: translateX(4px);
}

/* ─────────────────────────────────────────────
   CLOSE BUTTON
   ───────────────────────────────────────────── */
.promo-modal-close {
  position: absolute;
  top: clamp(10px, 1.8vh, 16px);
  right: clamp(10px, 1.8vw, 16px);
  z-index: 10;
  width: clamp(32px, 4.5vh, 36px);
  height: clamp(32px, 4.5vh, 36px);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: rgba(13, 24, 34, 0.85);
  border: 1px solid rgba(250, 205, 81, 0.35);
  color: var(--color-text);
  font-size: 16px;
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  box-sizing: border-box;
}

.promo-modal-close:hover,
.promo-modal-close:focus-visible {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #111C26;
  outline: none;
}

/* ─────────────────────────────────────────────
   TOAST NOTIFICATION SYSTEM
   ───────────────────────────────────────────── */
.fpj-toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 300000;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}

@media (max-width: 575px) {
  .fpj-toast-container {
    bottom: 24px;
    right: 16px;
    left: 16px;
  }
}

.fpj-toast {
  background: #111C26;
  color: #ffffff;
  padding: 16px 20px;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  border-left: 4px solid var(--color-gold);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  transform: translateY(100%) scale(0.9);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  display: flex;
  align-items: center;
  gap: 12px;
  pointer-events: auto;
  max-width: 400px;
}

@media (max-width: 575px) {
  .fpj-toast {
    max-width: 100%;
    width: 100%;
  }
}

.fpj-toast.show {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.fpj-toast i {
  font-size: 24px;
  flex-shrink: 0;
}

.fpj-toast.success {
  border-left-color: #2ed573;
}
.fpj-toast.success i {
  color: #2ed573;
}

.fpj-toast.error {
  border-left-color: #ff4757;
}
.fpj-toast.error i {
  color: #ff4757;
}

/* =====================================================
   VERTICAL RESPONSIVE BREAKPOINTS (Height-driven)
   ===================================================== */

/* Viewports with constrained height: 620px to 740px (e.g. 1024x669, 1366x768 browser viewports) */
@media (max-height: 740px) {
  .promo-modal-overlay {
    padding: 14px 18px;
  }

  .promo-modal {
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
  }

  .promo-modal-panel {
    padding: 16px 26px;
    gap: 8px;
    justify-content: flex-start;
  }

  .promo-modal-title {
    font-size: 28px;
    line-height: 1.1;
  }

  .promo-modal-sub {
    font-size: 13px;
    line-height: 1.4;
  }

  .promo-modal-points {
    margin-top: 2px;
    gap: 4px 12px;
  }

  .promo-modal-points li {
    font-size: 13px;
  }

  .promo-modal-form {
    margin-top: 6px;
    margin-bottom: 2px;
    gap: 7px;
  }

  .promo-input {
    height: 42px;
    font-size: 13.5px;
    padding: 0 16px;
  }

  .promo-submit-btn {
    height: 44px;
    margin-top: 3px;
    font-size: 12px;
  }

  .promo-modal-gallery {
    width: min(320px, 46vh);
    gap: 8px;
    margin-right: 20px;
  }
}

/* Viewports with tight height: 500px to 620px (small laptops, zoomed displays, landscape tablets) */
@media (max-height: 620px) {
  .promo-modal-overlay {
    padding: 10px 14px;
  }

  .promo-modal {
    max-height: calc(100vh - 16px);
    max-height: calc(100dvh - 16px);
  }

  .promo-modal-panel {
    padding: 12px 20px;
    gap: 6px;
    justify-content: flex-start;
  }

  .promo-modal-eyebrow {
    font-size: 10px;
    letter-spacing: 2.5px;
  }

  .promo-modal-title {
    font-size: 24px;
  }

  .promo-modal-sub {
    font-size: 12px;
    line-height: 1.35;
  }

  .promo-modal-points {
    margin-top: 1px;
    gap: 3px 10px;
  }

  .promo-modal-points li {
    font-size: 12px;
  }

  .promo-modal-form {
    margin-top: 5px;
    gap: 6px;
  }

  .promo-input {
    height: 38px;
    font-size: 13px;
    padding: 0 14px;
    border-radius: 8px;
  }

  .promo-submit-btn {
    height: 40px;
    margin-top: 2px;
    font-size: 11.5px;
  }

  .promo-modal-gallery {
    width: min(260px, 44vh);
    gap: 6px;
    margin-right: 14px;
  }
}

/* Extreme low height: under 500px (e.g. mobile in landscape) */
@media (max-height: 500px) {
  .promo-modal-gallery {
    display: none;
  }

  .promo-modal-panel {
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    padding: 12px 18px;
    gap: 5px;
  }

  .promo-modal-sub {
    display: none;
  }
}

/* =====================================================
   HORIZONTAL RESPONSIVE BREAKPOINTS (Width-driven)
   ===================================================== */

/* Compact Desktop & Tablet Landscape: 861px to 1080px (including 1024px) */
@media (max-width: 1080px) {
  .promo-modal {
    width: min(940px, 100%);
  }

  .promo-modal-panel {
    max-width: 490px;
    padding: clamp(16px, 2.5vh, 28px) clamp(20px, 2.8vw, 32px);
  }

  .promo-modal-gallery {
    width: min(clamp(240px, 34%, 320px), 48vh);
    gap: 10px;
    margin-right: 20px;
  }
}

/* Tablet Portrait: 768px to 860px (hide side gallery to keep form spacious) */
@media (max-width: 860px) {
  .promo-modal {
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
  }

  .promo-modal-gallery {
    display: none;
  }

  .promo-modal-panel {
    width: 100%;
    max-width: 100%;
    padding: 36px 26px 24px;
  }
}

/* Mobile Devices: up to 767px */
@media (max-width: 767px) {
  .promo-modal-overlay {
    padding: 14px;
    align-items: flex-start;
  }

  .promo-modal {
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
    flex-direction: column;
  }

  .promo-modal-bg::after {
    background: radial-gradient(
      ellipse 120% 70% at 50% 42%,
      #0B1826 30%,
      rgba(11, 24, 38, 0.88) 55%,
      rgba(11, 24, 38, 0.35) 100%
    );
  }

  .promo-modal-gallery {
    display: none;
  }

  .promo-modal-panel {
    width: 100%;
    max-width: 100%;
    padding: 38px 20px 20px;
    gap: 9px;
    justify-content: flex-start;
  }

  .promo-modal-eyebrow {
    letter-spacing: 3px;
    font-size: 11px;
  }

  .promo-modal-title {
    font-size: clamp(24px, 6.8vw, 30px);
    line-height: 1.1;
  }

  .promo-modal-sub {
    font-size: 13.5px;
    line-height: 1.45;
  }

  .promo-modal-points {
    gap: 5px 10px;
    margin-top: 3px;
  }

  .promo-modal-points li {
    font-size: 13px;
    letter-spacing: 0.04em;
  }

  .promo-modal-form {
    gap: 8px;
    margin-top: 8px;
    margin-bottom: 2px;
  }

  .promo-input {
    height: 48px;
    padding: 0 16px;
    font-size: 14px;
  }

  .promo-submit-btn {
    height: 50px;
    margin-top: 3px;
    font-size: 12.5px;
  }

  .promo-modal-cta {
    width: 100%;
    margin-top: 8px;
  }

  .promo-modal-close {
    top: 10px;
    right: 10px;
  }
}

/* Small Mobile: 320px to 374px (e.g. iPhone SE) */
@media (max-width: 374px) {
  .promo-modal-overlay {
    padding: 10px;
  }

  .promo-modal-panel {
    padding: 32px 16px 16px;
    gap: 7px;
  }

  .promo-modal-title {
    font-size: 22px;
  }

  .promo-modal-sub {
    line-height: 1.35;
    font-size: 12.5px;
  }

  .promo-modal-points {
    gap: 3px 8px;
    margin-top: 1px;
  }

  .promo-modal-points li {
    font-size: 12px;
  }

  .promo-modal-form {
    gap: 7px;
    margin-top: 5px;
  }

  .promo-input {
    height: 44px;
    font-size: 13px;
  }

  .promo-submit-btn {
    height: 46px;
    margin-top: 2px;
    font-size: 11.5px;
  }
}

/* Reduced motion: instantaneous transitions */
@media (prefers-reduced-motion: reduce) {
  .promo-modal-overlay,
  .promo-modal {
    transition: opacity 0.01s linear, visibility 0.01s linear;
  }
  .promo-modal {
    transform: none;
  }
}
