@tailwind base;
@tailwind components;
@tailwind utilities;

/* ============================================
   MURMURA DESIGN SYSTEM
   ============================================ */

/* ---------- CSS Custom Properties ---------- */
:root {
  /* Colors */
  --color-primary: #3B82F6;
  --color-primary-dark: #2563eb;
  --color-primary-light: #60a5fa;
  --color-success: #10b981;
  --color-warning: #f59e0b;
  --color-error: #ef4444;
  --color-info: #3b82f6;

  /* Fonts */
  --font-display: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-body: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-data: 'JetBrains Mono', monospace;

  /* Glass morphism */
  --glass-blur: 12px;
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.2);

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-glow: 0 0 20px rgba(59, 130, 246, 0.3);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-normal: 300ms ease;
  --transition-slow: 500ms ease;
}

/* ---------- Animations ---------- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInScale {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

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

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ---------- Utility Classes ---------- */
@layer utilities {
  .anim-fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
  }
  .anim-fade-in-up-delay-1 {
    animation: fadeInUp 0.6s ease 0.1s forwards;
    opacity: 0;
  }
  .anim-fade-in-up-delay-2 {
    animation: fadeInUp 0.6s ease 0.2s forwards;
    opacity: 0;
  }
  .anim-fade-in-up-delay-3 {
    animation: fadeInUp 0.6s ease 0.3s forwards;
    opacity: 0;
  }
  .anim-fade-in-scale {
    animation: fadeInScale 0.4s ease forwards;
  }
  .anim-slide-in-left {
    animation: slideInLeft 0.5s ease forwards;
  }
  .anim-slide-in-right {
    animation: slideInRight 0.5s ease forwards;
  }
  .anim-float {
    animation: float 3s ease-in-out infinite;
  }

  .hover-lift {
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  }
  .hover-lift:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
  }

  .skeleton {
    background: linear-gradient(90deg, #e5e7eb 25%, #f3f4f6 50%, #e5e7eb 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 0.375rem;
  }

  .reveal-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
  }
  .reveal-on-scroll.revealed {
    opacity: 1;
    transform: translateY(0);
  }

  .glass {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
  }

  .shadow-glow {
    box-shadow: var(--shadow-glow);
  }
}

/* ---------- Component Classes ---------- */
@layer components {
  .btn-primary {
    @apply inline-flex items-center justify-center px-6 py-3 rounded-lg font-semibold text-white transition-all duration-200;
    background: var(--color-primary);
  }
  .btn-primary:hover {
    background: var(--color-primary-dark);
  }
  .btn-primary:active {
    opacity: 0.9;
  }

  .btn-secondary {
    @apply inline-flex items-center justify-center px-6 py-3 rounded-lg font-semibold transition-all duration-200;
    @apply text-gray-700 bg-gray-100;
  }
  .btn-secondary:hover {
    @apply text-murmura-600 bg-murmura-50;
  }
  .btn-secondary:active {
    @apply bg-murmura-100;
  }
}

/* ---------- Drone Zones Map ---------- */
.drone-filter {
  @apply inline-flex items-center gap-1 px-2.5 py-1 rounded-md text-[11px] font-medium text-gray-500 bg-transparent transition-all duration-150 cursor-pointer border border-transparent;
}
.drone-filter:hover {
  @apply text-gray-700 bg-gray-50;
}
.drone-filter.active {
  @apply text-gray-900 bg-gray-100 border-gray-200;
}

[data-controller="drone-zones-map"] .gm-style-iw-c {
  border-radius: 12px !important;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08) !important;
  padding: 0 !important;
}
[data-controller="drone-zones-map"] .gm-style-iw-d {
  overflow: hidden !important;
  padding: 8px 12px !important;
}
[data-controller="drone-zones-map"] .gm-ui-hover-effect {
  top: 2px !important;
  right: 2px !important;
}
[data-controller="drone-zones-map"].map-loaded #map-loader {
  display: none;
}

/* ---------- Driver.js Tour Overrides ---------- */
.murmura-tour-popover .driver-popover {
  font-family: var(--font-display);
  border-radius: 1rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(59, 130, 246, 0.15);
  padding: 1.25rem;
  max-width: 380px;
}
.murmura-tour-popover .driver-popover-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: #111827;
  line-height: 1.4;
}
.murmura-tour-popover .driver-popover-description {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  color: #6b7280;
  line-height: 1.6;
  margin-top: 0.375rem;
}
.murmura-tour-popover .driver-popover-progress-text {
  font-size: 0.6875rem;
  color: #9ca3af;
  font-weight: 500;
}
.murmura-tour-popover .driver-popover-navigation-btns button {
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: 0.5rem;
  padding: 0.5rem 1rem;
  transition: all 150ms ease;
}
.murmura-tour-popover .driver-popover-next-btn {
  background: #2563eb;
  color: #fff;
  border: none;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.3);
}
.murmura-tour-popover .driver-popover-next-btn:hover {
  background: #1d4ed8;
}
.murmura-tour-popover .driver-popover-prev-btn {
  background: transparent;
  color: #6b7280;
  border: 1px solid #e5e7eb;
}
.murmura-tour-popover .driver-popover-prev-btn:hover {
  background: #f9fafb;
  color: #374151;
}
.driver-overlay {
  background: rgba(15, 23, 42, 0.6) !important;
  backdrop-filter: blur(2px);
}

/* ---------- Component imports ---------- */
@import "components/_toast-_8pedX0.css";
@import "components/_driver_override-NJlutKi.css";
