<template>
  <NuxtLayout name="blank">
    <div class="wrapper">
      <div class="container">
        <IconWWLogo />

        <div class="title">
          <h1>Kundenportal Demo</h1>
          <p>Alle Demo Varianten</p>
        </div>

        <div v-for="item of items" class="item">
          <h2>{{ item.title }}</h2>
          <div class="item-links">
            <a :href="`../mobile${item.prefix}`" class="item-link">
              <IconPhone />
            </a>
            <a :href="`..${item.prefix}`" class="item-link">
              <IconLaptop />
            </a>
          </div>
        </div>
      </div>
    </div>
  </NuxtLayout>
</template>

<script lang="ts" setup>
const items = [
  { title: 'Konzern Kunden', prefix: '' },
  { title: 'KO', prefix: '/ko' },
  { title: 'Wüstenrot Kunden', prefix: '/wuestenrot' },
  { title: 'Württembergische Kunden', prefix: '/wuerttembergische' },
]
</script>

<style scoped>
.wrapper {
  padding: 2rem;
  font-family: 'WW Type', sans-serif;
  line-height: 1.25;
}

.wrapper :where(*) {
  margin: 0;
  box-sizing: border-box;
}

.container {
  max-width: 62rem;
  margin: 0 auto;
}

.title {
  margin: 2rem 0;
}

.title h1 {
  font-size: 2rem;
  font-weight: 700;
}

.title p {
  font-size: 1.5rem;
}

.item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  width: 100%;
  padding: 1.625rem;
  background-color: #fafafa;
}

.item + .item {
  margin-top: 1rem;
}

.item h2 {
  font-size: 1.5rem;
  font-weight: 700;
}

.item-links {
  display: flex;
  gap: 2rem;
}

.item-link {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.625rem;
  height: 5rem;
  width: 5rem;
  background-color: #fff;
  border: 1px solid transparent;
  transition: border 0.3s ease;
}

.item-link:hover,
.item-link:focus {
  border-color: #f84914;
}

@media (max-width: 767px) {
  .wrapper {
    padding: 1rem;
  }

  .item {
    padding: 1rem;
  }

  .item h2 {
    font-size: 1rem;
  }

  .item-links {
    gap: 0.75rem;
  }

  .item-link {
    width: 3rem;
    height: 3rem;
  }

  .item-link:nth-child(1) svg {
    width: auto;
    height: 1.25rem;
  }

  .item-link:nth-child(2) svg {
    width: auto;
    height: 1rem;
  }
}
</style>
