import { Platform } from 'react-native';

export const colors = {
  background: '#eef3ef',
  backgroundAlt: '#e5ebe7',
  surface: '#ffffff',
  surfaceMuted: '#f7faf8',
  surfaceDark: '#14211d',
  surfaceDarkMuted: '#20312b',
  text: '#17211d',
  textSoft: '#35443e',
  textMuted: '#64736d',
  textSubtle: '#87948f',
  textInverse: '#f8fbf8',
  border: '#dce5df',
  borderStrong: '#c8d5ce',
  borderDark: 'rgba(255,255,255,0.12)',
  primary: '#0f766e',
  primaryDark: '#0b4f49',
  primarySoft: '#d9f1ed',
  accent: '#c87918',
  accentSoft: '#fff1d1',
  success: '#16a34a',
  successSoft: '#dcfce7',
  danger: '#dc2626',
  dangerSoft: '#fee2e2',
  warning: '#d97706',
  warningSoft: '#fef3c7',
  star: '#f2a51a',
  overlay: 'rgba(12,20,17,0.56)',
  placeholder: '#8a9791',
};

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

export const spacing = {
  screen: 20,
};

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

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

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