/* ==========================================================================
   Zendesk Trigger Analyzer - Main Stylesheet
   ========================================================================== */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ==========================================================================
   Base & Reset
   ========================================================================== */

* {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  background: #f8f9fa;
  min-height: 100vh;
  color: #374151;
  line-height: 1.6;
}

#root {
  width: 100%;
  height: 100vh;
}

/* ==========================================================================
   Layout Components
   ========================================================================== */

.app-container {
  min-height: 100vh;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  padding: 40px 20px;
}

.content-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

.main-card {
  background: white;
  border: 1px solid #e1e5e9;
  border-radius: 12px;
  padding: 40px;
  margin: 0 auto;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.section-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 32px;
  margin-bottom: 24px;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

/* ==========================================================================
   Navigation & Back Buttons
   ========================================================================== */

.modern-back-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  color: #475569;
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  transition: all 0.2s ease;
  margin-bottom: 24px;
}

.modern-back-button:hover {
  background: #e2e8f0;
  border-color: #cbd5e1;
  color: #334155;
  transform: translateX(-2px);
}

.modern-back-button svg {
  transition: transform 0.2s ease;
}

.modern-back-button:hover svg {
  transform: translateX(-2px);
}

.modern-back-button.secondary {
  background: rgba(248, 250, 252, 0.8);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(209, 213, 219, 0.3);
}

/* ==========================================================================
   Buttons & Interactive Elements
   ========================================================================== */

.modern-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border: 1px solid #d1d9e0;
  border-radius: 8px;
  background: white;
  color: #374151;
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
}

.modern-button:hover {
  background: #f8fafc;
  border-color: #9ca3af;
  transform: translateY(-1px);
}

.primary-button {
  background: #3b82f6;
  border-color: #3b82f6;
  color: white;
  font-weight: 600;
}

.primary-button:hover {
  background: #2563eb;
  border-color: #2563eb;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.primary-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background: #9ca3af;
  border-color: #9ca3af;
}

.secondary-button {
  background: #6b7280;
  border-color: #6b7280;
  color: white;
}

.secondary-button:hover {
  background: #4b5563;
  border-color: #4b5563;
}

/* ==========================================================================
   Feature Cards & Analysis Tools
   ========================================================================== */

.feature-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid #e1e5e9;
  border-radius: 16px;
  padding: 32px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  text-align: center;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12), 0 4px 10px rgba(0, 0, 0, 0.08);
  border-color: #c7d2fe;
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: linear-gradient(135deg, #dbeafe, #3b82f6);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  transition: transform 0.2s ease;
}

.feature-card:hover .feature-icon {
  transform: scale(1.05);
}

.feature-title {
  font-size: 20px;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
}

.feature-description {
  font-size: 14px;
  color: #6b7280;
  line-height: 1.6;
  position: relative;
  z-index: 1;
}

/* ==========================================================================
   Grid Layouts
   ========================================================================== */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 32px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.analysis-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

/* ==========================================================================
   Form Elements
   ========================================================================== */

.search-input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #d1d9e0;
  border-radius: 8px;
  font-size: 16px;
  color: #374151;
  background: white;
  transition: all 0.15s ease;
  box-sizing: border-box;
}

.search-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.trigger-dropdown {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #d1d9e0;
  border-radius: 8px;
  font-size: 16px;
  color: #374151;
  background: white;
  transition: all 0.15s ease;
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 12px center;
  background-repeat: no-repeat;
  background-size: 16px;
  padding-right: 48px;
}

.trigger-dropdown:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.text-input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #d1d9e0;
  border-radius: 8px;
  font-size: 16px;
  color: #374151;
  background: white;
  transition: all 0.15s ease;
  box-sizing: border-box;
}

.text-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* ==========================================================================
   Filter & Search Components
   ========================================================================== */

.filter-tag {
  padding: 6px 12px;
  border: 1px solid #d1d5db;
  border-radius: 20px;
  background: white;
  color: #374151;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-tag:hover {
  border-color: #9ca3af;
  background: #f9fafb;
}

.filter-tag.active {
  background: #3b82f6;
  border-color: #3b82f6;
  color: white;
}

/* ==========================================================================
   Status & Info Elements
   ========================================================================== */

.stat-card {
  background: white;
  border: 1px solid #e1e5e9;
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.status-badge,
.search-result-status {
  padding: 4px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.search-result-status {
  padding: 2px 6px;
  border-radius: 12px;
}

.status-badge.active,
.search-result-status.active {
  background: #dcfce7;
  color: #166534;
}

.search-result-status.active {
  color: #059669;
}

.status-badge.inactive,
.search-result-status.inactive {
  background: #fef3c7;
  color: #92400e;
}

.search-result-status.inactive {
  color: #d97706;
}

.info-card {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  padding: 20px;
  margin-bottom: 25px;
}

.analysis-card {
  background: #e3f2fd;
  border: 1px solid #bbdefb;
  border-radius: 4px;
  padding: 12px;
}

/* ==========================================================================
   Loading & Animation States
   ========================================================================== */

.loading-spinner, 
.what-if-loading-spinner, 
.ai-analysis-loading-spinner {
  border: 3px solid #e1e5e9;
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  margin: 0 auto 16px;
}

.what-if-loading-spinner {
  width: 32px;
  height: 32px;
  margin: 0 auto 15px;
}

.ai-analysis-loading-spinner {
  width: 32px;
  height: 32px;
  display: inline-block;
  margin-bottom: 16px;
  border-color: #f3f4f6;
  border-top-color: #3b82f6;
}

.loading-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 200px;
  padding: 16px 0;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

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

.fade-in {
  animation: fadeIn 0.3s ease-out;
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }

.p-0 { padding: 0; }
.p-1 { padding: 8px; }
.p-2 { padding: 16px; }
.p-3 { padding: 24px; }
.p-4 { padding: 32px; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }

.hidden { display: none !important; }
.block { display: block; }
.inline-block { display: inline-block; }

.w-full { width: 100%; }
.h-full { height: 100%; }

/* ==========================================================================
   Typography
   ========================================================================== */

.heading-1 {
  font-size: 32px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 12px;
  line-height: 1.2;
}

.heading-2 {
  font-size: 24px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 16px;
}

.heading-3 {
  font-size: 20px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 12px;
}

.heading-4 {
  font-size: 16px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 8px;
}

.text-lg {
  font-size: 18px;
  line-height: 1.6;
}

.text-base {
  font-size: 16px;
  line-height: 1.6;
}

.text-sm {
  font-size: 14px;
  line-height: 1.5;
}

.text-xs {
  font-size: 12px;
  line-height: 1.4;
}

.text-gray-900 { color: #111827; }
.text-gray-800 { color: #1f2937; }
.text-gray-700 { color: #374151; }
.text-gray-600 { color: #4b5563; }
.text-gray-500 { color: #6b7280; }
.text-gray-400 { color: #9ca3af; }

.text-blue-600 { color: #2563eb; }
.text-green-600 { color: #059669; }
.text-red-600 { color: #dc2626; }
.text-yellow-600 { color: #d97706; }

.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 1024px) {
  .feature-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .analysis-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .app-container {
    padding: 20px 16px;
  }
  
  .main-card {
    padding: 24px;
  }
  
  .section-card {
    padding: 20px;
  }
}

@media (max-width: 768px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .feature-card,
  .cards-grid .feature-card {
    padding: 20px;
  }
  
  .heading-1 {
    font-size: 24px;
  }
  
  .heading-2 {
    font-size: 20px;
  }
}

/* ==========================================================================
   Component-Specific Styles
   ========================================================================== */

/* Tool Header */
.tool-header {
  text-align: center;
  margin-bottom: 48px;
}

.tool-icon {
  width: 80px;
  height: 80px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  background: linear-gradient(135deg, #dbeafe, #3b82f6);
  color: white;
}

.tool-title {
  font-size: 28px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 8px;
  line-height: 1.3;
}

.tool-subtitle {
  font-size: 16px;
  color: #6b7280;
  max-width: 600px;
  margin: 0 auto;
}

/* Trigger List Items */
.trigger-item {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 20px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.15s ease;
}

.trigger-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border-color: #c7d2fe;
}

/* Security Notes */
.security-note {
  background: #dbeafe;
  border: 1px solid #93c5fd;
  border-radius: 8px;
  padding: 20px;
  margin-top: 32px;
}

.security-note p {
  margin: 0;
  color: #1e40af;
  line-height: 1.6;
  font-size: 14px;
}

/* Highlight Text */
.highlight {
  background: #fef08a;
  padding: 2px 4px;
  border-radius: 3px;
  font-weight: 500;
}

/* Tech Sections */
.tech-section {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 16px;
}

.tech-title {
  font-size: 16px;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 12px;
}

/* Feature Items (for How It Works page) */
.feature-item {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 24px;
}

@media (min-width: 1025px) {
  .feature-item {
    min-width: 320px;
  }
}

.feature-item .feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: #dbeafe;
  color: #2563eb;
  margin-bottom: 16px;
}

.feature-item .feature-title {
  font-size: 18px;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 8px;
}

.feature-item .feature-description {
  font-size: 14px;
  color: #6b7280;
  line-height: 1.6;
  margin-bottom: 12px;
}

.feature-list {
  margin: 0;
  padding-left: 20px;
  color: #4b5563;
  line-height: 1.6;
  font-size: 14px;
}

.feature-list li {
  margin-bottom: 4px;
}

/* ==========================================================================
   Field Display Components
   ========================================================================== */

.condition-group {
  margin-bottom: 20px;
}

.condition-header {
  font-weight: 600;
  margin-bottom: 10px;
  color: #495057;
  display: flex;
  align-items: center;
  gap: 8px;
}

.condition-tag {
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 11px;
  color: white;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.condition-tag.all {
  background: #dc3545;
}

.condition-tag.any {
  background: #28a745;
}

.condition-item {
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 12px;
  margin-bottom: 8px;
  background: #f8f9fa;
}

.condition-item.any {
  background: #f0f8f0;
}

.condition-title {
  font-weight: 500;
  margin-bottom: 5px;
}

.condition-details {
  font-size: 12px;
  color: #666;
  margin-bottom: 5px;
}

.condition-value {
  font-size: 12px;
  color: #666;
}

.field-code {
  background: #e9ecef;
  padding: 2px 4px;
  border-radius: 2px;
  font-family: monospace;
}

.action-item {
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 12px;
  margin-bottom: 10px;
  background: #f8f9fa;
}

.action-title {
  font-weight: 500;
  margin-bottom: 5px;
}

.action-details {
  font-size: 12px;
  color: #666;
}

.no-data-message {
  color: #666;
  font-style: italic;
}

/* ==========================================================================
   Message Components
   ========================================================================== */

.message-container {
  padding: 20px;
  text-align: center;
}

.message-card {
  border-radius: 8px;
  padding: 16px;
  max-width: 500px;
  margin: 0 auto;
}

.message-success {
  background: #d4edda;
  border: 1px solid #c3e6cb;
  color: #155724;
}

.message-error {
  background: #f8d7da;
  border: 1px solid #f5c6cb;
  color: #721c24;
}

.message-warning {
  background: #fff3cd;
  border: 1px solid #ffeaa7;
  color: #856404;
}

.message-info {
  background: #e3f2fd;
  border: 1px solid #bbdefb;
  color: #1565c0;
}

/* ==========================================================================
   Helper Classes
   ========================================================================== */

.icon-text {
  display: flex;
  align-items: center;
  gap: 6px;
}

.icon-sm {
  width: 16px;
  height: 16px;
}

.icon-md {
  width: 18px;
  height: 18px;
}

.icon-lg {
  width: 20px;
  height: 20px;
}

.border-l-4 {
  border-left: 4px solid;
}

.border-green {
  border-color: #28a745;
}

.border-yellow {
  border-color: #ffc107;
}

.cursor-pointer {
  cursor: pointer;
}

.select-none {
  user-select: none;
}

.overflow-hidden {
  overflow: hidden;
}

.relative {
  position: relative;
}

.absolute {
  position: absolute;
}

.top-0 {
  top: 0;
}

.left-0 {
  left: 0;
}

.right-0 {
  right: 0;
}

.bottom-0 {
  bottom: 0;
}

.z-10 {
  z-index: 10;
}

.z-20 {
  z-index: 20;
}

.opacity-50 {
  opacity: 0.5;
}

.opacity-70 {
  opacity: 0.7;
}

/* ==========================================================================
   UI Manager Specific Components
   ========================================================================== */

.header-nav-icon {
  padding: 8px;
  border: none;
  background: transparent;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #6b7280;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  min-height: 32px;
}

.header-nav-icon:hover {
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
  transform: translateY(-1px);
}

.header-nav-icon.active {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}

.header-nav-icon svg {
  width: 16px;
  height: 16px;
  transition: transform 0.2s ease;
}

.header-nav-icon:hover svg {
  transform: scale(1.1);
}

.main-app-container {
  min-height: 100vh;
  background: #f9fafb;
}

.app-header {
  background: white;
  border-bottom: 1px solid #e5e7eb;
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 24px;
}

.header-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.nav-section {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-icons {
  display: flex;
  gap: 4px;
  align-items: center;
}

.connection-status {
  background: #f0fdf4;
  border: 1px solid #22c55e;
  border-radius: 6px;
  padding: 6px 12px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.connection-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
}

.status-dot {
  width: 8px;
  height: 8px;
  background: #22c55e;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-text-primary {
  font-size: 13px;
  color: #15803d;
  font-weight: 600;
}

.status-text-secondary {
  font-size: 13px;
  color: #166534;
  font-weight: 500;
}

.main-content-area {
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px 24px;
  min-height: calc(100vh - 120px);
}

.title-section {
  margin-bottom: 40px;
}

.main-title {
  font-size: 28px;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 10px;
}

.main-subtitle {
  color: #6b7280;
  font-size: 16px;
}

.trigger-selection-section {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 32px;
  margin-bottom: 32px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.section-title {
  font-size: 20px;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-container {
  margin-bottom: 20px;
}

.search-wrapper {
  position: relative;
}

.trigger-search-input {
  width: 100%;
  padding: 12px 16px 12px 44px;
  border: 2px solid #d1d9e0;
  border-radius: 8px;
  font-size: 16px;
  color: #374151;
  background: white;
  transition: all 0.15s ease;
  box-sizing: border-box;
}

.trigger-search-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  border-radius: 8px 8px 0 0;
}

.trigger-search-input:focus + .trigger-search-results,
.trigger-search-input:focus ~ .trigger-search-results {
  display: block;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
}

.dropdown-wrapper {
  position: relative;
}

.main-trigger-dropdown {
  width: 100%;
  padding: 16px 20px;
  border: 2px solid #d1d9e0;
  border-radius: 8px;
  font-size: 16px;
  color: #374151;
  background: white;
  transition: all 0.15s ease;
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 16px center;
  background-repeat: no-repeat;
  background-size: 16px;
  padding-right: 52px;
}

.selected-trigger-info {
  display: none;
  margin-top: 20px;
  padding: 16px;
  background: #f8fafc;
  border: 1px solid #e1e5e9;
  border-radius: 8px;
}

.analysis-cards-section {
  display: none;
}

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

.cards-title {
  font-size: 20px;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 8px;
}

.cards-subtitle {
  color: #6b7280;
  font-size: 14px;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 24px;
  max-width: 1100px;
  margin: 0 auto;
  align-items: stretch; /* Ensure all cards have equal height */
}

/* Main page feature cards - consolidated with existing .feature-card */
.cards-grid .feature-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  height: 100%; /* Ensure full height utilization */
}

.cards-grid .feature-card:hover {
  border-color: #93c5fd;
  background: #fafbff;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.cards-grid .feature-card .feature-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 20px;
  flex-shrink: 0; /* Prevent icon from shrinking */
}

.cards-grid .feature-card .feature-title {
  font-size: 20px;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 12px;
  line-height: 1.4;
  flex-shrink: 0; /* Prevent title from shrinking */
}

.cards-grid .feature-card .feature-content {
  flex-grow: 1; /* Take up available space */
  display: flex;
  flex-direction: column;
}

.cards-grid .feature-card .feature-description {
  font-size: 15px;
  color: #6b7280;
  line-height: 1.6;
  margin-bottom: auto; /* Push action to bottom */
}

.feature-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 24px; /* Consistent spacing from content above */
  flex-shrink: 0; /* Prevent action from shrinking */
}

.get-started-text {
  font-size: 14px;
  font-weight: 500;
  color: #2563eb;
  transition: color 0.2s ease;
}

.feature-card:hover .get-started-text {
  color: #1d4ed8;
}

.arrow-icon {
  color: #2563eb;
  transition: transform 0.2s ease;
}

.feature-card:hover .arrow-icon {
  transform: translateX(4px);
}

/* Helper Classes */
.font-weight-bold { font-weight: bold; }

/* Trigger Simulator Styles */
.what-if-no-impact {
  background: #d4edda;
  border: 1px solid #c3e6cb;
  border-radius: 4px;
  padding: 12px;
  margin-bottom: 15px;
}

.what-if-no-impact-header {
  font-weight: 500;
  color: #155724;
  font-size: 13px;
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.what-if-no-impact-text {
  font-size: 12px;
  color: #155724;
}

.what-if-results-header {
  font-weight: 500;
  font-size: 13px;
  margin-bottom: 10px;
  color: #333;
}

.what-if-trigger-item {
  padding: 8px;
  margin: 4px 0;
  border-radius: 4px;
  cursor: pointer;
  border: 1px solid;
}

.what-if-trigger-item strong {
  display: block;
  margin-bottom: 4px;
}

.what-if-trigger-item small {
  opacity: 0.8;
}

/* What-if trigger item variants */
.what-if-now-affected {
  background-color: #f0f8f0;
  border-color: #c3e6cb;
  color: #155724;
}

.what-if-no-longer-affected {
  background-color: #fff3cd;
  border-color: #ffeaa7;
  color: #856404;
}

.what-if-relationship-changed-positive {
  background-color: #d4edda;
  border-color: #c3e6cb;
  color: #155724;
}

.what-if-relationship-changed-negative {
  background-color: #f8f9fa;
  border-color: #dee2e6;
  color: #6c757d;
}

.what-if-relationship-changed-warning {
  background-color: #fff3cd;
  border-color: #ffeaa7;
  color: #856404;
}

.what-if-relationship-changed-neutral {
  background-color: #e3f2fd;
  border-color: #bbdefb;
  color: #1565c0;
}

.what-if-relationship-changed-removed {
  background-color: #f8d7da;
  border-color: #f5c6cb;
  color: #721c24;
}

/* Trigger List Styles */
.trigger-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

/* Consolidated with existing .stat-card above */

.stat-number {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 4px;
}

.stat-number.primary { color: #3b82f6; }
.stat-number.success { color: #059669; }
.stat-number.warning { color: #d97706; }

.stat-label {
  font-size: 14px;
  font-weight: 500;
  color: #6b7280;
}

.trigger-controls-panel {
  background: white;
  border: 1px solid #e1e5e9;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.trigger-controls-row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.trigger-search-container {
  flex: 1;
  min-width: 250px;
}

.trigger-filters-container {
  display: flex;
  gap: 6px;
}

.trigger-empty-state {
  text-align: center;
  padding: 40px;
  color: #666;
}

.empty-state-header {
  font-size: 18px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
}

.empty-state-text {
  font-size: 14px;
}

.no-results-state {
  text-align: center;
  padding: 40px;
  color: #9ca3af;
}

.no-results-header {
  font-size: 18px;
  margin-bottom: 8px;
}

.no-results-text {
  font-size: 14px;
}

.trigger-section {
  margin-bottom: 24px;
}

.trigger-section-title {
  margin: 0 0 16px 0;
  font-size: 16px;
  font-weight: 600;
}

.trigger-section-title.active {
  color: #059669;
}

.trigger-section-title.inactive {
  color: #dc2626;
}

.trigger-section-grid {
  display: grid;
  gap: 12px;
}

.trigger-card {
  padding: 20px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.trigger-status-badge {
  position: absolute;
  top: 16px;
  right: 16px;
}

.trigger-card-content {
  padding-right: 80px;
}

.trigger-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.trigger-icon {
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
}

.trigger-icon.active {
  background: #3b82f6;
}

.trigger-icon.inactive {
  background: #d1d5db;
}

.trigger-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #111827;
  line-height: 1.4;
}

.trigger-meta-row {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
}

.trigger-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.meta-dot {
  width: 4px;
  height: 4px;
  background: #d1d5db;
  border-radius: 50%;
}

.meta-text {
  font-size: 13px;
  color: #6b7280;
  font-weight: 500;
}

.trigger-analyze-link {
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0.7;
  transition: opacity 0.15s ease;
}

.analyze-link-text {
  font-size: 13px;
  font-weight: 500;
  color: #3b82f6;
}

.analyze-link-icon {
  color: #3b82f6;
}

/* Trigger Analysis Styles */
.analysis-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.analysis-main-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 32px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.analysis-header {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid #e5e7eb;
}

.analysis-id {
  color: #6b7280;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 500;
}

.analysis-id code {
  background: #f1f5f9;
  padding: 3px 8px;
  border-radius: 4px;
  font-family: 'SF Mono', 'Monaco', 'Cascadia Code', 'Roboto Mono', monospace;
  font-weight: 600;
  color: #475569;
}

.analysis-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
  gap: 20px;
}

.analysis-title {
  margin: 0;
  color: #1f2937;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.3;
  flex: 1;
}

.analysis-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.analysis-status-active {
  color: #059669;
  font-size: 13px;
  background: #d1fae5;
  padding: 6px 12px;
  border-radius: 6px;
  font-weight: 600;
  border: 1px solid #a7f3d0;
}

.analysis-status-inactive {
  color: #dc2626;
  font-size: 13px;
  background: #fee2e2;
  padding: 6px 12px;
  border-radius: 6px;
  font-weight: 600;
  border: 1px solid #fecaca;
}

.analysis-button {
  padding: 2px 8px;
  background: #007bff;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
}

.analysis-description-text {
  color: #666;
  margin-bottom: 15px;
}

.analysis-section {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
}

.analysis-section-title {
  margin: 0 0 16px 0;
  color: #374151;
  font-size: 18px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}

.analysis-section-content {
  line-height: 1.7;
  color: #4b5563;
  font-size: 15px;
}

.dependencies-header {
  margin: 0 0 15px 0;
  color: #333;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dependencies-container {
  background: #fff;
  border-radius: 8px;
  padding: 20px;
  border: 1px solid #e5e7eb;
}

.dependency-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  margin-bottom: 12px;
  background: white;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  transition: all 0.2s ease;
}

.dependency-item:hover {
  border-color: #d1d5db;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.dependency-item:last-child {
  margin-bottom: 0;
}

.dependency-content {
  flex: 1;
}

.dependency-meta {
  color: #6b7280;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 500;
}

.dependency-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.dependency-title {
  font-weight: 600;
  color: #1f2937;
  font-size: 15px;
}

.dependency-status {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.dependency-details {
  font-size: 13px;
  color: #6b7280;
  line-height: 1.5;
}

.dependency-analyze-btn {
  padding: 8px 16px;
  background: #3b82f6;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  margin-left: 12px;
  transition: all 0.2s ease;
}

.dependency-analyze-btn:hover {
  background: #2563eb;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.no-triggers-section {
  background: #f8f9fa;
  border-radius: 6px;
  padding: 20px;
  text-align: center;
  color: #666;
}

.no-triggers-icon {
  margin-bottom: 8px;
  opacity: 0.5;
}

.no-triggers-title {
  font-weight: 500;
  margin-bottom: 4px;
}

.no-triggers-text {
  font-size: 14px;
}

.conditions-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.conditions-section-title {
  margin: 0 0 10px 0;
  color: #495057;
  display: flex;
  align-items: center;
  gap: 6px;
}

.conditions-content {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 4px;
  padding: 15px;
  font-size: 14px;
}

.analysis-footer {
  padding-top: 24px;
  border-top: 1px solid #e5e7eb;
  font-size: 14px;
  color: #6b7280;
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.analysis-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 32px 16px;
  text-align: center;
}

.analysis-loading .loading-spinner {
  width: 24px;
  height: 24px;
}

.loading-text {
  color: #666;
  font-size: 14px;
  font-weight: 500;
}

.loading-subtext {
  color: #666;
  font-size: 14px;
}

.analysis-description-para {
  margin: 12px 0;
}

.analysis-highlight-code {
  background: #f8f9fa;
  padding: 1px 4px;
  border-radius: 2px;
}

/* App Content Styles */
.app-content {
  padding: 20px;
  max-width: 1400px;
  margin: 0 auto;
}

/* What-If Manager Styles */
.what-if-container {
  max-width: 600px;
  margin: 0 auto;
}

.what-if-main-card {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 40px;
}

.what-if-title {
  margin: 0 0 10px 0;
  color: #333;
  font-size: 24px;
  text-align: center;
}

.what-if-subtitle {
  margin: 0 0 30px 0;
  color: #666;
  font-size: 16px;
  text-align: center;
}

.what-if-form-group {
  margin-bottom: 20px;
}

.what-if-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  font-size: 14px;
}

.what-if-trigger-display {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  background: #f8f9fa;
  color: #666;
  font-size: 16px;
}

.what-if-select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #ced4da;
  border-radius: 6px;
  font-size: 16px;
  background: white;
}

.what-if-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #ced4da;
  border-radius: 6px;
  font-size: 16px;
}

.what-if-analyze-button {
  width: 100%;
  padding: 16px;
  background: #007bff;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
  opacity: 0.6;
  margin-top: 20px;
}

.what-if-analyze-button.enabled {
  opacity: 1;
}

.what-if-results {
  margin-top: 30px;
  display: none;
}

.what-if-results.visible {
  display: block;
}

.what-if-no-actions-message {
  color: #666;
  font-size: 16px;
  padding: 20px;
  text-align: center;
}

.what-if-error-message {
  color: #dc3545;
  font-size: 16px;
  padding: 20px;
  background: #f8d7da;
  border-radius: 6px;
  border: 1px solid #f5c6cb;
}

.what-if-loading-container {
  text-align: center;
  color: #666;
  font-size: 16px;
  padding: 30px;
}

.what-if-analysis-failed {
  padding: 20px;
  background: #f8d7da;
  border: 1px solid #f5c6cb;
  border-radius: 6px;
  color: #721c24;
}

.what-if-analysis-failed-title {
  font-weight: 500;
  margin-bottom: 8px;
  font-size: 16px;
}

.what-if-analysis-failed-text {
  font-size: 16px;
}

/* AI Analysis Styles */
.ai-analysis-container {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  max-width: 900px;
  margin: 0 auto;
}

.ai-analysis-header {
  margin-bottom: 20px;
  text-align: center;
}

.ai-analysis-title {
  margin: 0 0 8px 0;
  color: #1f2937;
  font-size: 22px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
}

.ai-analysis-subtitle {
  color: #6b7280;
  font-size: 15px;
  margin: 0;
  font-weight: 400;
}

.ai-analysis-loading {
  text-align: center;
  padding: 60px 20px;
  background: #f9fafb;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
}

.ai-analysis-loading-spinner {
  width: 40px;
  height: 40px;
  display: inline-block;
  margin-bottom: 24px;
  border: 3px solid #f3f4f6;
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.ai-analysis-loading-title {
  font-size: 18px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 12px;
}

.ai-analysis-loading-text {
  font-size: 15px;
  color: #6b7280;
  line-height: 1.5;
}

.ai-analysis-result-section {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}

.ai-analysis-result-header {
  font-weight: 600;
  color: #374151;
  font-size: 15px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ai-analysis-result-text {
  font-size: 14px;
  color: #4b5563;
  line-height: 1.6;
}

.ai-analysis-insight {
  background: linear-gradient(135deg, #dbeafe 0%, #e0f2fe 100%);
  border: 1px solid #93c5fd;
  border-radius: 8px;
  padding: 18px;
  margin-bottom: 20px;
}

.ai-analysis-insight-header {
  font-weight: 600;
  color: #1e40af;
  font-size: 16px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ai-analysis-insight-header::before {
  content: "🤖";
  font-size: 20px;
}

.ai-analysis-insight-text {
  font-size: 15px;
  color: #1f2937;
  line-height: 1.6;
  word-wrap: break-word;
  overflow-wrap: break-word;
  width: 100%;
  box-sizing: border-box;
}

/* Styling for AI-generated HTML content */
.ai-analysis-insight-text h1,
.ai-analysis-insight-text h2,
.ai-analysis-insight-text h3,
.ai-analysis-insight-text h4 {
  color: #1e40af;
  margin: 24px 0 12px 0;
  font-weight: 600;
  line-height: 1.3;
}

.ai-analysis-insight-text h1:first-child,
.ai-analysis-insight-text h2:first-child,
.ai-analysis-insight-text h3:first-child,
.ai-analysis-insight-text h4:first-child {
  margin-top: 0;
}

.ai-analysis-insight-text h1 { font-size: 20px; }
.ai-analysis-insight-text h2 { font-size: 18px; }
.ai-analysis-insight-text h3 { font-size: 17px; }
.ai-analysis-insight-text h4 { font-size: 16px; }

.ai-analysis-insight-text h4::after {
  content: "";
  display: block;
  width: 100%;
  height: 1px;
  background: #94a3b8;
  margin: 8px 0 16px 0;
}

.ai-analysis-insight-text strong {
  color: #1e40af;
  font-weight: 600;
}

.ai-analysis-insight-text ul {
  margin: 16px 0;
  padding-left: 20px;
  list-style: disc;
}

.ai-analysis-insight-text li {
  margin: 8px 0;
  padding: 0;
  line-height: 1.7;
}

.ai-analysis-insight-text li strong:first-child {
  color: #1e40af;
  font-weight: 600;
}

.ai-analysis-insight-text li br {
  display: block;
  margin: 8px 0;
  content: "";
}

.ai-analysis-insight-text li br + strong {
  display: inline-block;
  margin-top: 8px;
  color: #059669;
  font-weight: 600;
}

.ai-analysis-insight-text p {
  margin: 12px 0;
  line-height: 1.6;
}

.ai-analysis-insight-text p:first-child {
  margin-top: 0;
}

.ai-analysis-insight-text p:last-child {
  margin-bottom: 0;
}

/* Enhanced styling for better readability */
.ai-analysis-insight-text code {
  background: #f1f5f9;
  color: #1e40af;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'SF Mono', 'Monaco', 'Cascadia Code', 'Roboto Mono', monospace;
  font-size: 14px;
  font-weight: 500;
}

/* Remove any unwanted spacing */
.ai-analysis-insight-text > *:last-child {
  margin-bottom: 0;
}

/* Style for nested content within list items */
.ai-analysis-insight-text li > *:last-child {
  margin-bottom: 0;
}

/* Clean spacing for consecutive elements */
.ai-analysis-insight-text h4 + p,
.ai-analysis-insight-text h4 + ul {
  margin-top: 8px;
}

.ai-analysis-controls {
  margin-top: 20px;
  text-align: center;
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.ai-analysis-button {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 140px;
  justify-content: center;
}

.ai-analysis-button.secondary {
  background: #6b7280;
  color: white;
  border: 2px solid transparent;
}

.ai-analysis-button.secondary:hover {
  background: #4b5563;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.ai-analysis-button.primary {
  background: #3b82f6;
  color: white;
  border: 2px solid transparent;
}

.ai-analysis-button.primary:hover {
  background: #2563eb;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.ai-analysis-error {
  padding: 20px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  color: #991b1b;
  margin-bottom: 24px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.ai-analysis-error::before {
  content: "⚠️";
  font-size: 20px;
  flex-shrink: 0;
  margin-top: 2px;
}

.ai-analysis-error-content {
  flex: 1;
}

.ai-analysis-error-title {
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 16px;
}

.ai-analysis-error-text {
  font-size: 14px;
  line-height: 1.5;
}

/* Enhanced ticket information display */
.ticket-info-card {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 24px;
}

.ticket-info-header {
  font-weight: 600;
  color: #0c4a6e;
  font-size: 16px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ticket-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.ticket-info-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ticket-info-label {
  font-size: 12px;
  font-weight: 500;
  color: #0369a1;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.ticket-info-value {
  font-size: 14px;
  color: #0c4a6e;
  font-weight: 500;
}

/* Back Button Styles */
.back-button {
  margin-bottom: 24px;
}

/* Icon Styles */
.icon-blue {
  color: #3b82f6;
}

.icon-margin-right {
  margin-right: 6px;
}

/* Layout Utilities */
.flex-gap {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

/* Enhanced Analysis Container */
.analysis-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.analysis-main-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 32px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Enhanced Analysis Header */
.analysis-header {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid #e5e7eb;
}

.analysis-id {
  color: #6b7280;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 500;
}

.analysis-id code {
  background: #f1f5f9;
  padding: 3px 8px;
  border-radius: 4px;
  font-family: 'SF Mono', 'Monaco', 'Cascadia Code', 'Roboto Mono', monospace;
  font-weight: 600;
  color: #475569;
}

.analysis-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
  gap: 20px;
}

.analysis-title {
  margin: 0;
  color: #1f2937;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.3;
  flex: 1;
}

/* Enhanced Status Badges */
.analysis-status-active {
  color: #059669;
  font-size: 13px;
  background: #d1fae5;
  padding: 6px 12px;
  border-radius: 6px;
  font-weight: 600;
  border: 1px solid #a7f3d0;
}

.analysis-status-inactive {
  color: #dc2626;
  font-size: 13px;
  background: #fee2e2;
  padding: 6px 12px;
  border-radius: 6px;
  font-weight: 600;
  border: 1px solid #fecaca;
}

/* Enhanced Analysis Sections */
.analysis-section {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
}

.analysis-section-title {
  margin: 0 0 16px 0;
  color: #374151;
  font-size: 18px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}

.analysis-section-content {
  line-height: 1.7;
  color: #4b5563;
  font-size: 15px;
}

/* Enhanced Dependencies Section */
.dependencies-container {
  background: #fff;
  border-radius: 8px;
  padding: 20px;
  border: 1px solid #e5e7eb;
}

.dependency-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  margin-bottom: 12px;
  background: white;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  transition: all 0.2s ease;
}

.dependency-item:hover {
  border-color: #d1d5db;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.dependency-item:last-child {
  margin-bottom: 0;
}

.dependency-content {
  flex: 1;
}

.dependency-meta {
  color: #6b7280;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 500;
}

.dependency-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.dependency-title {
  font-weight: 600;
  color: #1f2937;
  font-size: 15px;
}

.dependency-status {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.dependency-details {
  font-size: 13px;
  color: #6b7280;
  line-height: 1.5;
}

.dependency-analyze-btn {
  padding: 8px 16px;
  background: #3b82f6;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  margin-left: 12px;
  transition: all 0.2s ease;
}

.dependency-analyze-btn:hover {
  background: #2563eb;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

/* Enhanced Analysis Footer */
.analysis-footer {
  padding-top: 24px;
  border-top: 1px solid #e5e7eb;
  font-size: 14px;
  color: #6b7280;
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

@media (max-width: 768px) {
  .analysis-footer {
    flex-direction: column;
    gap: 8px;
  }
  
  .analysis-title-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .ai-analysis-controls {
    flex-direction: column;
    align-items: center;
  }
  
  .ai-analysis-button {
    width: 100%;
    max-width: 280px;
  }
}

/* Search & Selection Components */
.search-selection-container {
  position: relative;
}

.trigger-search-results {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 2px solid #3b82f6;
  border-top: none;
  border-radius: 0 0 8px 8px;
  max-height: 300px;
  overflow-y: auto;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.trigger-search-results.visible {
  display: block;
}

.search-results-placeholder {
  padding: 20px;
  text-align: center;
  color: #6b7280;
}

.search-result-item {
  padding: 12px 16px;
  border-bottom: 1px solid #e5e7eb;
  cursor: pointer;
  transition: background-color 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.search-result-item:hover {
  background-color: #f8fafc;
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-content {
  flex: 1;
}

.search-result-title {
  font-weight: 500;
  color: #1f2937;
  margin-bottom: 4px;
  font-size: 14px;
}

.search-result-meta {
  font-size: 12px;
  color: #6b7280;
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-no-results {
  padding: 20px;
  text-align: center;
  color: #6b7280;
  font-size: 14px;
}

.search-no-results-icon {
  margin-bottom: 8px;
  opacity: 0.5;
}

/* Search input focus styles consolidated above */

/* Back Button Styles */
.back-button {
  margin-bottom: 24px;
}

/* Icon Styles */
.icon-blue {
  color: #3b82f6;
}

.icon-margin-right {
  margin-right: 6px;
}

/* Layout Utilities */
.flex-gap {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

/* Enhanced Modern Back Button */
.modern-back-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  color: #475569;
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  transition: all 0.2s ease;
  margin-bottom: 24px;
}

.modern-back-button:hover {
  background: #e2e8f0;
  border-color: #cbd5e1;
  color: #334155;
  transform: translateX(-2px);
}

.modern-back-button svg {
  transition: transform 0.2s ease;
}

.modern-back-button:hover svg {
  transform: translateX(-2px);
}

/* Enhanced Analysis Container */
.analysis-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.analysis-main-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 32px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Enhanced Analysis Header */
.analysis-header {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid #e5e7eb;
}

.analysis-id {
  color: #6b7280;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 500;
}

.analysis-id code {
  background: #f1f5f9;
  padding: 3px 8px;
  border-radius: 4px;
  font-family: 'SF Mono', 'Monaco', 'Cascadia Code', 'Roboto Mono', monospace;
  font-weight: 600;
  color: #475569;
}

.analysis-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
  gap: 20px;
}

.analysis-title {
  margin: 0;
  color: #1f2937;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.3;
  flex: 1;
}

/* Enhanced Status Badges */
.analysis-status-active {
  color: #059669;
  font-size: 13px;
  background: #d1fae5;
  padding: 6px 12px;
  border-radius: 6px;
  font-weight: 600;
  border: 1px solid #a7f3d0;
}

.analysis-status-inactive {
  color: #dc2626;
  font-size: 13px;
  background: #fee2e2;
  padding: 6px 12px;
  border-radius: 6px;
  font-weight: 600;
  border: 1px solid #fecaca;
}

/* Enhanced Analysis Sections */
.analysis-section {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
}

.analysis-section-title {
  margin: 0 0 16px 0;
  color: #374151;
  font-size: 18px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}

.analysis-section-content {
  line-height: 1.7;
  color: #4b5563;
  font-size: 15px;
}

/* Enhanced Dependencies Section */
.dependencies-container {
  background: #fff;
  border-radius: 8px;
  padding: 20px;
  border: 1px solid #e5e7eb;
}

.dependency-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  margin-bottom: 12px;
  background: white;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  transition: all 0.2s ease;
}

.dependency-item:hover {
  border-color: #d1d5db;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.dependency-item:last-child {
  margin-bottom: 0;
}

.dependency-content {
  flex: 1;
}

.dependency-meta {
  color: #6b7280;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 500;
}

.dependency-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.dependency-title {
  font-weight: 600;
  color: #1f2937;
  font-size: 15px;
}

.dependency-status {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.dependency-details {
  font-size: 13px;
  color: #6b7280;
  line-height: 1.5;
}

.dependency-analyze-btn {
  padding: 8px 16px;
  background: #3b82f6;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  margin-left: 12px;
  transition: all 0.2s ease;
}

.dependency-analyze-btn:hover {
  background: #2563eb;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

/* Enhanced Analysis Footer */
.analysis-footer {
  padding-top: 24px;
  border-top: 1px solid #e5e7eb;
  font-size: 14px;
  color: #6b7280;
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

@media (max-width: 768px) {
  .analysis-footer {
    flex-direction: column;
    gap: 8px;
  }
  
  .analysis-title-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .ai-analysis-controls {
    flex-direction: column;
    align-items: center;
  }
  
  .ai-analysis-button {
    width: 100%;
    max-width: 280px;
  }
} 