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

.levelup {
  position: fixed;
  top: 10px;
  right: 10px;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 300px;
  height: 80px;
  color: var(--pix-neutral-800);
  background-color: rgb(255 255 255 / 92%);
  border-radius: 5px;
  box-shadow: 0 0 10px var(--pix-neutral-800);
  animation-name: slidein;
  animation-duration: 1s;
  user-select: none;

  @include breakpoints.device-is('tablet') {
    width: 362px;
  }

  & > img {
    height: 100%;
  }

  &__icon-card-level {
    @extend %pix-title-s;

    position: absolute;
    top: 31px;
    left: 45px;
  }

  &__competence {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 10px 10px 10px 0;
  }

  &__close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    padding: 0;
    color: var(--pix-neutral-500);
    font-size: 1.5rem;
    background-color: transparent;
    border: none;
    border-left: 1px solid var(--pix-neutral-20);
    cursor: pointer;

    &:hover,
    &:focus,
    &:active {
      color: var(--pix-neutral-800);
      background-color: var(--pix-neutral-20);
      border-top-right-radius: 5px;
      border-bottom-right-radius: 5px;
    }
  }
}

.levelup-competence {
  &__level {
    @extend %pix-body-m;

    margin-bottom: 2px;
    font-weight: var(--pix-font-bold);
    text-transform: uppercase;

    @include breakpoints.device-is('mobile') {
      font-size: 0.875rem;
    }
  }

  &__name {
    font-size: 0.875rem;
    font-family: fonts.$font-roboto;
    line-height: 1.125rem;

    @include breakpoints.device-is('mobile') {
      font-size: 0.813rem;
    }
  }
}

@keyframes slidein {
  from {
    right: -500px;
    opacity: 0;
  }

  to {
    right: 10px;
    opacity: 1;
  }
}
