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

/* Import fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto",
    "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans",
    "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

code {
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
}

@layer base {
  :root {
    /* Backgrounds - Warm AI Theme */
    --bg-page: 34 100% 97%;
    --bg-card: 0 0% 100%;
    --bg-section: 34 60% 95%;
    --bg-overlay: 0 0% 100%;
    
    /* Text Colors */
    --text-primary: 0 0% 14%;
    --text-secondary: 0 0% 21%;
    --text-muted: 0 0% 45%;
    
    /* Borders */
    --border-primary: 0 0% 60%;
    --border-input: 0 0% 60%;
    --border-input-focus: 0 0% 30%;
    --border-light: 0 0% 90%;
    
    /* Accent Colors - Voice Interface */
    --accent-purple-400: 292 13% 55%;
    --accent-purple-200: 296 67% 95%;
    --accent-blue-400: 213 14% 52%;
    --accent-blue-200: 214 47% 93%;
    --accent-orange-400: 37 30% 63%;
    --accent-orange-200: 34 93% 93%;
    --accent-pink-200: 2 88% 88%;
    --accent-green-200: 124 24% 76%;
    --accent-grey-200: 0 8% 90%;
    
    /* Glass Effect */
    --glass-bg: 0 0% 100%;
    --glass-border: 0 0% 0%;

    /* Shadcn defaults */
    --background: 34 100% 97%;
    --foreground: 0 0% 14%;
    --card: 0 0% 100%;
    --card-foreground: 0 0% 14%;
    --popover: 0 0% 100%;
    --popover-foreground: 0 0% 14%;
    --primary: 0 0% 14%;
    --primary-foreground: 0 0% 98%;
    --secondary: 34 30% 93%;
    --secondary-foreground: 0 0% 14%;
    --muted: 34 20% 94%;
    --muted-foreground: 0 0% 45%;
    --accent: 34 30% 93%;
    --accent-foreground: 0 0% 14%;
    --destructive: 0 84% 60%;
    --destructive-foreground: 0 0% 98%;
    --border: 34 20% 88%;
    --input: 34 20% 88%;
    --ring: 0 0% 14%;
    --radius: 0.75rem;
    
    /* Chart colors */
    --chart-1: 12 76% 61%;
    --chart-2: 173 58% 39%;
    --chart-3: 197 37% 24%;
    --chart-4: 43 74% 66%;
    --chart-5: 27 87% 67%;
  }

  .dark {
    --background: 0 0% 6%;
    --foreground: 0 0% 95%;
    --card: 0 0% 8%;
    --card-foreground: 0 0% 95%;
    --popover: 0 0% 8%;
    --popover-foreground: 0 0% 95%;
    --primary: 0 0% 95%;
    --primary-foreground: 0 0% 9%;
    --secondary: 0 0% 15%;
    --secondary-foreground: 0 0% 95%;
    --muted: 0 0% 15%;
    --muted-foreground: 0 0% 64%;
    --accent: 0 0% 15%;
    --accent-foreground: 0 0% 95%;
    --destructive: 0 63% 31%;
    --destructive-foreground: 0 0% 95%;
    --border: 0 0% 15%;
    --input: 0 0% 15%;
    --ring: 0 0% 84%;
  }
}

@layer base {
  * {
    @apply border-border;
  }
  body {
    @apply bg-background text-foreground;
  }
}

/* Hero Gradient */
.gradient-hero-warm {
  background: linear-gradient(
    180deg,
    rgba(252, 202, 199, 1) 0%,
    rgba(253, 215, 197, 0.8) 25%,
    rgba(254, 241, 229, 0.6) 50%,
    rgba(255, 250, 243, 0.8) 75%,
    rgba(255, 249, 242, 1) 100%
  );
}

.gradient-hero-subtle {
  background: linear-gradient(
    180deg,
    rgba(252, 202, 199, 0.5) 0%,
    rgba(253, 215, 197, 0.3) 40%,
    rgba(255, 249, 242, 1) 100%
  );
}

/* Typography */
.heading-hero {
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: hsl(var(--text-primary));
}

.heading-1 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: hsl(var(--text-primary));
}

.heading-2 {
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
  line-height: 1.3;
  font-weight: 500;
  color: hsl(var(--text-primary));
}

.body-large {
  font-size: clamp(1rem, 2vw, 1.125rem);
  line-height: 1.7;
  font-weight: 400;
  color: hsl(var(--text-secondary));
}

.body-medium {
  font-size: 1rem;
  line-height: 1.6;
  font-weight: 400;
  color: hsl(var(--text-secondary));
}

/* Mono text */
.mono-text {
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
  font-size: 0.875rem;
  font-weight: 400;
  letter-spacing: 0.025em;
}

/* Custom Button Styles */
.btn-primary {
  @apply inline-flex items-center justify-center;
  background: hsl(var(--text-primary));
  color: white;
  border: none;
  border-radius: 2rem;
  padding: 0.875rem 1.75rem;
  font-family: 'SF Mono', monospace;
  font-size: 0.875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 2.75rem;
}

.btn-primary:hover {
  background: hsl(var(--text-secondary));
  transform: scale(1.02);
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-secondary {
  @apply inline-flex items-center justify-center;
  background: rgba(255, 255, 255, 0.4);
  color: hsl(var(--text-primary));
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 2rem;
  padding: 0.875rem 1.75rem;
  font-family: 'SF Mono', monospace;
  font-size: 0.875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 2.75rem;
  backdrop-filter: blur(4px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.6);
  border-color: rgba(0, 0, 0, 0.2);
  transform: scale(1.02);
}

/* Voice Card Accents */
.accent-purple { background: hsl(var(--accent-purple-200)); }
.accent-blue { background: hsl(var(--accent-blue-200)); }
.accent-orange { background: hsl(var(--accent-orange-200)); }
.accent-pink { background: hsl(var(--accent-pink-200)); }
.accent-green { background: hsl(var(--accent-green-200)); }
.accent-grey { background: hsl(var(--accent-grey-200)); }

/* Chat Message Styles */
.chat-message-user {
  background: hsl(var(--accent-blue-200));
  border-radius: 1.25rem 1.25rem 0.25rem 1.25rem;
}

.chat-message-assistant {
  background: white;
  border: 1px solid hsl(var(--border));
  border-radius: 1.25rem 1.25rem 1.25rem 0.25rem;
}

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

@keyframes pulse-gentle {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
}

.animate-fade-in-up {
  animation: fadeInUp 0.6s ease-out forwards;
}

.animate-pulse-gentle {
  animation: pulse-gentle 2s ease-in-out infinite;
}

/* Stagger animations */
.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }

/* Hover effects */
.hover-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: hsl(var(--border));
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: hsl(var(--text-muted));
}

/* Focus styles */
.focus-ring:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px hsl(var(--bg-page)), 0 0 0 4px hsl(var(--text-primary));
}

/* Mobile responsive fixes */
@media (max-width: 640px) {
  [role="dialog"] {
    max-height: 85vh !important;
    max-width: 95vw !important;
    margin: 1rem;
    overflow-y: auto !important;
  }
  
  [role="dialog"] > div {
    max-height: none;
  }
}

/* Ensure dialog is scrollable on iOS */
.overflow-y-auto {
  -webkit-overflow-scrolling: touch;
}
