@use 'pix-design-tokens/breakpoints';
@use 'pix-design-tokens/typography';
@use "pix-design-tokens/colors";

.new-information {
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  width: 100%;
  margin-bottom: 16px;
  padding: 10px;
  border-radius: 10px;

  &:last-child {
    margin-bottom: 0;
  }

  @include breakpoints.device-is('tablet') {
    flex-direction: row;
    justify-content: space-between;
  }

  &__content {
    display: flex;
    align-items: center;
  }

  &__close {
    align-self: flex-end;

    @include breakpoints.device-is('tablet') {
      align-self: flex-start;
    }
  }

  &--yellow-background {
    background: linear-gradient(-225deg, rgb(254 220 65 / 55%) 0%, rgb(255 159 0 / 55%) 100%);
  }

  &--blue-gradient-background {
    background-color: rgb(5 108 255);
    background-image: colors.$pix-primary-app-gradient;
  }

  &--yellow-gradient-background {
    background-image: linear-gradient(-225deg, var(--pix-secondary-100) 0%, var(--pix-secondary-500) 100%);
  }

  &--white-text {
    color: var(--pix-neutral-0);
  }

  &--black-text {
    color: var(--pix-neutral-800);
  }

  &--align-text-center {
    text-align: center;

    @include breakpoints.device-is('desktop') {
      text-align: left;
    }
  }
}

.new-information-content {
  &__img {
    display: block;
    margin: 12px 48px 12px 30px;
  }

  &__text {
    display: inline-block;
    padding: 0 10px 14px;
    font-size: 1.5rem;
    line-height: 2rem;

    @include breakpoints.device-is('tablet') {
      padding: 16px 0 14px 24px;
    }

    @include breakpoints.device-is('desktop') {
      padding: 12px 0;
    }

    h2 {
      @extend %pix-title-s;

      margin-bottom: 14px;
      letter-spacing: 0;

      @include breakpoints.device-is('tablet') {
        font-size: 1.5rem;
        line-height: 2rem;
      }
    }

    p {
      @extend %pix-body-s;

      margin: 0;
      letter-spacing: 0.009rem;
    }
  }
}

.new-information-content-text {
  &__button {
    display: inline-table;
    margin-top: 20px;
  }

  &__link {
    display: none;
    margin-top: 14px;
    font-weight: var(--pix-font-normal);
    font-size: 0.875rem;
    line-height: 1.375rem;
    letter-spacing: 0.009rem;

    span {
      border-bottom: 1px solid transparent;
    }

    svg {
      width: 1rem;
      height: 1rem;
      margin-right: var(--pix-spacing-1x);
    }

    @include breakpoints.device-is('desktop') {
      display: flex;
      align-items: center;
    }

    &:focus span,
    &:hover span {
      border-bottom: 1px solid var(--pix-neutral-0);
    }
  }
}
