@import '../../../../globals/variables';
@import '../../../../globals/mixins';
@import '../../../../globals/fonts';
@import '../../../../globals/breakpoints';

.text-card {
  background-color: $ads-color-main;
  display: flex;
  flex-direction: column;
  gap: 24px;
  height: 263px;
  max-width: 619px;
  padding: 24px;
  width: 100%;

  &--selected {
    box-shadow: 0 0 0 2px $ads-color-main;
  }

  &--default {
    background-color: $ads-color-main;
  }

  &--info {
    border-left: 4px solid $ads-primary-main;
  }

  &--success {
    border-left: 4px solid $ads-text-main;
  }

  &--warning {
    border-left: 4px solid $ads-warning-main;
  }

  &--error {
    border-left: 4px solid $ads-danger-main;
  }

  &--sharp {
    border-radius: 0;
  }

  &__header {
    align-items: center;
    display: flex;
    gap: 16px;
  }

  &__checkbox-wrapper {
    flex-shrink: 0;
    height: 24px;
    width: 24px;
  }

  &__badge {
    align-items: center;
    background-color: $ads-color-brand-primary-500;
    border-radius: 8px;
    display: flex;
    gap: 8px;
    height: auto;
    padding: 4px 8px 4px 4px;
    width: fit-content;
  }

  &__avatar-wrapper {
    align-items: center;
    background-color: $ads-color-feedback-warning-200;
    border-radius: 8px;
    display: flex;
    height: 25px;
    justify-content: center;
    width: 25px;
  }

  &__avatar {
    border-radius: 50%;
    height: 21px;
    object-fit: cover;
    width: 21px;
  }

  &__text {
    color: $ads-paragraph-color-light;
    font-family: Poppins, sans-serif;
    font-size: 1rem;
    font-weight: 400;
  }

  &__badge-trailing {
    background-color: $ads-color-main;
    border-radius: 4px;
    color: $ads-color-brand-primary-500;
    font-family: Poppins, sans-serif;
    font-size: 0.875rem;
    font-weight: 400;
    line-height: 1;
    padding: 4px 8px;
    text-align: center;
  }

  &__content {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-height: 215px;
    width: 523px;
  }

  &__title-tag {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    height: 54px;
    justify-content: space-between;
    width: 523px;
  }

  &__title {
    color: $ads-text-main;
    font-family: Poppins, sans-serif;
    font-size: 18px;
    font-weight: 500;
    letter-spacing: 0%;
    line-height: 100%;
    margin: 0;
  }

  &__tag {
    background-color: $ads-tertiary-main;
    border-radius: 4px;
    color: $ads-text-secondary;
    font-size: $ads-font-size-fifth;
    padding: 4px 8px;
  }

  &__description-text {
    color: $ads-color-gray-soft-500;
    font-family: Poppins, sans-serif;
    font-size: 16px;
    font-weight: 300;
    letter-spacing: 0%;
    line-height: 100%;
    max-width: 523px;
  }
}

.text-card__checkbox-wrapper input[type='checkbox'] {
  appearance: none;
  background-color: $ads-tertiary-main;
  border: 2px solid $ads-color-gray-strong-800;
  border-radius: 4px;
  cursor: pointer;
  height: 100%;
  position: relative;
  transition: background-color 0.2s ease;
  width: 100%;
}

.text-card__checkbox-wrapper input[type='checkbox']:checked {
  background-color: $ads-color-gray-strong-800;
}

.text-card__checkbox-wrapper input[type='checkbox']:checked::after {
  color: $ads-color-main;
  content: '✔';
  font-size: 16px;
  font-weight: $ads-color-gray-strong-800;
  left: 50%;
  position: absolute;
  top: 25%;
  transform: translate(-50%, -50%);
}

.text-card__checkbox-wrapper input[type='checkbox']:focus {
  box-shadow: 0 0 0 2px $ads-color-gray-strong-800;
  outline: none;
}
