/* NX Sales Chat — Floating Bubble
   Injected by WP plugin into all public pages */

/* ── Bubble button ── */
.nx-bubble {
  position: fixed;
  bottom: 24px;
  z-index: 99998;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px 12px 14px;
  background: var(--nx-accent, #3b7cf7);
  color: #fff;
  border: none;
  border-radius: 50px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0,0,0,.25), 0 1px 4px rgba(0,0,0,.15);
  transition: transform .18s cubic-bezier(.4,0,.2,1),
              box-shadow .18s ease,
              opacity .18s ease;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
}
.nx-bubble.nx-right { right: 24px; }
.nx-bubble.nx-left  { left:  24px; }

.nx-bubble:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0,0,0,.3), 0 2px 6px rgba(0,0,0,.15);
}
.nx-bubble:active { transform: scale(.96); }

.nx-bubble.nx-open { border-radius: 12px; }

.nx-bubble-icon { flex-shrink: 0; display: flex; align-items: center; }
.nx-bubble-label { line-height: 1; }

/* Unread badge */
.nx-badge {
  position: absolute;
  top: -4px; right: -4px;
  width: 18px; height: 18px;
  background: #ef4444;
  color: #fff;
  border-radius: 50%;
  font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid #fff;
  display: none;
}
.nx-badge.visible { display: flex; }

/* ── Popup window ── */
.nx-popup {
  position: fixed;
  z-index: 99999;
  bottom: 86px;
  background: #0d0f12;
  border-radius: 16px;
  border: 1px solid #23272f;
  box-shadow: 0 20px 60px rgba(0,0,0,.4), 0 4px 16px rgba(0,0,0,.2);
  overflow: hidden;
  /* Start hidden — JS adds .nx-visible */
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px) scale(.97);
  transform-origin: bottom center;
  transition: opacity .22s cubic-bezier(.4,0,.2,1),
              transform .22s cubic-bezier(.4,0,.2,1);
}
.nx-popup.nx-right { right: 20px; }
.nx-popup.nx-left  { left:  20px; }
.nx-popup.nx-visible {
  opacity: 1;
  pointer-events: all;
  transform: none;
}
.nx-popup iframe {
  display: block;
  border: none;
  width: 100%;
  height: 100%;
}

/* ── Mobile: full-screen popup ── */
@media (max-width: 500px) {
  .nx-popup {
    position: fixed !important;
    inset: 0 !important;
    bottom: 0 !important;
    right: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    border-radius: 0;
    border: none;
    transform: translateY(100%);
    transition: transform .28s cubic-bezier(.4,0,.2,1), opacity .1s;
    opacity: 1;
  }
  .nx-popup.nx-visible {
    transform: translateY(0);
  }
  .nx-bubble {
    bottom: max(16px, env(safe-area-inset-bottom, 16px));
  }
  .nx-bubble.nx-right { right: 16px; }
  .nx-bubble.nx-left  { left:  16px; }
}
