/**
 * Ontario Land For Sale by Owner (FSBO)
 * Custom Stylesheet & Leaflet Customizations
 */

:root {
  --pine-primary: #15803d;
  --pine-dark: #14532d;
  --pine-deep: #052e16;
  --pine-light: #dcfce7;
  --amber-accent: #d97706;
}

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

body {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* -------------------------------------------------------------------
 * Leaflet Custom Map Marker Pins
 * ------------------------------------------------------------------- */
.custom-leaflet-pin {
  background: transparent;
  border: none;
}

.map-price-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #0f172a;
  color: #ffffff;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-weight: 700;
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 9999px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25), 0 0 0 1.5px #ffffff;
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  transform: translate(-50%, -100%);
  position: relative;
}

.map-price-badge::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 5px 5px 0 5px;
  border-style: solid;
  border-color: #0f172a transparent transparent transparent;
}

.map-price-badge .acres-tag {
  background: #166534;
  color: #dcfce7;
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 9999px;
  font-weight: 600;
}

.map-price-badge:hover,
.map-price-badge.active-marker {
  background: #15803d;
  transform: translate(-50%, -105%) scale(1.1);
  box-shadow: 0 6px 20px rgba(21, 128, 61, 0.4), 0 0 0 2px #ffffff;
  z-index: 1000 !important;
}

.map-price-badge:hover::after,
.map-price-badge.active-marker::after {
  border-color: #15803d transparent transparent transparent;
}

/* Leaflet Popup Styling */
.leaflet-popup-content-wrapper {
  padding: 0 !important;
  border-radius: 14px !important;
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2) !important;
  border: 1px solid rgba(226, 232, 240, 0.8) !important;
}

.leaflet-popup-content {
  margin: 0 !important;
  line-height: 1.4 !important;
  width: 260px !important;
}

.leaflet-popup-tip {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

.leaflet-container {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif !important;
  z-index: 10;
}

/* -------------------------------------------------------------------
 * Card & UI Components
 * ------------------------------------------------------------------- */
.listing-card {
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.2s ease;
}

.listing-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 28px -6px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
}

.listing-card.card-highlight {
  border-color: #15803d !important;
  box-shadow: 0 0 0 2px #22c55e, 0 12px 24px -4px rgba(22, 101, 52, 0.2) !important;
  transform: translateY(-2px);
}

/* Badges */
.badge-unorganized {
  background-color: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.badge-waterfront {
  background-color: #ecfeff;
  color: #0e7490;
  border: 1px solid #a5f3fc;
}

.badge-offgrid {
  background-color: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
}

/* Image Aspect Ratio */
.aspect-card {
  aspect-ratio: 16 / 10;
}

/* Map Containers */
#main-map {
  height: 100%;
  min-height: 380px;
  width: 100%;
  border-radius: 16px;
}

.full-width-map-container #main-map {
  border-radius: 0 !important;
}

#picker-map {
  height: 340px;
  width: 100%;
  border-radius: 12px;
}

#property-map {
  height: 380px;
  width: 100%;
  border-radius: 14px;
}

/* Custom Scrollbars */
.custom-scrollbar::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
.custom-scrollbar::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 8px;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 8px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Drag & Drop Upload Zone */
.dropzone-active {
  border-color: #15803d !important;
  background-color: #f0fdf4 !important;
}

/* Gallery main image transition */
.gallery-hero-img {
  transition: opacity 0.2s ease-in-out;
}
