/* ═══════════════════════════════════════════
   NEAR ME PAGE GENERATOR MODULE CSS
   ═══════════════════════════════════════════ */

.nm-container {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  width: 100%;
}

/* Horizontal Progress Steps Tracker */
.nm-steps-tracker {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px var(--space-5);
  gap: var(--space-4);
  overflow-x: auto;
}

.nm-tracker-step {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  flex: 1;
}

.nm-tracker-step:not(:last-child)::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-color);
  margin: 0 16px;
  min-width: 30px;
}

.nm-step-badge {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.nm-tracker-step.active .nm-step-badge {
  background: #6366f1;
  border-color: #6366f1;
  color: white;
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.4);
}

.nm-tracker-step.completed .nm-step-badge {
  background: rgba(34, 197, 94, 0.12);
  border-color: #22c55e;
  color: #22c55e;
}

.nm-step-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nm-step-lbl {
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  color: var(--text-secondary);
  white-space: nowrap;
}

.nm-tracker-step.active .nm-step-lbl {
  color: var(--text-primary);
}

.nm-step-desc {
  font-size: 0.65rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Two Column Layout */
.nm-grid {
  display: grid;
  grid-template-columns: 480px 1fr;
  gap: var(--space-5);
  align-items: start;
}

@media (max-width: 1100px) {
  .nm-grid {
    grid-template-columns: 1fr;
  }
}

.nm-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

/* Form Headers & Steps */
.nm-step-title {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--fs-md);
  font-weight: var(--fw-bold);
  color: var(--text-primary);
  margin-bottom: 2px;
}

.nm-step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #6366f1;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  flex-shrink: 0;
}

.nm-step-sub {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  margin-left: 36px;
  margin-top: -10px;
}

/* Tags Lists for Service Areas */
.nm-tags-input-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 8px 10px;
  min-height: 40px;
  align-items: center;
}

.nm-tag {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 4px 10px;
  border-radius: 4px;
  font-size: var(--fs-xs);
  color: var(--text-secondary);
}

.nm-tag-close {
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
}

.nm-tag-close:hover {
  color: var(--error);
}

.nm-tag-add-btn {
  background: rgba(99, 102, 241, 0.1);
  border: 1px dashed rgba(99, 102, 241, 0.4);
  color: #a78bfa;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: var(--fs-xs);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.nm-tag-add-btn:hover {
  background: rgba(99, 102, 241, 0.2);
  border-color: #6366f1;
}

/* USP Selectors Grid */
.nm-usp-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.nm-usp-btn {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  font-size: var(--fs-xs);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.nm-usp-btn:hover {
  border-color: var(--border-color-hover);
  background: var(--bg-surface-hover);
}

.nm-usp-btn.active {
  border-color: #6366f1;
  background: rgba(99, 102, 241, 0.08);
  color: var(--text-primary);
}

.nm-usp-checkbox {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.nm-usp-btn.active .nm-usp-checkbox {
  background: #6366f1;
  border-color: #6366f1;
  color: white;
}

/* AI Generation Banner */
.nm-gen-banner {
  background: rgba(99, 102, 241, 0.04);
  border: 1px solid rgba(99, 102, 241, 0.15);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.nm-banner-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  color: #a78bfa;
}

.nm-banner-bullets {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nm-banner-bullet {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: var(--fs-xs);
  color: var(--text-secondary);
}

.nm-bullet-icon {
  color: #6366f1;
  flex-shrink: 0;
  margin-top: 1px;
}

/* Page Preview Live Frame */
.nm-preview-card {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.nm-preview-head {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nm-preview-title {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--text-primary);
}

.nm-preview-canvas {
  background: #ffffff;
  color: #334155;
  padding: 24px;
  max-height: 600px;
  overflow-y: auto;
  font-family: system-ui, -apple-system, sans-serif;
  line-height: 1.5;
}

/* Reusable Landing Page Preview Components */
.lp-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 12px;
  margin-bottom: 20px;
}

.lp-logo {
  font-weight: bold;
  font-size: 1.1rem;
  color: #1e3a8a;
}

.lp-hero {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: var(--space-4);
  align-items: center;
  margin-bottom: 30px;
}

@media (max-width: 600px) {
  .lp-hero {
    grid-template-columns: 1fr;
  }
}

.lp-hero-title {
  font-size: 1.8rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
  margin: 0 0 10px 0;
}

.lp-hero-sub {
  font-size: 1rem;
  color: #475569;
  margin: 0 0 16px 0;
}

.lp-hero-bullets {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
  padding: 0;
  list-style: none;
}

.lp-hero-bullet {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #334155;
}

.lp-hero-bullet svg {
  color: #22c55e;
}

.lp-hero-btns {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.lp-btn-primary {
  background: #4f46e5;
  color: white;
  padding: 10px 18px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: bold;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.lp-btn-secondary {
  background: #f1f5f9;
  color: #334155;
  padding: 10px 18px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: bold;
  text-decoration: none;
  display: inline-block;
  border: 1px solid #cbd5e1;
  text-align: center;
}

.lp-hero-img-wrap {
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lp-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Service cards in Preview */
.lp-section-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #0f172a;
  text-align: center;
  margin-bottom: 16px;
}

.lp-services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 30px;
}

@media (max-width: 600px) {
  .lp-services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.lp-service-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 12px 10px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.lp-service-icon {
  font-size: 1.25rem;
  color: #4f46e5;
  background: #e0e7ff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lp-service-name {
  font-size: 0.75rem;
  font-weight: bold;
  color: #1e293b;
}

/* Why Choose Us Grid */
.lp-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 30px;
}

@media (max-width: 600px) {
  .lp-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.lp-stat-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 12px 6px;
  text-align: center;
}

.lp-stat-val {
  font-size: 1.1rem;
  font-weight: bold;
  color: #4f46e5;
  display: block;
}

.lp-stat-lbl {
  font-size: 0.65rem;
  color: #64748b;
}

/* Service areas tags list */
.lp-areas-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 20px;
}

.lp-area-tag {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  color: #475569;
}

/* Circular Radial Progress Meter for SEO Score */
.nm-seo-circle-wrap {
  position: relative;
  width: 90px;
  height: 90px;
  margin: 0 auto;
}

.nm-seo-circle-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.nm-seo-circle-bg {
  fill: none;
  stroke: var(--bg-secondary);
  stroke-width: 8;
}

.nm-seo-circle-progress {
  fill: none;
  stroke: #22c55e;
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 251.2; /* 2 * pi * r (r=40) => 251.2 */
  stroke-dashoffset: 251.2;
  transition: stroke-dashoffset 0.8s ease;
}

.nm-seo-val {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: var(--fs-xl);
  font-weight: var(--fw-bold);
  color: var(--text-primary);
}

/* Score Criteria Progress Bars */
.nm-criteria-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.nm-criteria-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nm-criteria-header {
  display: flex;
  justify-content: space-between;
  font-size: var(--fs-xs);
  color: var(--text-secondary);
}

.nm-criteria-bar-wrap {
  width: 100%;
  height: 6px;
  background: var(--bg-secondary);
  border-radius: 4px;
  overflow: hidden;
}

.nm-criteria-bar {
  height: 100%;
  background: #6366f1;
  width: 0;
  border-radius: 4px;
  transition: width 0.6s ease;
}

/* Sidebar checklist items */
.nm-checklist {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.nm-checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: var(--fs-xs);
  color: var(--text-secondary);
}

.nm-checklist-icon {
  color: #22c55e;
  flex-shrink: 0;
  margin-top: 1px;
}

.nm-checklist-icon.pending {
  color: var(--text-muted);
}

/* Related Keywords list block */
.nm-keywords-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.nm-keyword-tag {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: var(--fs-xs);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Modal form USP additions */
.nm-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1100;
}

.nm-modal {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  max-width: 400px;
  width: 90%;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

/* Table elements */
.nm-badge-draft {
  background: rgba(249, 115, 22, 0.12);
  color: #f97316;
  border: 1px solid rgba(249, 115, 22, 0.25);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: var(--fw-semibold);
  display: inline-block;
  text-transform: uppercase;
}
