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

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

export const selectSeatTheme = {
  colors: {
    primaryDark: '#0B1F4D',
    skyAccent: '#38BDF8',
    navyBg: '#071126',
    lightBg: '#F8FAFC',
    cardLight: '#FFFFFF',
    cardDark: '#0F172A',
    seatAvailableBgLight: '#FFFFFF',
    seatAvailableBorderLight: '#64748B',
    seatSelectedBg: '#15803D',
    seatBookedBg: '#64748B',
  },
};

export const selectSeatStyles = StyleSheet.create({
  container: {
    flex: 1,
  },
  scrollContent: {
    paddingHorizontal: 16,
    paddingTop: 12,
    paddingBottom: 110,
  },
  headerRouteRow: {
    flexDirection: 'row',
    alignItems: 'center',
    marginBottom: 6,
  },
  headerRouteTitleLight: {
    fontSize: 20,
    fontWeight: '900',
    color: '#0B1F4D',
    marginLeft: 8,
  },
  headerRouteTitleDark: {
    fontSize: 20,
    fontWeight: '900',
    color: '#F8FAFC',
    marginLeft: 8,
  },
  headerRouteSub: {
    fontSize: 12,
    fontWeight: '600',
    color: '#64748B',
    marginLeft: 26,
    marginBottom: 10,
  },
  screenSectionTitleLight: {
    fontSize: 20,
    fontWeight: '900',
    color: '#0B1F4D',
    marginBottom: 12,
  },
  screenSectionTitleDark: {
    fontSize: 20,
    fontWeight: '900',
    color: '#F8FAFC',
    marginBottom: 12,
  },
  cabinContainer: {
    borderRadius: 20,
    overflow: 'hidden',
    borderWidth: 1.5,
    marginBottom: 16,
  },
  cabinContainerLight: {
    backgroundColor: '#FFFFFF',
    borderColor: '#E2E8F0',
    shadowColor: '#000',
    shadowOffset: { width: 0, height: 4 },
    shadowOpacity: 0.06,
    shadowRadius: 8,
    elevation: 3,
  },
  cabinContainerDark: {
    backgroundColor: '#0F172A',
    borderColor: '#1E293B',
  },
  driverBar: {
    backgroundColor: '#0B1F4D',
    paddingVertical: 10,
    flexDirection: 'row',
    alignItems: 'center',
    justifyContent: 'center',
  },
  driverBarText: {
    color: '#FFFFFF',
    fontWeight: '900',
    fontSize: 15,
    marginLeft: 6,
  },
  cabinImage: {
    width: '100%',
    height: 70,
  },
  seatGridArea: {
    paddingVertical: 14,
    paddingHorizontal: 12,
  },
  seatRow: {
    flexDirection: 'row',
    justifyContent: 'space-between',
    marginBottom: 10,
  },
  seatColumnGroup: {
    flexDirection: 'row',
  },
  seatBox: {
    width: 44,
    height: 42,
    borderRadius: 9,
    borderWidth: 1.5,
    justifyContent: 'center',
    alignItems: 'center',
    marginHorizontal: 3,
  },
  seatBoxAvailableLight: {
    backgroundColor: '#FFFFFF',
    borderColor: '#CBD5E1',
  },
  seatBoxAvailableDark: {
    backgroundColor: '#0F172A',
    borderColor: '#334155',
  },
  seatBoxSelected: {
    backgroundColor: '#15803D',
    borderColor: '#15803D',
  },
  seatBoxBookedLight: {
    backgroundColor: '#FEE2E2',
    borderColor: '#EF4444',
  },
  seatBoxBookedDark: {
    backgroundColor: 'rgba(239, 68, 68, 0.15)',
    borderColor: '#EF4444',
  },
  seatLabel: {
    fontSize: 11,
    fontWeight: '900',
  },
  seatLabelAvailableLight: {
    color: '#0B1F4D',
  },
  seatLabelAvailableDark: {
    color: '#F8FAFC',
  },
  seatLabelSelected: {
    color: '#FFFFFF',
  },
  seatLabelBookedLight: {
    color: '#DC2626',
  },
  seatLabelBookedDark: {
    color: '#F87171',
  },
  facilityBox: {
    height: 42,
    borderRadius: 8,
    borderWidth: 1.5,
    justifyContent: 'center',
    alignItems: 'center',
    marginHorizontal: 3,
  },
  facilityBoxDriver: {
    backgroundColor: '#334155',
    borderColor: '#475569',
  },
  facilityBoxDoor: {
    backgroundColor: 'rgba(16, 185, 129, 0.15)',
    borderColor: '#10B981',
  },
  facilityBoxToilet: {
    backgroundColor: 'rgba(168, 85, 247, 0.15)',
    borderColor: '#A855F7',
  },
  facilityText: {
    fontSize: 8,
    fontWeight: '800',
    marginTop: 1,
  },
  seatBoxVipBorder: {
    borderColor: '#F59E0B',
  },
  vipBadgeText: {
    fontSize: 8,
    fontWeight: '900',
    color: '#D97706',
    marginTop: 1,
  },
  aisleSpace: {
    width: 24,
    alignItems: 'center',
    justifyContent: 'center',
  },
  aisleText: {
    fontSize: 10,
    fontWeight: '800',
    color: '#64748B',
  },
  legendRow: {
    flexDirection: 'row',
    alignItems: 'center',
    justifyContent: 'space-around',
    paddingVertical: 10,
    borderTopWidth: 1,
    marginHorizontal: 10,
  },
  legendRowLight: {
    borderTopColor: '#E2E8F0',
  },
  legendRowDark: {
    borderTopColor: '#1E293B',
  },
  legendItem: {
    flexDirection: 'row',
    alignItems: 'center',
  },
  legendBox: {
    width: 16,
    height: 16,
    borderRadius: 4,
    borderWidth: 1.5,
    marginRight: 6,
  },
  legendTextLight: {
    fontSize: 12,
    fontWeight: '700',
    color: '#0B1F4D',
  },
  legendTextDark: {
    fontSize: 12,
    fontWeight: '700',
    color: '#F8FAFC',
  },

  // Floating Bottom Action Card
  floatingFooter: {
    position: 'absolute',
    bottom: 16,
    left: 16,
    right: 16,
    borderRadius: 20,
    paddingHorizontal: 18,
    paddingVertical: 14,
    flexDirection: 'row',
    alignItems: 'center',
    justifyContent: 'space-between',
    borderWidth: 1.5,
    shadowColor: '#000',
    shadowOffset: { width: 0, height: 6 },
    shadowOpacity: 0.15,
    shadowRadius: 10,
    elevation: 8,
  },
  floatingFooterLight: {
    backgroundColor: '#FFFFFF',
    borderColor: '#E2E8F0',
  },
  floatingFooterDark: {
    backgroundColor: '#0F172A',
    borderColor: '#1E293B',
  },
  seatSummaryTitleLight: {
    fontSize: 15,
    fontWeight: '900',
    color: '#0B1F4D',
  },
  seatSummaryTitleDark: {
    fontSize: 15,
    fontWeight: '900',
    color: '#F8FAFC',
  },
  totalPriceLabelLight: {
    fontSize: 10,
    fontWeight: '700',
    color: '#64748B',
    marginTop: 2,
  },
  totalPriceLabelDark: {
    fontSize: 10,
    fontWeight: '700',
    color: '#94A3B8',
    marginTop: 2,
  },
  totalPriceValueLight: {
    fontSize: 18,
    fontWeight: '900',
    color: '#0B1F4D',
  },
  totalPriceValueDark: {
    fontSize: 18,
    fontWeight: '900',
    color: '#38BDF8',
  },
  continueButton: {
    backgroundColor: '#0B1F4D',
    paddingHorizontal: 26,
    paddingVertical: 12,
    borderRadius: 24,
  },
  continueButtonText: {
    color: '#FFFFFF',
    fontWeight: '900',
    fontSize: 15,
  },
});
