<script setup>
import { RouterView } from 'vue-router'
import AppHeader from './components/layout/AppHeader.vue'
import AppFooter from './components/layout/AppFooter.vue'
import BackToTop from './components/motion/BackToTop.vue'
import FormBanner from './components/layout/FormBanner.vue'
import SideButtons from './components/layout/SideButtons.vue'
</script>

<template>
  <div class="app-shell">
    <AppHeader />
    <main class="app-main">
      <RouterView v-slot="{ Component }">
        <Transition name="page" mode="out-in">
          <component :is="Component" />
        </Transition>
      </RouterView>
    </main>
    <FormBanner />
    <AppFooter />
    <BackToTop />
    <SideButtons />
  </div>
</template>

<style>
.page-enter-active,
.page-leave-active {
  transition: opacity 240ms ease, transform 240ms ease;
}

.page-enter-from,
.page-leave-to {
  opacity: 0;
  transform: translate3d(0, 8px, 0);
}

@media (prefers-reduced-motion: reduce) {
  .page-enter-active,
  .page-leave-active {
    transition: none;
  }
  .page-enter-from,
  .page-leave-to {
    opacity: 1;
    transform: none;
  }
}
</style>