import { colors } from '@/assets/styles/colors';
import { fonts } from '@/assets/styles/fonts';
import { StyleSheet, Platform } from 'react-native';

export default StyleSheet.create({
  container: {
    flex: 1,
    backgroundColor: colors.background_1,
  },
  centered: {
    flex: 1,
    backgroundColor: colors.background_1,
    alignItems: 'center',
    justifyContent: 'center',
    padding: 24,
  },
  content: {
    paddingHorizontal: 16,
    paddingTop: 18,
    paddingBottom: 120,
  },
  pageTitle: {
    fontFamily: fonts.bold,
    fontSize: 22,
    color: colors.azul,
    marginBottom: 18,
  },
  errorText: {
    fontFamily: fonts.medium,
    fontSize: 14,
    color: colors.vermelho,
    textAlign: 'center',
  },

  // ── Ações rápidas ──────────────────────────────────────────────────────────
  actionsRow: {
    flexDirection: 'row',
    gap: 8,
    marginBottom: 14,
  },
  actionBtn: {
    flex: 1,
    backgroundColor: colors.azul,
    borderRadius: 14,
    alignItems: 'center',
    paddingVertical: 14,
    paddingHorizontal: 6,
    gap: 4,
  },
  actionIconWrap: {
    width: 36,
    height: 36,
    borderRadius: 18,
    backgroundColor: colors.background_1,
    alignItems: 'center',
    justifyContent: 'center',
    marginBottom: 2,
  },
  actionIcon: {
    width: 20,
    height: 20,
    tintColor: colors.azul,
    resizeMode: 'contain',
  },
  actionLabel: {
    fontFamily: fonts.regular,
    fontSize: 14,
    color: colors.branco,
    textAlign: 'center',
  },
  actionSub: {
    fontFamily: fonts.regular,
    fontSize: 12,
    color: colors.branco,
    textAlign: 'center',
  },

  // ── Card genérico ──────────────────────────────────────────────────────────
  card: {
    backgroundColor: colors.branco,
    borderRadius: 14,
    padding: 16,
    marginBottom: 14,
    shadowColor: '#000',
    shadowOpacity: 0.04,
    shadowRadius: 6,
    shadowOffset: { width: 0, height: 2 },
    elevation: 2,
  },
  cardTitle: {
    fontFamily: fonts.bold,
    fontSize: 15,
    color: colors.azul,
    marginBottom: 12,
  },

  // ── Localização ───────────────────────────────────────────────────────────
  mapImageWrap: {
    width: '100%',
    height: 160,
    borderRadius: 10,
    overflow: 'hidden',
    marginBottom: 12,
    backgroundColor: colors.background_2,
  },
  mapImage: {
    width: '100%',
    height: '100%',
  },
  mapOverlay: {
    ...StyleSheet.absoluteFillObject,
    alignItems: 'center',
    justifyContent: 'center',
    gap: 6,
    backgroundColor: colors.background_2,
  },
  mapErrorText: {
    fontFamily: fonts.medium,
    fontSize: 12,
    color: '#9AA8BE',
  },
  addressRow: {
    flexDirection: 'row',
    alignItems: 'flex-start',
    gap: 8,
    marginBottom: 14,
  },
  addressText: {
    flex: 1,
    fontFamily: fonts.regular,
    fontSize: 13,
    color: colors.azul,
    lineHeight: 20,
  },
  copyIcon: {
    marginTop: 2,
    paddingHorizontal: 4,
  },
  direcoeBtn: {
    backgroundColor: colors.azul,
    borderRadius: 10,
    flexDirection: 'row',
    alignItems: 'center',
    justifyContent: 'center',
    gap: 8,
    paddingVertical: 13,
  },
  direcoeBtnText: {
    fontFamily: fonts.regular,
    fontSize: 16,
    color: colors.branco,
  },
  saveButtonIcon: {
    width: 14,
    height: 14,
  },

  // ── Horário ───────────────────────────────────────────────────────────────
  horarioRow: {
    flexDirection: 'row',
    justifyContent: 'space-between',
    alignItems: 'center',
    paddingVertical: 12,
  },
  horarioRowBorder: {
    borderBottomWidth: 1,
    borderBottomColor: colors.background_1,
  },
  horarioDia: {
    fontFamily: fonts.semiBold,
    fontSize: 13,
    color: colors.azul,
  },
  horarioHoras: {
    fontFamily: fonts.regular,
    fontSize: 13,
    color: colors.azul,
  },
  horarioFechado: {
    color: colors.vermelho,
    fontFamily: fonts.medium,
  },

  // ── Emergência ────────────────────────────────────────────────────────────
  emergencyBtn: {
    backgroundColor: '#25D366',
    borderRadius: 10,
    flexDirection: 'row',
    alignItems: 'center',
    paddingVertical: 13,
    paddingHorizontal: 16,
    gap: 10,
  },
  emergencyIcon: {
    width: 22,
    height: 22,
    resizeMode: 'contain',
    tintColor: colors.branco,
  },
  emergencyText: {
    flex: 1,
    fontFamily: fonts.semiBold,
    fontSize: 14,
    color: colors.branco,
  },

  // ── Redes Sociais ─────────────────────────────────────────────────────────
  socialsRow: {
    flexDirection: 'row',
    flexWrap: 'wrap',
    gap: 10,
  },
  socialBtn: {
    width: 44,
    height: 44,
    borderRadius: 22,
    backgroundColor: colors.background_1,
    alignItems: 'center',
    justifyContent: 'center',
  },
});
