/**
 * investment-dashboard.css
 * PREMIUM POLISH VERSION - Feb 12, 2026
 * Styles for investment comparison, calculator, and AI analysis
 */

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes slide-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes pulse-subtle {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.8; }
}

@keyframes shine {
  0% { left: -100%; }
  100% { left: 200%; }
}

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

.animate-slide-up {
  animation: slide-up 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.animate-float {
  animation: float 3s ease-in-out infinite;
}

/* ============================================
   INVESTMENT DASHBOARD SECTION
   ============================================ */

.investment-dashboard-section {
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 50%, #e2e8f0 100%);
  padding: 3rem 0;
  position: relative;
}

.investment-dashboard-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 200px;
  background: linear-gradient(180deg, rgba(99, 102, 241, 0.03) 0%, transparent 100%);
  pointer-events: none;
}

/* ============================================
   AI ANALYSIS COMPONENT (HERO)
   ============================================ */

.ai-analysis-premium {
  animation: slide-up 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.ai-analysis-premium .grade-circle {
  animation: float 4s ease-in-out infinite;
}

/* Grade circle glow effect */
.ai-analysis-premium .grade-circle-glow {
  filter: blur(30px);
  animation: pulse-subtle 2s ease-in-out infinite;
}

/* ============================================
   INVESTMENT COMPARISON COMPONENT
   ============================================ */

.investment-comparison {
  animation: slide-up 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}

/* Verdict Section */
.verdict-section {
  background: linear-gradient(135deg, #ffffff 0%, #fafbfc 100%);
  position: relative;
  overflow: hidden;
}

.verdict-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.03) 0%, transparent 50%);
  pointer-events: none;
}

/* Comparison Table */
.comparison-table {
  background: linear-gradient(135deg, #ffffff 0%, #fafbfc 100%);
}

.comparison-table table {
  border-collapse: separate;
  border-spacing: 0;
}

.comparison-table tbody tr {
  transition: all 0.2s ease;
}

.comparison-table tbody tr:hover {
  background-color: rgba(99, 102, 241, 0.04) !important;
}

.comparison-table th {
  position: sticky;
  top: 0;
  z-index: 10;
}

/* LTR Section */
.ltr-section {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.ltr-section:hover {
  box-shadow: 0 20px 40px -12px rgba(59, 130, 246, 0.15);
}

.ltr-section::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #3b82f6, #6366f1);
  border-radius: 2px 2px 0 0;
}

/* STR Section */
.str-section {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.str-section:hover {
  box-shadow: 0 20px 40px -12px rgba(147, 51, 234, 0.15);
}

.str-section::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #9333ea, #ec4899);
  border-radius: 2px 2px 0 0;
}

/* ============================================
   LISTING CARDS (PREMIUM)
   ============================================ */

.listing-card {
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.listing-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.5s ease;
  pointer-events: none;
  z-index: 10;
}

.listing-card:hover::before {
  left: 200%;
}

.listing-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.15);
}

.listing-card img {
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.listing-card:hover img {
  transform: scale(1.1);
}

/* ============================================
   PERSONAL CALCULATOR COMPONENT
   ============================================ */

.personal-calculator {
  animation: slide-up 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
  background: linear-gradient(135deg, #ffffff 0%, #fafbfc 100%);
}

.personal-calculator input[type="number"] {
  -moz-appearance: textfield;
  transition: all 0.2s ease;
}

.personal-calculator input[type="number"]::-webkit-outer-spin-button,
.personal-calculator input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.personal-calculator input:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
  border-color: #6366f1;
}

.input-section {
  background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
  border-radius: 1rem;
  padding: 1.25rem;
  border: 1px solid #e5e7eb;
  transition: all 0.2s ease;
}

.input-section:hover {
  border-color: #d1d5db;
  box-shadow: 0 4px 12px -4px rgba(0, 0, 0, 0.05);
}

/* Results Section */
.results-section {
  position: relative;
  border-top: none;
  background: linear-gradient(135deg, #f0f9ff 0%, #eff6ff 100%);
  border-radius: 1rem;
  padding: 1.5rem;
  margin-top: 1.5rem;
}

.results-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 1rem;
  right: 1rem;
  height: 3px;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6, #ec4899);
  border-radius: 2px;
}

/* Premium Slider Styles */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(90deg, #e2e8f0 0%, #cbd5e1 100%);
  outline: none;
  transition: all 0.2s ease;
}

input[type="range"]:hover {
  background: linear-gradient(90deg, #cbd5e1 0%, #94a3b8 100%);
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  cursor: pointer;
  border: 3px solid white;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
  transition: all 0.2s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.5);
}

input[type="range"]::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  cursor: pointer;
  border: 3px solid white;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
  transition: all 0.2s ease;
}

/* PDF Button */
#generate-pdf-btn {
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

#generate-pdf-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s ease;
}

#generate-pdf-btn:hover::before {
  left: 100%;
}

#generate-pdf-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgba(99, 102, 241, 0.4);
}

#generate-pdf-btn:active {
  transform: translateY(0);
}

/* ============================================
   RESPONSIVE STYLES
   ============================================ */

@media (max-width: 1024px) {
  .investment-dashboard-section {
    padding: 2rem 0;
  }
  
  .ltr-section,
  .str-section {
    padding: 1.25rem;
  }
}

@media (max-width: 768px) {
  .investment-dashboard-section {
    padding: 1.5rem 0;
  }

  .ai-analysis-premium .flex-col.md\\:flex-row {
    flex-direction: column;
    text-align: center;
  }
  
  .ai-analysis-premium .grade-circle {
    margin: 0 auto;
  }

  .verdict-section .grid-cols-2 {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .comparison-table {
    overflow-x: auto;
    padding: 1rem;
  }

  .comparison-table table {
    min-width: 500px;
  }

  .listing-card {
    margin-bottom: 0.75rem;
  }
  
  .listing-card h36 {
    height: 120px;
  }

  .personal-calculator .grid-cols-3 {
    grid-template-columns: 1fr;
  }

  .results-section .grid-cols-2 {
    grid-template-columns: 1fr;
  }

  .input-section {
    padding: 1rem;
  }
}

@media (max-width: 640px) {
  .ai-analysis-premium > div:first-child {
    padding: 1.5rem;
  }
  
  .ai-analysis-premium .w-32 {
    width: 100px;
    height: 100px;
  }

  .ai-analysis-premium .text-5xl {
    font-size: 2.5rem;
  }

  .verdict-section {
    padding: 1.25rem;
  }

  .verdict-section .text-3xl {
    font-size: 1.5rem;
  }

  .ltr-section,
  .str-section {
    padding: 1rem;
  }
  
  .ltr-section h3,
  .str-section h3 {
    font-size: 1rem;
  }
  
  .listing-card .p-4 {
    padding: 0.75rem;
  }
}

/* ============================================
   DARK MODE SUPPORT (Future)
   ============================================ */

@media (prefers-color-scheme: dark) {
  /* Keep light mode for now - dashboard uses light theme */
}

.investment-dashboard-section,
.investment-dashboard-section * {
  color-scheme: light;
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
  .investment-dashboard-section {
    background: white !important;
    padding: 0 !important;
  }

  .ai-analysis-premium,
  .investment-comparison,
  .personal-calculator {
    box-shadow: none !important;
    border: 1px solid #e5e7eb !important;
    break-inside: avoid;
  }

  #generate-pdf-btn,
  input[type="range"],
  .input-section input {
    display: none !important;
  }

  .listing-card {
    break-inside: avoid;
    box-shadow: none !important;
    border: 1px solid #e5e7eb !important;
  }

  .listing-card a {
    text-decoration: none !important;
  }
  
  .animate-float,
  .animate-pulse {
    animation: none !important;
  }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.text-gradient-blue {
  background: linear-gradient(135deg, #3b82f6, #06b6d4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-gradient-purple {
  background: linear-gradient(135deg, #8b5cf6, #ec4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.border-gradient-blue {
  border: 2px solid transparent;
  background: linear-gradient(white, white) padding-box,
              linear-gradient(135deg, #3b82f6, #6366f1) border-box;
  border-radius: 1rem;
}

.border-gradient-purple {
  border: 2px solid transparent;
  background: linear-gradient(white, white) padding-box,
              linear-gradient(135deg, #9333ea, #ec4899) border-box;
  border-radius: 1rem;
}

/* Glass morphism effect */
.glass {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Loading skeleton */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: 0.5rem;
}

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Focus visible styles */
*:focus-visible {
  outline: 2px solid #6366f1;
  outline-offset: 2px;
}

/* Smooth scrolling */
.smooth-scroll {
  scroll-behavior: smooth;
}

/* Hide scrollbar but keep functionality */
.hide-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.hide-scrollbar::-webkit-scrollbar {
  display: none;
}
/**
 * Rental Comparables Component Styles
 * Matches the design system of the Airbnb listings display
 */

/* Section Container */
.rental-comparables-section {
  background: white;
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
}

.rental-comps-header {
  margin-bottom: 20px;
}

.rental-comps-header h3 {
  font-size: 24px;
  font-weight: 700;
  color: #1a202c;
  margin-bottom: 4px;
}

.rental-comps-subtitle {
  color: #718096;
  font-size: 14px;
  margin-bottom: 12px;
}

.rental-data-badge {
  display: flex;
  gap: 8px;
  align-items: center;
}

.badge-live {
  background: linear-gradient(135deg, #48bb78, #38a169);
  color: white;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.badge-source {
  color: #a0aec0;
  font-size: 12px;
}

/* Market Stats */
.rental-market-stats {
  background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
}

.rental-market-stats h4 {
  font-size: 16px;
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 16px;
}

.rental-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

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

.rental-stat-card {
  background: white;
  border-radius: 10px;
  padding: 16px;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.rental-stat-card.highlight {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.rental-stat-card.highlight .rental-stat-label {
  color: rgba(255, 255, 255, 0.8);
}

.rental-stat-label {
  font-size: 12px;
  color: #a0aec0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.rental-stat-value {
  font-size: 22px;
  font-weight: 700;
  color: #2d3748;
}

.rental-stat-card.highlight .rental-stat-value {
  color: white;
}

/* Market Comparison */
.rental-market-comparison {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
}

.rental-market-comparison.above-market {
  background: #fff5f5;
  color: #c53030;
  border: 1px solid #fed7d7;
}

.rental-market-comparison.below-market {
  background: #f0fff4;
  color: #276749;
  border: 1px solid #c6f6d5;
}

.comparison-icon {
  font-size: 18px;
}

/* Listings Grid */
.rental-listings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

@media (max-width: 640px) {
  .rental-listings-grid {
    grid-template-columns: 1fr;
  }
}

/* Individual Listing Card */
.rental-listing-card {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.2s ease;
  background: white;
}

.rental-listing-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
  border-color: #667eea;
}

.rental-listing-image {
  width: 100%;
  height: 160px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.rental-no-image {
  color: white;
  font-size: 18px;
  font-weight: 600;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.rental-listing-details {
  padding: 16px;
}

.rental-listing-address {
  font-size: 14px;
  color: #4a5568;
  margin-bottom: 8px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rental-listing-price {
  font-size: 26px;
  font-weight: 700;
  color: #667eea;
  margin-bottom: 8px;
}

.rental-price-period {
  font-size: 14px;
  font-weight: 400;
  color: #a0aec0;
}

.rental-listing-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: #718096;
  margin-bottom: 8px;
}

.rental-spec {
  display: flex;
  align-items: center;
  gap: 4px;
}

.rental-price-sqft {
  background: #f7fafc;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
}

.rental-psf-label {
  color: #718096;
}

.rental-psf-value {
  font-weight: 600;
  color: #2d3748;
}

.rental-amenities {
  margin-top: 8px;
  font-size: 12px;
  color: #718096;
}

/* Show More Button */
.rental-show-more {
  text-align: center;
  margin-top: 20px;
}

.show-more-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.show-more-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Empty State */
.rental-comps-empty {
  text-align: center;
  padding: 48px 24px;
  background: #f7fafc;
  border-radius: 12px;
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.empty-message {
  font-size: 18px;
  font-weight: 600;
  color: #4a5568;
  margin-bottom: 8px;
}

.empty-hint {
  font-size: 14px;
  color: #a0aec0;
}

/* Dark Mode Support */
.dark .rental-comparables-section,
.ultimate-dashboard .rental-comparables-section {
  background: rgba(255, 255, 255, 0.05);
}

.dark .rental-comps-header h3,
.ultimate-dashboard .rental-comps-header h3 {
  color: white;
}

.dark .rental-listing-card,
.ultimate-dashboard .rental-listing-card {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.1);
}

.dark .rental-listing-address,
.ultimate-dashboard .rental-listing-address {
  color: #cbd5e0;
}

.dark .rental-stat-card,
.ultimate-dashboard .rental-stat-card {
  background: rgba(255, 255, 255, 0.1);
}

.dark .rental-stat-value,
.ultimate-dashboard .rental-stat-value {
  color: white;
}

.dark .rental-market-stats,
.ultimate-dashboard .rental-market-stats {
  background: rgba(255, 255, 255, 0.05);
}

.dark .rental-market-stats h4,
.ultimate-dashboard .rental-market-stats h4 {
  color: white;
}
