import type { Config } from 'tailwindcss';

const config: Config = {
  darkMode: ['class'],
  content: [
    "./app/**/*.{js,ts,jsx,tsx,mdx}",
    "./components/**/*.{js,ts,jsx,tsx,mdx}",
    "./src/**/*.{js,ts,jsx,tsx,mdx}",
    "./app/(marketing)/**/*.{js,ts,jsx,tsx,mdx}",
    // Explicit deep-path locks for nested admin routes (hot-reload insurance)
    "./app/admin/**/*.{js,ts,jsx,tsx,mdx}",
    "./app/admin/components/**/*.{js,ts,jsx,tsx,mdx}",
    "./app/admin/seo/**/*.{js,ts,jsx,tsx,mdx}",
    // Context providers and hooks
    "./contexts/**/*.{js,ts,jsx,tsx,mdx}",
    // Utilities and helpers with inline class strings
    "./lib/**/*.{js,ts,jsx,tsx,mdx}",
  ],

  theme: {
    container: {
      center: true,
      padding: '2rem',
      screens: {
        '2xl': '1400px',
      },
    },
    extend: {
      colors: {
        border: 'hsl(var(--border))',
        input: 'hsl(var(--input))',
        ring: 'hsl(var(--ring))',
        background: 'hsl(var(--background))',
        foreground: 'hsl(var(--foreground))',
        primary: {
          DEFAULT: 'hsl(var(--primary))',
          foreground: 'hsl(var(--primary-foreground))',
        },
        secondary: {
          DEFAULT: 'hsl(var(--secondary))',
          foreground: 'hsl(var(--secondary-foreground))',
        },
        destructive: {
          DEFAULT: 'hsl(var(--destructive))',
          foreground: 'hsl(var(--destructive-foreground))',
        },
        muted: {
          DEFAULT: 'hsl(var(--muted))',
          foreground: 'hsl(var(--muted-foreground))',
        },
        accent: {
          DEFAULT: 'hsl(var(--accent))',
          foreground: 'hsl(var(--accent-foreground))',
        },
        popover: {
          DEFAULT: 'hsl(var(--popover))',
          foreground: 'hsl(var(--popover-foreground))',
        },
        card: {
          DEFAULT: 'hsl(var(--card))',
          foreground: 'hsl(var(--card-foreground))',
        },
        // Dubai Gold accent (original)
        gold: {
          50: '#fdf9e7',
          100: '#f9f0c4',
          200: '#f3e29a',
          300: '#ecd06d',
          400: '#e5c04a',
          500: '#d4af37',
          600: '#b8941f',
          700: '#8f7318',
          800: '#755916',
          900: '#624a16',
        },
        // Wild Dubai premium palette
        sandy: {
          DEFAULT: '#C5A880',
          light: '#fedeb2',
          dark: '#725b38',
        },
        navy: {
          DEFAULT: '#0d1c32',
          light: '#1a3050',
          muted: '#334d6e',
        },
        cream: {
          DEFAULT: '#f7f9fb',
          warm: '#fdf6ee',
        },
        // Status colors
        status: {
          offplan: '#3b82f6',
          ready: '#10B981',
          construction: '#f59e0b',
          featured: '#C5A880',
        },
        // ── Wild Dubai Logo Brand System ──────────────────────
        brand: {
          green:       '#098E4B',   // Logo emerald — primary CTA
          greenLight:  '#E8F5EE',   // Green tinted hover surface
          red:         '#C41B27',   // Logo crimson — alerts, status
          redLight:    '#FDECEA',   // Red tinted surface
          dark:        '#111111',   // Near-black heading/body text
          bg:          '#FBFBFA',   // Warm off-white page backdrop
          surface:     '#FFFFFF',   // Card / panel background
          border:      '#E8E8E6',   // Subtle dividers
          muted:       '#666666',   // Secondary text
          // Legacy CSS-var aliases kept for backwards compat
          emerald: 'var(--brand-emerald)',
          crimson: 'var(--brand-crimson)',
        },
      },
      borderRadius: {
        lg: 'var(--radius)',
        md: 'calc(var(--radius) - 2px)',
        sm: 'calc(var(--radius) - 4px)',
      },
      fontFamily: {
        sans: ['var(--font-inter)', 'Inter', 'system-ui', '-apple-system', 'sans-serif'],
        serif: ['var(--font-playfair)', 'Playfair Display', 'Georgia', 'serif'],
        arabic: ['Noto Sans Arabic', 'Inter', 'sans-serif'],
      },
      keyframes: {
        'accordion-down': {
          from: { height: '0' },
          to: { height: 'var(--radix-accordion-content-height)' },
        },
        'accordion-up': {
          from: { height: 'var(--radix-accordion-content-height)' },
          to: { height: '0' },
        },
        marquee: {
          '0%': { transform: 'translateX(0%)' },
          '100%': { transform: 'translateX(-50%)' },
        },
      },
      animation: {
        'accordion-down': 'accordion-down 0.2s ease-out',
        'accordion-up': 'accordion-up 0.2s ease-out',
        marquee: 'marquee 30s linear infinite',
      },
    },
  },
  plugins: [require('tailwindcss-animate')],
};

export default config;
