// Copyright 2022 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only

@use '../mixins';
@use '../variables';

.module-conversation-hero {
  padding-block: 32px 28px;
  padding-inline: 0;
  text-align: center;

  &__avatar {
    margin-bottom: 12px;
  }

  &__title {
    @include mixins.button-reset();
    & {
      cursor: pointer;
    }
  }

  &__title span {
    @include mixins.font-title-1;
    font-weight: 400;
  }

  &__title__chevron {
    display: inline-block;
    height: 20px;
    width: 20px;

    // Align with the text
    position: relative;
    inset-block-start: 2px;

    @include mixins.color-svg(
      '../images/icons/v3/chevron/chevron-right-bold.svg',
      light-dark(variables.$color-gray-90, variables.$color-gray-05)
    );
  }

  &__profile-name {
    display: flex;
    align-items: center;
    justify-content: center;

    @include mixins.font-title-1;
    margin-bottom: 2px;
    margin-top: 0;

    color: light-dark(variables.$color-gray-90, variables.$color-gray-05);

    .module-contact-name {
      display: inline-flex;
      align-items: center;
    }
  }

  &__with {
    @include mixins.font-body-2;
    margin-block: 0;
    margin-inline: auto;
    margin-bottom: 20px;
    max-width: 500px;

    color: light-dark(variables.$color-gray-60, variables.$color-gray-25);
  }

  &__note-to-self {
    @include mixins.font-body-2;

    padding-block: 0;
    padding-inline: 16px;

    color: light-dark(variables.$color-gray-60, variables.$color-gray-25);
  }

  &__members-count__button {
    @include mixins.button-reset;
    & {
      cursor: pointer;
      text-decoration: underline;
      text-underline-offset: 2px;
      text-decoration-color: variables.$color-gray-25;
    }
  }

  &__safety-tips-button {
    border-radius: 9999px;
    padding-block: 6px;
    padding-inline: 14px;
    margin-top: 5px;
    @include mixins.font-subtitle;
  }

  &__review-carefully {
    @include mixins.font-body-2-bold;
    color: #a98b52;
  }

  &__group-question-icon {
    display: inline-block;
    height: 16px;
    width: 22px;
    vertical-align: text-top;
    margin-inline-end: 8px;

    @include mixins.color-svg(
      '../images/icons/v3/group/group-questionmark-compact.svg',
      light-dark(variables.$color-black, variables.$color-gray-05)
    );
  }

  &__direct-question-icon {
    display: inline-block;
    height: 16px;
    width: 16px;
    vertical-align: text-top;
    margin-inline-end: 8px;

    @include mixins.color-svg(
      '../images/icons/v3/person/person-questionmark-compact.svg',
      light-dark(variables.$color-black, variables.$color-gray-05)
    );
  }

  &__name-not-verified__button {
    @include mixins.button-reset;
    & {
      cursor: pointer;
      text-decoration: underline;
      text-underline-offset: 2px;
      text-decoration-color: variables.$color-gray-25;
    }
  }

  &--release-notes-notice {
    @include mixins.font-body-1;

    user-select: none;

    max-width: 255px;
    margin-inline: auto;
    margin-block-start: 10px;
    padding-block: 16px;
    padding-inline: 20px;

    border-radius: 18px;
    background-color: light-dark(#eeefff, #3b3d50);
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: light-dark(variables.$color-gray-75, variables.$color-gray-02);
  }

  &__release-notes-notice-content {
    text-align: center;
  }

  &__release-notes-notice-check-icon {
    display: inline-block;
    height: 16px;
    width: 16px;
    margin-inline-end: 4px;
    position: relative;
    top: 3px;

    @include mixins.color-svg(
      '../images/icons/v3/official/official-compact.svg',
      light-dark(variables.$color-gray-75, variables.$color-gray-05)
    );
  }

  &__release-notes-notice-bell-icon {
    display: inline-block;
    height: 16px;
    width: 16px;

    margin-inline-end: 4px;
    position: relative;
    top: 3px;

    @include mixins.color-svg(
      '../images/icons/v3/bell/bell-compact.svg',
      light-dark(variables.$color-gray-75, variables.$color-gray-05)
    );
  }

  &__membership {
    @include mixins.font-body-2;
    user-select: none;

    max-width: 255px;
    margin-inline: auto;
    margin-block-start: 10px;
    padding-block: 16px;
    padding-inline: 20px;

    border-radius: 18px;
    border-style: solid;
    border-width: 2.5px;

    display: flex;
    flex-direction: column;
    gap: 10px;

    border-color: light-dark(
      variables.$color-gray-04,
      variables.$color-gray-80
    );

    color: light-dark(variables.$color-gray-90, variables.$color-gray-02);

    &__chevron {
      display: inline-block;
      height: 18px;
      width: 18px;
      vertical-align: text-top;
      margin-inline-end: 8px;

      @include mixins.color-svg(
        '../images/icons/v3/group/group.svg',
        light-dark(variables.$color-black, variables.$color-gray-05)
      );
    }

    &__name {
      // Cancel bold
      font-weight: normal;
    }

    &__review-carefully-icon {
      display: inline-block;
      height: 18px;
      width: 18px;
      vertical-align: text-top;
      margin-inline-end: 8px;

      @include mixins.color-svg(
        '../images/icons/v3/error/error-triangle-fill-compact-bold.svg',
        #a98b52
      );
    }

    &__warning {
      line-height: 20px;
    }
  }

  &__members-count-icon {
    display: inline-block;
    height: 16px;
    width: 16px;
    vertical-align: text-top;
    margin-inline-end: 8px;

    @include mixins.color-svg(
      '../images/icons/v3/group/group-compact.svg',
      light-dark(variables.$color-black, variables.$color-gray-05)
    );
  }
}
