/* =============================================
   SHARED CONTENT WELCOME OVERLAY
   Shows when user opens a shared article link
   ============================================= */

.shared-welcome-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.3s ease;
  padding: 20px;
}

.shared-welcome-overlay.visible {
  opacity: 1;
}

.shared-welcome-overlay.dismissing {
  opacity: 0;
}

.shared-welcome-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 32px 28px 24px;
  max-width: 340px;
  width: 100%;
  text-align: center;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  transform: scale(0.9) translateY(20px);
  transition: transform 0.3s ease;
}

.shared-welcome-overlay.visible .shared-welcome-card {
  transform: scale(1) translateY(0);
}

.shared-welcome-overlay.dismissing .shared-welcome-card {
  transform: scale(0.9) translateY(-20px);
}

/* Close button */
.shared-welcome-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  font-size: 24px;
  color: #999;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
  line-height: 1;
}

.shared-welcome-close:hover {
  background: #f0f0f0;
  color: #333;
}

/* Icon */
.shared-welcome-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #2e7d32;
}

/* Title */
.shared-welcome-title {
  font-size: 20px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0 0 4px;
  line-height: 1.3;
}

.shared-welcome-title .referrer-name {
  color: #00695c;
}

/* Subtitle */
.shared-welcome-subtitle {
  font-size: 16px;
  color: #555;
  margin: 0 0 12px;
  line-height: 1.4;
}

/* Value proposition */
.shared-welcome-value {
  font-size: 14px;
  color: #00796b;
  margin: 0 0 20px;
  padding: 10px 16px;
  background: linear-gradient(135deg, #e0f2f1 0%, #b2dfdb 100%);
  border-radius: 8px;
  line-height: 1.4;
}

/* CTA Button */
.shared-welcome-cta {
  display: block;
  width: 100%;
  padding: 14px 24px;
  background: linear-gradient(135deg, #00897b 0%, #00695c 100%);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 16px;
}

.shared-welcome-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 105, 92, 0.4);
}

.shared-welcome-cta:active {
  transform: translateY(0);
}

/* Progress bar */
.shared-welcome-progress {
  height: 4px;
  background: #e0e0e0;
  border-radius: 2px;
  overflow: hidden;
}

.shared-welcome-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #26a69a, #00897b);
  width: 100%;
  transform-origin: left;
}

@keyframes sharedWelcomeProgress {
  from {
    transform: scaleX(1);
  }
  to {
    transform: scaleX(0);
  }
}

/* =============================================
   MOBILE RESPONSIVE
   ============================================= */

@media (max-width: 480px) {
  .shared-welcome-overlay {
    padding: 16px;
    align-items: flex-end;
    padding-bottom: 24px;
  }

  .shared-welcome-card {
    padding: 28px 24px 20px;
    border-radius: 20px 20px 20px 20px;
  }

  .shared-welcome-icon {
    width: 56px;
    height: 56px;
  }

  .shared-welcome-icon svg {
    width: 40px;
    height: 40px;
  }

  .shared-welcome-title {
    font-size: 18px;
  }

  .shared-welcome-subtitle {
    font-size: 15px;
  }

  .shared-welcome-cta {
    padding: 16px 24px;
  }
}

/* =============================================
   DARK MODE SUPPORT
   ============================================= */

body.dark-mode .shared-welcome-card {
  background: #1e1e1e;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

body.dark-mode .shared-welcome-close {
  color: #888;
}

body.dark-mode .shared-welcome-close:hover {
  background: #333;
  color: #fff;
}

body.dark-mode .shared-welcome-icon {
  background: linear-gradient(135deg, #1e3d3d 0%, #1b5e20 100%);
}

body.dark-mode .shared-welcome-title {
  color: #f5f5f5;
}

body.dark-mode .shared-welcome-title .referrer-name {
  color: #4db6ac;
}

body.dark-mode .shared-welcome-subtitle {
  color: #bbb;
}

body.dark-mode .shared-welcome-value {
  background: linear-gradient(135deg, #1e3d3d 0%, #004d40 100%);
  color: #80cbc4;
}

body.dark-mode .shared-welcome-progress {
  background: #333;
}
