/* ════════════════════════════════════════════════════════════════════════════
   Popup — overlay, two-column layout, nav trigger button
   ════════════════════════════════════════════════════════════════════════════ */

/* ── Nav trigger button ──────────────────────────────────────────────────── */
.bpt-popup-trigger {
  display:         inline-flex;
  align-items:     center;
  gap:             .4rem;
  padding:         .62rem 1.1rem;
  font-size:       .8125rem;
  font-weight:     600;
  font-family:     var(--bpt-font);
  color:           #fff;
  background:      var(--bpt-accent);
  border:          1px solid var(--bpt-accent);
  border-radius:   var(--bpt-radius-sm);
  cursor:          pointer;
  white-space:     nowrap;
  line-height:     1;
  transition:      background var(--bpt-t), box-shadow var(--bpt-t);
}
.bpt-popup-trigger:hover,
.bpt-popup-trigger:focus-visible {
  background:  var(--bpt-accent-h);
  box-shadow:  0 0 0 3px var(--bpt-accent-glow);
  outline:     none;
}

/* Wrapper <li> for the trigger in the nav */
.bpt-menu-item--cta { padding-left: .3rem; }

/* Mobile: full-width pill — no li padding, button handles own spacing */
@media (max-width: 1024px) {
  .bpt-menu-item--cta {
    padding: 0;
  }
  .bpt-popup-trigger {
    display:         flex;
    width:           100%;
    justify-content: center;
    padding:         .65rem .9rem;
    font-size:       .875rem;
    border-radius:   var(--bpt-radius);
    margin:          .25rem 0;
  }
}

/* ── Overlay ─────────────────────────────────────────────────────────────── */
.bpt-popup-overlay {
  position:        fixed;
  inset:           0;
  z-index:         99999;
  background:      rgba(0, 0, 0, .72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display:         flex;
  align-items:     center;
  justify-content: center;
  padding:         1rem;
  opacity:         0;
  transition:      opacity .28s ease;
}
.bpt-popup-overlay[hidden] { display: none !important; }
.bpt-popup-overlay.is-open { opacity: 1; }

/* ── Popup container ─────────────────────────────────────────────────────── */
.bpt-popup {
  position:      relative;
  display:       grid;
  grid-template-columns: 2fr 3fr;
  width:         100%;
  max-width:     960px;
  background:    var(--bpt-surface);
  border:        1px solid var(--bpt-border-light);
  border-radius: var(--bpt-radius-lg);
  overflow:      hidden;
  box-shadow:    0 32px 80px rgba(0, 0, 0, .55), 0 0 0 1px rgba(99, 102, 241, .12);
  transform:     scale(.93) translateY(10px);
  transition:    transform .28s ease;
}
.bpt-popup-overlay.is-open .bpt-popup {
  transform: scale(1) translateY(0);
}

/* ── Close button ────────────────────────────────────────────────────────── */
.bpt-popup__close {
  position:        absolute;
  top:             .875rem;
  right:           .875rem;
  z-index:         3;
  width:           32px;
  height:          32px;
  display:         flex;
  align-items:     center;
  justify-content: center;
  background:      rgba(255, 255, 255, .07);
  border:          1px solid rgba(255, 255, 255, .1);
  border-radius:   50%;
  color:           var(--bpt-text-2);
  cursor:          pointer;
  flex-shrink:     0;
  transition:      background var(--bpt-t), color var(--bpt-t);
}
.bpt-popup__close:hover,
.bpt-popup__close:focus-visible {
  background: rgba(255, 255, 255, .14);
  color:      var(--bpt-text);
  outline:    none;
}

/* ── Visual column (left) ────────────────────────────────────────────────── */
.bpt-popup__visual {
  position:        relative;
  min-height:      340px;
  background:      linear-gradient(145deg, #1a1647 0%, #2d2a72 55%, #3b35a8 100%);
  display:         flex;
  align-items:     center;
  justify-content: center;
  overflow:        hidden;
}
/* Radial glows */
.bpt-popup__visual::before {
  content:  '';
  position: absolute;
  inset:    0;
  background:
    radial-gradient(circle at 28% 28%, rgba(99, 102, 241, .45) 0%, transparent 55%),
    radial-gradient(circle at 72% 75%, rgba(139,  92, 246, .3)  0%, transparent 52%);
  pointer-events: none;
}
/* Grid pattern */
.bpt-popup__visual::after {
  content:  '';
  position: absolute;
  inset:    0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image:      radial-gradient(ellipse at 50% 50%, black 40%, transparent 82%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 50%, black 40%, transparent 82%);
  pointer-events: none;
}

.bpt-popup__visual-inner {
  position:   relative;
  z-index:    1;
  text-align: center;
  padding:    2.5rem 1.75rem;
}
.bpt-popup__visual-icon {
  width:           64px;
  height:          64px;
  margin:          0 auto 1.5rem;
  background:      rgba(99, 102, 241, .18);
  border:          1px solid rgba(99, 102, 241, .45);
  border-radius:   16px;
  display:         flex;
  align-items:     center;
  justify-content: center;
  box-shadow:      0 0 32px rgba(99, 102, 241, .3);
}
.bpt-popup__visual-title {
  font-size:   1.375rem;
  font-weight: 700;
  color:       #fff;
  margin:      0 0 .45rem;
  line-height: 1.3;
  font-family: var(--bpt-font);
}
.bpt-popup__visual-sub {
  font-size:   .875rem;
  color:       rgba(255, 255, 255, .6);
  margin:      0 0 2rem;
  line-height: 1.5;
}
.bpt-popup__visual-chips {
  display:         flex;
  flex-wrap:       wrap;
  gap:             .45rem;
  justify-content: center;
}
.bpt-popup__visual-chip {
  font-size:     .72rem;
  font-weight:   500;
  color:         rgba(255, 255, 255, .75);
  background:    rgba(255, 255, 255, .08);
  border:        1px solid rgba(255, 255, 255, .13);
  border-radius: 20px;
  padding:       .28rem .7rem;
}

/* ── Form column (right) ─────────────────────────────────────────────────── */
.bpt-popup__body {
  padding:         1.75rem 2rem 1.75rem 1.75rem;
  display:         flex;
  flex-direction:  column;
  justify-content: center;
  gap:             0;
}
.bpt-popup__body-eyebrow {
  display:        inline-flex;
  align-items:    center;
  gap:            .35rem;
  font-size:      .72rem;
  font-weight:    600;
  letter-spacing: .07em;
  text-transform: uppercase;
  color:          var(--bpt-accent-h);
  margin-bottom:  .6rem;
}
.bpt-popup__body h2 {
  font-size:   1.375rem;
  font-weight: 700;
  color:       var(--bpt-text);
  margin:      0 0 .45rem;
  line-height: 1.3;
}
.bpt-popup__body-desc {
  font-size:    .875rem;
  color:        var(--bpt-text-2);
  margin:       0 0 1rem;
  line-height:  1.6;
}

/* ── CF7 inside popup ────────────────────────────────────────────────────── */
.bpt-popup__body .wpcf7 { margin: 0; }

.bpt-popup__body .wpcf7-form {
  display:               grid;
  grid-template-columns: 1fr 1fr;
  gap:                   .75rem;
}
.bpt-popup__body .wpcf7-form p { margin: 0; }

/* Full-width rows: select, textarea, submit button, response message */
.bpt-popup__body .wpcf7-form .form-group:has(select),
.bpt-popup__body .wpcf7-form .form-group:has(textarea),
.bpt-popup__body .wpcf7-form > input[type="submit"],
.bpt-popup__body .wpcf7-form > .wpcf7-submit,
.bpt-popup__body .wpcf7-response-output {
  grid-column: 1 / -1;
}

.bpt-popup__body label {
  display:        block;
  font-size:      .82rem;
  font-weight:    600;
  color:          var(--bpt-text-2);
  margin-bottom:  .3rem;
  letter-spacing: .02em;
}
.bpt-popup__body input[type="text"],
.bpt-popup__body input[type="email"],
.bpt-popup__body input[type="tel"],
.bpt-popup__body input[type="url"],
.bpt-popup__body input[type="number"],
.bpt-popup__body select,
.bpt-popup__body textarea {
  width:         100%;
  padding:       .72rem .9rem;
  background:    var(--bpt-surface-2);
  border:        1px solid var(--bpt-border-light);
  border-radius: var(--bpt-radius);
  color:         var(--bpt-text);
  font-size:     .875rem;
  font-family:   var(--bpt-font);
  transition:    border-color var(--bpt-t), box-shadow var(--bpt-t);
  box-sizing:    border-box;
  appearance:    none;
  -webkit-appearance: none;
}
.bpt-popup__body textarea {
  resize:      none;
  min-height:  72px;
  line-height: 1.6;
}
.bpt-popup__body input:focus,
.bpt-popup__body select:focus,
.bpt-popup__body textarea:focus {
  outline:      none;
  border-color: var(--bpt-accent-h);
  box-shadow:   0 0 0 3px rgba(99, 102, 241, .2);
}
.bpt-popup__body input::placeholder,
.bpt-popup__body textarea::placeholder { color: var(--bpt-text-3); }

.bpt-popup__body .wpcf7-submit {
  display:         inline-flex;
  align-items:     center;
  justify-content: center;
  width:           100%;
  padding:         .82rem 1.5rem;
  background:      var(--bpt-accent);
  border:          1px solid var(--bpt-accent);
  border-radius:   var(--bpt-radius);
  color:           #fff;
  font-size:       .9rem;
  font-weight:     600;
  font-family:     var(--bpt-font);
  cursor:          pointer;
  transition:      background var(--bpt-t), box-shadow var(--bpt-t), transform var(--bpt-t);
  margin-top:      .25rem;
}
.bpt-popup__body .wpcf7-submit:hover {
  background: var(--bpt-accent-h);
  box-shadow: 0 4px 20px rgba(99, 102, 241, .4);
  transform:  translateY(-1px);
}

.bpt-popup__body .wpcf7-not-valid-tip {
  font-size:  .78rem;
  color:      #f87171;
  margin-top: .3rem;
  display:    block;
}
.bpt-popup__body .wpcf7-not-valid {
  border-color: #f87171 !important;
  box-shadow:   0 0 0 3px rgba(248, 113, 113, .15) !important;
}
.bpt-popup__body .wpcf7-response-output {
  margin:        .5rem 0 0;
  padding:       .7rem 1rem;
  border-radius: var(--bpt-radius);
  font-size:     .85rem;
  border:        1px solid var(--bpt-border);
  color:         var(--bpt-text-2);
}
.bpt-popup__body .wpcf7-mail-sent-ok {
  background:   var(--bpt-success-dim);
  border-color: var(--bpt-success);
  color:        var(--bpt-success);
}
.bpt-popup__body .wpcf7-mail-sent-ng,
.bpt-popup__body .wpcf7-validation-errors,
.bpt-popup__body .wpcf7-acceptance-missing {
  background:   rgba(248, 113, 113, .1);
  border-color: #f87171;
  color:        #f87171;
}
.bpt-popup__body .wpcf7-spinner { display: none !important; }

/* ── Mobile: stack columns ───────────────────────────────────────────────── */
@media (max-width: 640px) {
  .bpt-popup {
    grid-template-columns: 1fr;
    max-height:            92dvh;
    overflow-y:            auto;
  }
  .bpt-popup__visual { min-height: 180px; }
  .bpt-popup__visual-chips  { display: none; }
  .bpt-popup__body { padding: 1.5rem 1.25rem 1.25rem; }
  .bpt-popup__body .wpcf7-form { grid-template-columns: 1fr; }
}
