<template>
  <div class="customer-wrapper">
    <div class="masker" @click="close"></div>
    <div class="customer-content">
      <div class="customer-avatar">
        <div class="avatar-wrapper">
          <img src="../../assets/images/search/customer.png" class="avatar" alt="" />
        </div>
        <p class="customer-name">客服001</p>
      </div>
      <div class="time">00:34</div>
      <div class="status">{{ $t('waiting') }}...</div>
      <img src="../../assets/images/search/out.svg" class="off" @click="close" alt="" />
      <div class="close" @click="close">
        <img src="../../assets/images/detail/yellow_close.png" alt="" />
      </div>
    </div>
  </div>
</template>

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

<style lang="scss" scoped>
.customer-wrapper {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1000;
  animation-duration: 0.2s;
  .masker {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
  }
  .customer-content {
    position: relative;
    width: 600px;
    height: 400px;
    margin: 0 auto;
    margin-top: 760px;
    background: #ffffff;
    box-shadow: 0px 40px 60px rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    .customer-avatar {
      display: flex;
      align-items: center;
      padding: 24px 0 0 32px;
      margin-bottom: 50px;

      .avatar-wrapper {
        width: 56px;
        height: 56px;
        box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.04);
        border-radius: 50%;
        padding: 14px;
        background-color: var(--color-fff);
        .avatar {
          width: 100%;
          height: 100%;
          object-fit: contain;
        }
      }
      .customer-name {
        font-weight: 700;
        font-size: 16px;
        padding-left: 16px;
        font-family: 'font_bold';
        color: rgba(0, 0, 0, 0.6);
      }
    }
    .time {
      font-weight: 700;
      font-size: 48px;
      color: rgba(0, 0, 0, 0.8);
      font-family: 'font_bold';
      padding-bottom: 8px;
      text-align: center;
    }
    .status {
      color: rgba(0, 0, 0, 0.4);
      text-align: center;
      font-size: 18px;
      margin-bottom: 49px;
    }
    .off {
      display: block;
      width: 80px;
      height: 80px;
      margin: 0 auto;
    }
  }
  .close {
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    top: 12px;
    right: 12px;
    width: 56px;
    height: 56px;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 12px;
    img {
      width: 56px;
      height: 56px;
    }
  }
}
</style>
