<template>
  <Dialog @close="close">
    <div class="content">
      <div class="info">
        <div class="group">
          <p class="text">车牌号</p>
          <p class="text-bold">沪AB66688</p>
        </div>
        <div class="group">
          <p class="text">车位号</p>
          <p class="text-bold">E-123</p>
        </div>
        <div class="group">
          <p class="text">停车时长</p>
          <p class="text-bold">2<i>小时</i>30<i>分钟</i></p>
        </div>
        <div class="last">
          <p class="text">费用</p>
          <p class="text-bold">¥<i>2</i></p>
        </div>
      </div>
      <div class="right">
        <div class="car-wrapper">
          <img src="" alt="" class="car-img" />
        </div>
        <div class="codes-wrapper">
          <img src="" alt="" class="code" />
          <p class="tip">扫码缴费</p>
        </div>
      </div>
      <Button class="car-btn" @click="close" />
      <Go class="go" />
    </div>
  </Dialog>
</template>

<script setup>
import Button from '@/base/Button/Button.vue'
import Go from '@/base/Go/Go.vue'
import Dialog from '@/layouts/Dialog.vue'

const emits = defineEmits(['close'])
function close() {
  emits('close')
}
</script>

<style lang="scss" scoped>
.content {
  position: relative;
  display: flex;
  margin: 0 auto;
  margin-top: 160px;
  width: max-content;
  animation-duration: 0.2s;
}
.info {
  width: 480px;
  height: 668px;
  background: #ffffff;
  border-radius: 12px;
  padding: 64px 0 0 0;
}
.group {
  margin-bottom: 64px;
  padding-left: 64px;

  .text-bold {
    font-weight: 700;
    font-size: 32px;
    color: rgba(0, 0, 0, 0.8);
    i {
      font-size: 20px;
      padding: 0 5px;
    }
  }
}
.text {
  font-weight: 400;
  font-size: 20px;
  line-height: 23px;
  margin-bottom: 18px;
  color: rgba(0, 0, 0, 0.4);
}

.last {
  font-weight: 700;

  color: rgba(0, 0, 0, 0.8);
  padding-left: 64px;
  padding-top: 38px;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  .text-bold {
    font-size: 24px;
    i {
      font-size: 48px;
      padding-left: 5px;
    }
  }
}

.right {
  margin-left: 32px;
  .car-wrapper {
    width: 480px;
    height: 270px;
    margin-bottom: 32px;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    .car-img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }
  }

  .codes-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 480px;
    height: 366px;
    background: #ffffff;
    border-radius: 12px;
    .code {
      width: 150px;
      height: 150px;
    }
    .tip {
      font-weight: 700;
      font-size: 20px;
      color: rgba(0, 0, 0, 0.8);
      padding-top: 41px;
    }
  }
}

.car-btn {
  position: absolute;
  top: 0;
  right: -112px;
}

.go {
  position: absolute;
  bottom: -160px;
  left: 50%;
  transform: translateX(-50%);
}
</style>
