<template>
  <div class="boxed-icon-title">
    <div class="boxed-icon-title__icon-wrap">
      <span class="boxed-icon-title__icon-glow" />
      <slot name="icon" />
    </div>
    <div class="boxed-icon-title__text">
      <p class="boxed-icon-title__title">{{ title }}</p>
      <p class="boxed-icon-title__desc">{{ desc }}</p>
    </div>
  </div>
</template>

<script setup>
defineProps({
  title: { type: String, default: 'عنوان' },
  desc: { type: String, default: 'توضیحات' },
})
</script>

<style lang="scss" scoped>
.boxed-icon-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;

  &__icon-wrap {
    background: #fff;
    border-radius: 0.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 3rem;
    width: 3rem;
    position: relative;
  }

  &__icon-glow {
    position: absolute;
    inset: 0;
    margin: auto;
    background: var(--color-primary);
    filter: blur(4px);
    height: 1rem;
    width: 1rem;
    opacity: 0.15;
    border-radius: 9999px;
  }

  &__text {
    text-align: right;
    font-family: var(--font-family-fa);
  }

  &__title {
    font-size: 1.125rem;
    font-weight: 500;
    margin: 0;
  }

  &__desc {
    font-size: 0.75rem;
    font-weight: 400;
    color: #9ca3af;
    margin: 0;
  }
}
</style>
