.woocommerce-MyAccount-content {
    display:flex;
    flex-direction: column;
}

.woocommerce-MyAccount-content .select-products {
    order:5;
}

.select-products textarea {
    min-height: auto !important;
}

.woocommerce.select-products {
    margin-top: 30px;
}

.woocommerce.select-products > h2 {
    margin-bottom: initial;
}

body #wc-limit-gifts-form .select2-selection__choice__display {
    padding-left: 20px;
}

body #wc-limit-gifts-form .select2-selection__choice__remove {
    min-height: 100%;
    margin-top: initial;
}

body #wc-limit-gifts-form .out-of-stock {
    background-color: red;
    color: #fff;
    padding: 10px;
    margin-right: -12px;
    margin-left: -8px;
}

#wc-limit-gifts-form .select2-container .select2-search--inline {
    float: initial !important;
}

#wc-limit-gifts-form {
    margin-top: 20px;
}

button.select-gift.selected {
  background-color: #4caf50;
  color: #fff;
}

button.select-gift.error {
  background-color: #f44336;
  color: #fff;
}

.woocommerce-MyAccount-content .price del,
.woocommerce-MyAccount-content .wd-add-btn *:not(.select-gift),
.woocommerce-MyAccount-content .wcpv-sold-by-loop,
.select-gifts-grid .onsale.product-label 
{
    display: none !important;
}

.woocommerce-MyAccount-content .wd-bottom-actions * {
    width: 100% !important;
}

.select-gifts-grid .wd-entities-title a, .select-gifts-grid .product-element-top a{
    pointer-events: none;
    touch-action: none;
}

/* Grey-out + disable unavailable cards, but allow the remove button */
.gift-card.is-unavailable {
  pointer-events: none;
}
.gift-card.is-unavailable img {
  filter: grayscale(1);
}

.gift-card.is-unavailable button {
  pointer-events: auto; /* keep the remove button clickable */
  width:100%;
  background-color: red;
  color: #fff;
}
.gift-card__status {
  font-size: .875rem;
  font-style: italic;
  margin-top: .25rem;
}
.wc-gifts-selected--unavailable {
  margin-bottom: 1.5rem;
}
.wc-gifts-selected--unavailable .gift-list {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 16px;
}
.gift-card {
  border: 1px solid #eee;
  padding: 12px;
  border-radius: 8px;
}

/* Hide stuff for not-limit-gifts accounts */

body:not(.limit-gifts-active) .woocommerce-MyAccount-navigation-link--select-gifts,
body:not(.limit-gifts-active) .select-gifts-link {
    display: none;
}