import { StyleSheet, Dimensions, Platform } from 'react-native';

const { width: SCREEN_WIDTH } = Dimensions.get('window');

export const onboardingTheme = {
  colors: {
    navyDark: '#050E24',
    navyPrimary: '#0B1F4D',
    navyCardDark: '#0F2862',
    skyAccent: '#38BDF8',
    skyDeep: '#0EA5E9',
    white: '#FFFFFF',
    lightBg: '#F0F6FF',
    lightCard: '#FFFFFF',
    lightBorder: '#E2ECFC',
    darkBorder: '#1E408A',
    textMutedDark: '#94A3B8',
    textMutedLight: '#475569',
  },
  dimensions: {
    screenWidth: SCREEN_WIDTH,
    heroImageHeight: 160,
  },
};

export const onboardingStyles = StyleSheet.create({
  root: {
    flex: 1,
  },
  headerBar: {
    flexDirection: 'row',
    justifyContent: 'space-between',
    alignItems: 'center',
    paddingHorizontal: 20,
    paddingVertical: 10,
    zIndex: 10,
  },
  brandRow: {
    flexDirection: 'row',
    alignItems: 'center',
    gap: 10,
  },
  brandIconBox: {
    padding: 9,
    borderRadius: 14,
    borderWidth: 1.5,
    backgroundColor: 'rgba(56, 189, 248, 0.15)',
    borderColor: 'rgba(56, 189, 248, 0.4)',
  },
  brandTitleDark: {
    color: '#FFFFFF',
    fontWeight: '900',
    fontSize: 21,
    letterSpacing: -0.5,
  },
  brandTitleLight: {
    color: '#0B1F4D',
    fontWeight: '900',
    fontSize: 21,
    letterSpacing: -0.5,
  },
  brandAccentText: {
    color: '#38BDF8',
  },
  brandSubtitle: {
    color: '#38BDF8',
    fontSize: 9,
    fontWeight: '900',
    letterSpacing: 1.5,
    textTransform: 'uppercase',
  },
  controlsRow: {
    flexDirection: 'row',
    alignItems: 'center',
    gap: 8,
  },
  pillDark: {
    backgroundColor: '#0B1F4D',
    borderColor: 'rgba(56, 189, 248, 0.4)',
    borderWidth: 1,
    paddingHorizontal: 11,
    paddingVertical: 6,
    borderRadius: 20,
    flexDirection: 'row',
    alignItems: 'center',
    gap: 5,
  },
  pillLight: {
    backgroundColor: '#FFFFFF',
    borderColor: '#CBD5E1',
    borderWidth: 1,
    paddingHorizontal: 11,
    paddingVertical: 6,
    borderRadius: 20,
    flexDirection: 'row',
    alignItems: 'center',
    gap: 5,
    ...Platform.select({
      ios: {
        shadowColor: '#0B1F4D',
        shadowOffset: { width: 0, height: 2 },
        shadowOpacity: 0.05,
        shadowRadius: 4,
      },
      android: {
        elevation: 2,
      },
    }),
  },
  pillTextDark: {
    color: '#FFFFFF',
    fontSize: 11,
    fontWeight: '900',
  },
  pillTextLight: {
    color: '#0B1F4D',
    fontSize: 11,
    fontWeight: '900',
  },
  skipButton: {
    paddingHorizontal: 8,
    paddingVertical: 4,
  },
  skipTextDark: {
    color: '#94A3B8',
    fontSize: 12,
    fontWeight: '700',
  },
  skipTextLight: {
    color: '#64748B',
    fontSize: 12,
    fontWeight: '700',
  },
  slideWrapper: {
    width: SCREEN_WIDTH,
    paddingHorizontal: 20,
    paddingTop: 4,
    flex: 1,
    justifyContent: 'space-between',
    paddingBottom: 8,
  },
  slideContent: {
    flex: 1,
    justifyContent: 'space-between',
  },
  heroBox: {
    width: '100%',
    height: 160,
    borderRadius: 26,
    overflow: 'hidden',
    borderWidth: 1.5,
    borderColor: 'rgba(56, 189, 248, 0.4)',
    marginBottom: 12,
    position: 'relative',
    ...Platform.select({
      ios: {
        shadowColor: '#38BDF8',
        shadowOffset: { width: 0, height: 6 },
        shadowOpacity: 0.25,
        shadowRadius: 12,
      },
      android: {
        elevation: 6,
      },
    }),
  },
  heroImage: {
    width: '100%',
    height: '100%',
  },
  tagBadge: {
    position: 'absolute',
    top: 12,
    left: 12,
    backgroundColor: 'rgba(11, 31, 77, 0.92)',
    borderColor: '#38BDF8',
    borderWidth: 1.5,
    paddingHorizontal: 12,
    paddingVertical: 5,
    borderRadius: 20,
    flexDirection: 'row',
    alignItems: 'center',
    gap: 5,
  },
  tagText: {
    color: '#FFFFFF',
    fontSize: 10,
    fontWeight: '900',
    letterSpacing: 1.2,
    textTransform: 'uppercase',
  },
  cardDark: {
    backgroundColor: '#0B1F4D',
    borderColor: 'rgba(56, 189, 248, 0.35)',
    borderWidth: 1.5,
    borderRadius: 28,
    padding: 22,
    flex: 1,
    justifyContent: 'space-between',
    ...Platform.select({
      ios: {
        shadowColor: '#38BDF8',
        shadowOffset: { width: 0, height: 8 },
        shadowOpacity: 0.25,
        shadowRadius: 16,
      },
      android: {
        elevation: 8,
      },
    }),
  },
  cardLight: {
    backgroundColor: '#FFFFFF',
    borderColor: '#E2ECFC',
    borderWidth: 1.5,
    borderRadius: 28,
    padding: 22,
    flex: 1,
    justifyContent: 'space-between',
    ...Platform.select({
      ios: {
        shadowColor: '#0B1F4D',
        shadowOffset: { width: 0, height: 8 },
        shadowOpacity: 0.08,
        shadowRadius: 16,
      },
      android: {
        elevation: 4,
      },
    }),
  },
  badgeRow: {
    flexDirection: 'row',
    alignItems: 'center',
    marginBottom: 8,
    gap: 8,
  },
  iconBox: {
    padding: 7,
    borderRadius: 12,
    backgroundColor: 'rgba(56, 189, 248, 0.18)',
    borderWidth: 1,
    borderColor: 'rgba(56, 189, 248, 0.3)',
  },
  badgeText: {
    color: '#38BDF8',
    fontSize: 11,
    fontWeight: '900',
    letterSpacing: 1.2,
    textTransform: 'uppercase',
  },
  titleDark: {
    color: '#FFFFFF',
    fontSize: 22,
    fontWeight: '900',
    marginBottom: 6,
    lineHeight: 28,
    letterSpacing: -0.3,
  },
  titleLight: {
    color: '#0B1F4D',
    fontSize: 22,
    fontWeight: '900',
    marginBottom: 6,
    lineHeight: 28,
    letterSpacing: -0.3,
  },
  descriptionDark: {
    color: '#94A3B8',
    fontSize: 13,
    fontWeight: '500',
    lineHeight: 19,
    marginBottom: 12,
  },
  descriptionLight: {
    color: '#475569',
    fontSize: 13,
    fontWeight: '500',
    lineHeight: 19,
    marginBottom: 12,
  },
  highlightsBoxDark: {
    backgroundColor: 'rgba(56, 189, 248, 0.06)',
    padding: 12,
    borderRadius: 18,
    borderWidth: 1,
    borderColor: 'rgba(56, 189, 248, 0.2)',
    gap: 8,
  },
  highlightsBoxLight: {
    backgroundColor: '#F8FAFC',
    padding: 12,
    borderRadius: 18,
    borderWidth: 1,
    borderColor: '#E2ECFC',
    gap: 8,
  },
  highlightRow: {
    flexDirection: 'row',
    alignItems: 'center',
    gap: 8,
  },
  highlightTextDark: {
    color: '#F1F5F9',
    fontSize: 12,
    fontWeight: '700',
  },
  highlightTextLight: {
    color: '#1E293B',
    fontSize: 12,
    fontWeight: '700',
  },
  welcomeBanner: {
    backgroundColor: 'rgba(56, 189, 248, 0.15)',
    borderColor: 'rgba(56, 189, 248, 0.35)',
    borderWidth: 1.5,
    padding: 12,
    borderRadius: 18,
    flexDirection: 'row',
    alignItems: 'center',
    marginBottom: 12,
    gap: 12,
  },
  welcomeTextGroup: {
    flex: 1,
  },
  welcomeHeading: {
    color: '#38BDF8',
    fontWeight: '900',
    fontSize: 13,
    textTransform: 'uppercase',
    letterSpacing: 0.8,
  },
  welcomeSubTextDark: {
    color: '#CBD5E1',
    fontSize: 11,
    fontWeight: '600',
  },
  welcomeSubTextLight: {
    color: '#475569',
    fontSize: 11,
    fontWeight: '600',
  },
  gatewayList: {
    gap: 12,
  },
  gatewayPrimary: {
    backgroundColor: '#38BDF8',
    borderColor: 'rgba(56, 189, 248, 0.5)',
    borderWidth: 1.5,
    borderRadius: 20,
    paddingHorizontal: 18,
    paddingVertical: 14,
    flexDirection: 'row',
    alignItems: 'center',
    justifyContent: 'space-between',
    ...Platform.select({
      ios: {
        shadowColor: '#38BDF8',
        shadowOffset: { width: 0, height: 6 },
        shadowOpacity: 0.4,
        shadowRadius: 10,
      },
      android: {
        elevation: 6,
      },
    }),
  },
  gatewayDark: {
    backgroundColor: '#0B1F4D',
    borderColor: 'rgba(56, 189, 248, 0.4)',
    borderWidth: 1.5,
    borderRadius: 20,
    paddingHorizontal: 18,
    paddingVertical: 14,
    flexDirection: 'row',
    alignItems: 'center',
    justifyContent: 'space-between',
  },
  gatewayLight: {
    backgroundColor: '#FFFFFF',
    borderColor: '#CBD5E1',
    borderWidth: 1.5,
    borderRadius: 20,
    paddingHorizontal: 18,
    paddingVertical: 14,
    flexDirection: 'row',
    alignItems: 'center',
    justifyContent: 'space-between',
  },
  gatewayDarkOutlined: {
    backgroundColor: '#050E24',
    borderColor: '#38BDF8',
    borderWidth: 1.5,
    borderRadius: 20,
    paddingHorizontal: 18,
    paddingVertical: 14,
    flexDirection: 'row',
    alignItems: 'center',
    justifyContent: 'space-between',
  },
  gatewayRowLeft: {
    flexDirection: 'row',
    alignItems: 'center',
    gap: 12,
  },
  gatewayIconBoxDark: {
    backgroundColor: 'rgba(56, 189, 248, 0.2)',
    padding: 9,
    borderRadius: 14,
  },
  gatewayIconBoxLight: {
    backgroundColor: 'rgba(11, 31, 77, 0.15)',
    padding: 9,
    borderRadius: 14,
  },
  gatewayTextMainDark: {
    color: '#FFFFFF',
    fontWeight: '900',
    fontSize: 14,
  },
  gatewayTextMainLight: {
    color: '#0B1F4D',
    fontWeight: '900',
    fontSize: 14,
  },
  gatewayTextMainPrimary: {
    color: '#0B1F4D',
    fontWeight: '900',
    fontSize: 15,
  },
  gatewayTextSubPrimary: {
    color: 'rgba(11, 31, 77, 0.85)',
    fontSize: 11,
    fontWeight: '700',
  },
  gatewayTextSubDark: {
    color: '#CBD5E1',
    fontSize: 11,
    fontWeight: '600',
  },
  gatewayTextSubLight: {
    color: '#64748B',
    fontSize: 11,
    fontWeight: '600',
  },
  bottomBar: {
    paddingHorizontal: 20,
    paddingVertical: 12,
    flexDirection: 'row',
    alignItems: 'center',
    justifyContent: 'space-between',
    borderTopWidth: 1,
    borderTopColor: 'rgba(203, 213, 225, 0.3)',
  },
  btnPrimary: {
    backgroundColor: '#38BDF8',
    paddingHorizontal: 22,
    paddingVertical: 12,
    borderRadius: 16,
    flexDirection: 'row',
    alignItems: 'center',
    gap: 6,
    ...Platform.select({
      ios: {
        shadowColor: '#38BDF8',
        shadowOffset: { width: 0, height: 4 },
        shadowOpacity: 0.35,
        shadowRadius: 8,
      },
      android: {
        elevation: 4,
      },
    }),
  },
  btnPrimaryText: {
    color: '#0B1F4D',
    fontWeight: '900',
    fontSize: 13,
  },
  btnSecondaryDark: {
    backgroundColor: '#0B1F4D',
    borderColor: 'rgba(56, 189, 248, 0.4)',
    borderWidth: 1.5,
    paddingHorizontal: 18,
    paddingVertical: 10,
    borderRadius: 16,
    flexDirection: 'row',
    alignItems: 'center',
    gap: 6,
  },
  btnSecondaryLight: {
    backgroundColor: '#FFFFFF',
    borderColor: '#E2E8F0',
    borderWidth: 1.5,
    paddingHorizontal: 18,
    paddingVertical: 10,
    borderRadius: 16,
    flexDirection: 'row',
    alignItems: 'center',
    gap: 6,
  },
  btnSecondaryTextDark: {
    color: '#FFFFFF',
    fontWeight: '700',
    fontSize: 13,
  },
  btnSecondaryTextLight: {
    color: '#0B1F4D',
    fontWeight: '800',
    fontSize: 13,
  },
  dotsRow: {
    flexDirection: 'row',
    alignItems: 'center',
    gap: 6,
  },
  dotActive: {
    width: 28,
    height: 8,
    borderRadius: 4,
    backgroundColor: '#38BDF8',
  },
  dotInactiveDark: {
    width: 8,
    height: 8,
    borderRadius: 4,
    backgroundColor: '#1E408A',
  },
  dotInactiveLight: {
    width: 8,
    height: 8,
    borderRadius: 4,
    backgroundColor: '#CBD5E1',
  },
  emptyPlaceholder: {
    width: 64,
  },
});
