/* Custom Styles for Property Deals Calculator */

:root {
  --primary-blue: #1e40af;
  --primary-green: #059669;
  --primary-purple: #7c3aed;
  --primary-orange: #ea580c;
}

/* Smooth transitions for all interactive elements */
.input-field {
  transition: all 0.2s ease;
}

.input-field:focus {
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  transform: translateY(-1px);
}

/* Mode button active states */
.mode-btn.active {
  background-color: #2563eb;
  color: white;
}

/* Deal Grade Animation */
#deal-grade {
  transition: all 0.5s ease;
}

.deal-grade-a { color: #059669; }
.deal-grade-b { color: #10b981; }
.deal-grade-c { color: #f59e0b; }
.deal-grade-d { color: #ef4444; }
.deal-grade-f { color: #dc2626; }

/* Card hover effects */
.bg-white {
  transition: box-shadow 0.3s ease;
}

.bg-white:hover {
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Chart container */
canvas {
  max-width: 100%;
}

/* Print styles */
@media print {
  header, footer, .mode-btn, button[onclick] {
    display: none !important;
  }
  
  #detailed-analysis {
    display: block !important;
  }
  
  .container {
    max-width: 100%;
  }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  header h1 {
    font-size: 1.25rem;
  }
  
  .grid.md\\:grid-cols-2,
  .grid.md\\:grid-cols-3,
  .grid.md\\:grid-cols-4 {
    grid-template-columns: 1fr;
  }
  
  .lg\\:grid-cols-3 {
    grid-template-columns: 1fr;
  }
}

/* Loading animation for calculations */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.calculating {
  animation: pulse 1.5s ease-in-out infinite;
}

/* Tooltip styles */
.tooltip {
  position: relative;
  cursor: help;
}

.tooltip:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: #1f2937;
  color: white;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
  z-index: 1000;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Range slider styling */
input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 5px;
  background: #e5e7eb;
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #3b82f6;
  cursor: pointer;
  transition: background .15s ease-in-out;
}

input[type="range"]::-webkit-slider-thumb:hover {
  background: #2563eb;
}

/* Table styling for detailed analysis */
#detailed-analysis table tr {
  border-bottom: 1px solid #e5e7eb;
}

#detailed-analysis table td {
  padding: 8px 0;
}

#detailed-analysis table td:first-child {
  color: #6b7280;
}

#detailed-analysis table td:last-child {
  text-align: right;
  font-weight: 600;
}

/* Metric cards hover effect */
#detailed-analysis .bg-gray-50:hover {
  background-color: #f3f4f6;
  transform: translateY(-2px);
  transition: all 0.2s ease;
}

/* Saved deal cards */
.saved-deal-card {
  transition: all 0.3s ease;
}

.saved-deal-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Section dividers */
.section-divider {
  border-top: 2px solid #e5e7eb;
  margin: 2rem 0;
}

/* Number input styling */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  opacity: 1;
  height: 24px;
}

/* Focus styles for accessibility */
button:focus,
input:focus,
select:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

/* Smooth scroll */
html {
  scroll-behavior: smooth;
}

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

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}
