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

.challenge-actions {
  display: flex;
  flex-direction: column;
  gap: var(--pix-spacing-4x);
  justify-content: center;
  margin: var(--pix-spacing-1x);
  background-color: var(--pix-neutral-20);

  &__already-answered {
    flex-grow: 1;
  }

  @include breakpoints.device-is('mobile') {
    &__buttons button {
      width: min(100%, 20em);
      margin-inline: auto;
    }

    &__action-validate {
      margin-bottom: 1rem;
    }
  }

  @include breakpoints.device-is('tablet') {
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;

    &__buttons {
      display: flex;
      flex-direction: row-reverse;
      gap: var(--pix-spacing-4x);
    }

    &__action-validate {
      min-width: 12.5em;
    }
  }

  &__alert-message {
    @extend %pix-body-m;

    display: flex;
    align-items: center;
    max-width: 600px;
    margin: 0 auto 24px 12px;
    line-height: 1.375rem;
    letter-spacing: 0.009rem;

    @include breakpoints.device-is('tablet') {
      margin-bottom: 0;
    }
  }
}

.challenge-actions-alert-message {
  &__icon {
    margin-right: 20px;
    margin-left: 0;
    color: var(--pix-neutral-500);
    font-size: 1rem;
  }
}
