@import "tailwindcss";
@import "./carousel.css";

/* Definition of the design system. All colors, gradients, fonts, etc should be defined here.
All colors MUST be HSL.
*/

@layer base {
  :root {
    --background: 210 20% 98%;
    --foreground: 220 13% 18%;

    --card: 0 0% 100%;
    --card-foreground: 220 13% 18%;

    --popover: 0 0% 100%;
    --popover-foreground: 220 13% 18%;

    --primary: 217 91% 60%;
    --primary-foreground: 0 0% 100%;
    --primary-glow: 217 91% 70%;

    --secondary: 210 40% 96%;
    --secondary-foreground: 220 13% 18%;

    --muted: 210 40% 96%;
    --muted-foreground: 215 16% 47%;

    --accent: 142 76% 36%;
    --accent-foreground: 0 0% 100%;

    --destructive: 0 84% 60%;
    --destructive-foreground: 0 0% 100%;

    --border: 214 32% 91%;
    --input: 214 32% 91%;
    --ring: 217 91% 60%;

    /* Custom design tokens */
    --map-bg: 200 25% 97%;
    --property-marker: 217 91% 60%;
    --property-price: 142 76% 36%;
    --sidebar-bg: 0 0% 100%;
    --hover-bg: 217 91% 95%;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, hsl(var(--primary)), hsl(var(--primary-glow)));
    --gradient-map: linear-gradient(180deg, hsl(var(--map-bg)), hsl(200 20% 94%));

    /* Shadows */
    --shadow-card: 0 4px 12px hsl(var(--primary) / 0.1);
    --shadow-marker: 0 2px 8px hsl(var(--primary) / 0.2);

    /* Transitions */
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    --radius: 0.5rem;

    --sidebar-background: 0 0% 98%;

    --sidebar-foreground: 240 5.3% 26.1%;

    --sidebar-primary: 240 5.9% 10%;

    --sidebar-primary-foreground: 0 0% 98%;

    --sidebar-accent: 240 4.8% 95.9%;

    --sidebar-accent-foreground: 240 5.9% 10%;

    --sidebar-border: 220 13% 91%;

    --sidebar-ring: 217.2 91.2% 59.8%;
  }

  .dark {
    --background: 222.2 84% 4.9%;
    --foreground: 210 40% 98%;

    --card: 222.2 84% 4.9%;
    --card-foreground: 210 40% 98%;

    --popover: 222.2 84% 4.9%;
    --popover-foreground: 210 40% 98%;

    --primary: 210 40% 98%;
    --primary-foreground: 222.2 47.4% 11.2%;

    --secondary: 217.2 32.6% 17.5%;
    --secondary-foreground: 210 40% 98%;

    --muted: 217.2 32.6% 17.5%;
    --muted-foreground: 215 20.2% 65.1%;

    --accent: 217.2 32.6% 17.5%;
    --accent-foreground: 210 40% 98%;

    --destructive: 0 62.8% 30.6%;
    --destructive-foreground: 210 40% 98%;

    --border: 217.2 32.6% 17.5%;
    --input: 217.2 32.6% 17.5%;
    --ring: 212.7 26.8% 83.9%;
    --sidebar-background: 240 5.9% 10%;
    --sidebar-foreground: 240 4.8% 95.9%;
    --sidebar-primary: 224.3 76.3% 48%;
    --sidebar-primary-foreground: 0 0% 100%;
    --sidebar-accent: 240 3.7% 15.9%;
    --sidebar-accent-foreground: 240 4.8% 95.9%;
    --sidebar-border: 240 3.7% 15.9%;
    --sidebar-ring: 217.2 91.2% 59.8%;
  }
}

/* Estilos específicos da aplicação */
.map-background {
  background: var(--gradient-map);
  background-image:
    radial-gradient(circle at 20% 30%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(34, 197, 94, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 60% 20%, rgba(168, 85, 247, 0.05) 0%, transparent 50%);
}

.property-marker {
  transition: var(--transition-smooth);
}

.property-marker.active .marker-pin {
  background: hsl(var(--accent));
  transform: scale(1.2);
  box-shadow: var(--shadow-marker), 0 0 20px hsl(var(--accent) / 0.4);
}

.marker-pin {
  width: 48px;
  height: 48px;
  background: hsl(var(--property-marker));
  border: 3px solid white;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-marker);
  transition: var(--transition-smooth);
  margin-bottom: 8px;
}

.marker-icon {
  transform: rotate(45deg);
  font-size: 20px;
}

.marker-info {
  text-align: center;
  background: white;
  border: 1px solid hsl(var(--border));
  border-radius: 8px;
  padding: 8px 12px;
  box-shadow: var(--shadow-card);
  min-width: 120px;
}

.marker-price {
  font-weight: bold;
  color: hsl(var(--property-price));
  font-size: 14px;
}

.marker-neighborhood {
  font-size: 12px;
  color: hsl(var(--muted-foreground));
  margin-top: 2px;
}

.property-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.property-header h2 {
  color: hsl(var(--foreground));
  font-size: 24px;
  font-weight: bold;
  margin: 0;
}

.property-type {
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  padding: 4px 12px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 500;
}

.property-price-large {
  font-size: 32px;
  font-weight: bold;
  color: hsl(var(--property-price));
  margin-bottom: 16px;
}

.property-area {
  background: hsl(var(--muted));
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 16px;
  color: hsl(var(--foreground));
}

.property-description {
  margin-bottom: 20px;
}

.property-description p {
  color: hsl(var(--muted-foreground));
  line-height: 1.6;
  margin: 0;
}

.property-features h3 {
  color: hsl(var(--foreground));
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 12px;
}

.features-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.feature-tag {
  background: hsl(var(--primary-glow) / 0.2);
  color: hsl(var(--primary));
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}

.contact-btn {
  width: 100%;
  background: var(--gradient-primary);
  color: white;
  border: none;
  padding: 16px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
  box-shadow: var(--shadow-card);
}

.contact-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card), 0 8px 20px hsl(var(--primary) / 0.3);
}

.contact-btn:active {
  transform: translateY(0);
}

/* Leaflet Custom Styles */
.custom-marker {
  background: transparent !important;
  border: none !important;
}

.marker-container {
  position: relative;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.marker-pin {
  background: hsl(var(--primary));
  width: 40px;
  height: 40px;
  border-radius: 50% 50% 50% 0;
  position: relative;
  transform: rotate(-45deg);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px hsl(var(--primary) / 0.3);
  border: 3px solid white;
  transition: all 0.3s ease;
}

.marker-pin:hover {
  transform: rotate(-45deg) scale(1.1);
  box-shadow: 0 6px 16px hsl(var(--primary) / 0.4);
}

.marker-icon {
  transform: rotate(45deg);
  font-size: 16px;
  color: white;
}

.marker-label {
  background: hsl(var(--primary));
  color: white;
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 600;
  margin-top: 4px;
  white-space: nowrap;
  box-shadow: 0 2px 8px hsl(var(--primary) / 0.3);
  display: inline-block;
  min-width: fit-content;
  text-align: center;
  line-height: 1.2;
}

/* Popup Styles */
.leaflet-popup-content-wrapper {
  background: hsl(var(--card));
  border-radius: 12px;
  box-shadow: var(--shadow-card);
  border: 1px solid hsl(var(--border));
}

.leaflet-popup-tip {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
}

.popup-content {
  padding: 8px;
  min-width: 200px;
}

.popup-title {
  font-size: 16px;
  font-weight: 600;
  color: hsl(var(--foreground));
  margin-bottom: 4px;
}

.popup-price {
  font-size: 18px;
  font-weight: 700;
  color: hsl(var(--primary));
  margin-bottom: 4px;
}

.popup-area {
  font-size: 14px;
  color: hsl(var(--muted-foreground));
  margin-bottom: 8px;
}

.popup-button {
  background: hsl(var(--primary));
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
}

.popup-button:hover {
  background: hsl(var(--primary-glow));
  transform: translateY(-1px);
}

/* Map Controls */
.leaflet-control-zoom {
  border: none !important;
}

.leaflet-control-zoom a {
  background: hsl(var(--card)) !important;
  border: 1px solid hsl(var(--border)) !important;
  color: hsl(var(--foreground)) !important;
  border-radius: 8px !important;
  margin-bottom: 4px !important;
  transition: all 0.3s ease !important;
}

.leaflet-control-zoom a:hover {
  background: hsl(var(--hover-bg)) !important;
}

.leaflet-control-zoom a:first-child {
  border-top-left-radius: 8px !important;
  border-top-right-radius: 8px !important;
}

.leaflet-control-zoom a:last-child {
  border-bottom-left-radius: 8px !important;
  border-bottom-right-radius: 8px !important;
}

/* Attribution */
.leaflet-control-attribution {
  background: hsl(var(--card)) !important;
  border: 1px solid hsl(var(--border)) !important;
  border-radius: 8px !important;
  font-size: 11px !important;
}

.leaflet-control-attribution a {
  color: hsl(var(--primary)) !important;
}
