import { StyleSheet } from 'react-native';
import { Colors, palette } from '@/constants/colors';

export const agencyStyles = StyleSheet.create({
  container: {
    flex: 1,
  },
  fixedHeader: {
    paddingHorizontal: 16,
    paddingTop: 10,
    paddingBottom: 12,
    borderBottomWidth: 1,
  },
  fixedHeaderLight: {
    backgroundColor: Colors.light.header,
    borderBottomColor: Colors.light.headerBorder,
  },
  fixedHeaderDark: {
    backgroundColor: Colors.dark.header,
    borderBottomColor: Colors.dark.headerBorder,
  },
  headerTopRow: {
    flexDirection: 'row',
    alignItems: 'center',
    justifyContent: 'space-between',
    marginBottom: 10,
  },
  titleLight: {
    fontSize: 22,
    fontWeight: '900',
    color: Colors.light.textHeading,
  },
  titleDark: {
    fontSize: 22,
    fontWeight: '900',
    color: Colors.dark.textHeading,
  },
  subtitleLight: {
    fontSize: 12,
    fontWeight: '600',
    color: Colors.light.textMuted,
    marginTop: 2,
  },
  subtitleDark: {
    fontSize: 12,
    fontWeight: '600',
    color: Colors.dark.textMuted,
    marginTop: 2,
  },
  searchBox: {
    flexDirection: 'row',
    alignItems: 'center',
    borderRadius: 12,
    borderWidth: 1.5,
    paddingHorizontal: 12,
    height: 42,
  },
  searchBoxLight: {
    backgroundColor: Colors.light.inputBackground,
    borderColor: Colors.light.inputBorder,
  },
  searchBoxDark: {
    backgroundColor: Colors.dark.inputBackground,
    borderColor: Colors.dark.inputBorder,
  },
  searchInput: {
    flex: 1,
    marginLeft: 8,
    fontSize: 13,
    fontWeight: '600',
  },
  searchInputLight: {
    color: Colors.light.textHeading,
  },
  searchInputDark: {
    color: Colors.dark.textHeading,
  },
  scrollContent: {
    paddingHorizontal: 16,
    paddingTop: 16,
    paddingBottom: 40,
  },
  agencyCard: {
    borderRadius: 20,
    padding: 16,
    marginBottom: 16,
    borderWidth: 1.5,
    shadowColor: Colors.light.navy,
    shadowOffset: { width: 0, height: 4 },
    shadowOpacity: 0.08,
    shadowRadius: 8,
    elevation: 3,
  },
  agencyCardLight: {
    backgroundColor: Colors.light.card,
    borderColor: Colors.light.cardBorder,
  },
  agencyCardDark: {
    backgroundColor: Colors.dark.card,
    borderColor: Colors.dark.cardBorder,
  },
  agencyCardHeader: {
    flexDirection: 'row',
    alignItems: 'center',
    marginBottom: 12,
  },
  agencyLogo: {
    width: 52,
    height: 52,
    borderRadius: 14,
    borderWidth: 1.5,
    borderColor: Colors.light.primaryAccent,
    marginRight: 12,
  },
  agencyNameLight: {
    fontSize: 18,
    fontWeight: '900',
    color: Colors.light.textHeading,
  },
  agencyNameDark: {
    fontSize: 18,
    fontWeight: '900',
    color: Colors.dark.textHeading,
  },
  starsRow: {
    flexDirection: 'row',
    alignItems: 'center',
    marginTop: 3,
  },
  ratingText: {
    fontSize: 12,
    fontWeight: '800',
    color: Colors.light.rating,
    marginLeft: 4,
  },
  badgePill: {
    backgroundColor: Colors.light.badge,
    paddingHorizontal: 10,
    paddingVertical: 3,
    borderRadius: 12,
  },
  badgePillText: {
    fontSize: 11,
    fontWeight: '800',
    color: Colors.light.badgeText,
  },
  routesRow: {
    flexDirection: 'row',
    flexWrap: 'wrap',
    gap: 6,
    marginTop: 10,
  },
  routeTag: {
    paddingHorizontal: 10,
    paddingVertical: 4,
    borderRadius: 12,
    borderWidth: 1,
  },
  routeTagLight: {
    backgroundColor: Colors.light.surface,
    borderColor: Colors.light.border,
  },
  routeTagDark: {
    backgroundColor: Colors.dark.surface,
    borderColor: Colors.dark.border,
  },
  routeTagTextLight: {
    fontSize: 11,
    fontWeight: '700',
    color: Colors.light.textSub,
  },
  routeTagTextDark: {
    fontSize: 11,
    fontWeight: '700',
    color: Colors.dark.textMuted,
  },

  // Detail View Styles
  heroImage: {
    width: '100%',
    height: 180,
  },
  detailCard: {
    marginTop: -30,
    marginHorizontal: 16,
    borderRadius: 22,
    padding: 18,
    borderWidth: 1.5,
    shadowColor: Colors.light.navy,
    shadowOffset: { width: 0, height: 6 },
    shadowOpacity: 0.1,
    shadowRadius: 10,
    elevation: 4,
    marginBottom: 16,
  },
  detailCardLight: {
    backgroundColor: Colors.light.card,
    borderColor: Colors.light.cardBorder,
  },
  detailCardDark: {
    backgroundColor: Colors.dark.card,
    borderColor: Colors.dark.cardBorder,
  },
  tabBtn: {
    flex: 1,
    paddingVertical: 10,
    alignItems: 'center',
    borderBottomWidth: 3,
  },
  tripCard: {
    borderRadius: 18,
    padding: 16,
    marginBottom: 14,
    borderWidth: 1.5,
  },
  tripCardLight: {
    backgroundColor: Colors.light.card,
    borderColor: Colors.light.cardBorder,
  },
  tripCardDark: {
    backgroundColor: Colors.dark.card,
    borderColor: Colors.dark.cardBorder,
  },
});
