/**
 * Social Share Modal
 * Popup after successful conversion
 */

/* ===========================
   Modal Overlay
   =========================== */

.share-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.share-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* ===========================
   Modal Container
   =========================== */

.share-modal {
  background: var(--bg-primary);
  border-radius: var(--radius-2xl);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  max-width: 440px;
  width: 100%;
  padding: var(--space-8);
  transform: scale(0.9) translateY(20px);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.share-modal-overlay.active .share-modal {
  transform: scale(1) translateY(0);
}

/* Confetti effect background */
.share-modal::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--brand-400), var(--brand-600), #8B5CF6, #EC4899);
  background-size: 300% 100%;
  animation: gradientMove 3s ease infinite;
}

@keyframes gradientMove {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* ===========================
   Modal Header
   =========================== */

.share-modal-close {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  width: 36px;
  height: 36px;
  border: none;
  background: var(--bg-secondary);
  border-radius: var(--radius-full);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

.share-modal-close:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  transform: rotate(90deg);
}

.share-modal-header {
  text-align: center;
  margin-bottom: var(--space-6);
}

.share-modal-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto var(--space-4);
  background: linear-gradient(135deg, var(--brand-100) 0%, var(--brand-200) 100%);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: bounceIn 0.6s ease;
}

@keyframes bounceIn {
  0% { transform: scale(0); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

.share-modal-icon svg {
  width: 36px;
  height: 36px;
  color: var(--brand-600);
}

.share-modal-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}

.share-modal-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  margin: 0;
}

/* ===========================
   Share Buttons
   =========================== */

.share-buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}

.share-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-4);
  border: none;
  border-radius: var(--radius-xl);
  background: var(--bg-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.share-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.share-btn-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.share-btn:hover .share-btn-icon {
  transform: scale(1.1);
}

.share-btn-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
}

/* X/Twitter */
.share-btn-x .share-btn-icon {
  background: #000000;
  color: white;
}

.share-btn-x:hover {
  background: rgba(0, 0, 0, 0.05);
}

/* Facebook */
.share-btn-facebook .share-btn-icon {
  background: #1877F2;
  color: white;
}

.share-btn-facebook:hover {
  background: rgba(24, 119, 242, 0.1);
}

/* LinkedIn */
.share-btn-linkedin .share-btn-icon {
  background: #0A66C2;
  color: white;
}

.share-btn-linkedin:hover {
  background: rgba(10, 102, 194, 0.1);
}

/* WhatsApp */
.share-btn-whatsapp .share-btn-icon {
  background: #25D366;
  color: white;
}

.share-btn-whatsapp:hover {
  background: rgba(37, 211, 102, 0.1);
}

/* ===========================
   Copy Link Section
   =========================== */

.share-copy-section {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}

.share-copy-input {
  flex: 1;
  background: transparent;
  border: none;
  font-size: 0.875rem;
  color: var(--text-secondary);
  outline: none;
  min-width: 0;
}

.share-copy-btn {
  padding: var(--space-2) var(--space-4);
  background: var(--brand-600);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.share-copy-btn:hover {
  background: var(--brand-700);
}

.share-copy-btn.copied {
  background: var(--success);
}

/* ===========================
   Skip Button
   =========================== */

.share-skip {
  display: block;
  width: 100%;
  text-align: center;
  color: var(--text-tertiary);
  font-size: 0.875rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-2);
  transition: color 0.2s ease;
}

.share-skip:hover {
  color: var(--text-secondary);
}

/* ===========================
   Stats Badge
   =========================== */

.share-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
  padding: var(--space-2) var(--space-4);
  background: var(--brand-50);
  border-radius: var(--radius-full);
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

.share-stats-dot {
  width: 8px;
  height: 8px;
  background: var(--success);
  border-radius: var(--radius-full);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.share-stats-text {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--brand-700);
}

/* ===========================
   Mobile Responsive
   =========================== */

@media (max-width: 480px) {
  .share-modal {
    padding: var(--space-6);
    margin: var(--space-4);
  }

  .share-modal-title {
    font-size: 1.25rem;
  }

  .share-buttons {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-2);
  }

  .share-btn {
    padding: var(--space-3);
  }

  .share-btn-icon {
    width: 40px;
    height: 40px;
  }
}
