import { Platform } from 'react-native';

/** Paleta alinhada com web/src/index.css e tailwind (indigo → amber) */
export const colors = {
  background: '#f8fafc',
  backgroundAlt: '#f1f5f9',
  surface: '#ffffff',
  surfaceMuted: '#f1f5f9',
  surfaceDark: '#0f172a',
  surfaceDarkMuted: '#1e293b',
  slate950: '#020617',
  text: '#0f172a',
  textSoft: '#334155',
  textMuted: '#64748b',
  textSubtle: '#94a3b8',
  textInverse: '#ffffff',
  border: '#e2e8f0',
  borderStrong: '#cbd5e1',
  borderDark: 'rgba(255,255,255,0.12)',
  primary: '#f59e0b',
  primaryDark: '#b45309',
  primaryLight: '#fcd34d',
  primarySoft: '#fef3c7',
  brandAccent: '#fbbf24',
  accent: '#f59e0b',
  accentSoft: '#fef3c7',
  success: '#16a34a',
  successSoft: '#dcfce7',
  danger: '#e11d48',
  dangerSoft: '#fff1f2',
  warning: '#d97706',
  warningSoft: '#fef3c7',
  star: '#f59e0b',
  overlay: 'rgba(15,23,42,0.56)',
  placeholder: '#94a3b8',
};

export const radius = {
  xs: 6,
  sm: 8,
  md: 12,
  lg: 16,
  xl: 24,
  xxl: 32,
  pill: 999,
};

export const spacing = {
  screen: 20,
};

const cardShadow = Platform.select({
  ios: {
    shadowColor: '#0f172a',
    shadowOffset: { width: 0, height: 8 },
    shadowOpacity: 0.08,
    shadowRadius: 18,
  },
  android: {
    elevation: 3,
  },
  default: {
    shadowColor: '#0f172a',
    shadowOffset: { width: 0, height: 8 },
    shadowOpacity: 0.08,
    shadowRadius: 18,
    elevation: 3,
  },
}) ?? {};

const softShadow = Platform.select({
  ios: {
    shadowColor: '#0f172a',
    shadowOffset: { width: 0, height: 4 },
    shadowOpacity: 0.06,
    shadowRadius: 12,
  },
  android: {
    elevation: 2,
  },
  default: {
    shadowColor: '#0f172a',
    shadowOffset: { width: 0, height: 4 },
    shadowOpacity: 0.06,
    shadowRadius: 12,
    elevation: 2,
  },
}) ?? {};

export const shadows = {
  card: cardShadow,
  soft: softShadow,
};
