<template>
  <div class="member">
    <div class="avatar">
      <img :src="info.avatar" alt="The image cannot be displayed properly">
    </div>
    <div class="member-name">
      {{ info.name }}
    </div>
    <div class="member-post">{{ info.description }}</div>
    <div class="member-buttons">

      <a :href="info.twitter ? info.twitter : 'javascript:void(0);'" :target="info.twitter && '_blank'">
      <div class="member-btn twitter-icon">

      </div>
      </a>
      <a :href="info.linkedIn ? info.linkedIn : 'javascript:void(0)'" :target="info.linkedIn && '_blank'">
        <div class="member-btn linkedin-icon">

        </div>
      </a>


      <a :href="info.email ? 'mailto:' + info.email : 'javascript:void(0)'" :target="info.email && '_blank'">
      <div class="member-btn email-icon">

      </div>
      </a>
    </div>
  </div>
</template>

<script setup>
const props = defineProps({
  info: Object,
})
</script>

<style lang="scss" scoped>
.member {
  align-self: flex-start;
  display: flex;
  flex-direction: column;
  width: calc(100vw / 8);
  margin: 0 10px;
  margin-bottom: 48px;

  .avatar {
    width: 89px;
    height: 89px;
    margin: 0 auto;
    border-radius: 50%;
    overflow: hidden;
    img {
      width: 100%;
      height: 100%;
    }
    @media screen and (min-width:1440Px) and (max-width: 100vw) {
      width: 108px !important;
      height: 108px !important;
    }

    img {
      width: 100%;
      height: 100%;
    }
  }

  .member-name {
    font-family: 'Libre Bodoni';
    font-style: normal;
    font-weight: 400;
    font-size: 12px;
    line-height: 16px;
    text-align: center;
    color: #000000;
    margin-top: 16px;
    white-space: nowrap;
  }

  .member-post {
    font-family: 'Raleway';
    font-style: normal;
    font-weight: 400;
    font-size: 10px;
    line-height: 12px;
    text-align: center;
    color: rgba(0, 0, 0, 0.5);
    margin-bottom: 10px;
    height: 30px;
  }

  .member-buttons {
    margin: 0 auto;
    width: 100% !important;
    display: flex;
    justify-content: space-between;

    @media screen and (max-width: 958Px) and (min-width: 431Px) {
      width: 80px !important;
    }

    .member-btn {
      position: relative;
      width: 22px;
      height: 22px;
      background-size: 100%;
      background-repeat: no-repeat;
    }

    .twitter-icon {
      background-image: url(/images/About/twitter.png);
    }

    .twitter-icon:hover {
      background-image: url(/images/About/twitter_a.png);
    }

    .linkedin-icon {
      background-image: url(/images/About/linkedin.png);
    }

    .linkedin-icon:hover {
      background-image: url(/images/About/linkedin_a.png);
    }

    .email-icon {
      background-image: url(/images/About/email.png);
    }
    .email-icon:hover {
      background-image: url(/images/About/email_a.png);
    }
    .telegram-icon {
      background-image: url(/images/About/telegram.png);
    }

    .telegram-icon:hover {
      background-image: url(/images/About/telegram_a.png);
    }
  }

  @media screen and (min-width:1440Px) and (max-width: 100vw) {
    width: 108px;
    margin: 0 20px;
    margin-bottom: 48px;

    .member-name {
      font-size: 17px;
      line-height: 24px;
    }

    .member-post {
      font-size: 12px;
      transform: scale(0.9);
      line-height: 14px;
      margin-bottom: 20px;
    }
  }

  @media screen and (max-width: 958Px) and (min-width: 431Px) {
    width: calc(100vw / 6) !important;


    .avatar {
      width: 70px;
      height: 70px;
    }
    .member-post {
      height: 40px;
    }
    .member-buttons {
      width: 100% !important;

      .member-btn {
        width: 20px;
        height: 20px;

      }
    }
  }

  @media screen and (max-width:431Px) and (min-width: 0Px) {
    width: 93px !important;
    margin: 48px 5px 5px;

    .member-name {
      font-size: 14px;
      line-height: 20px;
      margin-bottom: 10px;
    }

    .member-post {
      font-size: 12Px;
      line-height: 18Px;
      height: 60px;
    }
    .member-buttons {
      width: 100% !important;

      .member-btn {
        width: 20px;
        height: 20px;

      }
    }
  }
}
</style>
