import { StyleSheet } from 'react-native';

export const ticketsTheme = {
  colors: {
    primaryDark: '#0B1F4D',
    skyAccent: '#38BDF8',
    navyBg: '#071126',
    lightBg: '#F8FAFC',
    cardLight: '#FFFFFF',
    cardDark: '#0F172A',
    statusActiveBg: '#DBEAFE',
    statusActiveText: '#1E4ED8',
    statusCompletedBg: '#DCFCE7',
    statusCompletedText: '#166534',
    statusCancelledBg: '#FEE2E2',
    statusCancelledText: '#991B1B',
  },
};

export const ticketsStyles = StyleSheet.create({
  container: {
    flex: 1,
  },
  fixedHeaderSection: {
    paddingHorizontal: 16,
    paddingTop: 10,
    paddingBottom: 4,
    borderBottomWidth: 1,
  },
  fixedHeaderLight: {
    backgroundColor: '#FFFFFF',
    borderBottomColor: '#E2E8F0',
  },
  fixedHeaderDark: {
    backgroundColor: '#071126',
    borderBottomColor: '#1E293B',
  },
  screenTitleLight: {
    fontSize: 22,
    fontWeight: '900',
    color: '#0B1F4D',
    textAlign: 'center',
    marginBottom: 12,
  },
  screenTitleDark: {
    fontSize: 22,
    fontWeight: '900',
    color: '#F8FAFC',
    textAlign: 'center',
    marginBottom: 12,
  },
  filterTabsRow: {
    flexDirection: 'row',
    alignItems: 'center',
    justifyContent: 'space-around',
    borderBottomWidth: 2,
    borderBottomColor: '#E2E8F0',
  },
  filterTab: {
    paddingVertical: 10,
    paddingHorizontal: 12,
    borderBottomWidth: 3,
    borderBottomColor: 'transparent',
  },
  filterTabActive: {
    borderBottomColor: '#0B1F4D',
  },
  filterTabActiveDark: {
    borderBottomColor: '#38BDF8',
  },
  filterTabTextLight: {
    fontSize: 15,
    fontWeight: '700',
    color: '#64748B',
  },
  filterTabTextDark: {
    fontSize: 15,
    fontWeight: '700',
    color: '#94A3B8',
  },
  filterTabTextActiveLight: {
    color: '#0B1F4D',
    fontWeight: '900',
  },
  filterTabTextActiveDark: {
    color: '#38BDF8',
    fontWeight: '900',
  },
  scrollContent: {
    paddingHorizontal: 16,
    paddingTop: 14,
    paddingBottom: 40,
  },
  ticketCard: {
    borderRadius: 20,
    padding: 16,
    marginBottom: 16,
    borderWidth: 1.5,
    shadowColor: '#000',
    shadowOffset: { width: 0, height: 4 },
    shadowOpacity: 0.1,
    shadowRadius: 8,
    elevation: 4,
  },
  ticketCardLight: {
    backgroundColor: '#FFFFFF',
    borderColor: '#E2E8F0',
  },
  ticketCardDark: {
    backgroundColor: '#0F172A',
    borderColor: '#1E293B',
  },
  ticketCardTopRow: {
    flexDirection: 'row',
    alignItems: 'center',
    justifyContent: 'space-between',
    marginBottom: 12,
  },
  leftRouteHeader: {
    flexDirection: 'row',
    alignItems: 'center',
  },
  busIconCircle: {
    width: 38,
    height: 38,
    borderRadius: 19,
    backgroundColor: '#0B1F4D',
    justifyContent: 'center',
    alignItems: 'center',
    marginRight: 10,
  },
  routeTitleLight: {
    fontSize: 16,
    fontWeight: '900',
    color: '#0B1F4D',
  },
  routeTitleDark: {
    fontSize: 16,
    fontWeight: '900',
    color: '#F8FAFC',
  },
  agencySubtextLight: {
    fontSize: 12,
    fontWeight: '700',
    color: '#64748B',
  },
  agencySubtextDark: {
    fontSize: 12,
    fontWeight: '700',
    color: '#94A3B8',
  },
  statusBadge: {
    paddingHorizontal: 10,
    paddingVertical: 4,
    borderRadius: 12,
    borderWidth: 1,
  },
  statusText: {
    fontSize: 12,
    fontWeight: '800',
  },
  ticketBodyRow: {
    flexDirection: 'row',
    justifyContent: 'space-between',
    alignItems: 'center',
    marginBottom: 14,
  },
  metaItem: {
    flexDirection: 'row',
    alignItems: 'center',
    marginBottom: 6,
  },
  metaTextLight: {
    fontSize: 13,
    fontWeight: '700',
    color: '#0F172A',
    marginLeft: 6,
  },
  metaTextDark: {
    fontSize: 13,
    fontWeight: '700',
    color: '#F8FAFC',
    marginLeft: 6,
  },
  presentQrTextLight: {
    fontSize: 11,
    fontWeight: '600',
    color: '#64748B',
    marginTop: 4,
  },
  presentQrTextDark: {
    fontSize: 11,
    fontWeight: '600',
    color: '#94A3B8',
    marginTop: 4,
  },
  ticketIdTextLight: {
    fontSize: 13,
    fontWeight: '900',
    color: '#0B1F4D',
    marginTop: 2,
  },
  ticketIdTextDark: {
    fontSize: 13,
    fontWeight: '900',
    color: '#38BDF8',
    marginTop: 2,
  },
  qrBox: {
    width: 64,
    height: 64,
    backgroundColor: '#FFFFFF',
    borderRadius: 8,
    borderWidth: 1,
    borderColor: '#E2E8F0',
    justifyContent: 'center',
    alignItems: 'center',
  },
  actionButtonsRow: {
    flexDirection: 'row',
    justifyContent: 'space-between',
    alignItems: 'center',
    gap: 12,
  },
  btnShareLight: {
    flex: 1,
    flexDirection: 'row',
    alignItems: 'center',
    justifyContent: 'center',
    height: 38,
    borderRadius: 12,
    borderWidth: 1.5,
    borderColor: '#E2E8F0',
    backgroundColor: '#FFFFFF',
  },
  btnShareDark: {
    flex: 1,
    flexDirection: 'row',
    alignItems: 'center',
    justifyContent: 'center',
    height: 38,
    borderRadius: 12,
    borderWidth: 1.5,
    borderColor: '#38BDF8',
    backgroundColor: '#0F172A',
  },
  btnShareTextLight: {
    fontSize: 13,
    fontWeight: '900',
    color: '#0B1F4D',
    marginLeft: 6,
  },
  btnShareTextDark: {
    fontSize: 13,
    fontWeight: '900',
    color: '#38BDF8',
    marginLeft: 6,
  },
  btnDownload: {
    flex: 1,
    flexDirection: 'row',
    alignItems: 'center',
    justifyContent: 'center',
    height: 38,
    borderRadius: 12,
    backgroundColor: '#0B1F4D',
  },
  btnDownloadText: {
    fontSize: 13,
    fontWeight: '900',
    color: '#FFFFFF',
    marginLeft: 6,
  },

  // Detail View Styles (Matching Image 2)
  detailCard: {
    borderRadius: 24,
    padding: 20,
    marginHorizontal: 16,
    marginVertical: 14,
    borderWidth: 1.5,
    backgroundColor: '#FFFFFF',
    borderColor: '#E2E8F0',
    shadowColor: '#000',
    shadowOffset: { width: 0, height: 6 },
    shadowOpacity: 0.1,
    shadowRadius: 10,
    elevation: 6,
  },
  detailCardDark: {
    backgroundColor: '#0F172A',
    borderColor: '#1E293B',
  },
  detailHeaderRow: {
    flexDirection: 'row',
    justifyContent: 'space-between',
    alignItems: 'center',
    marginBottom: 6,
  },
  detailRouteTextLight: {
    fontSize: 20,
    fontWeight: '900',
    color: '#0B1F4D',
  },
  detailRouteTextDark: {
    fontSize: 20,
    fontWeight: '900',
    color: '#F8FAFC',
  },
  detailDateText: {
    fontSize: 12,
    fontWeight: '600',
    color: '#94A3B8',
    marginBottom: 12,
  },
  dashedDivider: {
    height: 1,
    borderWidth: 1,
    borderColor: '#E2E8F0',
    borderStyle: 'dashed',
    marginVertical: 12,
  },
  detailGridRow: {
    flexDirection: 'row',
    justifyContent: 'space-between',
    marginBottom: 12,
  },
  detailGridItem: {
    flex: 1,
  },
  detailLabel: {
    fontSize: 11,
    fontWeight: '700',
    color: '#94A3B8',
    marginBottom: 2,
  },
  detailValueLight: {
    fontSize: 15,
    fontWeight: '900',
    color: '#0B1F4D',
  },
  detailValueDark: {
    fontSize: 15,
    fontWeight: '900',
    color: '#F8FAFC',
  },
  detailTotalRow: {
    flexDirection: 'row',
    justifyContent: 'space-between',
    alignItems: 'center',
    marginVertical: 8,
  },
  detailTotalLabelLight: {
    fontSize: 16,
    fontWeight: '900',
    color: '#0B1F4D',
  },
  detailTotalLabelDark: {
    fontSize: 16,
    fontWeight: '900',
    color: '#F8FAFC',
  },
  detailTotalValue: {
    fontSize: 20,
    fontWeight: '900',
    color: '#E11D48',
  },
  largeQrContainer: {
    alignItems: 'center',
    justifyContent: 'center',
    marginVertical: 16,
    padding: 16,
    backgroundColor: '#FFFFFF',
    borderRadius: 16,
    borderWidth: 1,
    borderColor: '#E2E8F0',
  },
  qrNoteText: {
    fontSize: 12,
    fontWeight: '600',
    color: '#64748B',
    textAlign: 'center',
    marginTop: 8,
  },
  qrNoteHighlight: {
    color: '#E11D48',
    fontWeight: '700',
  },
});
