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

.hexagon-score {
  width: 132px;
  height: 148px;
  background: url('/images/background/hexa-pix-blue.svg') no-repeat center center;
  background-size: cover;

  &__content {
    position: relative;
    text-align: center;
  }
}

@mixin hexagon-score-title {
  color: var(--pix-neutral-900);
  font-size: 0.875rem;
  font-family: fonts.$font-roboto;
  letter-spacing: 0.219rem;
}

@mixin hexagon-score-pix-score {
  @extend %pix-title-l;

  color: var(--pix-neutral-900);
}

@mixin hexagon-score-pix-total {
  color: var(--pix-neutral-500);
  font-size: 0.813rem;
  font-family: fonts.$font-roboto;
  border-top: 1px solid var(--pix-neutral-100);
}

.hexagon-score-content {
  &__title {
    @include hexagon-score-title;

    position: absolute;
    top: 26px;
    left: 1px;
    width: 100%;
    text-transform: uppercase;
  }

  &__pix-score {
    @include hexagon-score-pix-score;

    position: absolute;
    top: 40px;
    width: 100%;
  }

  &__pix-total {
    @include hexagon-score-pix-total;

    position: absolute;
    top: 100px;
    left: 31px;
    display: flex;
    align-items: center;
    justify-content: space-around;
    width: 70px;
    padding: 0 var(--pix-spacing-2x);

    .pix-tooltip__content {
      max-width: 19rem;

      @include breakpoints.device-is('tablet') {
        max-width: 40rem;
      }

      @include breakpoints.device-is('desktop') {
        max-width: 19rem;
      }
    }
  }
}

.hexagon-score__information {
  padding: 24px 16px;
}

.hexagon-score-information__text {
  @extend %pix-body-m;

  line-height: 1.6rem;
  text-align: left;

  &--strong {
    font-weight: var(--pix-font-bold);
  }

  p {
    padding-top: 1rem;
  }
}

.hexagon-score-information__close {
  float: right;
  margin-top: -10px;
  padding: 10px;
  font-size: 1.25rem;

  @include breakpoints.device-is('desktop') {
    display: none;
  }
}

.hexagon-score-content-pix-total__icon {
  margin-left: 4px;
  padding: 0;
  color: inherit;
  line-height: 0;
  background: none;
  border: none;
  cursor: pointer;

  svg {
    width: 1rem;
    height: 1rem;
    margin-top: 0.2rem;
  }

  &:hover,
  &:focus {
    color: var(--pix-neutral-800);
  }
}
