<template>
  <footer
    :class="embedded
      ? 'pt-5 pb-1 mt-4 border-t border-white/35 max-md:pt-4 max-md:mt-3'
      : 'mt-3 px-[26px] py-6 glass rounded-[var(--radius-default)] shadow-[0_-4px_30px_rgba(33,33,40,0.06)] max-md:px-3.5 max-md:py-5'"
  >
    <div class="flex flex-col items-center gap-3.5">
      <div class="flex items-center gap-2.5">
        <img src="/pwa-192x192.png" alt="萌芽小店" class="w-7 h-7 rounded-[5px] object-contain border border-white/50 shadow-[0_4px_12px_rgba(33,33,40,0.1)]" />
        <span class="text-[19px] font-semibold text-apptext tracking-[0.5px]" style="font-family: var(--font-serif);">萌芽小店</span>
      </div>

      <div class="w-10 h-0.5 rounded-full bg-gradient-to-r from-accent to-accent2 opacity-50"></div>

      <div class="flex items-center gap-6 flex-wrap justify-center max-md:flex-row max-md:flex-wrap max-md:gap-2.5 max-md:justify-center">
        <a
          class="inline-flex items-center gap-1.5 text-[#7a4a38] no-underline text-[15px] font-semibold px-3 py-1.5 rounded bg-[rgba(217,168,120,0.14)] hover:bg-[rgba(217,168,120,0.26)] transition-colors"
          href="mailto:mail@smyhub.com"
        >
          <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="2" y="4" width="20" height="16" rx="2"/><path d="m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7"/></svg>
          mail@smyhub.com
        </a>
        <span v-if="statsLoaded" class="inline-flex items-center gap-1.5 text-[15px] font-semibold text-[#8b4a58] px-3 py-1.5 rounded bg-[rgba(200,130,120,0.14)]">
          <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 20V10"/><path d="M18 20V4"/><path d="M6 20v-4"/></svg>
          累计下单 {{ totalOrders }} 次
        </span>
        <span v-if="statsLoaded" class="inline-flex items-center gap-1.5 text-[15px] font-semibold text-[#7d523c] px-3 py-1.5 rounded bg-[rgba(217,168,120,0.14)]">
          <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z"/><circle cx="12" cy="12" r="3"/></svg>
          累计访问 {{ totalVisits }} 次
        </span>
      </div>

      <p class="text-[14px] text-apptext/90 tracking-[0.3px]">© 2025 – 2026 萌芽小店 · All rights reserved</p>
    </div>
  </footer>
</template>

<script setup>
defineProps({
  embedded: { type: Boolean, default: false },
  statsLoaded: { type: Boolean, default: false },
  totalOrders: { type: Number, default: 0 },
  totalVisits: { type: Number, default: 0 }
})
</script>
