/**
 * preview-modal.css — Styles for the paystub preview modal
 * Two-column comparison: Premium (paid) vs Free version
 */

/* ============================================
   OVERLAY
   ============================================ */
.pm-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  overflow-y: auto;
  padding: 30px 16px;
}

/* ============================================
   MODAL CONTAINER
   ============================================ */
.pm-modal {
  position: relative;
  background: #fff;
  border-radius: 16px;
  max-width: 1100px;
  width: 100%;
  padding: 36px 32px 32px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
  animation: previewSlideIn 0.3s ease-out;
}

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

.pm-modal > h2 {
  text-align: center;
  font-size: 1.5rem;
  color: #1B2A4A;
  margin: 0 0 4px;
}

.pm-modal > p {
  text-align: center;
  color: #666;
  font-size: 0.95rem;
  margin: 0 0 24px;
}

/* Close button */
.preview-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  font-size: 28px;
  color: #999;
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.2s, color 0.2s;
}

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

/* ============================================
   TWO-COLUMN LAYOUT
   ============================================ */
.preview-columns {
  display: flex;
  gap: 24px;
  align-items: stretch;
}

.preview-col {
  flex: 1;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: border-color 0.2s;
}

.preview-col.premium {
  border-color: #d4a017;
}

.preview-col.premium:hover {
  border-color: #b8860b;
}

.preview-col.free {
  border-color: #d1d5db;
}

/* ============================================
   BADGES
   ============================================ */
.preview-badge {
  display: inline-block;
  padding: 4px 16px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 14px;
  text-align: center;
  align-self: center;
}

.premium-badge {
  background: linear-gradient(135deg, #f6d365, #d4a017);
  color: #5a3e00;
}

.free-badge {
  background: #e5e7eb;
  color: #6b7280;
}

/* ============================================
   PDF PREVIEW CONTAINER
   ============================================ */
.preview-pdf-container {
  width: 100%;
  aspect-ratio: 8.5 / 11;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  background: #f9fafb;
  margin-bottom: 14px;
}

.preview-pdf-container iframe,
.preview-pdf-container canvas,
.preview-pdf-container img {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
  object-fit: contain;
}

/* ============================================
   WATERMARK NOTE
   ============================================ */
.preview-watermark-note {
  text-align: center;
  font-size: 0.82rem;
  color: #92400e;
  background: #fef3c7;
  border-radius: 6px;
  padding: 6px 12px;
  margin-bottom: 12px;
}

.lock-icon {
  margin-right: 4px;
}

/* ============================================
   FEATURE LIST
   ============================================ */
.preview-features {
  margin-bottom: 16px;
  flex: 1;
}

.feature-item {
  font-size: 0.88rem;
  color: #374151;
  padding: 4px 0;
  line-height: 1.5;
}

.feature-item.dimmed {
  color: #9ca3af;
}

.free-features .feature-item:last-child {
  font-size: 0.8rem;
  color: #6b7280;
  margin-top: 4px;
}

/* ============================================
   PRICING / CTA BUTTONS
   ============================================ */
.preview-pricing {
  text-align: center;
}

.btn-buy-preview {
  display: block;
  width: 100%;
  padding: 14px 24px;
  background: #1B2A4A;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  margin-bottom: 8px;
}

.btn-buy-preview:hover {
  background: #263a5e;
  transform: translateY(-1px);
}

.btn-buy-preview:active {
  transform: translateY(0);
}

.see-all-plans {
  display: inline-block;
  font-size: 0.88rem;
  color: #16a34a;
  font-weight: 600;
  text-decoration: none;
  padding: 8px 16px;
  border: 1.5px dashed #22C55E;
  border-radius: 8px;
  margin-top: 6px;
  transition: background 0.2s, color 0.2s;
}

.see-all-plans:hover {
  background: #f0fdf4;
  color: #15803d;
}

.see-all-plans .save-icon {
  color: #f59e0b;
  margin-right: 4px;
}

.btn-free-download {
  display: block;
  width: 100%;
  padding: 14px 24px;
  background: #fff;
  color: #374151;
  border: 2px solid #d1d5db;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.btn-free-download:hover {
  background: #f9fafb;
  border-color: #9ca3af;
}

/* ============================================
   EMAIL SUB-MODAL
   ============================================ */
.email-modal {
  position: fixed;
  inset: 0;
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
}

.email-modal-content {
  position: relative;
  background: #fff;
  border-radius: 12px;
  max-width: 420px;
  width: 90%;
  padding: 32px 28px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
  text-align: center;
}

.email-modal-content h3 {
  margin: 0 0 8px;
  font-size: 1.2rem;
  color: #1B2A4A;
}

.email-modal-content p {
  margin: 0 0 20px;
  font-size: 0.9rem;
  color: #666;
}

.email-modal-content input[type="email"] {
  display: block;
  width: 100%;
  padding: 12px 14px;
  border: 2px solid #d1d5db;
  border-radius: 8px;
  font-size: 1rem;
  margin-bottom: 14px;
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.email-modal-content input[type="email"]:focus {
  border-color: #2563eb;
}

.email-modal-content .btn-primary {
  display: block;
  width: 100%;
  padding: 12px 24px;
  background: #1B2A4A;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
  margin-bottom: 10px;
}

.email-modal-content .btn-primary:hover {
  background: #263a5e;
}

.email-modal-content .btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.email-disclaimer {
  font-size: 0.78rem;
  color: #9ca3af;
  margin: 0;
}

.email-success {
  color: #16a34a;
  font-weight: 600;
}

.email-error {
  color: #dc2626;
  font-size: 0.85rem;
  margin-top: 8px;
}

/* ============================================
   RESPONSIVE: MOBILE
   ============================================ */
@media (max-width: 768px) {
  .pm-overlay {
    padding: 16px 8px;
  }

  .pm-modal {
    padding: 24px 16px 20px;
  }

  .preview-columns {
    flex-direction: column;
    gap: 20px;
  }

  .preview-col {
    padding: 16px;
  }

  .pm-modal > h2 {
    font-size: 1.25rem;
  }

  .btn-buy-preview,
  .btn-free-download {
    padding: 12px 18px;
    font-size: 0.95rem;
  }
}
