/* CompAI Design System v5.0 */
/* Professional Commercial Real Estate Platform - Inspired by Pitch.com */

:root {
  /* Primary Colors */
  --primary-color: #5946C1;
  --primary-accent: #9B46C1;
  
  /* Neutral Colors */
  --gray-900: #1F2023;
  --gray-200: #EDF2F7;
  --gray-100: #F7FAFC;
  --light-gray: #A05668;
  
  /* Accent Colors */
  --success: #109861;
  --warning: #FF52E0B;
  --neutral-light: #F7FAFC;
  
  /* Typography */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-size-base: 1rem;
  
  /* Display Typography */
  --display-h1-size: 48px;
  --display-h1-height: 56px;
  --display-h1-weight: 700;
  
  /* Heading Typography */
  --heading-h2-size: 36px;
  --heading-h2-height: 44px;
  --heading-h2-weight: 700;
  
  /* Subheading Typography */
  --subheading-h3-size: 30px;
  --subheading-h3-height: 36px;
  --subheading-h3-weight: 700;
  
  /* Body Typography */
  --body-large-size: 18px;
  --body-large-height: 28px;
  --body-large-weight: 400;
  
  /* Caption Typography */
  --caption-size: 14px;
  --caption-height: 20px;
  --caption-weight: 400;
  
  /* Spacing Scale - Enhanced system */
  --spacing-xs: 4px;
  --spacing-s: 8px;
  --spacing-m: 16px;
  --spacing-l: 24px;
  --spacing-xl: 32px;
  --spacing-xxl: 40px;
  --spacing-xxxl: 64px;
  
  /* Border Radius */
  --radius-s: 4px;
  --radius-m: 8px;
  --radius-l: 12px;
  
  /* Animation Timing */
  --ease-in: cubic-bezier(0.4, 0, 1, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Responsive Breakpoints */
  --mobile: 320px;
  --tablet: 768px;
  --desktop: 1024px;
}

/* Typography System */
.display-h1 {
  font-family: var(--font-family);
  font-size: var(--display-h1-size);
  line-height: var(--display-h1-height);
  font-weight: var(--display-h1-weight);
  letter-spacing: -0.2px;
}

.heading-h2 {
  font-family: var(--font-family);
  font-size: var(--heading-h2-size);
  line-height: var(--heading-h2-height);
  font-weight: var(--heading-h2-weight);
  letter-spacing: -0.2px;
}

.subheading-h3 {
  font-family: var(--font-family);
  font-size: var(--subheading-h3-size);
  line-height: var(--subheading-h3-height);
  font-weight: var(--subheading-h3-weight);
  letter-spacing: -0.1px;
}

.body-large {
  font-family: var(--font-family);
  font-size: var(--body-large-size);
  line-height: var(--body-large-height);
  font-weight: var(--body-large-weight);
  letter-spacing: -0.1px;
}

.caption {
  font-family: var(--font-family);
  font-size: var(--caption-size);
  line-height: var(--caption-height);
  font-weight: var(--caption-weight);
}

/* Animation System */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 100%; }
}

@keyframes slideUp {
  from { 
    opacity: 0;
    transform: translateY(18px);
  }
  to { 
    opacity: 100%;
    transform: translateY(0);
  }
}

@keyframes loader {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Button Animations */
.btn-animate {
  transition: all 100ms var(--ease-in-out);
}

/* Card Hover Animation */
.card-hover {
  transition: transform 200ms var(--ease-in);
}

.card-hover:hover {
  transform: translateY(-4px);
}

/* Page Transitions */
.page-enter {
  opacity: 0;
  transform: translateY(18px);
  animation: slideUp 300ms var(--ease-out) forwards;
}

/* Loading Animation */
.loading-infinite {
  animation: loader var(--ease-in-out) infinite;
}

/* Component System */

/* Primary Button */
.btn-primary {
  background: var(--primary-color);
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-m);
  padding: 12px 24px;
  font-family: var(--font-family);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 100ms var(--ease-in-out);
  min-height: 44px; /* Touch target minimum */
}

.btn-primary:hover {
  background: #F34F6;
  transform: scale(1.02);
}

.btn-primary:active {
  background: #E57EB;
  transform: scale(0.98);
}

.btn-primary:disabled {
  background: var(--gray-200);
  color: var(--gray-900);
  cursor: not-allowed;
  transform: none;
}

/* Secondary Button */
.btn-secondary {
  background: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  border-radius: var(--radius-m);
  padding: 10px 22px;
  font-family: var(--font-family);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 100ms var(--ease-in-out);
  min-height: 44px;
}

.btn-secondary:hover {
  background: var(--primary-color);
  color: #FFFFFF;
}

/* Form Elements */
.input-field {
  width: 320px;
  height: 32px;
  padding: 12px var(--spacing-m);
  border: 1px solid #D15DB;
  border-radius: var(--radius-s);
  font-family: var(--font-family);
  font-size: 16px;
  transition: all 150ms var(--ease-in-out);
  background: #FFFFFF;
}

.input-field:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(89, 70, 193, 0.1);
}

.input-field::placeholder {
  color: #111827;
}

/* Card Component */
.card {
  background: #FFFFFF;
  border-radius: var(--radius-l);
  padding: var(--spacing-m);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--gray-200);
  transition: all 150ms var(--ease-in-out);
  min-height: 180px;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(89, 70, 193, 0.15);
  border-color: var(--primary-color);
}

/* Navigation Component */
.nav-bar {
  height: 56px;
  background: #1178F;
  padding: 0 var(--spacing-m);
  margin: var(--spacing-s);
  border-radius: var(--radius-m);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-item {
  color: #111827;
  font-family: var(--font-family);
  font-size: 16px;
  font-weight: 500;
  padding: var(--spacing-s) var(--spacing-m);
  text-decoration: none;
  transition: color 100ms var(--ease-in-out);
}

.nav-item:hover {
  color: var(--primary-color);
}

/* Property Listing Cards */
.property-listing {
  background: #FFFFFF;
  border-radius: var(--radius-l);
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  border: 1px solid var(--gray-200);
  transition: all 200ms var(--ease-in);
  cursor: pointer;
}

.property-listing:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(89, 70, 193, 0.12);
  border-color: var(--primary-color);
}

.property-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: var(--gray-200);
}

.property-details {
  padding: var(--spacing-m);
}

.property-price {
  font-size: 24px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: var(--spacing-xs);
}

.property-specs {
  color: #4B5563;
  font-size: 14px;
  margin-bottom: var(--spacing-s);
}

.property-location {
  color: #6B7280;
  font-size: 14px;
}

/* Confidence Indicators */
.confidence-score {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-xs);
  padding: 4px 8px;
  border-radius: var(--radius-s);
  font-size: 12px;
  font-weight: 600;
}

.confidence-high { 
  background: #D1FAE5;
  color: var(--success);
}

.confidence-medium { 
  background: #FEF3C7;
  color: #D97706;
}

.confidence-low { 
  background: #FEE2E2;
  color: #DC2626;
}

/* Mobile & Responsive Design */

/* Mobile First Approach - Base styles for mobile */
@media (max-width: 767px) {
  .display-h1 {
    font-size: 32px;
    line-height: 40px;
  }
  
  .heading-h2 {
    font-size: 24px;
    line-height: 32px;
  }
  
  .subheading-h3 {
    font-size: 20px;
    line-height: 28px;
  }
  
  .container {
    padding: 0 var(--spacing-m);
  }
  
  .grid-mobile {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-m);
  }
  
  /* Bottom Tab Navigation for Mobile */
  .mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #FFFFFF;
    border-top: 1px solid var(--gray-200);
    padding: var(--spacing-s) 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    z-index: 100;
  }
  
  .mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--spacing-s);
    text-decoration: none;
    color: #6B7280;
    font-size: 12px;
    transition: color 100ms var(--ease-in-out);
  }
  
  .mobile-nav-item.active {
    color: var(--primary-color);
  }
  
  .mobile-nav-icon {
    font-size: 18px;
    margin-bottom: 4px;
  }
}

/* Tablet Styles */
@media (min-width: 768px) and (max-width: 1023px) {
  .container {
    padding: 0 var(--spacing-l);
  }
  
  .grid-tablet {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-m);
  }
}

/* Desktop Styles */
@media (min-width: 1024px) {
  .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-xl);
  }
  
  .grid-desktop {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-l);
  }
  
  .sidebar-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: var(--spacing-xl);
  }
}

/* Loading spinner for AI operations */
.ai-spinner {
  border: 3px solid #f3f4f6;
  border-top: 3px solid var(--compai-purple);
  border-radius: 50%;
  width: 24px;
  height: 24px;
  animation: spin 1s linear infinite;
}

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

/* Custom scrollbar */
.custom-scrollbar::-webkit-scrollbar {
  width: 8px;
}

.custom-scrollbar::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background: var(--compai-purple-light);
  border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: var(--compai-purple);
}