/* ==========================================================================
   Stepify — Share Modal
   ========================================================================== */

.share-modal-backdrop {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.5); z-index: 1000;
  justify-content: center; align-items: center;
  backdrop-filter: blur(2px);
}
.share-modal-backdrop.open { display: flex; }

.share-modal {
  background: var(--card-bg, #fff); border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  width: 90%; max-width: 480px; overflow: hidden;
  animation: shareSlideIn 0.2s ease-out;
}

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

.share-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--border, #e2e8f0);
}
.share-modal-header h3 {
  margin: 0; font-family: var(--font-heading, 'Outfit', sans-serif);
  font-size: 1.1rem; font-weight: 600; color: var(--heading, #0f172a);
}
.share-modal-close {
  background: none; border: none; font-size: 1.5rem; cursor: pointer;
  color: var(--muted, #94a3b8); padding: 0 4px; line-height: 1;
}
.share-modal-close:hover { color: var(--text, #334155); }

.share-modal-body { padding: 20px; }

.share-link-row {
  display: flex; gap: 8px; margin-bottom: 6px;
}
.share-link-input {
  flex: 1; padding: 8px 12px; border-radius: 6px;
  border: 1px solid var(--border, #e2e8f0);
  background: var(--surface, #f8fafc); color: var(--text, #334155);
  font-size: 0.85rem; font-family: var(--font-body, 'DM Sans', sans-serif);
  outline: none;
}
.share-link-input:focus {
  border-color: #0891B2; box-shadow: 0 0 0 2px rgba(8,145,178,0.2);
}
.share-copy-btn {
  padding: 8px 16px; border-radius: 6px;
  background: #0891B2; color: #fff; border: none;
  font-weight: 600; font-size: 0.85rem; cursor: pointer;
  font-family: var(--font-body, 'DM Sans', sans-serif);
  white-space: nowrap;
}
.share-copy-btn:hover { background: #0E7490; }

.share-copy-feedback {
  font-size: 0.8rem; color: #059669; min-height: 20px;
  margin-bottom: 12px;
}

.share-buttons {
  display: flex; gap: 8px; flex-wrap: wrap;
}
.share-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 16px; border-radius: 8px;
  font-size: 0.85rem; font-weight: 500; text-decoration: none;
  font-family: var(--font-body, 'DM Sans', sans-serif);
  transition: opacity 0.15s;
}
.share-btn:hover { opacity: 0.85; }

.share-linkedin { background: #0077B5; color: #fff; }
.share-twitter { background: #1d1d1b; color: #fff; }
.share-facebook { background: #1877F2; color: #fff; }
.share-whatsapp { background: #25D366; color: #fff; }
.share-email {
  background: var(--surface, #f1f5f9);
  color: var(--text, #334155);
  border: 1px solid var(--border, #e2e8f0);
}

/* Dark mode */
[data-theme="dark"] .share-modal { background: #1e293b; }
[data-theme="dark"] .share-link-input { background: #0f172a; border-color: #334155; color: #f1f5f9; }
[data-theme="dark"] .share-email { background: #334155; color: #f1f5f9; border-color: #475569; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .share-modal { background: #1e293b; }
  :root:not([data-theme]) .share-link-input { background: #0f172a; border-color: #334155; color: #f1f5f9; }
  :root:not([data-theme]) .share-email { background: #334155; color: #f1f5f9; border-color: #475569; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .share-modal { animation: none; }
}

/* Mobile */
@media (max-width: 600px) {
  .share-modal { width: 95%; }
  .share-buttons { flex-direction: column; }
  .share-btn { justify-content: center; }
}
