@use "sass:map";
@use "global/acms-common" as acms;
@use "global/common" as global;

/* ------------------------------
　　プロフィール
------------------------------ */

.profile {
  box-sizing: border-box;
  width: 100%;
  padding: 1.5rem 1rem;
  background: var(--color-gray10);
  border-radius: var(--border-radius-lg);
}

.profile-body {
  display: flex;
  align-items: flex-start;
}

.profile-item-img {
  margin: 0 1rem 0 0;
}

.profile-img {
  width: 6rem;
  height: 6rem;
  vertical-align: top;
  border-radius: 50%;
}

.profile-item-info {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  justify-content: center;
}

.profile-position {
  margin: 0 0.5rem 0 0;
  font-size: map.get(global.$font-scales, body-s);
  line-height: var(--line-height-sm);
}

.profile-name {
  margin: 0;
  font-size: map.get(global.$font-scales, body-m);
  font-weight: bold;
  line-height: var(--line-height-sm);
}

.profile-text {
  margin: 0;
  font-size: map.get(global.$font-scales, body-s);
  line-height: var(--line-height-xl);
}

.profile-footer {
  margin: 0.75rem 0 0;
}

.profile-sns {
  --sns-icon-size: 30px;

  display: flex;
  gap: 1rem;
  height: var(--sns-icon-size); /* SNS情報がない時も表示崩れ防止のため高さを保つ */
  padding: 0;
  margin: 0;
  list-style-type: none;

  a {
    display: block;
    width: var(--sns-icon-size);

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

.profile-author {
  margin-block: 1rem 0;
}

.profile-author-link {
  display: flex;
  gap: 0.25rem;
  align-items: center;
  justify-content: flex-end;
  padding-block: 0.25rem;
  margin: 0;
  font-size: map.get(global.$font-scales, body-s);
  line-height: var(--line-height-base);
  text-decoration: none;

  @media (hover: hover) {
    &:any-link:hover {
      .profile-author-link-icon {
        background-color: var(--color-icon-bg-hover);
      }
    }
  }
}

.profile-author-link-text {
  font-weight: bold;
  color: var(--color-text);
}

.profile-author-link-icon {
  box-sizing: border-box;
  display: grid;
  place-items: center;
  width: 1rem;
  height: auto;
  aspect-ratio: 1 / 1;
  background-color: var(--color-icon-bg);
  border-radius: 50%;

  svg {
    width: 0.625rem;
    height: 0.625rem;
    color: var(--color-white);
    object-fit: contain;

    path {
      stroke: currentcolor;
    }
  }

  @media (hover: hover) {
    transition: background-color 0.3s ease;
  }
}

@include acms.media-breakpoint-up(md) {
  .profile {
    position: relative;
    padding: 2rem;
  }

  .profile-img {
    width: 5.5rem;
    height: 5.5rem;
  }

  .profile-name {
    font-size: map.get(global.$font-scales, body-m);
  }

  .profile-footer {
    position: absolute;
    right: 2rem;
    bottom: 2rem;
    margin: 0;
  }
}
