/* Self-hosted fonts (GDPR-compliant) */
@import './styles/fonts.css';

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

@layer utilities {
  /* Hide scrollbar for Chrome, Safari and Opera */
  .scrollbar-hide::-webkit-scrollbar {
    display: none;
  }

  /* Hide scrollbar for IE, Edge and Firefox */
  .scrollbar-hide {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
  }
}

/* WooNooW Customer SPA - Global Theme */
@layer base {
  :root {
    --background: 0 0% 100%;
    --foreground: 222.2 84% 4.9%;
    --card: 0 0% 100%;
    --card-foreground: 222.2 84% 4.9%;
    --popover: 0 0% 100%;
    --popover-foreground: 222.2 84% 4.9%;
    --primary: 222.2 47.4% 11.2%;
    --primary-foreground: 210 40% 98%;
    --secondary: 210 40% 96.1%;
    --secondary-foreground: 222.2 47.4% 11.2%;
    --muted: 210 40% 96.1%;
    --muted-foreground: 215.4 16.3% 46.9%;
    --accent: 210 40% 96.1%;
    --accent-foreground: 222.2 47.4% 11.2%;
    --destructive: 0 84.2% 60.2%;
    --destructive-foreground: 210 40% 98%;
    --border: 214.3 31.8% 91.4%;
    --input: 214.3 31.8% 91.4%;
    --ring: 222.2 84% 4.9%;
    --radius: 0.5rem;
  }
  
  .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%;
  }
}

@layer base {
  * { @apply border-border; }
  body { @apply bg-background text-foreground; }
  h1, h2, h3, h4, h5, h6 { @apply text-foreground; }
  
  /* Override WordPress/WooCommerce link styles */
  a {
    color: inherit;
    text-decoration: none;
  }
  
  a:hover {
    color: inherit;
  }
  
  .no-underline {
    text-decoration: none !important;
  }
}

/* Radix UI Popper z-index fix */
[data-radix-popper-content-wrapper] { 
  z-index: 9999 !important; 
}

html.dark #woonoow-customer-app {
  color: hsl(var(--foreground));
  background: hsl(var(--background));
}

html.dark #woonoow-customer-app h1,
html.dark #woonoow-customer-app h2,
html.dark #woonoow-customer-app h3,
html.dark #woonoow-customer-app h4,
html.dark #woonoow-customer-app h5,
html.dark #woonoow-customer-app h6 {
  color: hsl(var(--foreground));
}

html.dark #woonoow-customer-app .bg-white,
html.dark #woonoow-customer-app .bg-gray-50,
html.dark #woonoow-customer-app .bg-gray-100 {
  background-color: hsl(var(--card));
}

html.dark #woonoow-customer-app .hover\:bg-gray-50:hover,
html.dark #woonoow-customer-app .hover\:bg-gray-100:hover {
  background-color: hsl(var(--accent));
}

html.dark #woonoow-customer-app .text-gray-900,
html.dark #woonoow-customer-app .text-gray-800,
html.dark #woonoow-customer-app .text-gray-700 {
  color: hsl(var(--foreground));
}

html.dark #woonoow-customer-app .text-gray-600,
html.dark #woonoow-customer-app .text-gray-500,
html.dark #woonoow-customer-app .text-gray-400 {
  color: hsl(var(--muted-foreground));
}

html.dark #woonoow-customer-app .border,
html.dark #woonoow-customer-app .border-t,
html.dark #woonoow-customer-app .border-b,
html.dark #woonoow-customer-app .border-l,
html.dark #woonoow-customer-app .border-r {
  border-color: hsl(var(--border));
}

html.dark #woonoow-customer-app input,
html.dark #woonoow-customer-app textarea,
html.dark #woonoow-customer-app select {
  color: hsl(var(--foreground));
  background-color: hsl(var(--background));
  border-color: hsl(var(--input));
}

html.dark #woonoow-customer-app input::placeholder,
html.dark #woonoow-customer-app textarea::placeholder {
  color: hsl(var(--muted-foreground));
}

html.dark #woonoow-customer-app .prose,
html.dark #woonoow-customer-app .prose :where(p, li, strong, em, blockquote, figcaption, td, th) {
  color: hsl(var(--foreground));
}

html.dark #woonoow-customer-app .prose :where(a) {
  color: hsl(var(--primary));
}

/* Mobile-first responsive utilities */
@layer utilities {
  .container-safe {
    @apply container mx-auto px-4 sm:px-6 lg:px-8;
  }
  
  .touch-target {
    @apply min-h-[44px] min-w-[44px];
  }
}

/* Marquee Banner animation */
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.animate-marquee {
  animation: marquee linear infinite;
  will-change: transform;
}
