/* Real Estate AI App Custom Styles */

/* Base styles and fonts */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

/* Custom animations */
@keyframes pulse-slow {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.animate-pulse-slow {
  animation: pulse-slow 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Custom button hover effects */
.btn-hover-lift {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-hover-lift:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Loading spinner for buttons */
.loading-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Voice recording pulse animation */
@keyframes recording-pulse {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
  70% { transform: scale(1.05); box-shadow: 0 0 0 20px rgba(239, 68, 68, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.recording-pulse {
  animation: recording-pulse 2s infinite;
}

/* File upload drag and drop styles */
.file-upload-area {
  transition: all 0.3s ease;
}

.file-upload-area:hover {
  background-color: #f8fafc;
  border-color: #3b82f6;
}

.file-upload-area.dragover {
  background-color: #eff6ff;
  border-color: #2563eb;
  transform: scale(1.02);
}

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

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

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

textarea::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Toast notification styles */
.toast {
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

.toast.show {
  transform: translateX(0);
}

/* Compliance indicator styles */
.compliance-indicator {
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.compliance-pass {
  background-color: #dcfce7;
  color: #166534;
}

.compliance-warning {
  background-color: #fef3c7;
  color: #92400e;
}

.compliance-fail {
  background-color: #fee2e2;
  color: #991b1b;
}

/* Real estate specific color scheme */
:root {
  --re-primary: #1e40af;
  --re-primary-light: #3b82f6;
  --re-secondary: #059669;
  --re-accent: #7c3aed;
  --re-warning: #d97706;
  --re-danger: #dc2626;
  --re-gray-50: #f9fafb;
  --re-gray-100: #f3f4f6;
  --re-gray-200: #e5e7eb;
  --re-gray-500: #6b7280;
  --re-gray-700: #374151;
  --re-gray-900: #111827;
}

/* Card hover effects */
.card-hover {
  transition: all 0.3s ease;
}

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

/* Gradient backgrounds */
.gradient-primary {
  background: linear-gradient(135deg, var(--re-primary) 0%, var(--re-primary-light) 100%);
}

.gradient-secondary {
  background: linear-gradient(135deg, var(--re-secondary) 0%, #10b981 100%);
}

/* Form field focus states */
.form-input:focus {
  outline: none;
  border-color: var(--re-primary-light);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Mobile optimizations */
@media (max-width: 640px) {
  .hero-title {
    font-size: 2.5rem;
    line-height: 1.2;
  }
  
  .hero-subtitle {
    font-size: 1.125rem;
  }
  
  .input-method-card {
    padding: 1.5rem;
  }
  
  .property-form {
    padding: 1rem;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .btn-primary {
    background-color: #000;
    border: 2px solid #000;
  }
  
  .btn-secondary {
    background-color: #fff;
    color: #000;
    border: 2px solid #000;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Print styles */
@media print {
  .no-print {
    display: none !important;
  }
  
  .description-output {
    background: white !important;
    color: black !important;
    font-size: 12pt;
    line-height: 1.4;
  }
}

/* Loading states */
.loading {
  position: relative;
  pointer-events: none;
}

.loading::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Success/error states */
.success-border {
  border-color: var(--re-secondary) !important;
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
}

.error-border {
  border-color: var(--re-danger) !important;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

/* Custom select dropdown styling */
select.custom-select {
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
}

/* Word count and metrics styling */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1rem;
}

.metric-item {
  text-align: center;
  padding: 0.75rem;
  background: var(--re-gray-50);
  border-radius: 8px;
  border: 1px solid var(--re-gray-200);
}

.metric-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--re-primary);
}

.metric-label {
  font-size: 0.875rem;
  color: var(--re-gray-500);
  margin-top: 0.25rem;
}

/* Voice transcript styling */
.transcript-container {
  background: linear-gradient(to bottom, #f8fafc, #f1f5f9);
  border: 2px dashed #cbd5e1;
  min-height: 120px;
  padding: 1rem;
  border-radius: 8px;
  font-family: 'Courier New', monospace;
  line-height: 1.6;
}

.transcript-placeholder {
  color: #94a3b8;
  font-style: italic;
}

/* OCR preview styling */
.ocr-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem;
}

.ocr-data-item {
  padding: 0.5rem;
  background: white;
  border: 1px solid var(--re-gray-200);
  border-radius: 6px;
}

.ocr-data-label {
  font-weight: 600;
  color: var(--re-gray-700);
  margin-bottom: 0.25rem;
}

.ocr-data-value {
  color: var(--re-gray-900);
}

/* Accessibility improvements */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus visible for keyboard navigation */
.focus-visible:focus {
  outline: 2px solid var(--re-primary);
  outline-offset: 2px;
}

/* Button variants */
.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.125rem;
}

.btn-md {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

/* Status indicators */
.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 0.5rem;
}

.status-success {
  background-color: var(--re-secondary);
}

.status-warning {
  background-color: var(--re-warning);
}

.status-error {
  background-color: var(--re-danger);
}

.status-info {
  background-color: var(--re-primary);
}