/**
 * Premium Gates & Soft Paywalls
 * Visual styling for locked content and upgrade prompts
 */

/* ===================================
   LOCKED ACHIEVEMENT BADGES
   =================================== */
.achievement-card.locked {
  position: relative;
  opacity: 0.6;
  cursor: pointer;
  transition: all 0.3s ease;
}

.achievement-card.locked:hover {
  opacity: 0.8;
  transform: scale(1.05);
}

.achievement-card .locked-badge {
  position: absolute;
  bottom: 4px;
  right: 4px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 8px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ===================================
   RECIPE BLUR & SOFT PAYWALL
   =================================== */
.recipe-card.locked,
.recipe-item.locked {
  position: relative;
}

.recipe-card.locked .recipe-content,
.recipe-item.locked .recipe-content {
  filter: blur(5px);
  opacity: 0.5;
  pointer-events: none;
  user-select: none;
}

.unlock-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  padding: 32px;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  text-align: center;
  z-index: 10;
  max-width: 90%;
  width: 320px;
  animation: slideUpFade 0.4s ease;
}

@keyframes slideUpFade {
  from {
    opacity: 0;
    transform: translate(-50%, -40%);
  }

  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

.unlock-overlay h3 {
  margin: 0 0 12px 0;
  font-size: 24px;
  font-weight: 700;
  color: #1a202c;
}

.unlock-overlay p {
  margin: 0 0 20px 0;
  font-size: 16px;
  color: #4a5568;
  line-height: 1.5;
}

.unlock-overlay .premium-badge {
  display: inline-block;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
}

.unlock-overlay .upgrade-btn {
  display: block;
  width: 100%;
  padding: 14px 24px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  margin-bottom: 12px;
}

.unlock-overlay .upgrade-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(102, 126, 234, 0.3);
}

.unlock-overlay .learn-more-link {
  display: block;
  color: #667eea;
  font-size: 14px;
  text-decoration: none;
  font-weight: 500;
  margin-top: 8px;
}

.unlock-overlay .learn-more-link:hover {
  text-decoration: underline;
}

/* ===================================
   PREMIUM BANNER (Top of pages)
   =================================== */
.premium-banner {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 16px 24px;
  text-align: center;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.premium-banner p {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
}

.premium-banner strong {
  font-weight: 700;
}

.premium-banner .banner-btn {
  display: inline-block;
  background: white;
  color: #667eea;
  padding: 8px 20px;
  border-radius: 20px;
  font-weight: 600;
  text-decoration: none;
  margin-left: 16px;
  transition: all 0.3s ease;
}

.premium-banner .banner-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.premium-banner .close-banner {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  transition: all 0.3s ease;
}

.premium-banner .close-banner:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* ===================================
   UPGRADE MODAL (Full screen overlay)
   =================================== */
.upgrade-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 8000;
  padding: 20px;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.upgrade-modal {
  background: white;
  border-radius: 24px;
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  animation: modalSlideUp 0.4s ease;
}

@keyframes modalSlideUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.upgrade-modal-header {
  padding: 32px 32px 24px;
  text-align: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 24px 24px 0 0;
}

.upgrade-modal-header h2 {
  margin: 0 0 8px 0;
  font-size: 32px;
  font-weight: 700;
}

.upgrade-modal-header p {
  margin: 0;
  font-size: 18px;
  opacity: 0.95;
}

.upgrade-modal-body {
  padding: 32px;
}

.upgrade-modal .close-modal {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  transition: all 0.3s ease;
  line-height: 1;
}

.upgrade-modal .close-modal:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

.upgrade-features {
  list-style: none;
  padding: 0;
  margin: 24px 0;
}

.upgrade-features li {
  display: flex;
  align-items: flex-start;
  margin-bottom: 16px;
  font-size: 16px;
  color: #2d3748;
}

.upgrade-features li::before {
  content: "✓";
  display: inline-block;
  width: 24px;
  height: 24px;
  background: #48bb78;
  color: white;
  border-radius: 50%;
  text-align: center;
  line-height: 24px;
  font-weight: bold;
  margin-right: 12px;
  flex-shrink: 0;
}

.upgrade-modal .pricing-box {
  background: #f7fafc;
  border-radius: 16px;
  padding: 24px;
  text-align: center;
  margin: 24px 0;
}

.upgrade-modal .price {
  font-size: 48px;
  font-weight: 700;
  color: #1a202c;
  margin: 0;
}

.upgrade-modal .price-period {
  font-size: 18px;
  color: #718096;
  margin-top: 4px;
}

.upgrade-modal .price-breakdown {
  font-size: 14px;
  color: #a0aec0;
  margin-top: 8px;
}

.upgrade-modal .cta-button {
  display: block;
  width: 100%;
  padding: 16px 32px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  text-align: center;
  margin-top: 24px;
}

.upgrade-modal .cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(102, 126, 234, 0.4);
}

.upgrade-modal .guarantee {
  text-align: center;
  font-size: 14px;
  color: #718096;
  margin-top: 16px;
}

/* ===================================
   MOBILE RESPONSIVE
   =================================== */
@media (max-width: 640px) {
  .unlock-overlay {
    padding: 24px;
    width: 280px;
  }

  .unlock-overlay h3 {
    font-size: 20px;
  }

  .unlock-overlay p {
    font-size: 14px;
  }

  .upgrade-modal {
    border-radius: 16px;
  }

  .upgrade-modal-header {
    padding: 24px 24px 20px;
  }

  .upgrade-modal-header h2 {
    font-size: 24px;
  }

  .upgrade-modal-header p {
    font-size: 16px;
  }

  .upgrade-modal-body {
    padding: 24px;
  }

  .upgrade-modal .price {
    font-size: 36px;
  }

  .premium-banner .banner-btn {
    display: block;
    margin: 12px auto 0;
  }
}

/* ===================================
   DAY 7 REMINDER BANNER
   =================================== */
.day7-reminder {
  background: linear-gradient(135deg, #f6ad55 0%, #ed8936 100%);
  color: white;
  padding: 20px 24px;
  text-align: center;
  border-radius: 12px;
  margin: 20px 0;
  box-shadow: 0 4px 12px rgba(237, 137, 54, 0.3);
  animation: pulseGlow 2s ease-in-out infinite;
}

@keyframes pulseGlow {

  0%,
  100% {
    box-shadow: 0 4px 12px rgba(237, 137, 54, 0.3);
  }

  50% {
    box-shadow: 0 8px 24px rgba(237, 137, 54, 0.5);
  }
}

.day7-reminder h3 {
  margin: 0 0 8px 0;
  font-size: 24px;
  font-weight: 700;
}

.day7-reminder p {
  margin: 0 0 16px 0;
  font-size: 16px;
}

.day7-reminder .reminder-btn {
  display: inline-block;
  background: white;
  color: #ed8936;
  padding: 12px 28px;
  border-radius: 24px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.3s ease;
}

.day7-reminder .reminder-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* ===================================
   EXIT INTENT POPUP
   =================================== */
.exit-intent-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  border-radius: 24px;
  padding: 40px;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  z-index: 10000;
  animation: bounceIn 0.5s ease;
}

@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: translate(-50%, -60%) scale(0.8);
  }

  60% {
    opacity: 1;
    transform: translate(-50%, -48%) scale(1.05);
  }

  100% {
    transform: translate(-50%, -50%) scale(1);
  }
}

.exit-intent-popup h2 {
  margin: 0 0 16px 0;
  font-size: 32px;
  font-weight: 700;
  color: #1a202c;
  text-align: center;
}

.exit-intent-popup p {
  margin: 0 0 24px 0;
  font-size: 18px;
  color: #4a5568;
  text-align: center;
  line-height: 1.6;
}

.exit-intent-popup .trial-offer {
  background: #fef5e7;
  border: 2px solid #f6ad55;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  margin-bottom: 24px;
}

.exit-intent-popup .trial-offer strong {
  display: block;
  font-size: 24px;
  color: #ed8936;
  margin-bottom: 8px;
}

.exit-intent-popup .popup-cta {
  display: block;
  width: 100%;
  padding: 16px 32px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  text-align: center;
}

.exit-intent-popup .popup-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(102, 126, 234, 0.4);
}

.exit-intent-popup .no-thanks {
  display: block;
  text-align: center;
  color: #a0aec0;
  font-size: 14px;
  margin-top: 16px;
  cursor: pointer;
  text-decoration: none;
}

.exit-intent-popup .no-thanks:hover {
  color: #718096;
  text-decoration: underline;
}

/* ===================================
   PREMIUM FEATURE LOCKS
   =================================== */
.feature-locked {
  position: relative;
  opacity: 0.6;
  pointer-events: none;
  user-select: none;
}

.feature-locked::after {
  content: "🔒 Premium";
  position: absolute;
  top: 8px;
  right: 8px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.feature-lock-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.feature-lock-overlay:hover {
  background: rgba(255, 255, 255, 0.98);
}

.feature-lock-content {
  text-align: center;
  padding: 20px;
}

.feature-lock-content h4 {
  margin: 0 0 8px 0;
  font-size: 18px;
  font-weight: 700;
  color: #1a202c;
}

.feature-lock-content p {
  margin: 0 0 16px 0;
  font-size: 14px;
  color: #718096;
}

.feature-lock-content .unlock-feature-btn {
  display: inline-block;
  padding: 10px 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  font-size: 14px;
  transition: all 0.3s ease;
}

.feature-lock-content .unlock-feature-btn:hover {
  transform: scale(1.05);
}