/* Block: gift-popup
   ========================================================================== */

.gift-popup {
  position: fixed;
  inset: 0;
  z-index: 9999;
}

.gift-popup--hidden {
  display: none;
}

/* Element: gift-popup__overlay
   ========================================================================== */

.gift-popup__overlay {
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: rgba(0, 0, 0, 0.5);
}

/* Element: gift-popup__container
   ========================================================================== */

.gift-popup__container {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 9999;
  width: min(94vw, 800px);
  height: min(92dvh, 46rem);
  max-height: 46rem;
  overflow: auto;
  transform: translate(-50%, -50%);
  background: #fff;
  padding: 1.75rem 2rem 0;
  border-radius: 0;
  font-family: inherit;
}

@media (min-width: 640px) {
  .gift-popup__container {
    height: auto;
    max-height: 92vh;
    padding: 1.75rem 2rem 0;
  }
}

/* Element: gift-popup__close
   ========================================================================== */

.gift-popup__close {
  position: absolute;
  top: 0.75rem;
  right: 0.875rem;
  border: 0;
  background: transparent;
  color: #282929;
  font-size: 2rem;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
}

/* Element: gift-popup__title
   ========================================================================== */

.gift-popup__title {
  max-width: 64rem;
  margin: 0 auto 0;
  font-family: 'Manrope', sans-serif;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.15;
  color: #282929;
  text-align: center;
}

@media (min-width: 1024px) {
  .gift-popup__title {
    font-size: 1.125rem;
  }
}

/* Element: gift-popup__image
   ========================================================================== */

.gift-popup__image {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 153px;
  margin: 1.25rem auto 1rem;
  object-fit: contain;
}

/* Element: gift-popup__message
   ========================================================================== */

.gift-popup__message {
  margin: 0 0 1.125rem;
  padding-top: 1rem;
  border-top: 1px solid #e2e5e7;
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.75rem;
  color: #c1095a;
  text-align: center;
}

@media (min-width: 1024px) {
  .gift-popup__message {
    font-size: 20px;
  }
}

.gift-popup__message--hidden {
  display: none;
}

/* Element: gift-popup__empty
   ========================================================================== */

.gift-popup__empty {
  margin: 0;
  font-size: 0.875rem;
  color: #667;
}

/* Element: gift-popup__list
   ========================================================================== */

.gift-popup__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 1024px) {
  .gift-popup__list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .gift-popup__list--centered {
    grid-template-columns: repeat(var(--gift-popup-card-count), minmax(0, calc((100% - 2.25rem) / 4)));
    justify-content: center;
  }
}

.gift-popup__list--disabled {
  opacity: 0.6;
  pointer-events: none;
}

/* Element: gift-popup__desktop-gifts
   ========================================================================== */

.gift-popup__desktop-gifts {
  display: none;
}

@media (min-width: 640px) {
  .gift-popup__desktop-gifts {
    display: block;
  }
}

/* Element: gift-popup__mobile-picker
   ========================================================================== */

.gift-popup__mobile-picker {
  position: relative;
  display: block;
  width: 100%;
  min-width: 0;
  border: 0;
  border-radius: 0.125rem;
  background: #fff;
}

@media (min-width: 640px) {
  .gift-popup__mobile-picker {
    display: none;
  }
}

.gift-popup__mobile-picker.is-disabled {
  opacity: 0.6;
}

.gift-popup__mobile-picker.is-loading .gift-popup__mobile-toggle {
  cursor: progress;
}

.gift-popup__mobile-picker.is-loading .gift-popup__mobile-arrow {
  width: 1rem;
  height: 1rem;
  border: 2px solid #dfe2e2;
  border-top-color: #c00057;
  border-radius: 999px;
  transform: none;
  animation: yesdesign-gifts-spin 0.75s linear infinite;
}

.gift-popup__mobile-toggle {
  display: none;
  width: 100%;
  height: 3rem;
  min-width: 0;
  align-items: center;
  gap: 0.75rem;
  padding: 0 0.75rem;
  border: 0;
  border-radius: 0.125rem;
  background: #fff;
  color: #282929;
  text-align: left;
  cursor: pointer;
}

.gift-popup__mobile-toggle:disabled {
  cursor: not-allowed;
}

.gift-popup__mobile-thumb {
  display: flex;
  width: 2rem;
  min-width: 2rem;
  max-width: 2rem;
  height: 2rem;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid #dfe2e2;
  border-radius: 0.125rem;
  background: #fff;
  color: #697777;
  line-height: 1;
}

.gift-popup__mobile-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gift-popup__mobile-placeholder {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  color: #697777;
  font-size: 0.875rem;
}

.gift-popup__mobile-label {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  color: #282929;
  font-size: 1rem;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gift-popup__mobile-price {
  flex: 0 0 auto;
  color: #c1095a;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
}

.gift-popup__mobile-price del,
.gift-popup__mobile-option-price del {
  margin-right: 0.5rem;
  color: #a9b2b2;
  font-weight: 400;
}

.gift-popup__mobile-price strong,
.gift-popup__mobile-option-price strong {
  color: #28bcbb;
  font-weight: 700;
  text-transform: uppercase;
}

.gift-popup__mobile-arrow {
  width: 0.625rem;
  height: 0.625rem;
  flex: 0 0 auto;
  border-right: 2px solid #697777;
  border-bottom: 2px solid #697777;
  transform: rotate(45deg) translateY(-2px);
}

.gift-popup__mobile-menu {
  position: static;
  z-index: 2;
  max-height: none;
  overflow: auto;
  border: 0;
  border-radius: 0.125rem;
  background: #fff;
}

.gift-popup__mobile-menu.hidden {
  display: none;
}

.gift-popup__mobile-option {
  display: flex;
  width: 100%;
  min-width: 0;
  align-items: center;
  gap: 0.625rem;
  padding: 0.55rem 0.25rem;
  border: 0;
  border-bottom: 0;
  background: #fff;
  color: #282929;
  text-align: left;
  cursor: pointer;
}

.gift-popup__mobile-option:last-child {
  border-bottom: 0;
}

.gift-popup__mobile-option.is-selected {
  background: #fff;
}

.gift-popup__mobile-option[data-mode="remove"] .gift-popup__mobile-thumb {
  border: 0;
  background: transparent;
}

.gift-popup__mobile-option input.gift-popup__mobile-check[type="checkbox"] {
  -webkit-appearance: none !important;
  appearance: none !important;
  display: block;
  width: 1.125rem;
  height: 1.125rem;
  flex: 0 0 auto;
  margin: 0;
  border: 1px solid #a9b2b2 !important;
  border-radius: 0.125rem;
  background-color: #fff !important;
  background-image: none !important;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 0.75rem 0.75rem;
  box-shadow: none !important;
  pointer-events: none;
}

.gift-popup__mobile-option input.gift-popup__mobile-check[type="checkbox"]:checked {
  border-color: #c1095a !important;
  background-color: #fff !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23c1095a' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M3 8.5l3 3 7-7'/%3E%3C/svg%3E") !important;
}

.gift-popup__mobile-option:disabled,
.gift-popup__mobile-option[aria-disabled="true"] {
  cursor: not-allowed;
}

.gift-popup__mobile-option:disabled img,
.gift-popup__mobile-option[aria-disabled="true"] img {
  opacity: 0.5;
  filter: grayscale(1);
}

.gift-popup__mobile-option-label {
  min-width: 0;
  flex: 1 1 auto;
  color: #282929;
  font-size: 0.875rem;
  line-height: 1.25;
}

.gift-popup__mobile-option-price {
  flex: 0 0 auto;
  color: #c1095a;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
}

/* Element: gift-popup__card
   ========================================================================== */

.gift-popup__card {
  display: flex;
  min-width: 0;
  min-height: 240px;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #dfe2e2;
  background: #fff;
  cursor: pointer;
}

.gift-popup__card--selected {
  border-color: #c1095a;
  box-shadow: 0 0 0 1px #c1095a;
}

.gift-popup__card--disabled {
  cursor: not-allowed;
}

.gift-popup__card--disabled .gift-popup__card-image,
.gift-popup__card--disabled .gift-popup__card-title,
.gift-popup__card--disabled .gift-popup__card-price {
  opacity: 0.7;
}

/* Element: gift-popup__card-image
   ========================================================================== */

.gift-popup__card-image {
  display: flex;
  width: 100%;
  height: 90px;
  align-items: center;
  margin-top: 6px;
  justify-content: center;
  overflow: hidden;
  background: #fff;
}

.gift-popup__card-img {
  display: block;
  width: auto;
  max-width: 100%;
  height: 90px;
  max-height: 100%;
  object-fit: contain;
}

.gift-popup__card--disabled .gift-popup__card-img {
  opacity: 0.5;
  filter: grayscale(1);
}

/* Element: gift-popup__card-title
   ========================================================================== */

.gift-popup__card-title {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  min-height: calc(14px * 1.25 * 3);
  padding: 0 0.75rem;
  font-family: 'Manrope', sans-serif;
  margin-top: 8px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
  color: #282929;
  text-align: center;
}

/* Element: gift-popup__card-price
   ========================================================================== */

.gift-popup__card-price {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 0.375rem;
  padding: 0 0.75rem 0.75rem;
  margin-top: 0.375rem;
  font-weight: 700;
  line-height: 1;
}

.gift-popup__card-price del {
  font-size: 11px;
  color: #a9b2b2;
  font-weight: 400;
}

.gift-popup__card-price strong {
  font-size: 14px;
  line-height: 1;
  color: #28bcbb;
  text-transform: uppercase;
}

/* Element: gift-popup__card-button
   ========================================================================== */

.gift-popup__card-button {
  -webkit-appearance: none;
  appearance: none;
  display: flex;
  box-sizing: border-box;
  width: 100%;
  height: 32px;
  padding: 0;
  align-items: center;
  justify-content: center;
  margin-top: auto;
  margin-bottom: 0;
  border: 0;
  border-radius: 0;
  background: #232529 !important;
  color: #fff !important;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0;
  cursor: pointer;
  transition: background-color 0.2s;
}

.gift-popup__card--selected .gift-popup__card-button {
  background: #c1095a !important;
  color: #fff !important;
}

.gift-popup__card-button:hover {
  background: #000;
}

.gift-popup__card-button--disabled {
  background: #b9bbbd !important;
  color: #fff !important;
  cursor: not-allowed;
}

.gift-popup__card-button--disabled:hover {
  background: #b9bbbd;
}

/* Element: gift-popup__actions
   ========================================================================== */

.gift-popup__actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin: 1.5625rem -2rem 0;
  padding: 1rem 2rem;
  background: #f4f6f6;
}

@media (min-width: 1024px) {
  .gift-popup__actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Element: gift-popup__button
   ========================================================================== */

.gift-popup__button {
  display: inline-flex;
  height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0 1.5rem;
  border: 0;
  border-radius: 0.125rem;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0;
  cursor: pointer;
  transition: background-color 0.2s;
}

.gift-popup__button--secondary {
  border: 1px solid #697777;
  background: #fff !important;
  color: #282929;
}

.gift-popup__button--secondary:hover {
  background: #f4f6f6 !important;
}

.gift-popup__button--primary {
  background: #232529 !important;
}

.gift-popup__button--primary:hover {
  background: #000 !important;
}

/* ==========================================================================
   Cart-specific styles
   ========================================================================== */

body.woocommerce-cart .woocommerce .woocommerce-cart-form table .woocommerce-cart-form__cart-item.yesdesign-gifts-threshold-gift .product-remove,
body.woocommerce-cart .woocommerce .woocommerce-cart-form table .woocommerce-cart-form__cart-item.yesdesign-gifts-threshold-gift-placeholder .product-remove {
  visibility: hidden;
}

body.woocommerce-cart .woocommerce .woocommerce-cart-form table .woocommerce-cart-form__cart-item.yesdesign-gifts-threshold-gift .product-thumbnail,
body.woocommerce-cart .woocommerce .woocommerce-cart-form table .woocommerce-cart-form__cart-item.yesdesign-gifts-threshold-gift-placeholder .product-thumbnail {
  width: 5rem;
  min-width: 5rem;
}

body.woocommerce-cart .woocommerce .woocommerce-cart-form table .woocommerce-cart-form__cart-item.yesdesign-gifts-threshold-gift .product-thumbnail img,
body.woocommerce-cart .woocommerce .woocommerce-cart-form table .woocommerce-cart-form__cart-item.yesdesign-gifts-threshold-gift-placeholder .yesdesign-gifts-placeholder-thumbnail {
  display: block;
  width: 5rem;
  min-width: 5rem;
  max-width: 5rem;
  height: 5rem;
  min-height: 5rem;
  max-height: 5rem;
}

body.woocommerce-cart .woocommerce .woocommerce-cart-form table .woocommerce-cart-form__cart-item.yesdesign-gifts-threshold-gift-placeholder .yesdesign-gifts-placeholder-thumbnail {
  display: flex;
  width: 5rem;
  height: 5rem;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: #687477;
  font-size: 1.25rem;
  line-height: 1;
}

body.woocommerce-cart .woocommerce .woocommerce-cart-form table .woocommerce-cart-form__cart-item.yesdesign-gifts-threshold-gift .product-thumbnail img {
  object-fit: contain;
}

body.woocommerce-cart .woocommerce .woocommerce-cart-form [data-gift-selected-thumb-wrap] {
  width: 2rem;
  min-width: 2rem;
  max-width: 2rem;
  height: 2rem;
  flex: none;
}

body.woocommerce-cart .woocommerce .woocommerce-cart-form [data-gift-selected-thumb-wrap] img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body.woocommerce-cart .woocommerce .woocommerce-cart-form [data-gift-picker] del + strong {
  margin-left: 0.5rem;
}

body.woocommerce-cart .woocommerce .woocommerce-cart-form [data-gift-menu] {
  border-left: 1px solid #dfe2e2;
  border-right: 1px solid #dfe2e2;
}

body.woocommerce-cart .woocommerce .woocommerce-cart-form [data-gift-menu] [data-gift-item].is-selected {
  background: #fff;
}

body.woocommerce-cart .woocommerce .woocommerce-cart-form [data-gift-menu] [data-gift-item] {
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr) auto;
  column-gap: 0.75rem;
  align-items: center;
  text-align: left;
}

body.woocommerce-cart .woocommerce .woocommerce-cart-form .yesdesign-gifts-gift-option-thumb,
body.woocommerce-cart .woocommerce .woocommerce-cart-form .yesdesign-gifts-no-gift-option-thumb {
  width: 2.25rem;
  min-width: 2.25rem;
  max-width: 2.25rem;
  height: 2.25rem;
  min-height: 2.25rem;
  max-height: 2.25rem;
  border: 0;
}

body.woocommerce-cart .woocommerce .woocommerce-cart-form [data-gift-menu] [data-gift-item] img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

body.woocommerce-cart .woocommerce .woocommerce-cart-form .yesdesign-gifts-gift-option-title {
  flex: 1 1 auto;
  min-width: 0;
  text-align: left;
}

body.woocommerce-cart .woocommerce .woocommerce-cart-form .yesdesign-gifts-gift-option-price {
  flex: 0 0 auto;
  text-align: right;
  white-space: nowrap;
}

body.woocommerce-cart .woocommerce .woocommerce-cart-form [data-gift-menu] [data-gift-item] strong {
  color: #28bcbb;
  text-transform: uppercase;
}

body.woocommerce-cart .woocommerce .woocommerce-cart-form [data-gift-picker] .woocommerce-Price-amount.amount,
body.woocommerce-cart .woocommerce .woocommerce-cart-form .yesdesign-gifts-threshold-gift .woocommerce-Price-amount.amount {
  font-size: 11px;
  font-weight: 400;
}

body.woocommerce-cart .woocommerce .woocommerce-cart-form .yesdesign-gifts-missing-message .woocommerce-Price-amount.amount {
  font-size: inherit;
  font-weight: 700;
}

body.woocommerce-cart .woocommerce .woocommerce-cart-form #yesdesign-gifts-cart-wrap {
  margin-top: 10px;
}

body.woocommerce-cart .woocommerce .woocommerce-cart-form [data-gift-toggle] {
  height: 40px;
  min-height: 40px;
  padding-top: 0;
  padding-bottom: 0;
}

body.woocommerce-cart .woocommerce .woocommerce-cart-form [data-gift-selected-label] {
  font-size: 14px;
  line-height: 20px;
}

body.woocommerce-cart .woocommerce .woocommerce-cart-form .yesdesign-gifts-select-arrow {
  margin-left: auto;
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  color: #282929;
  font-size: 15px;
  line-height: 1;
}

body.woocommerce-cart .woocommerce .woocommerce-cart-form [data-gift-picker].is-loading [data-gift-toggle] {
  cursor: progress;
}

body.woocommerce-cart .woocommerce .woocommerce-cart-form [data-gift-picker].is-loading [data-gift-toggle]::after {
  content: "";
  display: block;
  width: 1rem;
  height: 1rem;
  margin-left: 0.75rem;
  border: 2px solid #dfe2e2;
  border-top-color: #c00057;
  border-radius: 999px;
  flex: 0 0 auto;
  animation: yesdesign-gifts-spin 0.75s linear infinite;
}

body.woocommerce-cart .woocommerce .woocommerce-cart-form [data-gift-picker].is-loading [data-gift-toggle] > span:last-child {
  display: none;
}

body.woocommerce-cart .woocommerce .woocommerce-cart-form .yesdesign-gifts-select-placeholder-thumb {
  display: flex;
  width: 2rem;
  min-width: 2rem;
  max-width: 2rem;
  height: 2rem;
  align-items: center;
  justify-content: center;
  border: 1px solid #e2e5e7;
  border-radius: 0.125rem;
  background: #fff;
  line-height: 1;
}

body.woocommerce-cart .woocommerce .woocommerce-cart-form .yesdesign-gifts-no-gift-option-thumb {
  display: inline-flex;
  width: 2.25rem;
  min-width: 2.25rem;
  max-width: 2.25rem;
  height: 2.25rem;
  align-items: center;
  justify-content: center;
  flex: none;
}

body.woocommerce-cart .woocommerce .woocommerce-cart-form .yesdesign-gifts-no-gift-option-icon {
  display: block;
  width: 20px;
  height: 20px;
  color: #a9b2b2;
  font-size: 20px;
  line-height: 1;
}

body.woocommerce-cart .woocommerce .woocommerce-cart-form [data-gift-item][aria-disabled="true"],
body.woocommerce-cart .woocommerce .woocommerce-cart-form [data-gift-item].is-disabled {
  cursor: not-allowed;
  background: #fff;
  color: #aab3ba;
}

body.woocommerce-cart .woocommerce .woocommerce-cart-form [data-gift-picker].is-disabled [data-gift-selected-label],
body.woocommerce-cart .woocommerce .woocommerce-cart-form [data-gift-picker].is-disabled .yesdesign-gifts-select-arrow,
body.woocommerce-cart .woocommerce .woocommerce-cart-form [data-gift-picker].is-disabled [data-gift-item] img,
body.woocommerce-cart .woocommerce .woocommerce-cart-form [data-gift-picker].is-disabled [data-gift-item] .text-sm,
body.woocommerce-cart .woocommerce .woocommerce-cart-form [data-gift-picker].is-disabled [data-gift-item] .woocommerce-Price-amount,
body.woocommerce-cart .woocommerce .woocommerce-cart-form [data-gift-picker].is-disabled [data-gift-item] strong,
body.woocommerce-cart .woocommerce .woocommerce-cart-form [data-gift-picker].is-disabled [data-gift-item] .yesdesign-gifts-no-gift-option-icon {
  opacity: 0.3;
}

body.woocommerce-cart .woocommerce .woocommerce-cart-form [data-gift-item][aria-disabled="true"] img,
body.woocommerce-cart .woocommerce .woocommerce-cart-form [data-gift-item].is-disabled img {
  opacity: 0.5;
  filter: grayscale(1);
}

.gift-popup__no-gift-icon {
  display: inline-flex;
  width: 1.5rem;
  height: 1.5rem;
  align-items: center;
  justify-content: center;
  color: #a9b2b2;
  font-size: 1.5rem;
  line-height: 1;
}

@keyframes yesdesign-gifts-spin {
  to {
    transform: rotate(360deg);
  }
}
