/* Scroll-triggered marketing popup (AU map) */
.pp-scroll-modal {
  /* easy knobs */
  --pp-brand: #36573B;          /* your green */
  --pp-accent: #EB9F37;         /* NEW orange (kept for accents if needed) */
  --pp-subscribe: #6BA539;      /* NEW green for subscribe */

  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
}

.pp-scroll-modal.is-open { display: block; }

.pp-scroll-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
}

.pp-scroll-modal__panel {
  position: relative;
  max-width: 1240px;
  width: calc(100% - 32px);
  margin: 6vh auto 0;
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
}

/* Close button */
.pp-scroll-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  border: 2px solid rgba(0,0,0,0.10);
  background: rgba(255,255,255,0.9);
  border-radius: 999px;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pp-scroll-modal__close:hover {
  border-color: rgba(0,0,0,0.18);
}

/* Layout */
.pp-scroll-modal__inner {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr); /* ✅ keep media same, let content truly use remaining space */
  gap: 0;
}

/* Image area */
.pp-scroll-modal__media {
  background: #fbfbfb;
  padding: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: 1px solid rgba(0,0,0,0.06);
}

.pp-scroll-modal__media img {
  width: 100%;
  max-width: 260px;     /* stops it getting silly */
  height: auto;
  max-height: 340px;
  object-fit: contain;  /* keep whole image visible */
  display: block;
  border-radius: 14px;

  /* orange outline vibe */
  border: 2px solid rgba(242,140,27,0.55);
  box-shadow: 0 10px 25px rgba(0,0,0,0.10);
}

/* Content area (UPDATED: vertically centred like the idle-help popup) */
.pp-scroll-modal__content {
  padding: 28px;
  display: grid;
  align-content: center;  /* ✅ vertical centring */
  gap: 10px;
  min-width: 0;           /* ✅ critical: prevents embeds/iframes forcing the column to shrink */
}

.pp-scroll-modal__title {
  margin: 0;
  font-size: 28px;
  line-height: 1.15;
  color: var(--pp-brand);
}

.pp-scroll-modal__copy {
  margin: 0;
  color: #333;
  line-height: 1.55;
}

/* If WYSIWYG renders as HTML, these will tidy it */
.pp-scroll-modal__copy p { margin: 0 0 10px; }
.pp-scroll-modal__copy p:last-child { margin-bottom: 0; }

.pp-scroll-modal__hubspot {
  margin: 10px 0 0;
  min-width: 0; /* ✅ */
}

/* ✅ Ensure HubSpot iframe/form can expand to full content width */
.pp-scroll-modal__hubspot iframe,
.pp-scroll-modal__hubspot .hs-form,
.pp-scroll-modal__hubspot form {
  width: 100% !important;
  max-width: 100% !important;
}

/* Style common form elements inside the popup (works for most embeds) */
.pp-scroll-modal__panel input[type="email"],
.pp-scroll-modal__panel input[type="text"],
.pp-scroll-modal__panel input[type="tel"],
.pp-scroll-modal__panel select,
.pp-scroll-modal__panel textarea {
  width: 100%;
  max-width: 100%; /* ✅ was 520px; this is what was making the content feel “narrow” */
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.20);
  outline: none;
}

.pp-scroll-modal__panel input[type="email"]:focus,
.pp-scroll-modal__panel input[type="text"]:focus,
.pp-scroll-modal__panel input[type="tel"]:focus,
.pp-scroll-modal__panel textarea:focus {
  border-color: rgba(54,87,59,0.55);
  box-shadow: 0 0 0 3px rgba(54,87,59,0.15);
}

/* Submit buttons inside embed */
.pp-scroll-modal__panel button[type="submit"],
.pp-scroll-modal__panel input[type="submit"] {
  width: 100%;
  max-width: 100%; /* ✅ was 520px */
  margin-top: 10px;
  border-radius: 10px;
  padding: 12px 14px;
  font-weight: 700;
  cursor: pointer;

  /* subscribe colour */
  border: 2px solid var(--pp-subscribe);
  background: var(--pp-subscribe);
  color: #fff;

  /* helps layout behave consistently */
  display: block;
}

.pp-scroll-modal__panel button[type="submit"]:hover,
.pp-scroll-modal__panel input[type="submit"]:hover {
  filter: brightness(0.95);
}

/* Actions row (kept, but "No thanks" is removed/hidden) */
.pp-scroll-modal__actions {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 12px;
  flex-wrap: wrap;
}

.pp-scroll-modal__btn {
  border-radius: 999px;
  padding: 10px 16px;
  cursor: pointer;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

/* ✅ HIDE the "No thanks" button (use the X instead) */
.pp-scroll-modal__btn--no {
  display: none !important;
}

.pp-scroll-modal__fineprint {
  margin: 10px 0 0;
  font-size: 12px;
  color: rgba(0,0,0,0.60);
}

/* Prevent page scroll when modal open */
html.pp-modal-open,
html.pp-modal-open body {
  overflow: hidden;
}

/* Mobile */
@media (max-width: 768px) {
  .pp-scroll-modal__inner {
    grid-template-columns: 1fr;
  }

  .pp-scroll-modal__media {
    border-right: 0;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    padding: 16px;
  }

  .pp-scroll-modal__media img {
    max-width: 220px;
    max-height: 240px;
  }

  .pp-scroll-modal__content {
    padding: 20px;
    min-width: 0; /* ✅ keep the same fix on mobile */
  }

  .pp-scroll-modal__title {
    font-size: 24px;
  }
}

/* FORCE the popup submit button to our green (overrides theme + embeds) */
.pp-scroll-modal .pp-scroll-modal__panel form button[type="submit"],
.pp-scroll-modal .pp-scroll-modal__panel form input[type="submit"],
.pp-scroll-modal .pp-scroll-modal__panel .hs-form button[type="submit"],
.pp-scroll-modal .pp-scroll-modal__panel .hs-form input[type="submit"] {
  background: #6BA539 !important;
  border-color: #6BA539 !important;
  color: #fff !important;
}

/* Optional: keep hover consistent */
.pp-scroll-modal .pp-scroll-modal__panel form button[type="submit"]:hover,
.pp-scroll-modal .pp-scroll-modal__panel form input[type="submit"]:hover,
.pp-scroll-modal .pp-scroll-modal__panel .hs-form button[type="submit"]:hover,
.pp-scroll-modal .pp-scroll-modal__panel .hs-form input[type="submit"]:hover {
  filter: brightness(0.95);
}