/* =========================================
   HERO VISUAL: INSTAGRAM + SIDE PANEL
   ========================================= */

/* Container */
.hero-visual {
  position: relative;
  width: 100%;
  max-width: 800px;
  height: 500px;
  margin: 0 auto;
  perspective: 1200px; /* For 3D feel */
}

/* --- LAYER 1: BROWSER WINDOW (Instagram Mockup) --- */
.abstract-browser {
  width: 100%;
  height: 100%;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
  border: 1px solid #e5e7eb;
  position: relative; /* Base for absolute positioning */
  z-index: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  /* Subtle 3D Tilt */
  transform: rotateY(2deg) rotateX(1deg);
  transition: transform 0.5s ease;
}

/* Browser Top Bar */
.browser-header-bar {
  background: #f3f4f6;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid #e5e7eb;
  flex-shrink: 0;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.dot.red {
  background: #ef4444;
}
.dot.yellow {
  background: #f59e0b;
}
.dot.green {
  background: #10b981;
}

.fake-url-bar {
  background: white;
  border-radius: 4px;
  height: 20px;
  flex: 1;
  margin-left: 10px;
  margin-right: 10px;
  color: #6b7280;
  font-size: 11px;
  display: flex;
  align-items: center;
  padding-left: 8px;
  font-family: monospace;
}

/* Browser Body Layout */
.browser-body {
  display: flex;
  flex: 1;
  overflow: hidden;
  position: relative; /* Important for side panel positioning */
}

/* IG Content Area */
.ig-content {
  flex: 1;
  padding: 30px;
  background: #fafafa;
  overflow: hidden;
  position: relative;
  padding-right: 290px; /* Prevent content from hiding behind panel */
}

/* IG Profile Header */
.ig-header {
  display: flex;
  gap: 30px;
  margin-bottom: 40px;
  align-items: flex-start;
}

.ig-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: #e5e7eb;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.ig-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background-image: radial-gradient(circle at 30% 30%, #d1d5db 0%, #9ca3af 60%);
}

.ig-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ig-username-row {
  display: flex;
  gap: 15px;
  align-items: center;
}

.ig-username {
  width: 120px;
  height: 16px;
  background: #d1d5db;
  border-radius: 4px;
}

.ig-btn {
  width: 80px;
  height: 24px;
  background: #3b82f6;
  border-radius: 4px;
}

.ig-stats {
  display: flex;
  gap: 20px;
}

.ig-stat {
  width: 60px;
  height: 12px;
  background: #e5e7eb;
  border-radius: 2px;
}

.ig-bio {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 5px;
}

.ig-line {
  height: 10px;
  background: #e5e7eb;
  border-radius: 2px;
}
.w-60 {
  width: 60%;
}
.w-40 {
  width: 40%;
}
.w-80 {
  width: 80%;
}

/* IG Grid */
.ig-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.ig-post {
  aspect-ratio: 1;
  background: #e5e7eb;
  position: relative;
}

/* Fake Post Colors */
.ig-post:nth-child(1) {
  background: #dbeafe;
}
.ig-post:nth-child(2) {
  background: #fce7f3;
}
.ig-post:nth-child(3) {
  background: #dcfce7;
}
.ig-post:nth-child(4) {
  background: #fef9c3;
}
.ig-post:nth-child(5) {
  background: #f3f4f6;
}
.ig-post:nth-child(6) {
  background: #e0e7ff;
}
.ig-post:nth-child(7) {
  background: #fce7f3;
}
.ig-post:nth-child(8) {
  background: #e0e7ff;
}
.ig-post:nth-child(9) {
  background: #dcfce7;
}

/* --- LAYER 2: SIDE PANEL EXTENSION (The Hero) --- */
.side-panel {
  width: 280px;
  height: 100%;
  background: #ffffff;
  border-left: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  position: absolute;
  right: 0;
  top: 0;
  z-index: 10;
  box-shadow: -5px 0 20px rgba(0, 0, 0, 0.05);
  /* Entrance Animation */
  animation: slideIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transform: translateX(100%); /* Start off screen */
}

@keyframes slideIn {
  to {
    transform: translateX(0);
  }
}

/* Side Panel Header */
.sp-header {
  padding: 16px;
  border-bottom: 1px solid #f3f4f6;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.sp-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: #111827;
  font-size: 14px;
}

.sp-logo-icon {
  width: 20px;
  height: 20px;
  background: #7c3aed;
  color: white;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
}

.sp-actions {
  display: flex;
  gap: 8px;
  color: #9ca3af;
}

/* NEW: Navigation Tabs */
.sp-tabs {
  display: flex;
  border-bottom: 1px solid #f3f4f6;
  background: #ffffff;
  padding: 0 4px;
}

.sp-tab {
  flex: 1;
  text-align: center;
  padding: 12px 0;
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  cursor: pointer;
  position: relative;
  transition: color 0.2s;
}

.sp-tab:hover {
  color: #374151;
}

.sp-tab.active {
  color: #3b82f6; /* Use blue or purple based on brand */
}

.sp-tab.active::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: #3b82f6;
}

/* Side Panel Content */
.sp-content {
  padding: 16px;
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Feature: AI Scanner Status */
.ai-status-card {
  background: linear-gradient(to right, #f5f3ff, #fff);
  border: 1px solid #e9d5ff;
  border-radius: 8px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.ai-pulse {
  width: 8px;
  height: 8px;
  background: #7c3aed;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(124, 58, 237, 0.7);
  animation: pulse-purple 2s infinite;
}

@keyframes pulse-purple {
  0% {
    box-shadow: 0 0 0 0 rgba(124, 58, 237, 0.7);
  }
  70% {
    box-shadow: 0 0 0 6px rgba(124, 58, 237, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(124, 58, 237, 0);
  }
}

.ai-text {
  font-size: 11px;
  color: #6b7280;
  font-weight: 500;
}
.ai-text strong {
  color: #7c3aed;
  display: block;
  font-size: 12px;
}

/* Feature: Extracted Data Badges */
.data-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.data-badge {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #d1fae5;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Feature: Match Score (Vertical) */
.match-card-vertical {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.match-dial {
  width: 60px;
  height: 30px; /* Half circle space */
  margin: 0 auto 0px auto;
  position: relative;
  overflow: hidden;
  top: 10px;
}

.match-arc {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 6px solid #e5e7eb;
  border-top-color: #10b981; /* Green score */
  border-right-color: #10b981;
  transform: rotate(-45deg);
  box-sizing: border-box;
}

.match-val {
  font-size: 18px;
  font-weight: 800;
  color: #111827;
}
.match-label {
  font-size: 10px;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Feature: Outreach Generator */
.outreach-card {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px;
}

.outreach-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 11px;
  font-weight: 600;
  color: #374151;
}

.msg-preview {
  font-size: 10px;
  color: #6b7280;
  line-height: 1.5;
  background: white;
  padding: 8px;
  border-radius: 4px;
  border: 1px solid #e5e7eb;
  margin-bottom: 8px;
}

.generate-btn {
  width: 100%;
  background: #7c3aed;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background 0.2s;
}

.generate-btn:hover {
  background: #6d28d9;
}

/* Feature: Mini CRM List */
.mini-crm {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mini-crm-title {
  font-size: 11px;
  font-weight: 600;
  color: #9ca3af;
  text-transform: uppercase;
}

.crm-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid #f3f4f6;
  border-radius: 6px;
  background: white;
}

.crm-avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #e5e7eb;
}
.crm-name {
  font-size: 11px;
  font-weight: 500;
  color: #374151;
  flex: 1;
}
.crm-status {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fbbf24;
} /* Pending status */

/* Floating Badge (External Decor) */
.float-badge {
  position: absolute;
  left: -30px;
  top: 40%;
  background: white;
  padding: 10px 16px;
  border-radius: 12px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  color: #111827;
  z-index: 20;
  animation: float 4s ease-in-out infinite;
}

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

/* RESPONSIVE TWEAKS */
@media (max-width: 768px) {
  .hero-visual {
    height: 400px;
    transform: scale(0.9);
    margin-top: 2rem;
    width: 100%;
    max-width: 100%;
  }

  /* On mobile, maybe hide the side panel or simplify */
  .ig-content {
    padding-right: 30px;
  }
  .side-panel {
    width: 220px;
    right: -20px; /* Slight offset */
  }
  .sp-content {
    padding: 10px;
  }
  .match-val {
    font-size: 14px;
  }
}
