/* Customer Journey Page Styles - Light Mode Only, WordPress.org Compliant */

/* Loading Overlay */
.cj-loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.3s ease;
}

.cj-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(59, 130, 246, 0.1);
  border-top: 4px solid #3b82f6;
  border-radius: 50%;
  animation: cj-spin 1s linear infinite;
  margin-bottom: 20px;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

@keyframes cj-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.cj-loading-overlay p {
  color: #4b5563;
  font-size: 16px;
  font-weight: 500;
  margin: 0;
  text-align: center;
  background: rgba(255, 255, 255, 0.9);
  padding: 12px 24px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
}

/* Main Container - FORCE LIGHT MODE */
.causalfunnel-customer-journey {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu,
    Cantarell, sans-serif;
  background: #f8fafc !important;
  color: #1f2937 !important;
  min-height: 100vh;
}

/* FORCE LIGHT MODE FOR ALL ELEMENTS */
.causalfunnel-customer-journey * {
  color: inherit !important;
}

/* Header Section - Beautiful Gradient Header */
.cj-header {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.25) 0%,
    rgba(255, 255, 255, 0.1) 100%
  ) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  padding: 32px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.cj-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(102, 126, 234, 0.8) 0%,
    rgba(118, 75, 162, 0.9) 50%,
    rgba(59, 130, 246, 0.8) 100%
  ) !important;
  z-index: -2;
}

.cj-header::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(
      circle at 20% 80%,
      rgba(255, 255, 255, 0.2) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 20%,
      rgba(255, 255, 255, 0.15) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 40% 40%,
      rgba(255, 255, 255, 0.1) 0%,
      transparent 50%
    );
  z-index: -1;
}

.cj-header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
  position: relative;
  z-index: 2;
}

.cj-title-section {
  flex: 1;
}

.cj-main-title {
  margin: 0 0 8px 0;
  font-size: 2rem;
  font-weight: 800;
  color: #ffffff !important;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.cj-subtitle {
  margin: 0;
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.9) !important;
  font-weight: 400;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  line-height: 1.4;
}

.cj-header-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.cj-date-badge {
  background: rgba(255, 255, 255, 0.15) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 16px 24px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  text-align: center;
  min-width: 160px;
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.cj-date-label {
  display: block;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.8) !important;
  margin-bottom: 4px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cj-date-value {
  display: block;
  font-size: 1.1rem;
  font-weight: 700;
  color: #ffffff !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Analytics Summary Cards - EXACTLY like Heatmap */
.cj-analytics-summary {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: #f8f9fa !important;
  border-radius: 8px;
  border: 1px solid #e9ecef;
}

.cj-summary-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.cj-summary-card {
  display: flex;
  align-items: center;
  padding: 1rem;
  background: white !important;
  border-radius: 6px;
  border: 1px solid #dee2e6;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.cj-summary-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.cj-summary-icon {
  font-size: 1.5rem;
  margin-right: 1rem;
}

.cj-summary-content h4 {
  margin: 0 0 0.25rem 0;
  font-size: 0.875rem;
  color: #6c757d !important;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.cj-summary-number {
  font-size: 1.5rem;
  font-weight: 700;
  color: #495057 !important;
}

/* Info Cards */
.cj-info-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.cj-info-card {
  background: white !important;
  padding: 24px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  border: 1px solid #e9ecef;
  transition: all 0.3s ease;
}

.cj-info-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.cj-card-icon {
  font-size: 2.5rem;
  margin-right: 20px;
  width: 60px;
  text-align: center;
}

.cj-card-content h4 {
  margin: 0 0 8px 0;
  color: #495057 !important;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.cj-link {
  color: #007cba !important;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.cj-link:hover {
  color: #005a87 !important;
  text-decoration: underline;
}

.cj-store-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: #343a40 !important;
}

/* Sections */
.cj-section {
  background: white !important;
  border-radius: 16px;
  padding: 32px;
  margin-bottom: 32px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid #e9ecef;
}

.cj-section-header {
  margin-bottom: 32px;
  text-align: center;
}

.cj-section-title {
  color: #343a40 !important;
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 12px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.cj-section-icon {
  font-size: 2.2rem;
}

.cj-section-subtitle {
  color: #6c757d !important;
  font-size: 1.1rem;
  margin: 0;
  font-weight: 400;
}

/* User Paths */
.cj-paths-list {
  list-style: none;
  padding: 0;
  margin: 0 0 32px 0;
}

.cj-path-item {
  display: flex;
  align-items: center;
  padding: 20px 24px;
  margin-bottom: 16px;
  background: #f8f9fa !important;
  border-radius: 12px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateY(20px);
  position: relative;
  overflow: hidden;
}

.cj-path-item:hover {
  background: #e9ecef !important;
  border-color: #007cba;
  transform: translateX(8px);
  box-shadow: 0 4px 15px rgba(0, 124, 186, 0.2);
}

.cj-path-active {
  background: linear-gradient(135deg, #e3f2fd, #f3e5f5) !important;
  border-color: #007cba;
  box-shadow: 0 4px 20px rgba(0, 124, 186, 0.3);
}

.cj-path-number {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #007cba, #0056b3) !important;
  color: white !important;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  margin-right: 20px;
  flex-shrink: 0;
}

.cj-path-content {
  flex: 1;
  min-width: 0;
}

.cj-path-text {
  display: block;
  font-weight: 600;
  color: #343a40 !important;
  font-size: 1rem;
  margin-bottom: 8px;
  word-break: break-all;
}

.cj-path-stats {
  display: flex;
  gap: 16px;
}

.cj-path-stat {
  display: flex;
  align-items: center;
  font-size: 0.9rem;
  color: #6c757d !important;
  font-weight: 500;
}

.cj-stat-icon {
  margin-right: 6px;
  font-size: 1rem;
}

.cj-path-indicator {
  font-size: 1.5rem;
  color: #007cba !important;
  margin-left: 16px;
  transition: transform 0.3s ease;
}

.cj-path-item:hover .cj-path-indicator {
  transform: translateX(4px);
}

.cj-interaction-hint {
  background: #fff3cd !important;
  border: 1px solid #ffeaa7;
  border-radius: 8px;
  padding: 16px;
  text-align: center;
  color: #856404 !important;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}

.cj-hint-icon {
  font-size: 1.2rem;
}

/* Insights Grid */
.cj-insights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.cj-insight-card {
  background: #f8f9fa !important;
  border-radius: 12px;
  padding: 24px;
  border: 2px solid #e9ecef;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.cj-insight-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, #007cba, #0056b3) !important;
}

.cj-insight-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  border-color: #007cba;
}

.cj-card-header {
  margin-bottom: 20px;
}

.cj-card-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: #343a40 !important;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cj-card-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cj-metric-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: white !important;
  border-radius: 8px;
  border: 1px solid #dee2e6;
  transition: all 0.3s ease;
}

.cj-metric-item:hover {
  background: #e9ecef !important;
  border-color: #007cba;
}

.cj-metric-label {
  font-weight: 500;
  color: #495057 !important;
  font-size: 0.95rem;
}

.cj-metric-value {
  font-weight: 700;
  color: #007cba !important;
  font-size: 1.1rem;
}

/* URL Analytics */
.cj-url-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 24px;
}

.cj-url-card {
  background: #f8f9fa !important;
  border-radius: 12px;
  padding: 24px;
  border: 2px solid #e9ecef;
  transition: all 0.3s ease;
  height: fit-content;
}

.cj-url-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  border-color: #007cba;
}

.cj-url-list {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 300px;
  overflow-y: auto;
}

.cj-url-item {
  margin-bottom: 12px;
  padding: 12px 16px;
  background: white !important;
  border-radius: 8px;
  border: 1px solid #dee2e6;
  transition: all 0.3s ease;
}

.cj-url-item:hover {
  background: #e9ecef !important;
  border-color: #007cba;
  transform: translateX(4px);
}

.cj-url-link {
  color: #007cba !important;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  word-break: break-all;
  display: block;
  transition: color 0.3s ease;
}

.cj-url-link:hover {
  color: #0056b3 !important;
  text-decoration: underline;
}

.cj-url-empty {
  color: #6c757d !important;
  font-style: italic;
  text-align: center;
  padding: 24px;
  background: white !important;
  border-radius: 8px;
  border: 1px solid #dee2e6;
}

/* Store domain input bar */
.cj-store-bar {
  background: #1a2332;
  border: 1px solid #2d3748;
  border-radius: 10px;
  padding: 14px 20px;
  margin-bottom: 20px;
}

.cj-store-form {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.cj-store-label {
  color: #94a3b8;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
}

.cj-store-input {
  flex: 1;
  min-width: 160px;
  max-width: 280px;
  padding: 8px 12px;
  background: #0f1523 !important;
  border: 1px solid #374151 !important;
  border-radius: 7px;
  color: #e2e8f0 !important;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
}

.cj-store-input:focus {
  border-color: #818cf8 !important;
  box-shadow: 0 0 0 2px rgba(129,140,248,0.15);
}

.cj-store-submit {
  padding: 8px 18px;
  background: linear-gradient(135deg, #818cf8, #6366f1);
  color: #fff;
  border: none;
  border-radius: 7px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.cj-store-submit:hover {
  background: linear-gradient(135deg, #a5b4fc, #818cf8);
  box-shadow: 0 3px 10px rgba(129,140,248,0.3);
}

.cj-store-hint {
  color: #64748b;
  font-size: 0.78rem;
  white-space: nowrap;
}

.cj-error-hint {
  color: #94a3b8 !important;
  font-size: 0.85rem !important;
  margin-top: 6px !important;
}

/* Empty State */
.cj-empty-state {
  text-align: center;
  padding: 80px 32px;
  background: #1a2332 !important;
  border: 1px solid #2d3748;
  border-radius: 16px;
  margin: 32px 0;
}

.cj-empty-icon {
  font-size: 5rem;
  margin-bottom: 32px;
  opacity: 0.7;
}

.cj-empty-state h3 {
  color: #e2e8f0 !important;
  font-size: 1.8rem;
  margin: 0 0 16px 0;
  font-weight: 600;
}

.cj-empty-state p {
  color: #94a3b8 !important;
  margin: 16px 0;
  font-size: 14px;
  line-height: 1.6;
}

.cj-status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(102, 126, 234, 0.1) !important;
  color: #667eea !important;
  padding: 12px 20px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid rgba(102, 126, 234, 0.2);
  margin: 16px 0;
}

.cj-status-dot {
  width: 8px;
  height: 8px;
  background: #667eea !important;
  border-radius: 50%;
  animation: cj-pulse 2s infinite;
}

@keyframes cj-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .causalfunnel-customer-journey {
    padding: 16px;
  }

  .cj-header {
    padding: 24px;
    margin-bottom: 24px;
  }

  .cj-header-content {
    flex-direction: column;
    text-align: center;
    gap: 24px;
  }

  .cj-main-title {
    font-size: 2rem;
  }

  .cj-section {
    padding: 24px 20px;
    margin-bottom: 24px;
  }

  .cj-section-title {
    font-size: 1.5rem;
    flex-direction: column;
    gap: 8px;
  }

  .cj-insights-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .cj-url-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .cj-info-cards {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .cj-path-item {
    padding: 16px;
  }

  .cj-path-text {
    font-size: 0.9rem;
  }

  .cj-summary-cards {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .cj-header {
    padding: 20px;
  }

  .cj-main-title {
    font-size: 1.8rem;
  }

  .cj-subtitle {
    font-size: 1rem;
  }

  .cj-section {
    padding: 20px 16px;
  }

  .cj-path-item {
    padding: 12px;
  }

  .cj-path-number {
    width: 32px;
    height: 32px;
    font-size: 1rem;
    margin-right: 12px;
  }
}
