.charity {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  padding-top: 20px;

  &_hide {
    display: none;
  }

  &__msg {
    font-size: .875rem;
    font-weight: 500;
  }

  &__prompt {
    display: block;
    font-size: .75rem;
    font-weight: 400;
  }

  &__img {
    width: 180px;
  }

  label {
    font-size: 1rem;
    font-weight: 500;
  }
}

.charity-new {
  &.charity-added {
    label[for='donation'] {
      display: none;
    }

    .order-item__remove {
      display: block;
    }
  }

  .order-item__remove {
    display: none;
  }

  .checkout-info-wrap {
    background-color: $gray-bg;
    padding: 10px 15px 15px;
    margin: 0;

    & .order-item__remove {
      position: static;
    }
  }

  .checkout-order {
    &__img {
      flex: none;
      width: 100%;
      height: 100%;
      max-height: 100px;
      display: flex;
      align-items: center;
      justify-content: center;
      max-width: 160px;

      img {
        width: 100%;
        height: auto;
        max-height: initial;
      }

      .image {
        width: 140px;
      }
    }

    .title-wrap {
      .title {
        font-size: .875rem;
        font-weight: 500;
      }

      .descr {
        font-size: .75rem;
        font-weight: 500;
      }
    }

    .price-wrap {
      &__donation {
        align-self: center;
      }

      label {
        margin-top: 8px;
        font-weight: 500;
      }

      .order-item {
        &__remove {
          margin-top: 5px;
        }
      }
    }

    &__info-wrap {
      flex: 1;
      flex-direction: row;
      padding-top: 15px;
      max-width: 100%;
    }
  }

  &.charity-multiple {
    .checkout-info-wrap {
      padding: 15px;
    }

    .title {
      margin-bottom: 15px;
    }

    .definition {
      font-size: .75rem;
      font-weight: 400;
      line-height: 14px;
      margin-bottom: 25px;
    }

    .descr {
      margin-top: -10px;
    }

    .checkout-order {
      &__img {
        img {
          width: 100%;
          height: 100%;
          object-fit: contain;
          object-position: top;
        }
      }
    }

    .donation-cart {
      &__definition {
        display: none;
      }
    }

    &.charity-added {
      .checkout-order {
        &__charity {
          border-bottom: 1px solid $gray;
          padding-bottom: 15px;
        }
      }
    }
  }
}

@include media-breakpoint-up(sm) {
  .charity-new {
    .checkout-order {
      &__img {
        img {
          max-width: 155px;
          max-height: 42px;
          width: 155px;
          height: 42px;
        }

        .image {
          width: 155px;
        }
      }

      &__info-wrap {
        padding-top: 0;
      }

      .price-wrap {
        align-items: center;

        label {
          margin-top: 0;
        }
      }

      .title-wrap {
        max-width: 100%;
        display: flex;
        flex-direction: column;

        .title {
          order: 1;
        }

        .descr {
          order: 2;
        }

        .definition {
          order: 3;
        }
      }
    }

    &.charity-multiple {
      .checkout-order {
        &__img {
          max-width: 184px;

          img {
            max-height: initial;
            max-width: 100%;
          }
        }

        &__info-wrap {
          align-items: flex-start;
        }
      }

      .price-wrap {
        margin-top: 6px;

        .order-item {
          &__remove {
            margin-top: 0;
          }
        }
      }

      .title-wrap {
        .descr {
          margin-bottom: 20px;
        }
      }
    }
  }
}

@include media-breakpoint-up(md) {
  .charity-new {
    .checkout-order {
      &__info-wrap {
        padding-left: 15px;
      }

      .title-wrap {
        max-width: 50%;
      }
    }

    &.charity-multiple {
      .checkout-info-wrap {
        padding-bottom: 20px;
      }

      .donation-cart {
        &__definition {
          display: block;
        }
      }

      .definition.definition,
      & p:last-of-type {
        margin-bottom: 0;
      }
    }

    &.charity-multiple.charity-added {
      .checkout-order {
        .title-wrap {
          max-width: none;
        }

        &__charity {
          display: grid;
          grid-template-columns: 1fr 1fr;

          .definition {
            display: none;
          }
        }
      }

      .title-wrap {
        .descr {
          margin-bottom: 0;
        }
      }
    }
  }
}

@include media-breakpoint-up(lg) {
  .charity-new {
    .checkout-order {
      .title-wrap {
        max-width: 50%;
      }
    }
  }

  .charity {
    &__msg {
      margin-bottom: 0;
      max-width: 50%;
    }
  }
}

@include media-breakpoint-up(xl) {
  .charity-new {
    &.charity-multiple {
      .checkout-order {
        .title-wrap {
          @include make-col(7);
        }

        &__info-wrap {
          @include make-col(5);
        }
      }
    }

    &.charity-multiple.charity-added {
      .checkout-order {
        &__info-wrap {
          max-width: none;
        }

        &__charity {
          grid-template-columns: 7fr 5fr;
        }
      }
    }
  }

  .charity {
    &__msg {
      max-width: 100%;
    }
  }
}
