/**
 * Registration Wall Styles
 * Styles for the metered registration wall that limits free story views
 */

/* Blur effect for gated content */
.registration-wall-blur {
  filter: blur(8px);
  pointer-events: none;
  user-select: none;
  transition: filter 0.3s ease;
}

/* Gradient overlay that fades content to white */
.registration-wall-gradient {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 200px;
  background: linear-gradient(to bottom, transparent 0%, rgba(255, 255, 255, 0.9) 50%, white 100%);
  pointer-events: none;
  z-index: 10;
}

/* Container for gated content - needs relative positioning for gradient */
.story-content-gated-wrapper {
  position: relative;
}

/* Prevent body scrolling when registration wall modal is open */
body.registration-wall-active {
  overflow: hidden;
}

/* Stories remaining badge */
.stories-remaining-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border: 1px solid #f59e0b;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #92400e;
  margin-bottom: 12px;
}

.stories-remaining-badge.last-story {
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
  border-color: #ef4444;
  color: #991b1b;
}

.stories-remaining-badge svg {
  width: 16px;
  height: 16px;
}

/* Registration Wall Modal Overlay */
.registration-wall-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.registration-wall-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Registration Wall Modal Content */
.registration-wall-modal {
  position: relative;
  background: #fff;
  background-image: url('/images/patterns/scribble-bg-storypie.png');
  background-repeat: repeat;
  border-radius: 24px;
  max-width: 420px;
  width: 100%;
  padding: 32px 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  max-height: 90vh;
  overflow-y: auto;
  animation: modalSlideUp 0.3s ease;
}

.registration-wall-modal::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 24px;
  pointer-events: none;
  z-index: 0;
}

.registration-wall-modal > * {
  position: relative;
  z-index: 1;
}

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

/* Mascot image */
.registration-wall-mascot {
  text-align: center;
  margin-bottom: 16px;
}

.registration-wall-mascot img {
  width: 80px;
  height: 80px;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
}

/* Title and subtitle */
.registration-wall-title {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 8px;
}

.registration-wall-subtitle {
  text-align: center;
  font-size: 1rem;
  color: #6b7280;
  margin-bottom: 24px;
}

/* Benefits list */
.registration-wall-benefits {
  list-style: none;
  padding: 0;
  margin: 0 0 24px 0;
}

.registration-wall-benefits li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 12px;
  background: #fff;
  border-radius: 12px;
  margin-bottom: 8px;
}

.registration-wall-benefits li:last-child {
  margin-bottom: 0;
}

.registration-wall-benefits .benefit-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 2px;
  filter: brightness(0) saturate(100%) invert(32%) sepia(91%) saturate(4538%) hue-rotate(315deg) brightness(103%) contrast(97%);
}

.registration-wall-benefits .benefit-text {
  font-size: 0.9rem;
  color: #374151;
  font-weight: 500;
}

/* OAuth buttons */
.registration-wall-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.registration-wall-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px 20px;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.registration-wall-btn-primary {
  background: #fe4080;
  color: #fff;
}

.registration-wall-btn-primary:hover {
  background: #e5396f;
  transform: translateY(-1px);
}

.registration-wall-btn-google {
  background: #fff;
  color: #374151;
  border: 2px solid #e5e7eb;
}

.registration-wall-btn-google:hover {
  background: #f9fafb;
  border-color: #d1d5db;
}

.registration-wall-btn-google img,
.registration-wall-btn-apple img {
  width: 20px;
  height: 20px;
}

.registration-wall-btn-apple {
  background: #000;
  color: #fff;
}

.registration-wall-btn-apple:hover {
  background: #1f2937;
}

/* Sign in link */
.registration-wall-signin {
  text-align: center;
  font-size: 0.9rem;
  color: #6b7280;
}

.registration-wall-signin a {
  color: #fe4080;
  font-weight: 600;
  text-decoration: none;
}

.registration-wall-signin a:hover {
  text-decoration: underline;
}

/* Mobile responsive */
@media (max-width: 480px) {
  .registration-wall-modal {
    padding: 24px 16px;
    margin: 10px;
    border-radius: 20px;
  }

  .registration-wall-title {
    font-size: 1.3rem;
  }

  .registration-wall-subtitle {
    font-size: 0.9rem;
  }

  .registration-wall-benefits li {
    padding: 8px 10px;
  }

  .registration-wall-btn {
    padding: 12px 16px;
    font-size: 0.95rem;
  }
}
