@use 'pix-design-tokens/typography';
@use 'pix-design-tokens/fonts';
@use 'pix-design-tokens/shadows';

.competence-card {
  @extend %pix-shadow-sm;

  position: relative;
  top: 0;
  overflow: hidden;
  font-family: fonts.$font-roboto;
  background-color: var(--pix-neutral-0);
  border: 1px solid var(--pix-neutral-20);
  border-radius: 11px;
  transition: all 0.1s linear;
  pointer-events: none;
  -webkit-tap-highlight-color: rgb(var(--pix-neutral-500) / 30%);

  &--interactive {
    pointer-events: auto;
  }

  & a {
    color: var(--pix-neutral-0);
    text-decoration: none;
  }
}

.competence-card__title {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  padding: 16px 12px;
  overflow: visible;
  color: var(--pix-neutral-0);
  transition: height 0.2s cubic-bezier(0.265, 0.075, 0.025, 0.99);
}

.competence-card__wrapper {
  &::after {
    position: absolute;
    top: -90px;
    right: -50px;
    bottom: -90px;
    left: -80px;
    width: 110%;
    border-radius: 100%;
    content: '';
  }

  &--jaffa::after {
    background: linear-gradient(90deg, var(--pix-information-dark) 45%, var(--pix-information-light) 100%);
  }

  &--emerald::after {
    background: linear-gradient(90deg, var(--pix-content-dark) 45%, var(--pix-content-light) 100%);
  }

  &--cerulean::after {
    background: linear-gradient(90deg, var(--pix-primary-500) 45%, var(--pix-communication-light) 100%);
  }

  &--wild-strawberry::after {
    background: linear-gradient(90deg, var(--pix-security-dark) 45%, var(--pix-security-light) 100%);
  }

  &--butterfly-bush::after {
    background: linear-gradient(90deg, var(--pix-environment-dark) 45%, var(--pix-environment-light) 100%);
  }
}

.competence-card__area-name {
  position: relative;
  margin-bottom: 8px;
  font-weight: var(--pix-font-bold);
  font-size: 0.688rem;
  letter-spacing: 0.031rem;
  text-transform: uppercase;
  opacity: 0.8;
}

.competence-card__competence-name {
  @extend %pix-body-l;

  position: relative;
  color: var(--pix-neutral-0);
  font-weight: var(--pix-font-bold);
}

.competence-card__body {
  z-index: 1;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  height: 80px;
  margin: 10px;
  border: 0 solid rgb(var(--pix-neutral-0) 0.4);
  transition: border 0.1s ease-in;

  &--white-background {
    padding: 5px;
    background-color: var(--pix-neutral-0);
    background-clip: padding-box;
    border-radius: 50%;
  }
}

.competence-card__link {
  z-index: 1;
  display: flex;
  align-items: center;
  padding: 5px;
  background-color: var(--pix-neutral-0);
  background-clip: padding-box;
  border: 0 solid rgb(var(--pix-neutral-0) 0.4);
  border-radius: 50%;
  transition: border 0.1s ease-in;
}

.competence-card__level {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.competence-card__score-value {
  min-height: 44px;
  font-size: 2.188rem;

  &--congrats {
    color: var(--pix-neutral-0);
    font-weight: var(--pix-font-bold);
  }
}

.competence-card__congrats {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 130px;
  height: 140px;
  margin: -10px -5px;
  background: url('/images/scorecard-congrats.svg') no-repeat center center;
  background-size: contain;

  &--small {
    width: 90px;
    height: 100px;
  }
}

.competence-card__score-label--congrats {
  color: var(--pix-neutral-0);
}
