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

.session-details-page {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  width: 100%;
}

.session-details__header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: var(--pix-spacing-3x);
}

.session-details-header {

  &__title {
    min-width: 300px;
  }

  &__datetime {
    display: flex;
    align-items: center;
    padding-right: 10px;
  }
}

.session-details-header-datetime {

  &__date {
    margin-right: 40px;
    padding-right: 40px;
    border-right: 1px solid var(--pix-neutral-500);
  }

  &__text {
    margin: 0;
    padding: 8px 0;
    font-weight: 400;
    font-size: 0.875rem;
  }
}

.session-details-container {
  display: flex;
  flex-direction: column;
}

.session-details-row {
  display: flex;
  flex-flow: wrap;
  padding: 0 8px;

  &__session-finalized-warning {
    font-weight: 500;
  }

  &:not(:last-child) {
    border-bottom: 1px solid var(--pix-neutral-100);
  }
}

.session-details-content {
  display: flex;
  flex-direction: column;
  padding: 16px;

  &--multiple {
    margin: 16px 0;
    padding: 0 24px;
    white-space: nowrap;
    border-right: 1px solid var(--pix-neutral-100);

    &:last-child {
      border-right: 0;
    }
  }

  &--copyable {
    margin: 16px 0 16px 8px;
    padding: 8px 16px;
    background: var(--pix-neutral-20);
    border: 0;
    border-radius: 4px;
  }

  &--single {
    width: 100%;
  }

  &__label {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 32px;
    margin: 0;
    color: var(--pix-neutral-900);
    font-weight: 500;
    font-size: 0.875rem;
  }

  &__sub-label {
    color: var(--pix-neutral-500);
    font-weight: normal;
    font-size: 0.813rem;
  }

  &__text {
    margin: 0;
    padding: 8px 0;
    font-size: 0.875rem;
  }

  &__clipboard {
    display: flex;
    flex-direction: row;
    align-items: center;
  }

  &__return-button {
    margin-right: 6px;
  }

  &__clipboard-button {
    margin-left: 4px;
  }

  .pix-icon-button {
    &:hover {
      background-color: var(--pix-neutral-0);
      &:active {
        color: var(--pix-neutral-0);
      }
    }
    &:focus {
      &:hover {
        background-color: var(--pix-neutral-800);
      }
    }
  }
}

.session-details-buttons {
  display: flex;
  justify-content: space-between;
  padding: 16px;
}

.session-details {

  &__clea-results-download {
    padding: 6px;
  }

  &__clea-results-download-grey {
    display: flex;
    align-items: center;
    padding: 16px;
    background: var(--pix-neutral-20);
  }

  &__clea-results-download-title {
    margin: 0 0 8px;
    color: var(--pix-neutral-900);
    @extend %pix-title-xs;
  }

  &__clea-results-download-description {
    margin-bottom: 12px;
    color: var(--pix-neutral-500);
    font-size: 0.875rem;
  }

  &__clea-results-download-icon {
    width: 5rem;
    height: 3rem;
    margin-right: 16px;
    color: var(--pix-neutral-500);
  }

  &__clea-results-link-icon {
    width: 1rem;
    height: 1rem;
    color: var(--pix-primary-500);
  }

  &__controls {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    margin: 1em 0;

    @include breakpoints.device-is("desktop") {
      flex-direction: row;
    }
  }

  &__controls-title {
    margin-right: 8px;
    color: var(--pix-neutral-900);
    font-weight: 500;
    font-size: 0.875rem;
  }

  &__controls-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: right;
    padding: var(--pix-spacing-3x) var(--pix-spacing-4x);

    @include breakpoints.device-is("desktop") {
      flex-direction: row;
      padding: var(--pix-spacing-2x) var(--pix-spacing-4x);
    }
  }

  &__controls-icon {
    width: 1rem;
    height: 1rem;
    fill: var(--pix-primary-700);
    margin-right: var(--pix-spacing-1x);
  }
}
