/* Wishlist Button Styles */
.epragma-wishlist-button {
  order: 3;
  margin-left: 25px;
  width: 30px;
  height: 30px;
  font-size: 0;
  color: transparent;
  cursor: pointer;
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
  background-image: url('/themes/custom/twbase/img/heart.svg');
  transition: all 0.3s ease;
  text-indent: -9999px;
  white-space: nowrap;
  overflow: hidden;

  /* Tablet and up styles */
  @media (min-width: 768px) {
    padding: 0;
    /* position: absolute; */
    display: block;
    top: 15px;
    right: 20px;
  }

  &:hover {
    @media (min-width: 768px) {
      background-image: url('/themes/custom/twbase/img/heart-full.svg');
    }
  }

  &.liked {
    background-image: url('/themes/custom/twbase/img/heart-full.svg');
  }
}

/* Wishlist Form Button Styles */
.commerce-wishlist-default-user-form {
  /* Remove button styling */
  input[name^="remove-"] {
    background-color: #dc2626 !important; /* red-600 */
    color: white !important;
    border-color: #dc2626 !important;

    &:hover {
      background-color: #b91c1c !important; /* red-700 */
      border-color: #b91c1c !important;
    }
  }

  /* Edit details link styling */
  .wishlist-item__details-edit-link {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background-color: #6b7280 !important; /* gray-500 */
    color: white !important;
    text-decoration: none;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;

    &:hover {
      background-color: #4b5563 !important; /* gray-600 */
      color: white !important;
      text-decoration: none;
    }
  }

  /* Add all to cart button */
  input[name="op"][value*="καλάθι"] {
    background-color: #2563eb !important; /* blue-600 */
    color: white !important;
    border-color: #2563eb !important;

    &:hover {
      background-color: #1d4ed8 !important; /* blue-700 */
      border-color: #1d4ed8 !important;
    }
  }

  /* Share button */
  a[id="edit-header-share"] {
    background-color: #059669 !important; /* emerald-600 */
    color: white !important;
    border-color: #059669 !important;

    &:hover {
      background-color: #047857 !important; /* emerald-700 */
      border-color: #047857 !important;
      color: white !important;
    }
  }
}

/* Modal Form Styles - Fallback CSS */
.commerce-wishlist-item-commerce-product-variation-details-form {
  .form-item-quantity {
    display: none !important;
  }

  .form-actions {
    display: none !important;
  }
}

/* Ensure modal dialog button is visible */
.ui-dialog-buttonpane .ui-dialog-buttonset .button {
  display: inline-flex !important;
}

/* Fix sidebar z-index stacking */
.wishlist-sidebar {
  z-index: 40 !important;
}

.wishlist-sidebar__overlay {
  z-index: 39 !important;
}

/* Ensure cart sidebar appears above wishlist sidebar */
.cart-sidebar {
  z-index: 50 !important;
}

.cart-sidebar__overlay {
  z-index: 49 !important;
}
