/* =========================
   Client Card
   Figma: Client Card.
   Horizontal card with avatar, name, summary and a trailing menu.
========================= */

@use "../kit-deps" as *;

.client-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 420px;
  padding: $space-5;
  border: $border-width-base $border-style-base $neutral-200;
  border-radius: $radius-xl;
  background-color: $neutral-0;
  color: $neutral-900;

  &__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: $space-4;
    margin-bottom: $space-5;
  }

  &__main {
    display: flex;
    align-items: center;
    gap: $space-4;
    min-width: 0;
  }

  &__avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    border-radius: $radius-full;
    background-color: $neutral-100;
    color: $neutral-700;
    overflow: hidden;

    img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }

    .vmk-icon,
    .ph {
      width: 28px;
      height: 28px;
    }
  }

  &__info {
    display: flex;
    flex-direction: column;
    gap: $space-1;
    min-width: 0;
  }

  &__name {
    margin: -0.2em 0;
    padding: 0;
    font-size: $font-size-lg;
    font-weight: $font-weight-bold;
    line-height: 1;
    color: $neutral-900;
  }

  &__role {
    color: $neutral-500;
    font-size: $font-size-md;
    line-height: $line-height-tight;
  }

  &__menu {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    padding: 0;
    border: 0;
    border-radius: $radius-full;
    background-color: transparent;
    color: $neutral-500;
    font-size: 20px;
    cursor: pointer;
    transition: background-color $motion-base $motion-ease;

    &:hover {
      background-color: $neutral-100;
      color: $neutral-900;
    }

    &:focus-visible {
      @include focus_ring;
    }
  }

  &__details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: $space-4;
    padding: $space-4;
    border: $border-width-base $border-style-base $neutral-100;
    border-radius: $radius-lg;
    background-color: $neutral-50;
  }

  &__detail {
    display: flex;
    flex-direction: column;
    gap: $space-1;

    &-label {
      color: $neutral-500;
      font-size: $font-size-sm;
      font-weight: $font-weight-medium;
    }

    &-value {
      color: $neutral-900;
      font-size: $font-size-md;
      font-weight: $font-weight-semibold;
    }
  }
}
