/**
 * Tailwind CSS v4 Configuration
 *
 * This file provides the CSS-first configuration for Tailwind v4.
 * Import this file in your app.css instead of using tailwind.config.js
 *
 * Usage:
 * @import "tailwindcss";
 * @import "@manacore/shared-tailwind/v4";
 */

/* ===== Theme Configuration ===== */
@theme {
  /* Brand color */
  --color-mana: #4287f5;

  /* Semantic colors using CSS variables */
  --color-background: hsl(var(--color-background));
  --color-foreground: hsl(var(--color-foreground));

  --color-primary: hsl(var(--color-primary));
  --color-primary-foreground: hsl(var(--color-primary-foreground));

  --color-secondary: hsl(var(--color-secondary));
  --color-secondary-foreground: hsl(var(--color-secondary-foreground));

  --color-surface: hsl(var(--color-surface));
  --color-surface-hover: hsl(var(--color-surface-hover));
  --color-surface-elevated: hsl(var(--color-surface-elevated));

  --color-muted: hsl(var(--color-muted));
  --color-muted-foreground: hsl(var(--color-muted-foreground));

  --color-border: hsl(var(--color-border));
  --color-border-strong: hsl(var(--color-border-strong));

  --color-error: hsl(var(--color-error));
  --color-success: hsl(var(--color-success));
  --color-warning: hsl(var(--color-warning));

  --color-input: hsl(var(--color-input));
  --color-ring: hsl(var(--color-ring));

  /* Legacy aliases */
  --color-content: hsl(var(--color-surface));
  --color-content-hover: hsl(var(--color-surface-hover));
  --color-content-page: hsl(var(--color-background));

  --color-menu: hsl(var(--color-muted));
  --color-menu-hover: hsl(var(--color-surface-hover));

  --color-theme: hsl(var(--color-foreground));
  --color-theme-secondary: hsl(var(--color-muted-foreground));

  --color-primary-btn: hsl(var(--color-primary));
  --color-primary-btn-text: hsl(var(--color-primary-foreground));

  /* Border radius */
  --radius-none: 0;
  --radius-sm: var(--radius-sm, 0.25rem);
  --radius-DEFAULT: var(--radius, 0.375rem);
  --radius-md: var(--radius-md, 0.5rem);
  --radius-lg: var(--radius-lg, 0.75rem);
  --radius-xl: var(--radius-xl, 1rem);
  --radius-2xl: var(--radius-2xl, 1.5rem);
  --radius-3xl: var(--radius-3xl, 2rem);
  --radius-full: 9999px;

  /* Box shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-DEFAULT: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
  --shadow-inner: inset 0 2px 4px 0 rgb(0 0 0 / 0.05);
  --shadow-none: none;

  /* Font families */
  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', Menlo, Monaco, Consolas, monospace;

  /* Transition durations */
  --duration-250: 250ms;
  --duration-350: 350ms;
  --duration-400: 400ms;

  /* Animations */
  --animate-spin-slow: spin 3s linear infinite;
  --animate-pulse-slow: pulse 3s cubic-bezier(0.4, 0, 0.6, 1) infinite;
  --animate-bounce-slow: bounce 2s infinite;
  --animate-fade-in: fadeIn 0.2s ease-out;
  --animate-fade-out: fadeOut 0.2s ease-in;
  --animate-slide-in: slideIn 0.2s ease-out;
  --animate-slide-out: slideOut 0.2s ease-in;
}

/* ===== Keyframes ===== */
@keyframes fadeIn {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

@keyframes fadeOut {
  0% { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes slideIn {
  0% { transform: translateY(-10px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

@keyframes slideOut {
  0% { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(-10px); opacity: 0; }
}
