/* ===== LightSpace — Custom Styles ===== */

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

/* Navbar glass effect when scrolled */
#navbar {
  background: transparent;
}
#navbar.scrolled {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

/* Counter animation */
[data-counter] {
  font-variant-numeric: tabular-nums;
}

/* Card hover lift */
.card-lift {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(74, 159, 217, 0.1);
}

/* Gradient text */
.text-gradient {
  background: linear-gradient(135deg, #4a9fd9, #2d7aab);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Property card image placeholder */
.property-img-placeholder {
  background: linear-gradient(135deg, #f0f8ff 0%, #dceefb 50%, #b8ddf5 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Filter chips */
.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.375rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid #e5e7eb;
  background: white;
  color: #4b5563;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.filter-chip:hover {
  border-color: #8ac7ed;
  background: #f0f8ff;
  color: #3b8ec4;
}
.filter-chip.active {
  border-color: #4a9fd9;
  background: #4a9fd9;
  color: white;
}

/* Calculator slider */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: #e5e7eb;
  border-radius: 999px;
  outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #4a9fd9;
  cursor: pointer;
  border: 3px solid white;
  box-shadow: 0 2px 6px rgba(74, 159, 217, 0.3);
  transition: transform 0.15s ease;
}
input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}
input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #4a9fd9;
  cursor: pointer;
  border: 3px solid white;
  box-shadow: 0 2px 6px rgba(74, 159, 217, 0.3);
}

/* Skeleton loading */
.skeleton {
  background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
  background-size: 200% 100%;
  animation: skeleton-pulse 1.5s ease-in-out infinite;
}
@keyframes skeleton-pulse {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Result highlight */
.result-highlight {
  position: relative;
  overflow: hidden;
}
.result-highlight::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 40%, rgba(74, 159, 217, 0.05) 100%);
  border-radius: inherit;
  pointer-events: none;
}

/* Comparison bars */
.comparison-bar {
  height: 8px;
  border-radius: 4px;
  background: #e5e7eb;
  overflow: hidden;
}
.comparison-bar-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, #4a9fd9, #3b8ec4);
  transition: width 0.6s ease;
}

/* Mobile menu animation */
#mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
#mobile-menu.open {
  display: block;
  max-height: 400px;
}

/* Page transitions */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid #4a9fd9;
  outline-offset: 2px;
}

/* ===== Auth Modal ===== */
.auth-modal-overlay {
  z-index: 100;
}
.auth-modal-backdrop {
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.auth-modal-content {
  animation: modal-slide-up 0.3s ease;
}
@keyframes modal-slide-up {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ===== Gated Price Blur ===== */
.gated-price-blur {
  position: relative;
}
.blur-sm {
  filter: blur(5px);
  -webkit-filter: blur(5px);
}

/* ===== Leaflet Map Overrides ===== */
.ls-marker {
  background: transparent !important;
  border: none !important;
}
.ls-popup .leaflet-popup-content-wrapper {
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  padding: 0;
}
.ls-popup .leaflet-popup-content {
  margin: 12px 16px;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 13px;
  line-height: 1.5;
}
.ls-popup .leaflet-popup-tip {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}
.ls-map-legend {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

/* ===== Auth Nav Button ===== */
.auth-nav-btn {
  display: flex;
  align-items: center;
}

/* Print styles */
@media print {
  nav, footer, .no-print, .auth-modal-overlay { display: none !important; }
  body { color: #000; background: #fff; }
}
