/* =========================================================================
   FEATURE DETAIL MODAL  (used on the pricing page)
   A dark dialog — bottom sheet on mobile — that shows a clone of an
   engagement-tools feature panel (.eng-feature). It reuses the .eng-* styling
   from engagement-tools.css; the shell only provides the overlay + sheet.
   Also: swaps the check bullet in package feature lists for the feature icon.
   ========================================================================= */

.feat-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;                                  /* above the fixed header (1000), below the cookie banner (10000) */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 4vw, 40px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .28s ease, visibility .28s ease;
}
.feat-modal.is-open { opacity: 1; visibility: visible; }

.feat-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 3, 6, .72);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.feat-modal__dialog {
  position: relative;
  width: 100%;
  max-width: 1180px;
  max-height: calc(100dvh - clamp(32px, 8vw, 80px));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--eng-panel, #12141e);
  border: 1px solid var(--eng-panel-border, #212536);
  border-radius: 28px;
  box-shadow: 0 40px 90px -24px rgba(0, 0, 0, .75);
  transform: translateY(18px) scale(.985);
  transition: transform .28s ease;
}
.feat-modal.is-open .feat-modal__dialog { transform: none; }

/* the injected panel already flexes detail | stage — just let it fill the sheet */
.feat-modal__body { display: flex; min-width: 0; }
.feat-modal__body .eng-feature.is-active { flex: 1 1 auto; min-width: 0; }

.feat-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 6;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 50%;
  background: rgba(16, 18, 27, .7);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: #fff;
  cursor: pointer;
  transition: background .2s, transform .12s;
}
.feat-modal__close:hover { background: rgba(40, 44, 60, .92); }
.feat-modal__close:active { transform: scale(.92); }
.feat-modal__close svg { width: 20px; height: 20px; display: block; }

@media (prefers-reduced-motion: reduce) {
  .feat-modal, .feat-modal__dialog { transition: opacity .01s; }
  .feat-modal__dialog { transform: none; }
}

/* ---- Bottom sheet on mobile (matches the eng panel's own 720px stacking) ---- */
@media (max-width: 720px) {
  .feat-modal { padding: 0; align-items: flex-end; }
  .feat-modal__dialog {
    max-width: none;
    max-height: 92dvh;
    border-radius: 22px 22px 0 0;
    transform: translateY(100%);
  }
  .feat-modal.is-open .feat-modal__dialog { transform: none; }
  .feat-modal__body { width: 100%; }
}

/* =========================================================================
   PER-HIGHLIGHT TIER PILL  (pricing feature modal only)
   Each talking point in the modal is tagged with the lowest plan tier that
   unlocks it (Plus / Pro / Ultra) so a shopper sees exactly what each tier of
   the tool includes. Same tier vocabulary + tint as the .plan-badge on the
   pricing cards, restyled as a pill for the dark modal. The pill is hidden
   everywhere else (engagement-tools.css) — this scope reveals it.
   ========================================================================= */
.feat-modal__body .eng-point__tier {
  display: inline-flex;
  align-items: center;
  flex: none;
  align-self: center;
  margin-left: auto;                              /* park it at the row's right edge */
  padding: 0.15em 0.62em;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.6875rem;                           /* 11px */
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}
.feat-modal__body .eng-point__tier--plus {
  color: #b9b9c9;
  background: rgba(255, 255, 255, 0.055);
  border-color: rgba(255, 255, 255, 0.14);
}
.feat-modal__body .eng-point__tier--pro {
  color: #aeaeff;
  background: rgba(90, 90, 255, 0.16);            /* --color-secondary #5A5AFF */
  border-color: rgba(90, 90, 255, 0.55);
}
.feat-modal__body .eng-point__tier--ultra {
  color: #ffb27a;
  background: rgba(255, 121, 27, 0.16);           /* --color-primary #FF791B */
  border-color: rgba(255, 121, 27, 0.55);
}
@media (max-width: 720px) {
  .feat-modal__body .eng-point__tier { font-size: 0.625rem; padding: 0.12em 0.5em; }
}

/* =========================================================================
   PACKAGE FEATURE LIST — gamification icon in place of the check bullet
   (feature-modal.js adds .has-feat-icon + the <img> per item; the plain
    check in pricing.html stays as the no-JS fallback)
   ========================================================================= */
.plan-features li.has-feat-icon { padding-left: 1.85rem; }
.plan-features li.has-feat-icon::before { display: none; }
.plan-feat-icon {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1.3rem;
  height: 1.3rem;
  object-fit: contain;
  pointer-events: none;
}

/* Every interactive feature row gets a 48px tap target (desktop + mobile):
   the row is >=48px tall and its link is stretched across the whole row, so a
   click/tap anywhere on the row opens the modal. */
.plan-features li.has-feat-icon {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  min-height: 48px;
}
.plan-features li.has-feat-icon .plan-badge { margin-left: 0.3em; }
.plan-features li.has-feat-icon > a::after {
  content: "";
  position: absolute;
  inset: 0;                                    /* full-row tap target → opens the modal */
}
