import { Dimensions, StyleSheet } from 'react-native';
import { Colors } from 'src/theme';
import { getFontSize } from 'src/utils';

const screenWidth = Dimensions.get('window').width;
const IMAGE_HEIGHT = screenWidth * 0.75;

export const styles = StyleSheet.create({
  container: {
    flex: 1,
    justifyContent: 'center',
    alignItems: 'center'
  },
  viewShot: {
    backgroundColor: 'transparent',
    height: IMAGE_HEIGHT,
    width: screenWidth,
    alignItems: 'center'
  },
  imageContainer: {
    width: screenWidth,
    alignItems: 'center',
    backgroundColor: Colors.WHITE,
    borderWidth: 2,
    borderColor: Colors.FILL_LIGHT,
    borderRadius: 16,
    height: IMAGE_HEIGHT
  },
  imageWrapper: {
    height: IMAGE_HEIGHT * 0.44,
    width: screenWidth - 4,
    overflow: 'hidden',
    backgroundColor: '#EBF2F5',
    borderTopLeftRadius: 14,
    borderTopRightRadius: 14,
    alignItems: 'flex-start'
  },
  usersMap: {
    width: '100%',
    height: '120%'
  },
  pageWrapper: {
    flexDirection: 'row',
    gap: 12,
    marginTop: -34
  },
  avatarWrapper: {
    gap: 8
  },
  avatar: {
    borderRadius: 64 / 2,
    width: 64,
    height: 64,
    borderWidth: 2,
    borderColor: Colors.WHITE
  },
  userInfoSection: {
    gap: 5,
    flex: 1
  },
  userNameSpacer: {
    height: 34
  },
  nameRow: {
    flexDirection: 'row',
    justifyContent: 'space-between',
    alignItems: 'center'
  },
  headerText: {
    flex: 1,
    fontFamily: 'redhat-700',
    color: Colors.DARK_BLUE,
    fontSize: screenWidth > 330 ? getFontSize(18) : getFontSize(16)
  },
  userInfo: {
    flexDirection: 'row',
    gap: 10,
    alignItems: 'center',
    justifyContent: 'space-between'
  },
  flagsContainer: {
    flexDirection: 'row'
  },
  countryFlag: {
    width: 20,
    height: 20,
    borderRadius: 10,
    borderWidth: 0.5,
    borderColor: Colors.BORDER_LIGHT
  },
  additionalFlag: {
    marginLeft: -7,
    width: 20,
    height: 20,
    borderRadius: 10,
    borderWidth: 0.5,
    borderColor: Colors.BORDER_LIGHT
  },
  scoreContainer: {
    flexDirection: 'row',
    alignItems: 'center',
    marginTop: 12,
    justifyContent: 'space-around',
    width: '100%'
  },
  rankingItem: {
    width: '31%',
    flexDirection: 'column',
    alignItems: 'center',
    justifyContent: 'center',
    backgroundColor: Colors.FILL_LIGHT,
    borderRadius: 10,
    padding: 4,
    gap: 4,
    height: IMAGE_HEIGHT / 5.5
  },
  rankingItemRow: {
    flexDirection: 'row',
    gap: 4,
    alignItems: 'center'
  },
  rankingScore: {
    fontFamily: 'montserrat-700',
    color: Colors.DARK_BLUE,
    fontSize: getFontSize(16)
  },
  flagImage: {
    borderRadius: 0,
    height: 15,
    width: 20,
    borderWidth: 0.5,
    borderColor: Colors.BORDER_LIGHT
  },
  titleText: {
    color: Colors.DARK_BLUE,
    fontWeight: '600',
    fontSize: getFontSize(16)
  },
  nomadManiaContainer: {
    flex: 1,
    justifyContent: 'center',
    alignItems: 'center'
  },
  nomadManiaText: {
    color: Colors.ORANGE,
    fontWeight: '700',
    fontSize: 16,
    textAlign: 'center'
  },
  shareButton: {
    paddingVertical: 12,
    borderRadius: 4,
    alignItems: 'center',
    justifyContent: 'center',
    paddingHorizontal: 16,
    gap: 4,
    borderWidth: 1,
    backgroundColor: Colors.ORANGE,
    borderColor: Colors.ORANGE,
    marginVertical: 8
  },
  shareButtonText: {
    fontSize: getFontSize(14),
    fontWeight: 'bold',
    fontFamily: 'redhat-700',
    color: Colors.WHITE
  }
});
