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

.panel {
  @extend %pix-shadow-xs;

  margin-bottom: var(--pix-spacing-8x);
  background-color: var(--pix-neutral-0);
  border: none;
  border-radius: 4px;

  &--header {
    box-sizing: border-box;
    width: 100%;
    margin-bottom: 24px;
    padding: 24px;
  }

  &__image {
    margin: auto;
  }
}

.panel-header__headline {
  display: flex;
  align-items: center;
  box-sizing: border-box;
  width: 100%;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--pix-neutral-20);

  .panel-header-title {
    margin: 0;
  }

  &--with-right-content {
    justify-content: space-between;
  }
}

.panel-header__body {
  display: flex;
  justify-content: space-between;
  width: 100%;
  padding-top: 16px;
}

.panel-header__data {
  display: flex;
  flex-direction: row;
  align-items: center;
  margin: 0;
  padding: 6px 0;
  font-family: fonts.$font-roboto;

  &--highlight {
    background-color: var(--pix-neutral-20);
    border-radius: 8px;
  }
}

.panel-header-data {
  &__content {
    display: flex;
    flex-direction: column;
    align-content: center;
    align-items: flex-start;
    padding: 0 16px;
    border-right: 1px solid var(--pix-neutral-20);
  }

  &__content:last-child {
    border-right: none;
  }
}

.panel-header-data-content {
  &__badges {
    display: flex;
    flex-direction: row;
    align-items: center;

    img {
      height: 40px;
    }

    & > :not(:last-child) {
      padding-right: 2px;
    }

    & > :not(:first-child) {
      padding-left: 2px;
    }
  }

  &__stages {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    align-items: center;
  }
}

@include breakpoints.device-is('mobile') {
  .panel-header__body {
    flex-direction: column;
  }

  .panel-header__data {
    flex-direction: column;
    align-items: flex-start;

    &--highlight {
      flex-direction: column;
      align-content: flex-start;
      margin-top: 16px;
      padding: 16px;
    }
  }

  .panel-header-data {
    &__content {
      margin-bottom: 16px;
      padding: 0;
      border-left: none;
    }

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