/* ============================================================
   NASCI CONTACT POPUP - ULTRA COMPACT v2.0
   All styles scoped under .nasci-contact-popup
   ============================================================ */

.nasci-contact-popup {
  /* Design tokens */
  --nasci-cp-bg-page: #050a08;
  --nasci-cp-green-primary: #90E509;
  --nasci-cp-green-accent: #B4FF1A;
  --nasci-cp-green-glow: rgba(144, 229, 9, 0.15);
  --nasci-cp-dark-1: #00181C;
  --nasci-cp-dark-2: #0A2226;
  --nasci-cp-dark-3: #0F2D32;
  --nasci-cp-text-primary: #F5FBED;
  --nasci-cp-text-secondary: #8B9E8C;
  --nasci-cp-text-tertiary: #5A6E5F;
  --nasci-cp-border-subtle: rgba(144, 229, 9, 0.08);
  --nasci-cp-border-strong: rgba(144, 229, 9, 0.25);
  --nasci-cp-font: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  font-family: var(--nasci-cp-font);
  color: var(--nasci-cp-text-primary);
  max-width: 320px;
  width: 100%;
  margin: 0 auto;
  position: relative;
}

.nasci-contact-popup *,
.nasci-contact-popup *::before,
.nasci-contact-popup *::after {
  box-sizing: border-box;
}

/* Glass card */
.nasci-contact-popup .nasci-cp-card {
  position: relative;
  background: linear-gradient(180deg, rgba(15, 45, 50, 0.95), rgba(0, 24, 28, 0.98));
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--nasci-cp-border-subtle);
  border-radius: 20px;
  padding: 18px 16px 16px;
  box-shadow:
    0 24px 48px -16px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.02) inset,
    0 1px 0 rgba(255, 255, 255, 0.05) inset;
  animation: nasciCpRise 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes nasciCpRise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.nasci-contact-popup .nasci-cp-card::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 20%;
  right: 20%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--nasci-cp-green-primary), transparent);
  opacity: 0.6;
}

/* Header */
.nasci-contact-popup .nasci-cp-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 6px;
}

.nasci-contact-popup .nasci-cp-title-wrap h1 {
  font-family: var(--nasci-cp-font);
  font-size: 17px;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--nasci-cp-text-primary);
  margin: 0;
  padding: 0;
}

.nasci-contact-popup .nasci-cp-title-wrap h1 em {
  font-style: normal;
  color: var(--nasci-cp-green-primary);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.nasci-contact-popup .nasci-cp-close-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--nasci-cp-border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--nasci-cp-text-secondary);
  cursor: pointer;
  transition: all 0.25s ease;
  flex-shrink: 0;
  padding: 0;
}

.nasci-contact-popup .nasci-cp-close-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--nasci-cp-text-primary);
  transform: rotate(90deg);
}

/* Status bar */
.nasci-contact-popup .nasci-cp-status-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 10px 0 12px;
  padding: 6px 10px;
  background: rgba(144, 229, 9, 0.06);
  border: 1px solid var(--nasci-cp-border-subtle);
  border-radius: 100px;
  font-size: 10.5px;
  color: var(--nasci-cp-text-primary);
}

.nasci-contact-popup .nasci-cp-pulse {
  position: relative;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--nasci-cp-green-primary);
  flex-shrink: 0;
}

.nasci-contact-popup .nasci-cp-pulse::before,
.nasci-contact-popup .nasci-cp-pulse::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--nasci-cp-green-primary);
  animation: nasciCpPing 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.nasci-contact-popup .nasci-cp-pulse::after {
  animation-delay: 1s;
}

@keyframes nasciCpPing {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(3.5); opacity: 0; }
}

.nasci-contact-popup .nasci-cp-status-text {
  flex: 1;
}

.nasci-contact-popup .nasci-cp-status-time {
  color: var(--nasci-cp-green-primary);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  transition: opacity 0.3s ease;
}

/* Expert card */
.nasci-contact-popup .nasci-cp-expert {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px;
  background: linear-gradient(135deg, rgba(144, 229, 9, 0.04), rgba(144, 229, 9, 0.01));
  border: 1px solid var(--nasci-cp-border-subtle);
  border-radius: 12px;
  margin-bottom: 10px;
  overflow: hidden;
}

.nasci-contact-popup .nasci-cp-expert::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--nasci-cp-border-strong), transparent);
}

.nasci-contact-popup .nasci-cp-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.nasci-contact-popup .nasci-cp-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2a4a1a, #0f2d32);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--nasci-cp-green-primary);
  font-family: var(--nasci-cp-font);
  font-size: 15px;
  font-weight: 700;
  border: 1.5px solid rgba(144, 229, 9, 0.2);
  overflow: hidden;
}

.nasci-contact-popup .nasci-cp-avatar svg {
  width: 100%;
  height: 100%;
}

/* Dynamische avatar-foto (uit plugin instellingen) */
.nasci-contact-popup .nasci-cp-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.nasci-contact-popup .nasci-cp-online-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 10px;
  height: 10px;
  background: var(--nasci-cp-green-primary);
  border: 2px solid #0a2226;
  border-radius: 50%;
  box-shadow: 0 0 8px var(--nasci-cp-green-primary);
}

.nasci-contact-popup .nasci-cp-expert-info {
  flex: 1;
  min-width: 0;
}

.nasci-contact-popup .nasci-cp-expert-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--nasci-cp-text-primary);
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 1px;
}

.nasci-contact-popup .nasci-cp-verified {
  color: var(--nasci-cp-green-primary);
  display: inline-flex;
}

.nasci-contact-popup .nasci-cp-verified svg {
  width: 11px;
  height: 11px;
}

.nasci-contact-popup .nasci-cp-expert-role {
  font-size: 10.5px;
  color: var(--nasci-cp-text-secondary);
  font-weight: 500;
  margin-bottom: 3px;
}

.nasci-contact-popup .nasci-cp-expert-stats {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 9px;
  color: var(--nasci-cp-text-tertiary);
  font-weight: 500;
}

.nasci-contact-popup .nasci-cp-stat-divider {
  width: 2px;
  height: 2px;
  background: var(--nasci-cp-text-tertiary);
  border-radius: 50%;
}

.nasci-contact-popup .nasci-cp-rating {
  color: var(--nasci-cp-green-primary);
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-weight: 600;
}

.nasci-contact-popup .nasci-cp-rating svg {
  width: 8px;
  height: 8px;
}

/* Channels */
.nasci-contact-popup .nasci-cp-channels {
  display: grid;
  gap: 5px;
  margin-bottom: 12px;
}

.nasci-contact-popup .nasci-cp-channel {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--nasci-cp-border-subtle);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
}

.nasci-contact-popup .nasci-cp-channel::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, var(--nasci-cp-green-glow), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.nasci-contact-popup .nasci-cp-channel:hover {
  background: rgba(144, 229, 9, 0.04);
  border-color: var(--nasci-cp-border-strong);
  transform: translateX(2px);
}

.nasci-contact-popup .nasci-cp-channel:hover::after {
  transform: translateX(100%);
}

.nasci-contact-popup .nasci-cp-channel-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(144, 229, 9, 0.08);
  border: 1px solid var(--nasci-cp-border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--nasci-cp-green-primary);
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.nasci-contact-popup .nasci-cp-channel-icon svg {
  width: 13px;
  height: 13px;
}

.nasci-contact-popup .nasci-cp-channel:hover .nasci-cp-channel-icon {
  background: var(--nasci-cp-green-primary);
  color: var(--nasci-cp-dark-1);
  transform: scale(1.05);
}

.nasci-contact-popup .nasci-cp-channel-content {
  flex: 1;
  min-width: 0;
}

.nasci-contact-popup .nasci-cp-channel-label {
  font-size: 8.5px;
  color: var(--nasci-cp-text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  margin-bottom: 0;
  line-height: 1.4;
}

.nasci-contact-popup .nasci-cp-channel-value {
  font-size: 12px;
  font-weight: 600;
  color: var(--nasci-cp-text-primary);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nasci-contact-popup .nasci-cp-channel-meta {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 9px;
  color: var(--nasci-cp-text-secondary);
  flex-shrink: 0;
}

.nasci-contact-popup .nasci-cp-speed-badge {
  padding: 2px 6px;
  border-radius: 100px;
  font-size: 8.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(144, 229, 9, 0.15);
  color: var(--nasci-cp-green-primary);
  border: 1px solid var(--nasci-cp-border-strong);
  white-space: nowrap;
}

.nasci-contact-popup .nasci-cp-speed-badge.nasci-cp-fast {
  background: var(--nasci-cp-green-primary);
  color: var(--nasci-cp-dark-1);
  border-color: var(--nasci-cp-green-primary);
  box-shadow: 0 0 12px rgba(144, 229, 9, 0.4);
}

/* CTA */
.nasci-contact-popup .nasci-cp-cta {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 11px 16px;
  background: var(--nasci-cp-green-primary);
  color: var(--nasci-cp-dark-1);
  border: none;
  border-radius: 100px;
  font-family: var(--nasci-cp-font);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  white-space: nowrap;
  text-decoration: none;
  box-shadow:
    0 5px 16px rgba(144, 229, 9, 0.28),
    0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

.nasci-contact-popup .nasci-cp-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transform: translateX(-100%);
  transition: transform 0.8s ease;
}

.nasci-contact-popup .nasci-cp-cta:hover {
  background: var(--nasci-cp-green-accent);
  transform: translateY(-1px);
  box-shadow:
    0 8px 22px rgba(144, 229, 9, 0.42),
    0 0 0 1px rgba(255, 255, 255, 0.15) inset;
}

.nasci-contact-popup .nasci-cp-cta:hover::before {
  transform: translateX(100%);
}

.nasci-contact-popup .nasci-cp-cta:hover .nasci-cp-arrow {
  transform: translateX(3px);
}

.nasci-contact-popup .nasci-cp-cta:active {
  transform: translateY(0);
}

.nasci-contact-popup .nasci-cp-arrow {
  transition: transform 0.3s ease;
}

/* Trust footer */
.nasci-contact-popup .nasci-cp-trust {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--nasci-cp-border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.nasci-contact-popup .nasci-cp-trust-text {
  font-size: 9.5px;
  color: var(--nasci-cp-text-secondary);
  line-height: 1.3;
  font-weight: 500;
}

.nasci-contact-popup .nasci-cp-trust-text strong {
  color: var(--nasci-cp-text-primary);
  font-weight: 700;
}

.nasci-contact-popup .nasci-cp-trust-sub {
  color: var(--nasci-cp-text-tertiary);
  font-size: 8.5px;
}

/* Reviews badge */
.nasci-contact-popup .nasci-cp-reviews-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px 4px 4px;
  background: rgba(144, 229, 9, 0.04);
  border: 1px solid var(--nasci-cp-border-subtle);
  border-radius: 100px;
  transition: all 0.25s ease;
  flex-shrink: 0;
}

.nasci-contact-popup .nasci-cp-reviews-badge:hover {
  background: rgba(144, 229, 9, 0.08);
  border-color: var(--nasci-cp-border-strong);
}

.nasci-contact-popup .nasci-cp-reviewer-stack {
  display: flex;
  flex-shrink: 0;
}

.nasci-contact-popup .nasci-cp-reviewer-avatar {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid #0a2226;
  margin-left: -6px;
  background: linear-gradient(135deg, #2a4a1a, #0f2d32);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 7px;
  font-weight: 700;
  color: var(--nasci-cp-green-primary);
}

.nasci-contact-popup .nasci-cp-reviewer-avatar:first-child {
  margin-left: 0;
}

.nasci-contact-popup .nasci-cp-reviews-content {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.nasci-contact-popup .nasci-cp-reviews-top {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 700;
  color: var(--nasci-cp-text-primary);
}

.nasci-contact-popup .nasci-cp-reviews-stars {
  display: inline-flex;
  gap: 1px;
  color: var(--nasci-cp-green-primary);
}

.nasci-contact-popup .nasci-cp-reviews-stars svg {
  width: 7px;
  height: 7px;
}

.nasci-contact-popup .nasci-cp-reviews-sub {
  font-size: 7.5px;
  color: var(--nasci-cp-text-secondary);
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-top: 1px;
}

/* Stagger animations */
.nasci-contact-popup .nasci-cp-stagger > * {
  opacity: 0;
  animation: nasciCpSlideIn 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.nasci-contact-popup .nasci-cp-stagger > *:nth-child(1) { animation-delay: 0.06s; }
.nasci-contact-popup .nasci-cp-stagger > *:nth-child(2) { animation-delay: 0.12s; }
.nasci-contact-popup .nasci-cp-stagger > *:nth-child(3) { animation-delay: 0.18s; }
.nasci-contact-popup .nasci-cp-stagger > *:nth-child(4) { animation-delay: 0.24s; }
.nasci-contact-popup .nasci-cp-stagger > *:nth-child(5) { animation-delay: 0.3s; }

@keyframes nasciCpSlideIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============ OFFLINE STATES ============ */
.nasci-contact-popup .nasci-cp-status-bar.nasci-cp-offline {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.06);
}

.nasci-contact-popup .nasci-cp-status-bar.nasci-cp-offline .nasci-cp-pulse {
  background: var(--nasci-cp-text-tertiary);
}

.nasci-contact-popup .nasci-cp-status-bar.nasci-cp-offline .nasci-cp-pulse::before,
.nasci-contact-popup .nasci-cp-status-bar.nasci-cp-offline .nasci-cp-pulse::after {
  display: none;
}

.nasci-contact-popup .nasci-cp-status-bar.nasci-cp-offline .nasci-cp-status-time {
  color: var(--nasci-cp-text-primary);
}

.nasci-contact-popup .nasci-cp-online-dot.nasci-cp-offline {
  background: #5A6E5F;
  box-shadow: none;
}

.nasci-contact-popup .nasci-cp-channel.nasci-cp-unavailable {
  opacity: 0.55;
  pointer-events: none;
}

.nasci-contact-popup .nasci-cp-channel.nasci-cp-unavailable .nasci-cp-speed-badge {
  background: rgba(255, 255, 255, 0.05);
  color: var(--nasci-cp-text-tertiary);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: none;
}

/* Online/offline visibility toggles */
.nasci-contact-popup .nasci-cp-show-offline { display: none; }
.nasci-contact-popup.nasci-cp-offline-mode .nasci-cp-show-offline { display: inline; }
.nasci-contact-popup.nasci-cp-offline-mode .nasci-cp-show-online { display: none; }
